mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibGUI: Use matching family fonts for TextEditor ruler
Fixes incorrect glyph sizes when drawing bold line counts.
This commit is contained in:
parent
126a03f087
commit
bc27aa9b6f
Notes:
sideshowbarker
2024-07-19 03:32:25 +09:00
Author: https://github.com/thankyouverycool
Commit: bc27aa9b6f
Pull-request: https://github.com/SerenityOS/serenity/pull/3175
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -412,7 +412,7 @@ void TextEditor::paint_event(PaintEvent& event)
|
|||
painter.draw_text(
|
||||
ruler_line_rect.shrunken(2, 0).translated(0, m_line_spacing / 2),
|
||||
String::number(i + 1),
|
||||
is_current_line ? Gfx::Font::default_bold_font() : font(),
|
||||
is_current_line && font().has_boldface() ? font().bold_family_font() : font(),
|
||||
Gfx::TextAlignment::TopRight,
|
||||
is_current_line ? palette().ruler_active_text() : palette().ruler_inactive_text());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue