Commit e4155876 authored by Thorsten Wißmann's avatar Thorsten Wißmann 🎸 Committed by Philipp Erhardt

Add Canvas::reset_zoom()

Absolutely reset the zoom factor to zoom = 0. It is bound to "z,z" per
default.
parent d2918206
......@@ -68,6 +68,7 @@ Canvas::Canvas(ResourceManager *_res, QWidget *parent) :
add_sequence("+", &Canvas::zoom_in);
add_sequence("=", &Canvas::zoom_in);
add_sequence("-", &Canvas::zoom_out);
add_sequence("z,z", &Canvas::reset_zoom);
add_sequence("]", &Canvas::columns_inc);
add_sequence("[", &Canvas::columns_dec);
......@@ -266,6 +267,11 @@ void Canvas::zoom_out() {
update();
}
void Canvas::reset_zoom() {
layout->set_zoom(0, false);
update();
}
void Canvas::columns_inc() {
layout->set_columns(1);
update();
......
......@@ -69,6 +69,7 @@ private:
void smooth_right();
void zoom_in();
void zoom_out();
void reset_zoom();
void columns_inc();
void columns_dec();
void toggle_overlay();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment