1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:27:35 +00:00

WindowServer: Fix notification placement

No more top bar, no more extra padding. Spacing is equal on the top and
on the left, so it looks pretty tidy.
This commit is contained in:
Valtteri Koskivuori 2021-04-12 19:09:00 +03:00 committed by Andreas Kling
parent 73411ee181
commit d5e1250061

View file

@ -46,7 +46,7 @@ static void update_notification_window_locations(const Gfx::IntRect& screen_rect
auto& window = window_entry.value;
Gfx::IntPoint new_window_location;
if (last_window_rect.is_null())
new_window_location = screen_rect.top_right().translated(-window->rect().width() - 24, 26);
new_window_location = screen_rect.top_right().translated(-window->rect().width() - 24, 7);
else
new_window_location = last_window_rect.bottom_left().translated(0, 10);
if (window->rect().location() != new_window_location) {
@ -76,7 +76,7 @@ NotificationWindow::NotificationWindow(i32 client_id, const String& text, const
Gfx::IntRect rect;
rect.set_width(220);
rect.set_height(40);
rect.set_location(GUI::Desktop::the().rect().top_right().translated(-rect.width() - 24, 26));
rect.set_location(GUI::Desktop::the().rect().top_right().translated(-rect.width() - 24, 7));
if (!lowest_notification_rect_on_screen.is_null())
rect.set_location(lowest_notification_rect_on_screen.bottom_left().translated(0, 10));