summaryrefslogtreecommitdiffstats
path: root/styles/phase/phasestyle.cpp
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2012-10-31 14:19:29 -0500
committerDarrell Anderson <humanreadable@yahoo.com>2012-10-31 14:19:29 -0500
commitc8898cf01f664fc323aa0bb46317bfb8b9dd22f5 (patch)
tree14a58e4a1a42114fcc44baba64551e9134df7cd9 /styles/phase/phasestyle.cpp
parentaf82583a167608ecacabc06240499b9923b7e8cb (diff)
parentccef52cd910555cccfa72e0b5005ca72b3fcb6a7 (diff)
downloadtdeartwork-c8898cf01f664fc323aa0bb46317bfb8b9dd22f5.tar.gz
tdeartwork-c8898cf01f664fc323aa0bb46317bfb8b9dd22f5.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdeartwork
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;