From f757474ee1cb81e549977a03578c41e4e163de1c Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 17 Feb 2021 16:52:20 +0100 Subject: [PATCH] Fix the look of the push button For some reason the tex tis not propertly ventered vertically Maybe a bug in the layout? --- examples/printerdemo/ui/common.60 | 8 ++++++-- examples/printerdemo/ui/copy_page.60 | 3 --- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/printerdemo/ui/common.60 b/examples/printerdemo/ui/common.60 index c62eb3a24..ead60f329 100644 --- a/examples/printerdemo/ui/common.60 +++ b/examples/printerdemo/ui/common.60 @@ -220,9 +220,12 @@ export PushButton := Rectangle { border-radius: 13.5px; 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 { + padding-top: 5px; + padding-bottom: 5px; padding-left: parent.border_radius; padding-right: parent.border_radius; @@ -230,7 +233,7 @@ export PushButton := Rectangle { horizontal-stretch: 0; colorize: DemoPalette.push_button_text_color; image-fit: contain; - width: height; + width: height * 1.333; } label := DemoText { @@ -238,6 +241,7 @@ export PushButton := Rectangle { font-weight: 900; color: DemoPalette.push_button_text_color; horizontal-alignment: center; + vertical-alignment: center; } } } diff --git a/examples/printerdemo/ui/copy_page.60 b/examples/printerdemo/ui/copy_page.60 index f483c1792..f9ef742f7 100644 --- a/examples/printerdemo/ui/copy_page.60 +++ b/examples/printerdemo/ui/copy_page.60 @@ -67,9 +67,6 @@ export CopyPage := Page { } } Row { - Rectangle { - colspan: 3; - } HorizontalLayout { col: 3; colspan: 2;