From ca90a2029d36e118cf7e9fbc0bdf4eb08b1bde13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ara=C3=BAjo?= Date: Tue, 23 Mar 2021 16:59:18 +0000 Subject: [PATCH] Everywhere: Change font properties to be described in GML --- Userland/Applications/Calculator/CalculatorWidget.cpp | 1 - Userland/Applications/Calculator/CalculatorWindow.gml | 1 + Userland/Applications/Serendipity/SerendipityWidget.cpp | 4 ---- Userland/Applications/Serendipity/SerendipityWindow.gml | 3 +++ Userland/Applications/Spreadsheet/CellTypeDialog.cpp | 1 - Userland/Applications/Spreadsheet/CondView.gml | 1 + Userland/Demos/WidgetGallery/GalleryGML/CursorsTab.gml | 1 + Userland/Demos/WidgetGallery/GalleryGML/IconsTab.gml | 1 + Userland/Demos/WidgetGallery/GalleryWidget.cpp | 2 -- 9 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Userland/Applications/Calculator/CalculatorWidget.cpp b/Userland/Applications/Calculator/CalculatorWidget.cpp index f2ae66413aa..24e1305770e 100644 --- a/Userland/Applications/Calculator/CalculatorWidget.cpp +++ b/Userland/Applications/Calculator/CalculatorWidget.cpp @@ -42,7 +42,6 @@ CalculatorWidget::CalculatorWidget() m_entry = *find_descendant_of_type_named("entry_textbox"); m_entry->set_relative_rect(5, 5, 244, 26); m_entry->set_text_alignment(Gfx::TextAlignment::CenterRight); - m_entry->set_font(Gfx::FontDatabase::default_fixed_width_font()); m_label = *find_descendant_of_type_named("label"); diff --git a/Userland/Applications/Calculator/CalculatorWindow.gml b/Userland/Applications/Calculator/CalculatorWindow.gml index ef5a4051e38..606e988f5a5 100644 --- a/Userland/Applications/Calculator/CalculatorWindow.gml +++ b/Userland/Applications/Calculator/CalculatorWindow.gml @@ -9,6 +9,7 @@ @GUI::TextBox { name: "entry_textbox" + font_type: "FixedWidth" } @GUI::Widget { diff --git a/Userland/Applications/Serendipity/SerendipityWidget.cpp b/Userland/Applications/Serendipity/SerendipityWidget.cpp index f101a538777..cd722184d46 100644 --- a/Userland/Applications/Serendipity/SerendipityWidget.cpp +++ b/Userland/Applications/Serendipity/SerendipityWidget.cpp @@ -56,13 +56,9 @@ SerendipityWidget::SerendipityWidget() auto& light_bulb_label = *find_descendant_of_type_named("light_bulb_label"); light_bulb_label.set_icon(Gfx::Bitmap::load_from_file("/res/icons/32x32/app-serendipity.png")); - auto& did_you_know_label = *find_descendant_of_type_named("did_you_know_label"); - did_you_know_label.set_font(Gfx::BitmapFont::load_from_file("/res/fonts/KaticaBold12.font")); - m_web_view = *find_descendant_of_type_named("web_view"); m_tip_label = *find_descendant_of_type_named("tip_label"); - m_tip_label->set_font(Gfx::BitmapFont::load_from_file("/res/fonts/KaticaRegular12.font")); m_next_button = *find_descendant_of_type_named("next_button"); m_next_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-forward.png")); diff --git a/Userland/Applications/Serendipity/SerendipityWindow.gml b/Userland/Applications/Serendipity/SerendipityWindow.gml index 249fa087915..4f6b167768a 100644 --- a/Userland/Applications/Serendipity/SerendipityWindow.gml +++ b/Userland/Applications/Serendipity/SerendipityWindow.gml @@ -50,12 +50,15 @@ name: "did_you_know_label" text: "Did you know..." text_alignment: "CenterLeft" + font_size: 12 + font_weight: "Bold" } @GUI::Label { name: "tip_label" text_alignment: "TopLeft" word_wrap: true + font_size: 12 } } } diff --git a/Userland/Applications/Spreadsheet/CellTypeDialog.cpp b/Userland/Applications/Spreadsheet/CellTypeDialog.cpp index 9b71a170161..ba4cefa425c 100644 --- a/Userland/Applications/Spreadsheet/CellTypeDialog.cpp +++ b/Userland/Applications/Spreadsheet/CellTypeDialog.cpp @@ -427,7 +427,6 @@ ConditionView::ConditionView(ConditionalFormat& fmt) formula_editor.set_syntax_highlighter(make()); formula_editor.set_should_hide_unnecessary_scrollbars(true); - formula_editor.set_font(&Gfx::FontDatabase::default_fixed_width_font()); formula_editor.on_change = [&] { m_format.condition = formula_editor.text(); }; diff --git a/Userland/Applications/Spreadsheet/CondView.gml b/Userland/Applications/Spreadsheet/CondView.gml index c896c4865bd..a17e15d14b3 100644 --- a/Userland/Applications/Spreadsheet/CondView.gml +++ b/Userland/Applications/Spreadsheet/CondView.gml @@ -15,6 +15,7 @@ name: "formula_editor" fixed_height: 25 tooltip: "Use 'value' to refer to the current cell's value" + font_type: "FixedWidth" } } diff --git a/Userland/Demos/WidgetGallery/GalleryGML/CursorsTab.gml b/Userland/Demos/WidgetGallery/GalleryGML/CursorsTab.gml index e610f819b89..965414eb105 100644 --- a/Userland/Demos/WidgetGallery/GalleryGML/CursorsTab.gml +++ b/Userland/Demos/WidgetGallery/GalleryGML/CursorsTab.gml @@ -11,6 +11,7 @@ @GUI::TableView { name: "cursors_tableview" + font_size: 12 } } } diff --git a/Userland/Demos/WidgetGallery/GalleryGML/IconsTab.gml b/Userland/Demos/WidgetGallery/GalleryGML/IconsTab.gml index d6d1533759c..8a3496c7991 100644 --- a/Userland/Demos/WidgetGallery/GalleryGML/IconsTab.gml +++ b/Userland/Demos/WidgetGallery/GalleryGML/IconsTab.gml @@ -11,6 +11,7 @@ @GUI::TableView { name: "icons_tableview" + font_size: 12 } } } diff --git a/Userland/Demos/WidgetGallery/GalleryWidget.cpp b/Userland/Demos/WidgetGallery/GalleryWidget.cpp index 3add7b662c8..1263106ee2f 100644 --- a/Userland/Demos/WidgetGallery/GalleryWidget.cpp +++ b/Userland/Demos/WidgetGallery/GalleryWidget.cpp @@ -306,7 +306,6 @@ GalleryWidget::GalleryWidget() m_cursors_tableview->set_alternating_row_colors(false); m_cursors_tableview->set_vertical_padding(16); m_cursors_tableview->set_column_headers_visible(false); - m_cursors_tableview->set_font(Gfx::BitmapFont::load_from_file("/res/fonts/KaticaRegular12.font")); m_cursors_tableview->set_highlight_key_column(false); auto sorting_proxy_model = GUI::SortingProxyModel::create(MouseCursorModel::create()); @@ -380,7 +379,6 @@ GalleryWidget::GalleryWidget() m_icons_tableview->set_alternating_row_colors(false); m_icons_tableview->set_vertical_padding(24); m_icons_tableview->set_column_headers_visible(false); - m_icons_tableview->set_font(Gfx::BitmapFont::load_from_file("/res/fonts/KaticaRegular12.font")); m_icons_tableview->set_highlight_key_column(false); auto sorting_proxy_icons_model = GUI::SortingProxyModel::create(FileIconsModel::create());