summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_ui.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-07-30 18:27:12 -0400
committerDavid Robillard <d@drobilla.net>2014-07-30 18:30:42 -0400
commitb75b88a1eb881d9c95fcea5b50346fac09bc7302 (patch)
tree6af38f01c82cdb327025a56d83ea344f4bede32f /gtk2_ardour/route_ui.cc
parent394ea9cb860354c1f24bbecf5a85e88d1a16d136 (diff)
Use text to specify combo box padding for better font/display tolerance.
Consistent mixer strip button height. The latter works by setting all the button size request heights to the calculated height of the alphabet. Thus, all buttons of the same class will be the same height regardless of their actual text.
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r--gtk2_ardour/route_ui.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 0de1f81dac..3998ea3717 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -23,6 +23,7 @@
#include <gtkmm2ext/bindable_button.h>
#include <gtkmm2ext/barcontroller.h>
#include <gtkmm2ext/gtk_ui.h>
+#include <gtkmm2ext/utils.h>
#include "ardour/route_group.h"
#include "ardour/dB.h"
@@ -65,6 +66,8 @@ uint32_t RouteUI::_max_invert_buttons = 3;
PBD::Signal1<void, boost::shared_ptr<Route> > RouteUI::BusSendDisplayChanged;
boost::weak_ptr<Route> RouteUI::_showing_sends_to;
+static const int _button_vpad = 2;
+
RouteUI::RouteUI (ARDOUR::Session* sess)
: AxisView(sess)
, mute_menu(0)
@@ -1935,6 +1938,7 @@ RouteUI::setup_invert_buttons ()
for (uint32_t i = 0; i < to_add; ++i) {
ArdourButton* b = manage (new ArdourButton);
b->set_size_request(20,20);
+ Gtkmm2ext::set_height_request_to_display_any_text (*b, _button_vpad);
b->signal_button_press_event().connect (sigc::mem_fun (*this, &RouteUI::invert_press));
b->signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::invert_release), i));