diff options
Diffstat (limited to 'src/styles/tqwindowsstyle.cpp')
| -rw-r--r-- | src/styles/tqwindowsstyle.cpp | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/src/styles/tqwindowsstyle.cpp b/src/styles/tqwindowsstyle.cpp index 02bd43720..38c126349 100644 --- a/src/styles/tqwindowsstyle.cpp +++ b/src/styles/tqwindowsstyle.cpp @@ -79,7 +79,7 @@ static const int windowsCheckMarkHMargin = 2; // horiz. margins of check mark static const int windowsRightBorder = 12; // right border on windows static const int windowsCheckMarkWidth = 12; // checkmarks width on windows -static bool use2000style = TRUE; +static bool use2000style = true; enum TQSliderDirection { SlUp, SlDown, SlLeft, SlRight }; @@ -110,7 +110,7 @@ TQWindowsStyle::Private::Private(TQWindowsStyle *parent) bool TQWindowsStyle::Private::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags, void* source, TQEvent *e ) { if (!(ceData.widgetObjectTypes.contains("TQWidget"))) { - return TRUE; + return true; } TQWidget *widget = reinterpret_cast<TQWidget*>(source); @@ -135,8 +135,8 @@ bool TQWindowsStyle::Private::objectEventHandler( const TQStyleControlElementDat if (menuBar && te->timerId() == menuBarTimer) { menuBar->killTimer(te->timerId()); menuBarTimer = 0; - menuBar->repaint(FALSE); - return TRUE; + menuBar->repaint(false); + return true; } } break; @@ -144,7 +144,7 @@ bool TQWindowsStyle::Private::objectEventHandler( const TQStyleControlElementDat break; } - return TRUE; + return true; } /*! @@ -177,7 +177,7 @@ bool TQWindowsStyle::objectEventHandler( const TQStyleControlElementData &ceData if (d) { return d->objectEventHandler(ceData, elementFlags, source, e); } - return TRUE; + return true; } /*! \reimp */ @@ -276,13 +276,13 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe, case PE_ButtonTool: { TQBrush fill; - bool stippled = FALSE; + bool stippled = false; if (! (flags & (Style_Down | Style_MouseOver)) && (flags & Style_On) && use2000style) { fill = TQBrush(cg.light(), Dense4Pattern); - stippled = TRUE; + stippled = true; } else fill = cg.brush(TQColorGroup::Button); @@ -329,7 +329,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe, else fill = cg.brush( TQColorGroup::Background ); - qDrawWinPanel( p, r, cg, TRUE, &fill ); + qDrawWinPanel( p, r, cg, true, &fill ); if (flags & Style_NoChange ) p->setPen( cg.dark() ); @@ -581,7 +581,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe, int xvis = vrect.x(); if ( act && !dis ) { - qDrawShadePanel( p, xvis, y, checkcol, h, cg, TRUE, 1, &cg.brush( TQColorGroup::Button ) ); + qDrawShadePanel( p, xvis, y, checkcol, h, cg, true, 1, &cg.brush( TQColorGroup::Button ) ); } else { TQBrush fill( cg.light(), Dense4Pattern ); @@ -590,7 +590,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe, // a consistent look TQPoint origin = p->brushOrigin(); p->setBrushOrigin( xvis, y ); - qDrawShadePanel( p, xvis, y, checkcol, h, cg, TRUE, 1, &fill ); + qDrawShadePanel( p, xvis, y, checkcol, h, cg, true, 1, &fill ); // restore the previous brush origin p->setBrushOrigin( origin ); } @@ -606,7 +606,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe, TQRect vrect = visualRect( TQRect( x, y, checkcol, h ), r ); int xvis = vrect.x(); - qDrawShadePanel( p, xvis, y, w, h, cg, FALSE, 1, &cg.brush( TQColorGroup::Button ) ); + qDrawShadePanel( p, xvis, y, w, h, cg, false, 1, &cg.brush( TQColorGroup::Button ) ); } break; @@ -705,8 +705,7 @@ void TQWindowsStyle::drawControl( ControlElement element, const TQTab * t = opt.tab(); bool selected = flags & Style_Selected; - bool lastTab = (ceData.tabBarData.identIndexMap[t->identifier()] == ceData.tabBarData.tabCount-1) ? - TRUE : FALSE; + bool lastTab = (ceData.tabBarData.identIndexMap[t->identifier()] == ceData.tabBarData.tabCount-1); TQRect r2( r ); if ( ceData.tabBarData.shape == TQTabBar::RoundedAbove ) { p->setPen( cg.midlight() ); @@ -1634,8 +1633,8 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p, if ( !verticalLine ) { // make 128*1 and 1*128 bitmaps that can be used for // drawing the right sort of lines. - verticalLine = new TQBitmap( 1, 129, TRUE ); - horizontalLine = new TQBitmap( 128, 1, TRUE ); + verticalLine = new TQBitmap( 1, 129, true ); + horizontalLine = new TQBitmap( 128, 1, true ); TQPointArray a( 64 ); TQPainter p; p.begin( verticalLine ); @@ -1705,7 +1704,7 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p, if ( sub & SC_ComboBoxArrow ) { SFlags flags = Style_Default; - qDrawWinPanel( p, r, cg, TRUE, ( elementFlags & CEF_IsEnabled ) ? + qDrawWinPanel( p, r, cg, true, ( elementFlags & CEF_IsEnabled ) ? &cg.brush( TQColorGroup::Base ): &cg.brush( TQColorGroup::Background ) ); @@ -1717,7 +1716,7 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p, p->setBrush( cg.brush( TQColorGroup::Button ) ); p->drawRect( ar ); } else - qDrawWinPanel( p, ar, cg, FALSE, + qDrawWinPanel( p, ar, cg, false, &cg.brush( TQColorGroup::Button ) ); ar.addCoords( 2, 2, -2, -2 ); @@ -1780,12 +1779,12 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p, p->setPen( cg.shadow() ); if ( ceData.orientation == Horizontal ) { qDrawWinPanel( p, groove.x(), groove.y() + mid - 2, - groove.width(), 4, cg, TRUE ); + groove.width(), 4, cg, true ); p->drawLine( groove.x() + 1, groove.y() + mid - 1, groove.x() + groove.width() - 3, groove.y() + mid - 1 ); } else { qDrawWinPanel( p, groove.x() + mid - 2, groove.y(), - 4, groove.height(), cg, TRUE ); + 4, groove.height(), cg, true ); p->drawLine( groove.x() + mid - 1, groove.y() + 1, groove.x() + mid - 1, groove.y() + groove.height() - 3 ); @@ -1833,7 +1832,7 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p, } if ( (tickAbove && tickBelow) || (!tickAbove && !tickBelow) ) { - qDrawWinButton( p, TQRect(x,y,wi,he), cg, FALSE, + qDrawWinButton( p, TQRect(x,y,wi,he), cg, false, &cg.brush( TQColorGroup::Button ) ); return; } |
