From 727ab2ee9d005fbb6ee64a930a8b79c74b40d092 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 24 Nov 2020 22:02:16 +0100 Subject: [PATCH] Minor tweak to the ugly style Don't use the shiny blue when pressing items - it's seemingly pretty but it won't go well with a color change on hover. --- sixtyfps_compiler/widgets/ugly/sixtyfps_widgets.60 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sixtyfps_compiler/widgets/ugly/sixtyfps_widgets.60 b/sixtyfps_compiler/widgets/ugly/sixtyfps_widgets.60 index ae65ed9b7..27fc4a050 100644 --- a/sixtyfps_compiler/widgets/ugly/sixtyfps_widgets.60 +++ b/sixtyfps_compiler/widgets/ugly/sixtyfps_widgets.60 @@ -14,6 +14,7 @@ global Palette := { property text_color_disabled: lightgray; property text_color_secondary: #111; property button_background: #aaa; + property button_pressed: #9c9c9c; property highlight_background: #2b60ae; property placeholder_text: #ccc; property border_color: #d0d3cf; @@ -36,7 +37,7 @@ export Button := Rectangle { border_width: 1px; border_radius: 2px; border_color: Palette.text_color; - color: self.pressed ? Palette.highlight_background : Palette.button_background; + color: self.pressed ? Palette.button_pressed : Palette.button_background; animate color { duration: 100ms; } horizontal-stretch: 0; vertical-stretch: 0; @@ -130,7 +131,7 @@ SpinBoxButton := Rectangle { border_width: 1px; border_radius: 2px; border_color: black; - color: touch.pressed ? Palette.highlight_background : Palette.button_background; + color: touch.pressed ? Palette.button_pressed : Palette.button_background; animate color { duration: 100ms; } touch := TouchArea { width: parent.width; @@ -236,7 +237,7 @@ export Slider := Rectangle { border_width: 1px; border_radius: 3px; border_color: black; - color: touch_area.pressed ? Palette.button_background : white; + color: touch_area.pressed ? Palette.button_pressed : white; animate color { duration: 100ms; } x: (root.width - handle.width) * (new_value - min)/(max - min); property new_value_tmp : touch_area.pressed @@ -343,7 +344,7 @@ ScrollBar := Rectangle { height: horizontal ? parent.height : max <= 0phx ? 0phx : parent.height * (page_size / (max + page_size)); border_radius: self.width / 2; - color: touch_area.pressed ? Palette.highlight_background : Palette.button_background; + color: touch_area.pressed ? Palette.button_pressed : Palette.button_background; animate color { duration: 100ms; } x: !horizontal ? 0phx : (root.width - handle.width) * (new_value / max); y: horizontal ? 0phx : (root.height - handle.height) * (new_value / max); @@ -443,7 +444,7 @@ export ComboBox := Rectangle { border_width: 1px; border_radius: 2px; border_color: Palette.text_color; - color: touch_area.pressed ? Palette.highlight_background : Palette.button_background; + color: touch_area.pressed ? Palette.button_pressed : Palette.button_background; animate color { duration: 100ms; } horizontal-stretch: 0; vertical-stretch: 0;