13
0

add central API to calculate UI scaling

This commit is contained in:
Robin Gareus 2015-04-22 21:31:19 +02:00
parent add248f0cb
commit 8d85afd294
3 changed files with 4 additions and 0 deletions

View File

@ -160,6 +160,7 @@ ARDOUR_UI *ARDOUR_UI::theArdourUI = 0;
sigc::signal<void, framepos_t, bool, framepos_t> ARDOUR_UI::Clock;
sigc::signal<void> ARDOUR_UI::CloseAllDialogs;
float ARDOUR_UI::ui_scale = 1.0;
static bool
ask_about_configuration_copy (string const & old_dir, string const & new_dir, int version)

View File

@ -185,6 +185,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
static ARDOUR_UI *instance () { return theArdourUI; }
static UIConfiguration *config () { return theArdourUI->ui_config; }
static float ui_scale;
PublicEditor& the_editor() { return *editor;}
Mixer_UI* the_mixer() { return mixer; }

View File

@ -423,6 +423,8 @@ ARDOUR_UI::parameter_changed (std::string p)
? ArdourCanvas::WaveView::Rectified : ArdourCanvas::WaveView::Normal);
} else if (p == "show-waveform-clipping") {
ArdourCanvas::WaveView::set_global_show_waveform_clipping (ARDOUR_UI::config()->get_show_waveform_clipping());
} else if (p == "font-scale") {
ui_scale = config()->get_font_scale () / 102400.;
}
}