From ecaa55832fa69804dd946df0a192dbaaf73dd951 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 30 Apr 2021 15:14:10 +0200 Subject: [PATCH] Use hover for the ugly style combo box as well This appears to be more consistent with how most combo boxes behave --- sixtyfps_compiler/widgets/ugly/sixtyfps_widgets.60 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sixtyfps_compiler/widgets/ugly/sixtyfps_widgets.60 b/sixtyfps_compiler/widgets/ugly/sixtyfps_widgets.60 index c3ae97fe9..d7946802a 100644 --- a/sixtyfps_compiler/widgets/ugly/sixtyfps_widgets.60 +++ b/sixtyfps_compiler/widgets/ugly/sixtyfps_widgets.60 @@ -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 => {