diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-07-30 13:28:49 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-07-30 13:28:49 (GMT) |
commit | a08b3f5336e5c819b33d922d3a809b5203d728f3 (patch) | |
tree | 952f42304d50f28ed6651bace587ab7935b29cd0 /src/gui/widgets | |
parent | 813fc3574a006cb2687715ccf7bdb984a485b173 (diff) | |
parent | 188ac02e2fb6cc6437b776f8c5b69a508728fbdb (diff) | |
download | Qt-a08b3f5336e5c819b33d922d3a809b5203d728f3.zip Qt-a08b3f5336e5c819b33d922d3a809b5203d728f3.tar.gz Qt-a08b3f5336e5c819b33d922d3a809b5203d728f3.tar.bz2 |
Merge commit 'qt/master-stable'
Conflicts:
demos/demos.pro
src/gui/graphicsview/qgraphicsitem_p.h
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qmenubar.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index 3f7675b..6be30cd 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -446,13 +446,12 @@ void QMenuBarPrivate::calcActionRects(int max_width, int start) const continue; //we don't really position these! } else { const QString s = action->text(); - if(!s.isEmpty()) { - sz = fm.size(Qt::TextShowMnemonic, s); - } - QIcon is = action->icon(); + // If an icon is set, only the icon is visible if (!is.isNull()) sz = sz.expandedTo(QSize(icone, icone)); + else if (!s.isEmpty()) + sz = fm.size(Qt::TextShowMnemonic, s); } //let the style modify the above size.. |