Everywhere: Change font properties to be described in GML

This commit is contained in:
Edgar Araújo 2021-03-23 16:59:18 +00:00 committed by Andreas Kling
parent 532e0090fc
commit ca90a2029d
Notes: sideshowbarker 2024-07-18 20:58:52 +09:00
9 changed files with 7 additions and 8 deletions

View file

@ -42,7 +42,6 @@ CalculatorWidget::CalculatorWidget()
m_entry = *find_descendant_of_type_named<GUI::TextBox>("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<GUI::Label>("label");

View file

@ -9,6 +9,7 @@
@GUI::TextBox {
name: "entry_textbox"
font_type: "FixedWidth"
}
@GUI::Widget {

View file

@ -56,13 +56,9 @@ SerendipityWidget::SerendipityWidget()
auto& light_bulb_label = *find_descendant_of_type_named<GUI::Label>("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<GUI::Label>("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::OutOfProcessWebView>("web_view");
m_tip_label = *find_descendant_of_type_named<GUI::Label>("tip_label");
m_tip_label->set_font(Gfx::BitmapFont::load_from_file("/res/fonts/KaticaRegular12.font"));
m_next_button = *find_descendant_of_type_named<GUI::Button>("next_button");
m_next_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-forward.png"));

View file

@ -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
}
}
}

View file

@ -427,7 +427,6 @@ ConditionView::ConditionView(ConditionalFormat& fmt)
formula_editor.set_syntax_highlighter(make<JS::SyntaxHighlighter>());
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();
};

View file

@ -15,6 +15,7 @@
name: "formula_editor"
fixed_height: 25
tooltip: "Use 'value' to refer to the current cell's value"
font_type: "FixedWidth"
}
}

View file

@ -11,6 +11,7 @@
@GUI::TableView {
name: "cursors_tableview"
font_size: 12
}
}
}

View file

@ -11,6 +11,7 @@
@GUI::TableView {
name: "icons_tableview"
font_size: 12
}
}
}

View file

@ -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());