1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +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:
thankyouverycool 2022-08-22 12:52:21 -04:00 committed by Andreas Kling
parent 589572cfa4
commit 0d4fd4e2a6
15 changed files with 106 additions and 144 deletions

View file

@ -60,7 +60,7 @@ static constexpr Array pangrams = {
ErrorOr<RefPtr<GUI::Window>> MainWidget::create_preview_window()
{
auto window = TRY(GUI::Window::try_create(this));
window->set_window_type(GUI::WindowType::ToolWindow);
window->set_window_mode(GUI::WindowMode::RenderAbove);
window->set_title("Preview");
window->resize(400, 150);
window->center_within(*this->window());