diff options
author | David Robillard <d@drobilla.net> | 2011-03-16 05:09:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-03-16 05:09:19 +0000 |
commit | 36f435cc1497c003be683aaebc4174a6494bbc0a (patch) | |
tree | f0c33ee73bfae3f8bdde9109f9f26a535b18afd1 /src/Patchage.cpp | |
parent | dd344aa9193665249f5da61666d751ae9a6a8af6 (diff) | |
download | patchage-36f435cc1497c003be683aaebc4174a6494bbc0a.tar.gz patchage-36f435cc1497c003be683aaebc4174a6494bbc0a.tar.bz2 patchage-36f435cc1497c003be683aaebc4174a6494bbc0a.zip |
Font-based sizing (implement ticket #374).
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3099 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Patchage.cpp')
-rw-r--r-- | src/Patchage.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 424b47c..f452bda 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -132,6 +132,9 @@ Patchage::Patchage(int argc, char** argv) , INIT_WIDGET(_menu_view_projects) , INIT_WIDGET(_menu_view_refresh) , INIT_WIDGET(_menu_view_toolbar) + , INIT_WIDGET(_menu_zoom_in) + , INIT_WIDGET(_menu_zoom_out) + , INIT_WIDGET(_menu_zoom_normal) , INIT_WIDGET(_messages_clear_but) , INIT_WIDGET(_messages_close_but) , INIT_WIDGET(_messages_win) @@ -230,6 +233,12 @@ Patchage::Patchage(int argc, char** argv) sigc::mem_fun(this, &Patchage::on_show_projects)); _menu_help_about->signal_activate().connect( sigc::mem_fun(this, &Patchage::on_help_about)); + _menu_zoom_in->signal_activate().connect( + sigc::mem_fun(this, &Patchage::on_zoom_in)); + _menu_zoom_out->signal_activate().connect( + sigc::mem_fun(this, &Patchage::on_zoom_out)); + _menu_zoom_normal->signal_activate().connect( + sigc::mem_fun(this, &Patchage::on_zoom_normal)); _messages_clear_but->signal_clicked().connect( sigc::mem_fun(this, &Patchage::on_messages_clear)); @@ -630,6 +639,27 @@ Patchage::on_help_about() void +Patchage::on_zoom_in() +{ + _canvas->set_font_size(_canvas->get_font_size() + 1.0); +} + + +void +Patchage::on_zoom_out() +{ + _canvas->set_font_size(_canvas->get_font_size() - 1.0); +} + + +void +Patchage::on_zoom_normal() +{ + _canvas->set_zoom_and_font_size(1.0, _canvas->get_default_font_size()); +} + + +void Patchage::on_messages_clear() { _status_text->get_buffer()->erase( |