mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
Userland: Use Font::pixel_size_rounded_up() instead of glyph_height()
The only remaining clients of this API are specific to bitmap fonts and editing thereof.
This commit is contained in:
parent
93c9344e35
commit
b71c7a6e44
32 changed files with 63 additions and 65 deletions
|
@ -321,7 +321,7 @@ void TabWidget::paint_event(PaintEvent& event)
|
|||
painter.draw_text(tab_button_content_rect, m_tabs[i].title, m_text_alignment, palette().button_text(), Gfx::TextElision::Right);
|
||||
|
||||
if (is_focused()) {
|
||||
Gfx::IntRect focus_rect { 0, 0, min(tab_button_content_rect.width(), font().width(m_tabs[i].title)), font().glyph_height() };
|
||||
Gfx::IntRect focus_rect { 0, 0, min(tab_button_content_rect.width(), font().width(m_tabs[i].title)), font().pixel_size_rounded_up() };
|
||||
focus_rect.align_within(tab_button_content_rect, m_text_alignment);
|
||||
focus_rect.inflate(6, 4);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue