summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-16 16:10:39 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-16 16:26:29 +0100
commit11c8596ad300953c6c03d8ba4475c1f58643401d (patch)
tree15bd3e76c56e422b8af21bb9953648a320b3f7dd /Userland/Libraries/LibGUI
parent15c1f7a40d988ae6f538d61f4dd088ceeb4b3bf9 (diff)
downloadserenity-11c8596ad300953c6c03d8ba4475c1f58643401d.zip
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.
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/Window.cpp2
-rw-r--r--Userland/Libraries/LibGUI/WindowType.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/Window.cpp b/Userland/Libraries/LibGUI/Window.cpp
index 5ddc73b1a5..7ba7de901d 100644
--- a/Userland/Libraries/LibGUI/Window.cpp
+++ b/Userland/Libraries/LibGUI/Window.cpp
@@ -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 };
diff --git a/Userland/Libraries/LibGUI/WindowType.h b/Userland/Libraries/LibGUI/WindowType.h
index b3b2638aba..a7fae0987b 100644
--- a/Userland/Libraries/LibGUI/WindowType.h
+++ b/Userland/Libraries/LibGUI/WindowType.h
@@ -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,
};
}