mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 06:41:14 +00:00
Fix C++ build
Rename the default color member to base.
This commit is contained in:
parent
4128edb92f
commit
ee6deaf82c
1 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,7 @@
|
||||||
LICENSE END */
|
LICENSE END */
|
||||||
|
|
||||||
struct ButtonColors := {
|
struct ButtonColors := {
|
||||||
default: color,
|
base: color,
|
||||||
pressed: color,
|
pressed: color,
|
||||||
hovered: color,
|
hovered: color,
|
||||||
}
|
}
|
||||||
|
@ -40,13 +40,13 @@ export global DemoPalette := {
|
||||||
property <color> control_foreground: night_mode ? white : #122F7B; // FIXME: the night mode color was not part of the design
|
property <color> control_foreground: night_mode ? white : #122F7B; // FIXME: the night mode color was not part of the design
|
||||||
|
|
||||||
property <ButtonColors> primary_push_button_colors: {
|
property <ButtonColors> primary_push_button_colors: {
|
||||||
default: #6284FF,
|
base: #6284FF,
|
||||||
pressed: #0031e0,
|
pressed: #0031e0,
|
||||||
hovered: #1a4bff,
|
hovered: #1a4bff,
|
||||||
};
|
};
|
||||||
|
|
||||||
property <ButtonColors> secondary_push_button_colors: {
|
property <ButtonColors> secondary_push_button_colors: {
|
||||||
default: #FFBF63,
|
base: #FFBF63,
|
||||||
pressed: #eb8a00,
|
pressed: #eb8a00,
|
||||||
hovered: #ffa729,
|
hovered: #ffa729,
|
||||||
};
|
};
|
||||||
|
@ -237,7 +237,7 @@ export PushButton := Rectangle {
|
||||||
|
|
||||||
border-radius: 13.5px;
|
border-radius: 13.5px;
|
||||||
|
|
||||||
background: pressed ? colors.pressed : (touch_area.has_hover ? colors.hovered : colors.default);
|
background: pressed ? colors.pressed : (touch_area.has_hover ? colors.hovered : colors.base);
|
||||||
|
|
||||||
height: 27px; // line-height in the design
|
height: 27px; // line-height in the design
|
||||||
horizontal-stretch: 1;
|
horizontal-stretch: 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue