diff options
author | David Robillard <d@drobilla.net> | 2014-03-31 03:03:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-03-31 03:03:43 +0000 |
commit | e9156d57e76ee86a0bce17417bb5b02fce45cf73 (patch) | |
tree | 8f79b2b86e41f914289b735d75e3ea876b208797 /src/Patchage.cpp | |
parent | 88b95838210411669973d956a5e84ead2c680d35 (diff) | |
download | patchage-e9156d57e76ee86a0bce17417bb5b02fce45cf73.tar.gz patchage-e9156d57e76ee86a0bce17417bb5b02fce45cf73.tar.bz2 patchage-e9156d57e76ee86a0bce17417bb5b02fce45cf73.zip |
Add zoom to fit menuitem.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5353 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Patchage.cpp')
-rw-r--r-- | src/Patchage.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 570e979..716ecdb 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -106,6 +106,7 @@ Patchage::Patchage(int argc, char** argv) , INIT_WIDGET(_menu_zoom_in) , INIT_WIDGET(_menu_zoom_out) , INIT_WIDGET(_menu_zoom_normal) + , INIT_WIDGET(_menu_zoom_full) , INIT_WIDGET(_menu_increase_font_size) , INIT_WIDGET(_menu_decrease_font_size) , INIT_WIDGET(_menu_normal_font_size) @@ -203,6 +204,8 @@ Patchage::Patchage(int argc, char** argv) sigc::mem_fun(this, &Patchage::on_zoom_out)); _menu_zoom_normal->signal_activate().connect( sigc::mem_fun(this, &Patchage::on_zoom_normal)); + _menu_zoom_full->signal_activate().connect( + sigc::mem_fun(this, &Patchage::on_zoom_full)); _menu_increase_font_size->signal_activate().connect( sigc::mem_fun(this, &Patchage::on_increase_font_size)); _menu_decrease_font_size->signal_activate().connect( @@ -651,6 +654,13 @@ Patchage::on_zoom_normal() } void +Patchage::on_zoom_full() +{ + _canvas->zoom_full(); + _conf->set_zoom(_canvas->get_zoom()); +} + +void Patchage::on_increase_font_size() { const float points = _canvas->get_font_size() + 1.0; |