add central API to calculate UI scaling
This commit is contained in:
parent
add248f0cb
commit
8d85afd294
@ -160,6 +160,7 @@ ARDOUR_UI *ARDOUR_UI::theArdourUI = 0;
|
|||||||
sigc::signal<void, framepos_t, bool, framepos_t> ARDOUR_UI::Clock;
|
sigc::signal<void, framepos_t, bool, framepos_t> ARDOUR_UI::Clock;
|
||||||
sigc::signal<void> ARDOUR_UI::CloseAllDialogs;
|
sigc::signal<void> ARDOUR_UI::CloseAllDialogs;
|
||||||
|
|
||||||
|
float ARDOUR_UI::ui_scale = 1.0;
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
ask_about_configuration_copy (string const & old_dir, string const & new_dir, int version)
|
ask_about_configuration_copy (string const & old_dir, string const & new_dir, int version)
|
||||||
|
@ -185,6 +185,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||||||
|
|
||||||
static ARDOUR_UI *instance () { return theArdourUI; }
|
static ARDOUR_UI *instance () { return theArdourUI; }
|
||||||
static UIConfiguration *config () { return theArdourUI->ui_config; }
|
static UIConfiguration *config () { return theArdourUI->ui_config; }
|
||||||
|
static float ui_scale;
|
||||||
|
|
||||||
PublicEditor& the_editor() { return *editor;}
|
PublicEditor& the_editor() { return *editor;}
|
||||||
Mixer_UI* the_mixer() { return mixer; }
|
Mixer_UI* the_mixer() { return mixer; }
|
||||||
|
@ -423,6 +423,8 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||||||
? ArdourCanvas::WaveView::Rectified : ArdourCanvas::WaveView::Normal);
|
? ArdourCanvas::WaveView::Rectified : ArdourCanvas::WaveView::Normal);
|
||||||
} else if (p == "show-waveform-clipping") {
|
} else if (p == "show-waveform-clipping") {
|
||||||
ArdourCanvas::WaveView::set_global_show_waveform_clipping (ARDOUR_UI::config()->get_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.;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user