Explorar o código

QuickShow: Properly hide toolbar on toggle action

Similar to fullscreen mode we need to hide the toolbar's container.
Linus Groh %!s(int64=5) %!d(string=hai) anos
pai
achega
fd5f05079d
Modificáronse 1 ficheiros con 1 adicións e 7 borrados
  1. 1 7
      Applications/QuickShow/main.cpp

+ 1 - 7
Applications/QuickShow/main.cpp

@@ -213,13 +213,7 @@ int main(int argc, char** argv)
 
 
     auto hide_show_toolbar_action = GUI::Action::create("Hide/Show Toolbar", { Mod_Ctrl, Key_T },
     auto hide_show_toolbar_action = GUI::Action::create("Hide/Show Toolbar", { Mod_Ctrl, Key_T },
         [&](auto&) {
         [&](auto&) {
-            main_toolbar.set_visible(!main_toolbar.is_visible());
-
-            if (main_toolbar.is_visible()) {
-                widget.set_toolbar_height(main_toolbar.height());
-            } else {
-                widget.set_toolbar_height(0);
-            }
+            toolbar_container.set_visible(!toolbar_container.is_visible());
         });
         });
 
 
     auto about_action = GUI::Action::create("About",
     auto about_action = GUI::Action::create("About",