summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui_dialogs.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-01-04 23:22:34 +0100
committerRobin Gareus <robin@gareus.org>2020-01-04 23:36:17 +0100
commitdce09c6136d05acab154a198aba5a8b77ce399fd (patch)
treeb7bdb44be6752b60f5c5e3a6cb6a4c77e1e22f9d /gtk2_ardour/ardour_ui_dialogs.cc
parent32d3554761ecf3f7e428e39c09c7101c40d4b8c2 (diff)
Pixel-pushing: editor-meter size and alignment
Previously the "reset peaks" button expanded to incredible height when the GUI was scaled. Now the meter fills available space instead.
Diffstat (limited to 'gtk2_ardour/ardour_ui_dialogs.cc')
-rw-r--r--gtk2_ardour/ardour_ui_dialogs.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc
index 40181100a5..106c064ed2 100644
--- a/gtk2_ardour/ardour_ui_dialogs.cc
+++ b/gtk2_ardour/ardour_ui_dialogs.cc
@@ -251,8 +251,8 @@ ARDOUR_UI::set_session (Session *s)
editor_meter->show();
editor_meter_table.set_spacings(3);
- editor_meter_table.attach(*editor_meter, 0,1, 0,1, FILL, FILL);
- editor_meter_table.attach(editor_meter_peak_display, 0,1, 1,2, FILL, EXPAND|FILL);
+ editor_meter_table.attach(*editor_meter, 0,1, 0,1, FILL, EXPAND|FILL, 0, 1);
+ editor_meter_table.attach(editor_meter_peak_display, 0,1, 1,2, FILL, SHRINK, 0, 0);
editor_meter->show();
editor_meter_peak_display.show();
@@ -263,8 +263,8 @@ ARDOUR_UI::set_session (Session *s)
editor_meter_peak_display.set_name ("meterbridge peakindicator");
editor_meter_peak_display.unset_flags (Gtk::CAN_FOCUS);
- editor_meter_peak_display.set_size_request (-1, std::max(6.f, rintf(5.f * UIConfiguration::instance().get_ui_scale())) );
- editor_meter_peak_display.set_corner_radius (3.0);
+ editor_meter_peak_display.set_size_request (-1, std::max (5.f, std::min (12.f, rintf (8.f * UIConfiguration::instance().get_ui_scale()))) );
+ editor_meter_peak_display.set_corner_radius (1.0);
editor_meter_max_peak = -INFINITY;
editor_meter_peak_display.signal_button_release_event().connect (sigc::mem_fun(*this, &ARDOUR_UI::editor_meter_peak_button_release), false);