diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-10-31 00:57:37 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-10-31 00:57:37 -0500 |
commit | 8c8a5b7ffaf390e70751f50c278f70d23de137bc (patch) | |
tree | 08608882ab816ca9b1e1dea3c8a7c307a072a35a /style | |
parent | f266fb5f2f9e5521c55155db0f0e350bdc900635 (diff) | |
download | tde-style-lipstik-8c8a5b7ffaf390e70751f50c278f70d23de137bc.tar.gz tde-style-lipstik-8c8a5b7ffaf390e70751f50c278f70d23de137bc.zip |
Update style
Diffstat (limited to 'style')
-rw-r--r-- | style/lipstik.cpp | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/style/lipstik.cpp b/style/lipstik.cpp index 46dc294..edbeb2a 100644 --- a/style/lipstik.cpp +++ b/style/lipstik.cpp @@ -2382,6 +2382,25 @@ void LipstikStyle::drawPrimitive(PrimitiveElement pe, 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_SpinWidgetDown: case PE_HeaderArrow: @@ -2972,13 +2991,10 @@ void LipstikStyle::drawControl(ControlElement element, // Then dont draw the icon, only the check. I believe its more // apparent its checked, compared to an almost invisible pressed background only. if ( checkable && /*!active &&*/ mi->isChecked() ) { - qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, true, 1, - &cg.brush(TQColorGroup::Midlight) ); - // Draw the checkmark - SFlags cflags = Style_On; - if (enabled) - cflags |= Style_Enabled; - drawPrimitive( PE_CheckMark, p, ceData, elementFlags, cr, cg, cflags ); + drawPrimitive(PE_MenuItemIndicatorIconFrame, p, ceData, elementFlags, TQRect(r.x(), r.y(), checkcol, r.height()), cg, flags); + + // Draw the checkmark + drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, TQRect(r.x(), r.y(), checkcol, r.height()), cg, flags); } } @@ -2988,14 +3004,10 @@ void LipstikStyle::drawControl(ControlElement element, // We only have to draw the background if the menu item is inactive - // if it's active the "pressed" background is already drawn // if ( ! active ) - qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, true, 1, - &cg.brush(TQColorGroup::Midlight) ); - - // Draw the checkmark - SFlags cflags = Style_On; - if (enabled) - cflags |= Style_Enabled; - drawPrimitive( PE_CheckMark, p, ceData, elementFlags, cr, cg, cflags ); + drawPrimitive(PE_MenuItemIndicatorIconFrame, p, ceData, elementFlags, TQRect(r.x(), r.y(), checkcol, r.height()), cg, flags); + + // Draw the checkmark + drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, TQRect(r.x(), r.y(), checkcol, r.height()), cg, flags); } // Time to draw the menu item label... |