mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:27:44 +00:00
LibGUI+WindowServer: Initialize minimum window size to zero
And remove unnecessary workarounds to the old limit of {50, 50} and the cautious but arbitrary limit of {1, 1} for other WindowTypes. Null rects are already the default when calculating minimum window size and are the least restrictive but valid value. Also returns early during minimum size calculations for frameless windows, and verifies against negative minimum sizes and failure to disable widget min size before setting a minimum window size. Layout automatically overrides this setting each relayout otherwise.
This commit is contained in:
parent
8b8cee3172
commit
46d6347035
5 changed files with 14 additions and 33 deletions
|
@ -470,6 +470,9 @@ Messages::WindowServer::GetWindowRectResponse ConnectionFromClient::get_window_r
|
|||
|
||||
static Gfx::IntSize calculate_minimum_size_for_window(Window const& window)
|
||||
{
|
||||
if (window.is_frameless())
|
||||
return { 0, 0 };
|
||||
|
||||
// NOTE: Windows with a title bar have a minimum size enforced by the system,
|
||||
// because we want to always keep their title buttons accessible.
|
||||
if (window.type() == WindowType::Normal || window.type() == WindowType::ToolWindow) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue