|
|
@ -591,6 +591,7 @@ void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element,
|
|
|
|
bool depress = (down || on);
|
|
|
|
bool depress = (down || on);
|
|
|
|
bool enabled = flags & Style_Enabled;
|
|
|
|
bool enabled = flags & Style_Enabled;
|
|
|
|
bool horiz = flags & Style_Horizontal;
|
|
|
|
bool horiz = flags & Style_Horizontal;
|
|
|
|
|
|
|
|
bool active = flags & Style_Active;
|
|
|
|
bool mouseover = highlights_ && (flags & Style_MouseOver);
|
|
|
|
bool mouseover = highlights_ && (flags & Style_MouseOver);
|
|
|
|
int x, y, w, h, x2, y2, n, cx, cy;
|
|
|
|
int x, y, w, h, x2, y2, n, cx, cy;
|
|
|
|
TQPointArray parray;
|
|
|
|
TQPointArray parray;
|
|
|
@ -1005,6 +1006,23 @@ void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element,
|
|
|
|
painter->drawPixmap(x+w/2-3, y+h/2-3, rarrow);
|
|
|
|
painter->drawPixmap(x+w/2-3, y+h/2-3, rarrow);
|
|
|
|
break;
|
|
|
|
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:
|
|
|
|
default:
|
|
|
|
KStyle::drawPrimitive(element, painter, ceData, elementFlags, rect, group, flags, option);
|
|
|
|
KStyle::drawPrimitive(element, painter, ceData, elementFlags, rect, group, flags, option);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1398,11 +1416,7 @@ void PhaseStyle::drawControl(TQ_ControlElement element,
|
|
|
|
// draw check
|
|
|
|
// draw check
|
|
|
|
if (mi->isChecked()) {
|
|
|
|
if (mi->isChecked()) {
|
|
|
|
int cx = reverse_ ? x+w - checkwidth : x;
|
|
|
|
int cx = reverse_ ? x+w - checkwidth : x;
|
|
|
|
drawPrimitive(PE_CheckMark, painter, ceData, elementFlags,
|
|
|
|
drawPrimitive(PE_MenuItemIndicatorCheck, painter, ceData, elementFlags, TQRect(cx, y, checkwidth, h), group, flags);
|
|
|
|
TQRect(cx + ITEMFRAME, y + ITEMFRAME,
|
|
|
|
|
|
|
|
checkwidth - ITEMFRAME*2, h - ITEMFRAME*2),
|
|
|
|
|
|
|
|
group, Style_Default |
|
|
|
|
|
|
|
|
(active ? Style_Enabled : Style_On));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// draw text
|
|
|
|
// 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
|
|
|
|
// Grab events we are interested in. Most of this routine is to handle the
|
|
|
|
// exceptions to the normal styling rules.
|
|
|
|
// 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)) {
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
|
|
|
|
TQObject* object = reinterpret_cast<TQObject*>(source);
|
|
|
|
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;
|
|
|
|
if (!object->isWidgetType()) return false;
|
|
|
|
|
|
|
|
|
|
|
|
bool horiz;
|
|
|
|
bool horiz;
|
|
|
|
int x, y, w, h;
|
|
|
|
int x, y, w, h;
|
|
|
|
TQFrame *frame;
|
|
|
|
TQFrame *frame;
|
|
|
|