Fix the look of the push button

For some reason the tex tis not propertly ventered vertically
Maybe a bug in the layout?
This commit is contained in:
Olivier Goffart 2021-02-17 16:52:20 +01:00
parent 33c0ff734a
commit f757474ee1
2 changed files with 6 additions and 5 deletions

View file

@ -220,9 +220,12 @@ export PushButton := Rectangle {
border-radius: 13.5px; border-radius: 13.5px;
background: primary ? DemoPalette.primary_push_button_color : DemoPalette.secondary_push_button_color; background: primary ? DemoPalette.primary_push_button_color : DemoPalette.secondary_push_button_color;
height: 23px; // line-height in the design height: 27px; // line-height in the design
horizontal-stretch: 1;
HorizontalLayout { HorizontalLayout {
padding-top: 5px;
padding-bottom: 5px;
padding-left: parent.border_radius; padding-left: parent.border_radius;
padding-right: parent.border_radius; padding-right: parent.border_radius;
@ -230,7 +233,7 @@ export PushButton := Rectangle {
horizontal-stretch: 0; horizontal-stretch: 0;
colorize: DemoPalette.push_button_text_color; colorize: DemoPalette.push_button_text_color;
image-fit: contain; image-fit: contain;
width: height; width: height * 1.333;
} }
label := DemoText { label := DemoText {
@ -238,6 +241,7 @@ export PushButton := Rectangle {
font-weight: 900; font-weight: 900;
color: DemoPalette.push_button_text_color; color: DemoPalette.push_button_text_color;
horizontal-alignment: center; horizontal-alignment: center;
vertical-alignment: center;
} }
} }
} }

View file

@ -67,9 +67,6 @@ export CopyPage := Page {
} }
} }
Row { Row {
Rectangle {
colspan: 3;
}
HorizontalLayout { HorizontalLayout {
col: 3; col: 3;
colspan: 2; colspan: 2;