mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
WindowServer+LibGUI+LibGfx: Add WindowType::ToolWindow
Tool windows are secondary windows with a smaller title bar. The sit on the layer above normal windows, and cannot be minimized. These are intended for complex yet non-modal interactions with the content of a primary window, such as find/replace windows, property windows, etc.
This commit is contained in:
parent
15c1f7a40d
commit
11c8596ad3
12 changed files with 105 additions and 37 deletions
|
@ -299,7 +299,7 @@ void Window::set_window_type(WindowType window_type)
|
|||
|
||||
if (!m_minimum_size_modified) {
|
||||
// Apply minimum size defaults.
|
||||
if (m_window_type == WindowType::Normal)
|
||||
if (m_window_type == WindowType::Normal || m_window_type == WindowType::ToolWindow)
|
||||
m_minimum_size_when_windowless = { 50, 50 };
|
||||
else
|
||||
m_minimum_size_when_windowless = { 1, 1 };
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -40,6 +40,7 @@ enum class WindowType {
|
|||
MenuApplet,
|
||||
Notification,
|
||||
Desktop,
|
||||
ToolWindow,
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue