1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:17:45 +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:
Andreas Kling 2020-06-10 10:57:59 +02:00
parent 656b01eb0f
commit 116cf92156
212 changed files with 1144 additions and 1144 deletions

View file

@ -138,12 +138,12 @@ void QSWidget::relayout()
float scale_factor = (float)m_scale / 100.0f;
Gfx::Size new_size;
Gfx::IntSize new_size;
new_size.set_width(m_bitmap->width() * scale_factor);
new_size.set_height(m_bitmap->height() * scale_factor);
m_bitmap_rect.set_size(new_size);
Gfx::Point new_location;
Gfx::IntPoint new_location;
new_location.set_x((width() / 2) - (new_size.width() / 2) - (m_pan_origin.x() * scale_factor));
new_location.set_y((height() / 2) - (new_size.height() / 2) - (m_pan_origin.y() * scale_factor));
m_bitmap_rect.set_location(new_location);

View file

@ -76,11 +76,11 @@ private:
RefPtr<Gfx::Bitmap> m_bitmap;
int m_toolbar_height { 28 };
Gfx::Rect m_bitmap_rect;
Gfx::IntRect m_bitmap_rect;
int m_scale { 100 };
Gfx::FloatPoint m_pan_origin;
Gfx::Point m_click_position;
Gfx::IntPoint m_click_position;
Gfx::FloatPoint m_saved_pan_origin;
Vector<String> m_files_in_same_dir;
};