Try to unify font sizes in the global settings

This also fixes the size of the document title in the printing queue
This commit is contained in:
Simon Hausmann 2021-02-16 18:16:03 +01:00 committed by Olivier Goffart
parent bf837a7999
commit eb09848e97
2 changed files with 20 additions and 9 deletions

View file

@ -37,6 +37,9 @@ export global DemoPalette := {
property <color> secondary_push_button_color: #FFBF63; // red in the "green" theme
property <color> push_button_text_color: white;
property <logical_length> base_font_size: 16px;
property <logical_length> label_base_font_size: 15.6px; // FIXME: Check if this shouldn't be 16 instead
property <bool> night_mode: false;
}
@ -55,7 +58,7 @@ export Page := Rectangle {
alignment: start;
if (has_back_button) : Text {
font-weight: 900;
font-size: 32px;
font-size: h.font-size;
text: "< ";
color: DemoPalette.control_secoundary;
TouchArea { clicked => { back() } }
@ -63,7 +66,7 @@ export Page := Rectangle {
h := Text {
font-weight: 900;
font-size: 32px;
font-size: DemoPalette.base_font_size * 2;
color: DemoPalette.text_foreground_color;
}
}
@ -80,7 +83,7 @@ export struct PrinterQueueItem := {
export Label := Text {
color: DemoPalette.text_foreground_color;
font-size: 15.6px;
font-size: DemoPalette.label_base_font_size;
vertical-alignment: center;
font-weight: 700;
}
@ -103,7 +106,7 @@ SpinBoxButton := Rectangle {
vertical-alignment: center;
horizontal-alignment: center;
text <=> root.text;
font-size: 32px;
font-size: 2 * DemoPalette.base_font_size;
color: DemoPalette.control_secoundary;
}
}
@ -137,7 +140,7 @@ export SpinBox := Rectangle {
vertical-alignment: center;
horizontal-alignment: center;
text: value;
font-size: 15.6px;
font-size: DemoPalette.label_base_font_size;
color: DemoPalette.control_foreground;
}
}
@ -166,7 +169,7 @@ export ComboBox := Rectangle {
vertical-alignment: center;
horizontal-alignment: left;
text <=> root.value;
font-size: 15.6px;
font-size: DemoPalette.label_base_font_size;
color: DemoPalette.control_foreground;
}
Text {
@ -197,7 +200,7 @@ export PushButton := Rectangle {
}
label := Text {
font-size: 15.6px;
font-size: DemoPalette.label_base_font_size;
font-weight: 900;
color: DemoPalette.push_button_text_color;
}

View file

@ -35,7 +35,7 @@ ActionButton := Rectangle {
}
label := Text {
font-size: 22px;
font-size: DemoPalette.base_font_size * 1.375;
font-weight: 800;
horizontal-alignment: center;
color: DemoPalette.text_foreground_color;
@ -48,6 +48,7 @@ ActionButton := Rectangle {
PrintQueueDetailsLabel := Text {
font-weight: 500;
color: DemoPalette.control_foreground;
font-size: DemoPalette.base_font_size;
}
PrintQueueSeparator := Rectangle {
@ -71,14 +72,17 @@ PrintQueueElement := Rectangle {
spacing: 4px;
Text {
// TODO: letter-spacing: 1.56px and text-transform: uppercase
text: queue_item.status;
color: DemoPalette.status_label_text_color;
font-size: DemoPalette.base_font_size * 0.75;
}
Text {
text: queue_item.title;
overflow: elide;
font-weight: 800;
font-size: DemoPalette.base_font_size * 1.125;
}
if (expanded) : GridLayout {
@ -92,6 +96,7 @@ PrintQueueElement := Rectangle {
Text {
text: queue_item.owner;
color: DemoPalette.secondary_foreground_color;
font-size: DemoPalette.base_font_size;
}
}
Row {
@ -106,6 +111,7 @@ PrintQueueElement := Rectangle {
Text {
text: queue_item.pages;
color: DemoPalette.secondary_foreground_color;
font-size: DemoPalette.base_font_size;
}
}
Row {
@ -120,6 +126,7 @@ PrintQueueElement := Rectangle {
Text {
text: queue_item.pages;
color: DemoPalette.secondary_foreground_color;
font-size: DemoPalette.base_font_size;
}
}
Row {
@ -134,6 +141,7 @@ PrintQueueElement := Rectangle {
Text {
text: queue_item.submission_date;
color: DemoPalette.secondary_foreground_color;
font-size: DemoPalette.base_font_size;
}
}
}
@ -165,7 +173,7 @@ PrinterQueue := Rectangle {
Text {
text: "Printing-Queue";
color: DemoPalette.text_foreground_color;
font-size: 24px;
font-size: DemoPalette.base_font_size * 1.5;
font-weight: 700;
}