projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f979463
)
ArdourButton: honor text-ellipsis width for size-request
author
Robin Gareus
<robin@gareus.org>
Tue, 30 Jan 2018 15:27:18 +0000
(16:27 +0100)
committer
Robin Gareus
<robin@gareus.org>
Tue, 30 Jan 2018 15:27:18 +0000
(16:27 +0100)
libs/widgets/ardour_button.cc
patch
|
blob
|
history
diff --git
a/libs/widgets/ardour_button.cc
b/libs/widgets/ardour_button.cc
index d3598794498d0f2b539e9ddd60658e04c0cc5531..7f16c242dd9ecf7adab366d58bda2c5b91395092 100644
(file)
--- 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));