mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 02:26:10 +00:00
LibGUI: Avoid too large tooltip when switching to shorter text
The tooltip window didn't resize when setting a shorter text, or moving to a widget with shorter text, so it had extra space on the sides. Fix by allowing the window to resize without obeying the minimum size of the (previous) tooltip.
This commit is contained in:
parent
2121760700
commit
ac034bdf7d
Notes:
sideshowbarker
2024-07-17 17:40:13 +09:00
Author: https://github.com/stendavid
Commit: ac034bdf7d
Pull-request: https://github.com/SerenityOS/serenity/pull/14814
1 changed files with 1 additions and 0 deletions
|
@ -43,6 +43,7 @@ private:
|
|||
TooltipWindow()
|
||||
{
|
||||
set_window_type(WindowType::Tooltip);
|
||||
set_obey_widget_min_size(false);
|
||||
m_label = set_main_widget<Label>();
|
||||
m_label->set_background_role(Gfx::ColorRole::Tooltip);
|
||||
m_label->set_foreground_role(Gfx::ColorRole::TooltipText);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue