QMenu: Honor the with for separators with text
A menu separator can contain text which is rendered by some styles (e.g. the fusion style) so the text width should be considered during the size calculation Pick-to: 6.8 Fixes: QTBUG-13404 Change-Id: I6bf0b727919d6d281df48623f0be2ca89822e85a Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
5e95e2df61
commit
e45d78ecba
@ -409,7 +409,7 @@ void QMenuPrivate::updateActionRects(const QRect &screen) const
|
|||||||
sz = w->sizeHint().expandedTo(w->minimumSize()).expandedTo(w->minimumSizeHint()).boundedTo(w->maximumSize());
|
sz = w->sizeHint().expandedTo(w->minimumSize()).expandedTo(w->minimumSizeHint()).boundedTo(w->maximumSize());
|
||||||
} else {
|
} else {
|
||||||
//calc what I think the size is..
|
//calc what I think the size is..
|
||||||
if (action->isSeparator()) {
|
if (action->isSeparator() && action->text().isEmpty()) {
|
||||||
sz = QSize(2, 2);
|
sz = QSize(2, 2);
|
||||||
} else {
|
} else {
|
||||||
QString s = action->text();
|
QString s = action->text();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user