summaryrefslogtreecommitdiff
path: root/Services/NotificationServer
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-10 10:57:59 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-10 10:59:04 +0200
commit116cf92156090bb3f5c15d5be145f1283884d65d (patch)
tree4496ab3e8c90add1c40da2eceee71324369ec0c6 /Services/NotificationServer
parent656b01eb0fb659fb2d3ee4e6e4413a82543414e3 (diff)
downloadserenity-116cf92156090bb3f5c15d5be145f1283884d65d.zip
LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much better visual clue about what type of metric is being used.
Diffstat (limited to 'Services/NotificationServer')
-rw-r--r--Services/NotificationServer/NotificationWindow.cpp8
-rw-r--r--Services/NotificationServer/NotificationWindow.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/Services/NotificationServer/NotificationWindow.cpp b/Services/NotificationServer/NotificationWindow.cpp
index 96b0c2652d..8f4a1c8b55 100644
--- a/Services/NotificationServer/NotificationWindow.cpp
+++ b/Services/NotificationServer/NotificationWindow.cpp
@@ -41,9 +41,9 @@ static Vector<RefPtr<NotificationWindow>> s_windows;
void update_notification_window_locations()
{
- Gfx::Rect last_window_rect;
+ Gfx::IntRect last_window_rect;
for (auto& window : s_windows) {
- Gfx::Point new_window_location;
+ Gfx::IntPoint new_window_location;
if (last_window_rect.is_null())
new_window_location = GUI::Desktop::the().rect().top_right().translated(-window->rect().width() - 24, 26);
else
@@ -64,13 +64,13 @@ NotificationWindow::NotificationWindow(const String& text, const String& title,
set_resizable(false);
set_minimizable(false);
- Gfx::Rect lowest_notification_rect_on_screen;
+ Gfx::IntRect lowest_notification_rect_on_screen;
for (auto& window : s_windows) {
if (window->m_original_rect.y() > lowest_notification_rect_on_screen.y())
lowest_notification_rect_on_screen = window->m_original_rect;
}
- Gfx::Rect rect;
+ 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));
diff --git a/Services/NotificationServer/NotificationWindow.h b/Services/NotificationServer/NotificationWindow.h
index 3519af0752..5c0a710301 100644
--- a/Services/NotificationServer/NotificationWindow.h
+++ b/Services/NotificationServer/NotificationWindow.h
@@ -35,12 +35,12 @@ class NotificationWindow final : public GUI::Window {
public:
virtual ~NotificationWindow() override;
- void set_original_rect(Gfx::Rect original_rect) { m_original_rect = original_rect; };
+ void set_original_rect(Gfx::IntRect original_rect) { m_original_rect = original_rect; };
private:
NotificationWindow(const String& text, const String& title, const Gfx::ShareableBitmap&);
- Gfx::Rect m_original_rect;
+ Gfx::IntRect m_original_rect;
};
}