diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index a90855c20a..51a54fa3ea 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -229,12 +229,15 @@ AutomationLine::hide () double AutomationLine::control_point_box_size () { + float uiscale = UIConfiguration::instance().get_ui_scale(); + uiscale = std::max (1.f, powf (uiscale, 1.71)); + if (_height > TimeAxisView::preset_height (HeightLarger)) { - return 8.0; + return rint (8.0 * uiscale); } else if (_height > (guint32) TimeAxisView::preset_height (HeightNormal)) { - return 6.0; + return rint (6.0 * uiscale); } - return 4.0; + return rint (4.0 * uiscale); } void diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index 003ba8d719..84f1346ea8 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -393,7 +393,10 @@ MidiStreamView::apply_note_range(uint8_t lowest, uint8_t highest, bool to_region _highest_note = highest; _lowest_note = lowest; - int const max_note_height = 20; // This should probably be based on text size... + float uiscale = UIConfiguration::instance().get_ui_scale(); + uiscale = expf (uiscale) / expf (1.f); + + int const max_note_height = std::max (20, 20 * uiscale); int const range = _highest_note - _lowest_note; int const pixels_per_note = floor (child_height () / range); diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index e51399c938..3e382a23c5 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -81,6 +81,7 @@ using namespace ArdourWidgets; using Gtkmm2ext::Keyboard; #define TOP_LEVEL_WIDGET controls_ebox +#define PX_SCALE(px) std::max((float)px, rintf((float)px * UIConfiguration::instance().get_ui_scale())) const double trim_handle_size = 6.0; /* pixels */ uint32_t TimeAxisView::button_height = 0; @@ -1325,11 +1326,11 @@ TimeAxisView::preset_height (Height h) { switch (h) { case HeightLargest: - return (button_height * 2) + extra_height + 260; + return (button_height * 2) + extra_height + PX_SCALE (260); case HeightLarger: - return (button_height * 2) + extra_height + 160; + return (button_height * 2) + extra_height + PX_SCALE (160); case HeightLarge: - return (button_height * 2) + extra_height + 60; + return (button_height * 2) + extra_height + PX_SCALE (60); case HeightNormal: return (button_height * 2) + extra_height + 10; case HeightSmall: