mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:37:35 +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
|
@ -58,13 +58,13 @@ void ClassicWindowTheme::paint_normal_frame(Painter& painter, WindowState window
|
|||
frame_rect.set_location({ 0, 0 });
|
||||
Gfx::StylePainter::paint_window_frame(painter, frame_rect, palette);
|
||||
|
||||
auto& title_font = FontDatabase::default_bold_font();
|
||||
auto& title_font = FontDatabase::default_font().bold_variant();
|
||||
|
||||
auto titlebar_rect = this->titlebar_rect(WindowType::Normal, window_rect, palette);
|
||||
auto titlebar_icon_rect = this->titlebar_icon_rect(WindowType::Normal, window_rect, palette);
|
||||
auto titlebar_inner_rect = titlebar_text_rect(WindowType::Normal, window_rect, palette);
|
||||
auto titlebar_title_rect = titlebar_inner_rect;
|
||||
titlebar_title_rect.set_width(FontDatabase::default_bold_font().width(window_title));
|
||||
titlebar_title_rect.set_width(title_font.width(window_title));
|
||||
|
||||
auto [title_color, border_color, border_color2, stripes_color, shadow_color] = compute_frame_colors(window_state, palette);
|
||||
|
||||
|
@ -100,12 +100,12 @@ void ClassicWindowTheme::paint_tool_window_frame(Painter& painter, WindowState w
|
|||
frame_rect.set_location({ 0, 0 });
|
||||
Gfx::StylePainter::paint_window_frame(painter, frame_rect, palette);
|
||||
|
||||
auto& title_font = FontDatabase::default_bold_font();
|
||||
auto& title_font = FontDatabase::default_font().bold_variant();
|
||||
|
||||
auto titlebar_rect = this->titlebar_rect(WindowType::ToolWindow, window_rect, palette);
|
||||
auto titlebar_inner_rect = titlebar_text_rect(WindowType::ToolWindow, window_rect, palette);
|
||||
auto titlebar_title_rect = titlebar_inner_rect;
|
||||
titlebar_title_rect.set_width(FontDatabase::default_bold_font().width(title_text));
|
||||
titlebar_title_rect.set_width(title_font.width(title_text));
|
||||
|
||||
auto [title_color, border_color, border_color2, stripes_color, shadow_color] = compute_frame_colors(window_state, palette);
|
||||
|
||||
|
@ -134,7 +134,7 @@ IntRect ClassicWindowTheme::menubar_rect(WindowType window_type, const IntRect&
|
|||
|
||||
IntRect ClassicWindowTheme::titlebar_rect(WindowType window_type, const IntRect& window_rect, const Palette& palette) const
|
||||
{
|
||||
auto& title_font = FontDatabase::default_bold_font();
|
||||
auto& title_font = FontDatabase::default_font().bold_variant();
|
||||
auto window_titlebar_height = titlebar_height(window_type, palette);
|
||||
// FIXME: The top of the titlebar doesn't get redrawn properly if this padding is different
|
||||
int total_vertical_padding = title_font.glyph_height() - 1;
|
||||
|
@ -235,7 +235,7 @@ Vector<IntRect> ClassicWindowTheme::layout_buttons(WindowType window_type, const
|
|||
|
||||
int ClassicWindowTheme::titlebar_height(WindowType window_type, const Palette& palette) const
|
||||
{
|
||||
auto& title_font = FontDatabase::default_bold_font();
|
||||
auto& title_font = FontDatabase::default_font().bold_variant();
|
||||
switch (window_type) {
|
||||
case WindowType::Normal:
|
||||
case WindowType::Notification:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue