Skip to content

Commit

Permalink
WindowServer: Fix notification placement
Browse files Browse the repository at this point in the history
No more top bar, no more extra padding. Spacing is equal on the top and
on the left, so it looks pretty tidy.
  • Loading branch information
vkoskiv authored and awesomekling committed Apr 12, 2021
1 parent 73411ee commit d5e1250
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Userland/Services/NotificationServer/NotificationWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit d5e1250

Please sign in to comment.