summaryrefslogtreecommitdiffstats
path: root/kstyles/highcontrast
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-30 22:44:02 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-30 22:44:02 -0500
commitd26d6ac23685063d532f0195499e617b2442350b (patch)
treea319beb31fac524d2147a3460de5880841c14faa /kstyles/highcontrast
parent40712e064638a603834221ccc204345c1bb9acf5 (diff)
downloadtdelibs-d26d6ac23685063d532f0195499e617b2442350b.tar.gz
tdelibs-d26d6ac23685063d532f0195499e617b2442350b.zip
Style update
Diffstat (limited to 'kstyles/highcontrast')
-rw-r--r--kstyles/highcontrast/highcontrast.cpp51
-rw-r--r--kstyles/highcontrast/highcontrast.h2
2 files changed, 39 insertions, 14 deletions
diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp
index 9d28dfd05..d54caf69b 100644
--- a/kstyles/highcontrast/highcontrast.cpp
+++ b/kstyles/highcontrast/highcontrast.cpp
@@ -337,7 +337,7 @@ void HighContrastStyle::drawArrow (TQPainter* p, TQRect r, TQ_PrimitiveElement a
}
// This function draws primitive elements
-void HighContrastStyle::tqdrawPrimitive (TQ_PrimitiveElement pe,
+void HighContrastStyle::drawPrimitive (TQ_PrimitiveElement pe,
TQPainter *p,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
@@ -632,6 +632,41 @@ void HighContrastStyle::tqdrawPrimitive (TQ_PrimitiveElement pe,
}
+ case PE_MenuItemIndicatorFrame:
+ {
+ // Draw nothing
+ break;
+ }
+ break;
+ case PE_MenuItemIndicatorIconFrame:
+ {
+ int x, y, w, h;
+ r.rect( &x, &y, &w, &h );
+ TQRect cr = visualRect( TQRect(x, y, w, h), r );
+ drawRect (p, cr, 0, false);
+ break;
+ }
+ case PE_MenuItemIndicatorCheck:
+ {
+ int x, y, w, h;
+ r.rect( &x, &y, &w, &h );
+ TQRect cr = visualRect( TQRect(x, y, w, h), r );
+
+ TQRect rc (x, y, w, h);
+ addOffset (&rc, 2*basicLineWidth);
+ TQPoint center = rc.center();
+ if (rc.width() > rc.height())
+ rc.setWidth (rc.height());
+ else
+ rc.setHeight (rc.width());
+ rc.moveCenter (center);
+
+ p->drawLine (rc.topLeft(), rc.bottomRight());
+ p->drawLine (rc.topRight(), rc.bottomLeft());
+ break;
+ }
+
+
// ARROWS
// -------------------------------------------------------------------
case PE_ArrowUp:
@@ -1043,7 +1078,7 @@ void HighContrastStyle::drawControl (TQ_ControlElement element,
// Then draw a square border around the icon
if ( checkable && mi->isChecked() )
{
- drawRect (p, cr, 0, false);
+ drawPrimitive(PE_MenuItemIndicatorIconFrame, p, ceData, elementFlags, TQRect(x, y, checkcol, h), cg, flags);
}
}
@@ -1051,17 +1086,7 @@ void HighContrastStyle::drawControl (TQ_ControlElement element,
else if ( checkable && mi->isChecked() ) {
int cx = reverse ? x+w - checkcol : x;
- TQRect rc (cx, y, checkcol, h);
- addOffset (&rc, 2*basicLineWidth);
- TQPoint center = rc.center();
- if (rc.width() > rc.height())
- rc.setWidth (rc.height());
- else
- rc.setHeight (rc.width());
- rc.moveCenter (center);
-
- p->drawLine (rc.topLeft(), rc.bottomRight());
- p->drawLine (rc.topRight(), rc.bottomLeft());
+ drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, TQRect(cx, y, checkcol, h), cg, flags);
}
// Time to draw the menu item label...
diff --git a/kstyles/highcontrast/highcontrast.h b/kstyles/highcontrast/highcontrast.h
index 56470993a..0831163fe 100644
--- a/kstyles/highcontrast/highcontrast.h
+++ b/kstyles/highcontrast/highcontrast.h
@@ -69,7 +69,7 @@ class HighContrastStyle : public KStyle
const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const;
- void tqdrawPrimitive( TQ_PrimitiveElement pe,
+ void drawPrimitive( TQ_PrimitiveElement pe,
TQPainter* p,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,