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

WorkspacePicker: Hide applet if size == 0

This commit is contained in:
Filiph Sandström 2022-07-12 18:45:44 +02:00 committed by Andreas Kling
parent 3ee5bdcfb7
commit a1ddc44c07
2 changed files with 14 additions and 1 deletions

View file

@ -104,6 +104,12 @@ private:
DesktopStatusWindow::DesktopStatusWindow()
{
GUI::Desktop::the().on_receive_screen_rects([&](GUI::Desktop&) {
auto& desktop = GUI::Desktop::the();
if (desktop.workspace_rows() == 1 && desktop.workspace_columns() == 1)
resize(0, 0);
else
resize(28, 16);
update();
});
set_window_type(GUI::WindowType::Applet);