Bladeren bron

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.
David Smith 3 jaren geleden
bovenliggende
commit
ac034bdf7d
1 gewijzigde bestanden met toevoegingen van 1 en 0 verwijderingen
  1. 1 0
      Userland/Libraries/LibGUI/Application.cpp

+ 1 - 0
Userland/Libraries/LibGUI/Application.cpp

@@ -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);