summaryrefslogtreecommitdiffstats
path: root/styles/phase/phasestyle.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-31 00:42:25 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-31 00:42:25 -0500
commitccef52cd910555cccfa72e0b5005ca72b3fcb6a7 (patch)
treebc97f64782999a6794e03320af5e691bd7c8bc7a /styles/phase/phasestyle.cpp
parent54971daef02cd2a958a4024da6b8d9928dc27859 (diff)
downloadtdeartwork-ccef52cd910555cccfa72e0b5005ca72b3fcb6a7.tar.gz
tdeartwork-ccef52cd910555cccfa72e0b5005ca72b3fcb6a7.zip
Update styles
Diffstat (limited to 'styles/phase/phasestyle.cpp')
-rw-r--r--styles/phase/phasestyle.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/styles/phase/phasestyle.cpp b/styles/phase/phasestyle.cpp
index 3b73ebfb..f163ef46 100644
--- a/styles/phase/phasestyle.cpp
+++ b/styles/phase/phasestyle.cpp
@@ -591,6 +591,7 @@ void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element,
bool depress = (down || on);
bool enabled = flags & Style_Enabled;
bool horiz = flags & Style_Horizontal;
+ bool active = flags & Style_Active;
bool mouseover = highlights_ && (flags & Style_MouseOver);
int x, y, w, h, x2, y2, n, cx, cy;
TQPointArray parray;
@@ -1005,6 +1006,23 @@ void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element,
painter->drawPixmap(x+w/2-3, y+h/2-3, rarrow);
break;
+ case PE_MenuItemIndicatorFrame: {
+ // Draw nothing
+ break;
+ }
+ case PE_MenuItemIndicatorIconFrame: {
+ // Draw nothing
+ break;
+ }
+ case PE_MenuItemIndicatorCheck: {
+ drawPrimitive(PE_CheckMark, painter, ceData, elementFlags,
+ TQRect(x + ITEMFRAME, y + ITEMFRAME,
+ w - ITEMFRAME*2, h - ITEMFRAME*2),
+ group, Style_Default |
+ (active ? Style_Enabled : Style_On));
+ break;
+ }
+
default:
KStyle::drawPrimitive(element, painter, ceData, elementFlags, rect, group, flags, option);
}
@@ -1398,11 +1416,7 @@ void PhaseStyle::drawControl(TQ_ControlElement element,
// draw check
if (mi->isChecked()) {
int cx = reverse_ ? x+w - checkwidth : x;
- drawPrimitive(PE_CheckMark, painter, ceData, elementFlags,
- TQRect(cx + ITEMFRAME, y + ITEMFRAME,
- checkwidth - ITEMFRAME*2, h - ITEMFRAME*2),
- group, Style_Default |
- (active ? Style_Enabled : Style_On));
+ drawPrimitive(PE_MenuItemIndicatorCheck, painter, ceData, elementFlags, TQRect(cx, y, checkwidth, h), group, flags);
}
// draw text
@@ -2249,14 +2263,14 @@ bool PhaseStyle::flatToolbar(const TQToolBar *toolbar) const
// Grab events we are interested in. Most of this routine is to handle the
// exceptions to the normal styling rules.
-bool PhaseStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags, void* source, TQEvent *event )
+bool PhaseStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
{
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
TQObject* object = reinterpret_cast<TQObject*>(source);
- if (KStyle::eventFilter(object, event)) return true;
+ if (KStyle::objectEventHandler(ceData, elementFlags, source, event)) return true;
if (!object->isWidgetType()) return false;
-
+
bool horiz;
int x, y, w, h;
TQFrame *frame;