mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
clean up GUI scaling
This commit is contained in:
parent
8d85afd294
commit
b38ab89d92
13 changed files with 35 additions and 56 deletions
|
|
@ -289,8 +289,7 @@ meter_render_ticks (Gtk::Widget& w, MeterType type, vector<ARDOUR::DataType> typ
|
|||
|
||||
float box_l=0;
|
||||
float box_w=0;
|
||||
const double scale = ARDOUR_UI::config()->get_font_scale() / 102400.;
|
||||
#define PX_SCALE(pxmin, dflt) rint(std::max((double)pxmin, (double)dflt * scale))
|
||||
#define PX_SCALE(pxmin, dflt) rint(std::max((double)pxmin, (double)dflt * ARDOUR_UI::ui_scale))
|
||||
if (tickleft) {
|
||||
if (w.get_name().substr(0, 3) == "Bar") {
|
||||
box_w = PX_SCALE(2, 2);
|
||||
|
|
@ -620,7 +619,7 @@ meter_render_metrics (Gtk::Widget& w, MeterType type, vector<DataType> types)
|
|||
const double fixfontsize = 1.125;
|
||||
#else
|
||||
// counter-act global font-scaling.
|
||||
const double fixfontsize = std::min(1.0, 0.9 / sqrt((double) ARDOUR_UI::config()->get_font_scale() / 102400.));
|
||||
const double fixfontsize = std::min(1.0, 0.9 / sqrtf(ARDOUR_UI::ui_scale));
|
||||
#endif
|
||||
|
||||
font.set_weight (Pango::WEIGHT_NORMAL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue