From e09778c7f3ef8a2272ab7dd18d00619e456fa84b Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 1 Sep 2010 14:05:05 +0200 Subject: Align icon positions when using TextUnderIcon for tool buttons The widget would explicitly ignore the TextUnderIcon flag if no text was set. This is wrong because it should be up to the style to decide such details and the end result are unaligned icons by default. Task-number: QTBUG-3715 Reviewed-by: richard --- src/gui/widgets/qtoolbutton.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gui/widgets/qtoolbutton.cpp b/src/gui/widgets/qtoolbutton.cpp index 1822db8..c18f660 100644 --- a/src/gui/widgets/qtoolbutton.cpp +++ b/src/gui/widgets/qtoolbutton.cpp @@ -394,9 +394,6 @@ void QToolButton::initStyleOption(QStyleOptionToolButton *option) const option->toolButtonStyle = Qt::ToolButtonTextOnly; else if (option->toolButtonStyle != Qt::ToolButtonTextOnly) option->toolButtonStyle = Qt::ToolButtonIconOnly; - } else { - if (d->text.isEmpty() && option->toolButtonStyle != Qt::ToolButtonIconOnly) - option->toolButtonStyle = Qt::ToolButtonIconOnly; } option->pos = pos(); -- cgit v0.12