mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
LibGfx: Remove Gfx::FontDatabase::default_bold_font()
Instead use default_font().bold_variant() in cases where we want a bold variant of the default font. :^)
This commit is contained in:
parent
068ddf4513
commit
6a012ad79f
24 changed files with 33 additions and 46 deletions
|
@ -63,7 +63,7 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Window
|
|||
label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
||||
label.set_fixed_height(14);
|
||||
if (bold)
|
||||
label.set_font(Gfx::FontDatabase::default_bold_font());
|
||||
label.set_font(Gfx::FontDatabase::default_font().bold_variant());
|
||||
};
|
||||
make_label(m_name, true);
|
||||
// If we are displaying a dialog for an application, insert 'SerenityOS' below the application name
|
||||
|
|
|
@ -75,7 +75,7 @@ void Button::paint_event(PaintEvent& event)
|
|||
painter.blit_disabled(icon_location, *m_icon, m_icon->rect(), palette());
|
||||
}
|
||||
}
|
||||
auto& font = is_checked() ? Gfx::FontDatabase::default_bold_font() : this->font();
|
||||
auto& font = is_checked() ? this->font().bold_variant() : this->font();
|
||||
if (m_icon && !text().is_empty()) {
|
||||
content_rect.translate_by(m_icon->width() + icon_spacing(), 0);
|
||||
content_rect.set_width(content_rect.width() - m_icon->width() - icon_spacing());
|
||||
|
|
|
@ -23,7 +23,7 @@ HeaderView::HeaderView(AbstractTableView& table_view, Gfx::Orientation orientati
|
|||
: m_table_view(table_view)
|
||||
, m_orientation(orientation)
|
||||
{
|
||||
set_font(Gfx::FontDatabase::default_bold_font());
|
||||
set_font(Gfx::FontDatabase::default_font().bold_variant());
|
||||
|
||||
if (m_orientation == Gfx::Orientation::Horizontal) {
|
||||
set_fixed_height(16);
|
||||
|
|
|
@ -28,12 +28,12 @@ WizardPage::WizardPage(const String& title_text, const String& subtitle_text)
|
|||
header_widget.set_layout<VerticalBoxLayout>();
|
||||
header_widget.layout()->set_margins({ 30, 15, 30, 0 });
|
||||
m_title_label = header_widget.add<Label>(title_text);
|
||||
m_title_label->set_font(Gfx::FontDatabase::the().default_bold_font());
|
||||
m_title_label->set_fixed_height(Gfx::FontDatabase::the().default_bold_font().glyph_height() + 2);
|
||||
m_title_label->set_font(Gfx::FontDatabase::default_font().bold_variant());
|
||||
m_title_label->set_fixed_height(m_title_label->font().glyph_height() + 2);
|
||||
m_title_label->set_text_alignment(Gfx::TextAlignment::TopLeft);
|
||||
m_subtitle_label = header_widget.add<Label>(subtitle_text);
|
||||
m_subtitle_label->set_text_alignment(Gfx::TextAlignment::TopLeft);
|
||||
m_title_label->set_fixed_height(Gfx::FontDatabase::the().default_font().glyph_height());
|
||||
m_subtitle_label->set_fixed_height(m_subtitle_label->font().glyph_height());
|
||||
header_widget.layout()->add_spacer();
|
||||
|
||||
auto& separator = add<SeparatorWidget>(Gfx::Orientation::Horizontal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue