Use hover for the ugly style combo box as well

This appears to be more consistent with how most combo boxes behave
This commit is contained in:
Simon Hausmann 2021-04-30 15:14:10 +02:00
parent 141c05410e
commit ecaa55832f

View file

@ -507,11 +507,11 @@ export ComboBox := Rectangle {
VerticalLayout {
spacing: 0px;
for value[idx] in root.model: Rectangle {
background: idx == root.current_index ? Palette.highlight_background : Palette.base_background_color;
background: item_area.has_hover ? Palette.highlight_background : Palette.base_background_color;
VerticalLayout { // FIXME: ideally this layout shouldn't be required
Text {
text: value;
TouchArea {
item_area := TouchArea {
width: 100%;
height: 100%;
clicked => {