summaryrefslogtreecommitdiffstats
path: root/src/styles/qsgistyle.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-30 22:42:44 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-30 22:42:44 -0500
commit0836d4649ca26cc4e6e867ca5a4a3eafd995f807 (patch)
tree4b4a28e15a3be4a17fdf5025a46ff0f104fd91d8 /src/styles/qsgistyle.cpp
parent970116b129a0dfd4ac8e90f1788ad7e81e3f6d71 (diff)
downloadtqt3-0836d4649ca26cc4e6e867ca5a4a3eafd995f807.tar.gz
tqt3-0836d4649ca26cc4e6e867ca5a4a3eafd995f807.zip
Automated update from Qt3
Diffstat (limited to 'src/styles/qsgistyle.cpp')
-rw-r--r--src/styles/qsgistyle.cpp36
1 files changed, 23 insertions, 13 deletions
diff --git a/src/styles/qsgistyle.cpp b/src/styles/qsgistyle.cpp
index 930a34d09..8110f66de 100644
--- a/src/styles/qsgistyle.cpp
+++ b/src/styles/qsgistyle.cpp
@@ -567,6 +567,9 @@ void TQSGIStyle::drawPrimitive( PrimitiveElement pe,
const int defaultFrameWidth = pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags );
bool hot = ( flags & Style_MouseOver ) && ( flags & Style_Enabled );
+ bool dis = ! (flags & Style_Enabled);
+ bool act = flags & Style_Active;
+
switch ( pe ) {
case PE_ButtonCommand:
{
@@ -878,6 +881,25 @@ void TQSGIStyle::drawPrimitive( PrimitiveElement pe,
}
break;
+ case PE_MenuItemIndicatorCheck:
+ {
+ int x, y, w, h;
+ r.rect(&x, &y, &w, &h);
+
+ SFlags cflags = Style_Default;
+ if (! dis)
+ cflags |= Style_Enabled;
+ if (act)
+ cflags |= Style_On;
+
+ TQRect er( x+sgiItemFrame+1, y+sgiItemFrame+3, pixelMetric(PM_IndicatorWidth, ceData, elementFlags), pixelMetric(PM_IndicatorHeight, ceData, elementFlags) );
+ er.addCoords( 1, 1, -1, -1 );
+ drawPrimitive( PE_ButtonBevel, p, ceData, elementFlags, er, cg, cflags, opt );
+ er.addCoords( 0, 1, 1, 1 );
+ drawPrimitive( PE_CheckMark, p, ceData, elementFlags, er, cg, cflags | Style_On, opt );
+ }
+ break;
+
default:
TQMotifStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, opt );
break;
@@ -1018,20 +1040,8 @@ void TQSGIStyle::drawControl( ControlElement element,
p->drawPixmap( pmr.topLeft(), pixmap );
} else {
if ( checkable ) {
- SFlags cflags = Style_Default;
- if (! dis)
- cflags |= Style_Enabled;
- if (act)
- cflags |= Style_On;
-
if ( mi->isChecked() ) {
- TQRect er( x+sgiItemFrame+1, y+sgiItemFrame+3,
- pixelMetric(PM_IndicatorWidth, ceData, elementFlags),
- pixelMetric(PM_IndicatorHeight, ceData, elementFlags) );
- er.addCoords( 1, 1, -1, -1 );
- drawPrimitive( PE_ButtonBevel, p, ceData, elementFlags, er, cg, cflags, opt );
- er.addCoords( 0, 1, 1, 1 );
- drawPrimitive( PE_CheckMark, p, ceData, elementFlags, er, cg, cflags | Style_On, opt );
+ drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, TQRect(x, y, w, h), cg, flags);
}
}
}