mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:07:46 +00:00
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.
This commit is contained in:
parent
589572cfa4
commit
0d4fd4e2a6
15 changed files with 106 additions and 144 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue