mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
adjust click box size - fixes #6499
This commit is contained in:
parent
8a8b5db2c3
commit
7aeead630a
1 changed files with 12 additions and 1 deletions
|
|
@ -88,6 +88,7 @@ void
|
||||||
ClickBox::set_label ()
|
ClickBox::set_label ()
|
||||||
{
|
{
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
int width, height;
|
||||||
|
|
||||||
bool const h = _printer (buf, get_adjustment());
|
bool const h = _printer (buf, get_adjustment());
|
||||||
if (!h) {
|
if (!h) {
|
||||||
|
|
@ -96,7 +97,17 @@ ClickBox::set_label ()
|
||||||
}
|
}
|
||||||
|
|
||||||
layout->set_text (buf);
|
layout->set_text (buf);
|
||||||
layout->get_pixel_size (twidth, theight);
|
layout->get_pixel_size (width, height);
|
||||||
|
|
||||||
|
if (twidth < width && (width > 50)) {
|
||||||
|
/* override GenericPluginUI::build_control_ui()
|
||||||
|
* Gtkmm2ext::set_size_request_to_display_given_text ("g9999999")
|
||||||
|
* see http://tracker.ardour.org/view.php?id=6499
|
||||||
|
*/
|
||||||
|
set_size_request (std::min (300, width + 6), height + 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
twidth = width; theight = height;
|
||||||
|
|
||||||
queue_draw ();
|
queue_draw ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue