mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-20 12:26:07 +01:00
Group tabs should match the size of a generic ArdourButton
This commit is contained in:
parent
dc7c594a93
commit
abdae636eb
1 changed files with 12 additions and 2 deletions
|
|
@ -49,6 +49,8 @@ using Gtkmm2ext::Keyboard;
|
|||
|
||||
list<Gdk::Color> 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<Pango::Layout> 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue