color animatinos

This commit is contained in:
Benjamin Palko 2025-09-15 16:16:35 -04:00
parent 1a8a14bf53
commit ad3a275c21

View file

@ -26,11 +26,21 @@ ComboBox {
contentItem: StyledText { contentItem: StyledText {
text: delegate.model[control.textRole] text: delegate.model[control.textRole]
color: delegate.highlighted ? palette.highlightedText : palette.buttonText color: delegate.highlighted ? palette.highlightedText : palette.buttonText
Behavior on color {
ColorAnimation {
duration: Styling.animations.speed.fast
}
}
elide: Text.ElideRight elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
background: Rectangle { background: Rectangle {
color: delegate.highlighted ? palette.highlight : palette.button color: delegate.highlighted ? palette.highlight : palette.button
Behavior on color {
ColorAnimation {
duration: Styling.animations.speed.fast
}
}
radius: Styling.theme.radiusSelector radius: Styling.theme.radiusSelector
} }
highlighted: control.highlightedIndex === index highlighted: control.highlightedIndex === index
@ -41,6 +51,11 @@ ComboBox {
text: control.displayText text: control.displayText
color: control.hovered || control.down ? palette.highlightedText : palette.buttonText color: control.hovered || control.down ? palette.highlightedText : palette.buttonText
Behavior on color {
ColorAnimation {
duration: Styling.animations.speed.fast
}
}
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight elide: Text.ElideRight
} }
@ -49,6 +64,11 @@ ComboBox {
implicitWidth: 120 implicitWidth: 120
implicitHeight: 40 implicitHeight: 40
color: control.hovered || control.down ? palette.highlight : palette.button color: control.hovered || control.down ? palette.highlight : palette.button
Behavior on color {
ColorAnimation {
duration: Styling.animations.speed.fast
}
}
border.color: Styling.theme.base100 border.color: Styling.theme.base100
border.width: control.visualFocus ? 2 : 1 border.width: control.visualFocus ? 2 : 1
radius: Styling.theme.radiusSelector radius: Styling.theme.radiusSelector
@ -72,6 +92,11 @@ ComboBox {
background: Rectangle { background: Rectangle {
color: palette.window color: palette.window
Behavior on color {
ColorAnimation {
duration: Styling.animations.speed.fast
}
}
bottomLeftRadius: Styling.theme.radiusField bottomLeftRadius: Styling.theme.radiusField
bottomRightRadius: Styling.theme.radiusField bottomRightRadius: Styling.theme.radiusField
} }