1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:27:35 +00:00

LibGUI: Remove usages of deprecated implicit conversions

This commit is contained in:
FrHun 2022-06-12 23:17:42 +02:00 committed by Sam Atkins
parent 8dd08d47f1
commit 603034759f
5 changed files with 13 additions and 12 deletions

View file

@ -27,7 +27,7 @@ public:
void set_tooltip(String const& tooltip)
{
m_label->set_text(Gfx::parse_ampersand_string(tooltip));
int tooltip_width = m_label->min_width() + 10;
int tooltip_width = m_label->effective_min_size().width().as_int() + 10;
int line_count = m_label->text().count("\n");
int glyph_height = m_label->font().glyph_height();
int tooltip_height = glyph_height * (1 + line_count) + ((glyph_height + 1) / 2) * line_count + 8;