Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: animation tweak #384

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions qt6/src/qml/ListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ ListView {
bgVisible = (background.x <= 0 && background.y <= 0) ? false : hoveredItem.hovered
background.x = hoveredItem.x - contentX
background.y = hoveredItem.y - contentY
background.width = hoveredItem.implicitWidth
background.height = hoveredItem.implicitHeight
background.width = hoveredItem.background.width
background.height = hoveredItem.background.height
bgVisible = hoveredItem.hovered
control.state = bgVisible ? "Visible" : "Invisible"
} else {
Expand Down Expand Up @@ -151,8 +151,8 @@ ListView {

Item {
id: background
implicitWidth: DS.Style.itemDelegate.width
implicitHeight: DS.Style.itemDelegate.height
implicitWidth: hoveredItem ? hoveredItem.background.width : DS.Style.itemDelegate.width
implicitHeight: hoveredItem ? hoveredItem.background.height : DS.Style.itemDelegate.height
z: -1

Loader {
Expand All @@ -163,6 +163,8 @@ ListView {
enableAnimation: false // avoid hover animation
outsideBorderColor: null
insideBorderColor: null
innerShadowColor1: null
innerShadowColor2: null
visible: hoveredItem && !hoveredItem.checked && hoveredItem.enabled
color1: D.Palette {
normal {
Expand Down
2 changes: 1 addition & 1 deletion qt6/src/qml/Switch.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ T.Switch {

Timer {
id: toggletimer
interval: 300
interval: 500
onTriggered: {
control.toggle()
}
Expand Down
Loading