mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
LibGfx+Userland: Add width_rounded_up() helper
This commit is contained in:
parent
c9404c3a63
commit
55423b4ed0
21 changed files with 34 additions and 19 deletions
|
@ -81,7 +81,7 @@ void LinkLabel::paint_event(PaintEvent& event)
|
|||
GUI::Painter painter(*this);
|
||||
|
||||
if (m_hovered)
|
||||
painter.draw_line({ 0, rect().bottom() }, { static_cast<int>(ceilf(font().width(text()))), rect().bottom() }, palette().link());
|
||||
painter.draw_line({ 0, rect().bottom() }, { font().width_rounded_up(text()), rect().bottom() }, palette().link());
|
||||
|
||||
if (is_focused())
|
||||
painter.draw_focus_rect(text_rect(), palette().focus_outline());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue