summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/qgroupbox.cpp3
-rw-r--r--src/widgets/qlabel.cpp3
-rw-r--r--src/widgets/qtoolbox.cpp3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/widgets/qgroupbox.cpp b/src/widgets/qgroupbox.cpp
index 6097ece..7ffcb2a 100644
--- a/src/widgets/qgroupbox.cpp
+++ b/src/widgets/qgroupbox.cpp
@@ -364,8 +364,9 @@ void QGroupBox::paintEvent( QPaintEvent *event )
if(va & AlignTop)
r.moveBy(0, fm.descent());
QColor pen( (QRgb) style().styleHint(QStyle::SH_GroupBox_TextLabelColor, this ) );
- if (!style().styleHint(QStyle::SH_UnderlineAccelerator, this))
+ if ((!style().styleHint(QStyle::SH_UnderlineAccelerator, this)) || ((style().styleHint(QStyle::SH_HideUnderlineAcceleratorWhenAltUp, this)) && (!style().acceleratorsShown()))) {
va |= NoAccel;
+ }
style().drawItem( &paint, r, ShowPrefix | AlignHCenter | va, colorGroup(),
isEnabled(), 0, str, -1, ownPalette() ? 0 : &pen );
paint.setClipRegion( event->region().subtract( r ) ); // clip everything but title
diff --git a/src/widgets/qlabel.cpp b/src/widgets/qlabel.cpp
index 40f2b38..ff2e7bc 100644
--- a/src/widgets/qlabel.cpp
+++ b/src/widgets/qlabel.cpp
@@ -838,8 +838,9 @@ void QLabel::drawContents( QPainter *p )
}
#endif
int alignment = align;
- if ((align & ShowPrefix) && !style().styleHint(QStyle::SH_UnderlineAccelerator, this))
+ if ((align & ShowPrefix) && ((!style().styleHint(QStyle::SH_UnderlineAccelerator, this)) || ((style().styleHint(QStyle::SH_HideUnderlineAcceleratorWhenAltUp, this)) && (!style().acceleratorsShown())))) {
alignment |= NoAccel;
+ }
// ordinary text or pixmap label
style().drawItem( p, cr, alignment, colorGroup(), isEnabled(),
pix, ltext );
diff --git a/src/widgets/qtoolbox.cpp b/src/widgets/qtoolbox.cpp
index 64fc148..b48f416 100644
--- a/src/widgets/qtoolbox.cpp
+++ b/src/widgets/qtoolbox.cpp
@@ -240,8 +240,9 @@ void QToolBoxButton::drawButton( QPainter *p )
fill = &cg.color( QPalette::foregroundRoleFromMode( tb->backgroundMode() ) );
int alignment = AlignLeft | AlignVCenter | ShowPrefix;
- if (!style().styleHint(QStyle::SH_UnderlineAccelerator, this))
+ if ((!style().styleHint(QStyle::SH_UnderlineAccelerator, this)) || ((style().styleHint(QStyle::SH_HideUnderlineAcceleratorWhenAltUp, this)) && (!style().acceleratorsShown()))) {
alignment |= NoAccel;
+ }
style().drawItem( p, tr, alignment, cg,
isEnabled(), 0, txt, -1, fill );