diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index b8e13a7e9a..b682c601b7 100644 --- a/gtk2_ardour/group_tabs.cc +++ b/gtk2_ardour/group_tabs.cc @@ -49,6 +49,8 @@ using Gtkmm2ext::Keyboard; list GroupTabs::_used_colors; +#define BASELINESTRETCH (1.25) + GroupTabs::GroupTabs () : _dragging_new_tab (0) , _menu (0) @@ -140,8 +142,16 @@ GroupTabs::set_offset (double offset) void GroupTabs::on_size_request (Gtk::Requisition *req) { - req->width = std::max (16.f, rintf (16.f * UIConfiguration::instance().get_ui_scale())); - req->height = std::max (16.f, rintf (16.f * UIConfiguration::instance().get_ui_scale())); + Glib::RefPtr layout; + layout = Pango::Layout::create (get_pango_context ()); + layout->set_text (X_("Tab Text")); + int tw, th; + layout->get_pixel_size (tw, th); + + int size = (int) ceil(th * BASELINESTRETCH + 1.0); //@robin this should match ArdourButton impl + + req->width = size; + req->height = size; } bool