1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:48:14 +00:00

LibGUI: Hide ResizeCorner in StatusBar when window is maximized

Fully expands status bars when maximized and prevents maximized
windows from being erroneously resized.
This commit is contained in:
thankyouverycool 2020-08-30 15:13:17 -04:00 committed by Andreas Kling
parent 72deaa3423
commit 199c1da31c
2 changed files with 10 additions and 0 deletions

View file

@ -29,6 +29,7 @@
#include <LibGUI/Painter.h>
#include <LibGUI/ResizeCorner.h>
#include <LibGUI/StatusBar.h>
#include <LibGUI/Window.h>
#include <LibGfx/Palette.h>
#include <LibGfx/StylePainter.h>
@ -92,4 +93,12 @@ void StatusBar::paint_event(PaintEvent& event)
painter.fill_rect(rect(), palette().button());
}
void StatusBar::resize_event(ResizeEvent& event)
{
if (window())
m_corner->set_visible(window()->is_maximized() ? false : true);
Widget::resize_event(event);
}
}