Move ARDOUR_UI::ui_scale into UIConfiguration class

This commit is contained in:
Tim Mayberry 2015-04-29 21:30:07 +10:00 committed by Paul Davis
parent 74db5abc7e
commit 45d487f16e
22 changed files with 46 additions and 43 deletions

View file

@ -304,7 +304,7 @@ meter_render_ticks (Gtk::Widget& w, MeterType type, vector<ARDOUR::DataType> typ
float box_l=0;
float box_w=0;
#define PX_SCALE(pxmin, dflt) rint(std::max((double)pxmin, (double)dflt * ARDOUR_UI::ui_scale))
#define PX_SCALE(pxmin, dflt) rint(std::max((double)pxmin, (double)dflt * ARDOUR_UI::config()->get_ui_scale()))
if (tickleft) {
if (w.get_name().substr(0, 3) == "Bar") {
box_w = PX_SCALE(2, 2);
@ -641,7 +641,7 @@ meter_render_metrics (Gtk::Widget& w, MeterType type, vector<DataType> types)
const double fixfontsize = 1.0;
#else
// counter-act global font-scaling.
const double fixfontsize = std::min(1.0, 0.9 / sqrtf(ARDOUR_UI::ui_scale));
const double fixfontsize = std::min(1.0, 0.9 / sqrtf(ARDOUR_UI::config()->get_ui_scale()));
#endif
font.set_weight (Pango::WEIGHT_NORMAL);