diff options
Diffstat (limited to 'Applications/QuickShow')
-rw-r--r-- | Applications/QuickShow/QSWidget.cpp | 3 | ||||
-rw-r--r-- | Applications/QuickShow/main.cpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Applications/QuickShow/QSWidget.cpp b/Applications/QuickShow/QSWidget.cpp index 06cdb91ea5..6732c90085 100644 --- a/Applications/QuickShow/QSWidget.cpp +++ b/Applications/QuickShow/QSWidget.cpp @@ -127,6 +127,9 @@ void QSWidget::set_scale(int scale) if (scale > 1000) scale = 1000; + if (scale == 100) + m_pan_origin = { 0, 0 }; + m_scale = scale; relayout(); } diff --git a/Applications/QuickShow/main.cpp b/Applications/QuickShow/main.cpp index 7430cbfa8b..2146b92c4a 100644 --- a/Applications/QuickShow/main.cpp +++ b/Applications/QuickShow/main.cpp @@ -204,7 +204,7 @@ int main(int argc, char** argv) widget.set_scale(widget.scale() + 10); }); - auto zoom_reset_action = GUI::Action::create("Zoom 100%", { Mod_None, Key_0 }, + auto zoom_reset_action = GUI::Action::create("Zoom 100%", { Mod_None, Key_0 }, Gfx::Bitmap::load_from_file("/res/icons/16x16/zoom-reset.png"), [&](auto&) { widget.set_scale(100); }); @@ -233,6 +233,7 @@ int main(int argc, char** argv) main_toolbar.add_action(go_last_action); main_toolbar.add_separator(); main_toolbar.add_action(zoom_in_action); + main_toolbar.add_action(zoom_reset_action); main_toolbar.add_action(zoom_out_action); auto menubar = GUI::MenuBar::construct(); |