diff options
author | Robin Gareus <robin@gareus.org> | 2018-01-30 16:27:18 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-01-30 16:27:18 +0100 |
commit | 5cbd9787350cd27ffe4f47f1883937ac4a906db1 (patch) | |
tree | 5e12f6fbdd734a44563e57b0148b32257c4cf0ca /libs/widgets | |
parent | f979463cfe5d8b939a1c87119e6d711de6d8902e (diff) |
ArdourButton: honor text-ellipsis width for size-request
Diffstat (limited to 'libs/widgets')
-rw-r--r-- | libs/widgets/ardour_button.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/widgets/ardour_button.cc b/libs/widgets/ardour_button.cc index d359879449..7f16c242dd 100644 --- a/libs/widgets/ardour_button.cc +++ b/libs/widgets/ardour_button.cc @@ -618,6 +618,11 @@ ArdourButton::on_size_request (Gtk::Requisition* req) * of text. */ + } else if (_layout_ellipsize_width > 0 && _sizing_text.empty()) { + + req->height = std::max(req->height, (int) ceil(char_pixel_height() * BASELINESTRETCH + 1.0)); + req->width += _layout_ellipsize_width / PANGO_SCALE; + } else /*if (!_text.empty() || !_sizing_text.empty()) */ { req->height = std::max(req->height, (int) ceil(char_pixel_height() * BASELINESTRETCH + 1.0)); |