mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:07:35 +00:00
QuickShow:If image is larger then window size resize it to fit the image
This commit is contained in:
parent
79de1a33cf
commit
0001bbf182
3 changed files with 42 additions and 24 deletions
|
@ -49,6 +49,7 @@ public:
|
|||
void set_scale(int);
|
||||
int scale() { return m_scale; }
|
||||
void set_toolbar_height(int height) { m_toolbar_height = height; }
|
||||
int toolbar_height() { return m_toolbar_height; }
|
||||
|
||||
void clear();
|
||||
void flip(Gfx::Orientation);
|
||||
|
@ -56,7 +57,7 @@ public:
|
|||
void navigate(Directions);
|
||||
void load_from_file(const String&);
|
||||
|
||||
Function<void(int)> on_scale_change;
|
||||
Function<void(int, Gfx::IntRect)> on_scale_change;
|
||||
Function<void()> on_doubleclick;
|
||||
Function<void(const GUI::DropEvent&)> on_drop;
|
||||
|
||||
|
@ -79,7 +80,7 @@ private:
|
|||
int m_toolbar_height { 28 };
|
||||
|
||||
Gfx::IntRect m_bitmap_rect;
|
||||
int m_scale { 100 };
|
||||
int m_scale { -1 };
|
||||
Gfx::FloatPoint m_pan_origin;
|
||||
|
||||
Gfx::IntPoint m_click_position;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue