summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qcommonstyle_p.h
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-01-27 21:15:52 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-07 05:32:37 +0000
commit7024090e1dc7043e7a2a692ede105bcb7952781d (patch)
treef67335829b56103698acc7126d8e609c45a7d58b /src/widgets/styles/qcommonstyle_p.h
parenta7ba79553c364df9ab55c5c177b15606191cd568 (diff)
QToolButton: fix handling multi-line texts
The patch to elide the QToolButton text when there is not enough space introduced a regression with multi-line text. Fix it by using the newly introduced common function to elide multi-line text. Fixes: QTBUG-72226 Change-Id: I066ebbd2f360add93406cc29bb4bbbebf599ba42 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/styles/qcommonstyle_p.h')
-rw-r--r--src/widgets/styles/qcommonstyle_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/widgets/styles/qcommonstyle_p.h b/src/widgets/styles/qcommonstyle_p.h
index f0131b7a58..296f89ce5f 100644
--- a/src/widgets/styles/qcommonstyle_p.h
+++ b/src/widgets/styles/qcommonstyle_p.h
@@ -115,6 +115,11 @@ public:
&& option.viewItemPosition == cachedOption->viewItemPosition);
}
#endif
+#if QT_CONFIG(toolbutton)
+ QString toolButtonElideText(const QStyleOptionToolButton *toolbutton,
+ const QRect &textRect, int flags) const;
+#endif
+
mutable QIcon tabBarcloseButtonIcon;
#if QT_CONFIG(tabbar)
void tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *pixmapRect) const;