diff options
Diffstat (limited to 'styles/dotnet')
-rw-r--r-- | styles/dotnet/dotnet.cpp | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/styles/dotnet/dotnet.cpp b/styles/dotnet/dotnet.cpp index 11e68412..9ab1d92d 100644 --- a/styles/dotnet/dotnet.cpp +++ b/styles/dotnet/dotnet.cpp @@ -435,10 +435,11 @@ void dotNETstyle::drawPrimitive(TQ_PrimitiveElement pe, SFlags flags, const TQStyleOption &opt ) const { - bool down = flags & Style_Down; - bool on = flags & Style_On; - bool sunken = flags & Style_Sunken; - bool horiz = flags & Style_Horizontal; + bool down = flags & Style_Down; + bool on = flags & Style_On; + bool sunken = flags & Style_Sunken; + bool horiz = flags & Style_Horizontal; + bool disabled = !(flags & Style_Enabled); int x, x2, y, y2, w, h; r.rect(&x, &y, &w, &h); @@ -691,6 +692,34 @@ void dotNETstyle::drawPrimitive(TQ_PrimitiveElement pe, break; } + case PE_MenuItemIndicatorFrame: { + // Draw nothing + break; + } + case PE_MenuItemIndicatorIconFrame: { + // Draw nothing + break; + } + case PE_MenuItemIndicatorCheck: { + int x, y, w, h; + r.rect( &x, &y, &w, &h ); + + SFlags cflags = Style_Default; + + if (!disabled) + cflags |= Style_Enabled; + else + cflags |= Style_On; + + TQRect rr = TQRect( x + 6, y + 6, 16, h - 6 ); + if (TQApplication::reverseLayout()) + rr = visualRect( rr, r ); + + drawPrimitive(PE_CheckMark, p, ceData, elementFlags, rr, cg, cflags); + + break; + } + case PE_SpinWidgetUp: case PE_SpinWidgetDown: case PE_HeaderArrow: @@ -1361,20 +1390,7 @@ void dotNETstyle::drawControl(TQ_ControlElement element, if (checkable) { if (mi->isChecked()) { - int xp = x; - - SFlags cflags = Style_Default; - - if (!disabled) - cflags |= Style_Enabled; - else - cflags |= Style_On; - - TQRect rr = TQRect( xp + 6, y + 6, 16, h - 6 ); - if (TQApplication::reverseLayout()) - rr = visualRect( rr, r ); - - drawPrimitive(PE_CheckMark, p, ceData, elementFlags, rr, cg, cflags); + drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, TQRect(x, y, checkcol, h), cg, flags); } } |