mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 17:47:18 +00:00
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.
This commit is contained in:
@@ -49,12 +49,12 @@ namespace WindowServer {
|
||||
|
||||
HashMap<int, NonnullRefPtr<ClientConnection>>* s_connections;
|
||||
|
||||
static Gfx::Rect normalize_window_rect(Gfx::Rect rect, WindowType window_type)
|
||||
static Gfx::IntRect normalize_window_rect(Gfx::IntRect rect, WindowType window_type)
|
||||
{
|
||||
auto min_size = 1;
|
||||
if (window_type == WindowType::Normal)
|
||||
min_size = 50;
|
||||
Gfx::Rect normalized_rect = { rect.x(), rect.y(), max(rect.width(), min_size), max(rect.height(), min_size) };
|
||||
Gfx::IntRect normalized_rect = { rect.x(), rect.y(), max(rect.width(), min_size), max(rect.height(), min_size) };
|
||||
return normalized_rect;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ void ClientConnection::die()
|
||||
});
|
||||
}
|
||||
|
||||
void ClientConnection::notify_about_new_screen_rect(const Gfx::Rect& rect)
|
||||
void ClientConnection::notify_about_new_screen_rect(const Gfx::IntRect& rect)
|
||||
{
|
||||
post_message(Messages::WindowClient::ScreenRectChanged(rect));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user