1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

LibGUI: Set LinkLabel tooltip if text can't fit the widget

We were setting a tooltip when the text overflowed the *window* width,
make this more general by basing it on the *widget* width.
This commit is contained in:
Andreas Kling 2020-12-26 13:17:57 +01:00
parent 4e084793df
commit 7babe5ade6
2 changed files with 21 additions and 10 deletions

View file

@ -42,10 +42,13 @@ private:
virtual void mousedown_event(MouseEvent&) override;
virtual void paint_event(PaintEvent&) override;
virtual void resize_event(ResizeEvent&) override;
virtual void second_paint_event(PaintEvent&) override;
virtual void enter_event(Core::Event&) override;
virtual void leave_event(Core::Event&) override;
virtual void did_change_text() override;
void update_tooltip_if_needed();
bool m_hovered { false };
};