From bc2f738a843523d120d4268e22478962e8f5a3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Wed, 11 May 2022 20:33:00 +0200 Subject: WindowServer: Make window frame flashing use the highlight color Now, when windows flash, the "active" color of the window title frame's flash is the highlight color instead of the standard window color. The "inactive" color of the flash is still the disabled color as before. Reasoning behind this change in aesthetics: There are four [1] window title frame colors with specific UI purposes: 1. "Active" for the normal active window, obvious purpose. 2. "Moving" for the window that is being dragged or resized by the user. Responsible for acting as a visual click feedback as a kind of subdued button. 3. "Inactive" for any inactive windows, obvious purpose. 4. "Highlight". The purpose of "Highlight" is in the name, though it's non-obvious what that exactly entails. Before, only alt-tab selecting windows would use the highlight color for showing the current target window. In my opinion this points to the purpose of "highlight" being to move the user's focus to another window when the simple active state is not enough. Then it makes sense to have the window flashing use the highlight color. The entire purpose of window flashing is to shift the user's focus to a dialog window that might not be close to the window they just clicked. Using the highlight color enables an even stronger emphasis than before. It enables a cleaner separation between the purpose of the two frame colors, as well as making the "Highlight" frame more common. [1] Technically there are eight, as the title frame has a gradient by default. We can count the gradient as one color for this purpose. --- Userland/Services/WindowServer/WindowFrame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland') diff --git a/Userland/Services/WindowServer/WindowFrame.cpp b/Userland/Services/WindowServer/WindowFrame.cpp index 6d241b40c4..b367efa306 100644 --- a/Userland/Services/WindowServer/WindowFrame.cpp +++ b/Userland/Services/WindowServer/WindowFrame.cpp @@ -258,7 +258,7 @@ Gfx::WindowTheme::WindowState WindowFrame::window_state_for_theme() const auto& wm = WindowManager::the(); if (m_flash_timer && m_flash_timer->is_active()) - return m_flash_counter & 1 ? Gfx::WindowTheme::WindowState::Active : Gfx::WindowTheme::WindowState::Inactive; + return m_flash_counter & 1 ? Gfx::WindowTheme::WindowState::Highlighted : Gfx::WindowTheme::WindowState::Inactive; if (&m_window == wm.highlight_window()) return Gfx::WindowTheme::WindowState::Highlighted; -- cgit v1.2.3