diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2022-08-22 12:52:21 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-25 13:28:50 +0200 |
commit | 0d4fd4e2a66bf7d8224c6490c92bf133130923ac (patch) | |
tree | c893db36c5b4b2530cccbb7a13150548bb8222c8 /Userland/Demos/LibGfxScaleDemo | |
parent | 589572cfa44308c4cfc62f366e95c97c7e6cdc9c (diff) | |
download | serenity-0d4fd4e2a66bf7d8224c6490c92bf133130923ac.zip |
LibGfx+LibGUI+WindowServer+Apps+Demos: Replace ToolWindows
with the RenderAbove WindowMode. This mode will ensure child
windows always draw above their parents, even when focus is lost.
RenderAbove modals are automatically themed the same as the old
ToolWindows. Fixes ToolWindows rendering above ALL normal windows,
regardless of parent. We can't rely on WindowType to create these
sort of effects because of WindowManager's strict display hierarchy.
Diffstat (limited to 'Userland/Demos/LibGfxScaleDemo')
-rw-r--r-- | Userland/Demos/LibGfxScaleDemo/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Demos/LibGfxScaleDemo/main.cpp b/Userland/Demos/LibGfxScaleDemo/main.cpp index 32167beb15..5658739e52 100644 --- a/Userland/Demos/LibGfxScaleDemo/main.cpp +++ b/Userland/Demos/LibGfxScaleDemo/main.cpp @@ -76,7 +76,7 @@ void Canvas::draw(Gfx::Painter& painter) { auto active_window_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/window.png"sv).release_value_but_fixme_should_propagate_errors(); - Gfx::WindowTheme::current().paint_normal_frame(painter, Gfx::WindowTheme::WindowState::Active, { 4, 18, WIDTH - 8, HEIGHT - 29 }, "Well hello friends 🐞"sv, *active_window_icon, palette(), { WIDTH - 20, 6, 16, 16 }, 0, false); + Gfx::WindowTheme::current().paint_normal_frame(painter, Gfx::WindowTheme::WindowState::Active, Gfx::WindowTheme::WindowMode::Other, { 4, 18, WIDTH - 8, HEIGHT - 29 }, "Well hello friends 🐞"sv, *active_window_icon, palette(), { WIDTH - 20, 6, 16, 16 }, 0, false); painter.fill_rect({ 4, 25, WIDTH - 8, HEIGHT - 30 }, palette().color(Gfx::ColorRole::Background)); painter.draw_rect({ 20, 34, WIDTH - 40, HEIGHT - 45 }, palette().color(Gfx::ColorRole::Selection), true); |