Update style

pull/1/head
Timothy Pearson 12 years ago
parent f266fb5f2f
commit 8c8a5b7ffa

@ -2382,6 +2382,25 @@ void LipstikStyle::drawPrimitive(PrimitiveElement pe,
break; break;
} }
case PE_MenuItemIndicatorFrame:
case PE_MenuItemIndicatorIconFrame: {
int x, y, w, h;
r.rect( &x, &y, &w, &h );
TQRect cr = visualRect( TQRect( x + 2, y + 2, w - 1, h - 4 ), r );
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, true, 1, &cg.brush(TQColorGroup::Midlight) );
break;
}
case PE_MenuItemIndicatorCheck: {
int x, y, w, h;
r.rect( &x, &y, &w, &h );
TQRect cr = visualRect( TQRect( x + 2, y + 2, w - 1, h - 4 ), r );
SFlags cflags = Style_On;
if (enabled)
cflags |= Style_Enabled;
drawPrimitive( PE_CheckMark, p, ceData, elementFlags, cr, cg, cflags );
break;
}
case PE_SpinWidgetUp: case PE_SpinWidgetUp:
case PE_SpinWidgetDown: case PE_SpinWidgetDown:
case PE_HeaderArrow: case PE_HeaderArrow:
@ -2972,13 +2991,10 @@ void LipstikStyle::drawControl(ControlElement element,
// Then dont draw the icon, only the check. I believe its more // Then dont draw the icon, only the check. I believe its more
// apparent its checked, compared to an almost invisible pressed background only. // apparent its checked, compared to an almost invisible pressed background only.
if ( checkable && /*!active &&*/ mi->isChecked() ) { if ( checkable && /*!active &&*/ mi->isChecked() ) {
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, true, 1, drawPrimitive(PE_MenuItemIndicatorIconFrame, p, ceData, elementFlags, TQRect(r.x(), r.y(), checkcol, r.height()), cg, flags);
&cg.brush(TQColorGroup::Midlight) );
// Draw the checkmark // Draw the checkmark
SFlags cflags = Style_On; drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, TQRect(r.x(), r.y(), checkcol, r.height()), cg, flags);
if (enabled)
cflags |= Style_Enabled;
drawPrimitive( PE_CheckMark, p, ceData, elementFlags, cr, cg, cflags );
} }
} }
@ -2988,14 +3004,10 @@ void LipstikStyle::drawControl(ControlElement element,
// We only have to draw the background if the menu item is inactive - // We only have to draw the background if the menu item is inactive -
// if it's active the "pressed" background is already drawn // if it's active the "pressed" background is already drawn
// if ( ! active ) // if ( ! active )
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, true, 1, drawPrimitive(PE_MenuItemIndicatorIconFrame, p, ceData, elementFlags, TQRect(r.x(), r.y(), checkcol, r.height()), cg, flags);
&cg.brush(TQColorGroup::Midlight) );
// Draw the checkmark
// Draw the checkmark drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, TQRect(r.x(), r.y(), checkcol, r.height()), cg, flags);
SFlags cflags = Style_On;
if (enabled)
cflags |= Style_Enabled;
drawPrimitive( PE_CheckMark, p, ceData, elementFlags, cr, cg, cflags );
} }
// Time to draw the menu item label... // Time to draw the menu item label...

Loading…
Cancel
Save