diff options
Diffstat (limited to 'src/styles/tqsgistyle.cpp')
| -rw-r--r-- | src/styles/tqsgistyle.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/styles/tqsgistyle.cpp b/src/styles/tqsgistyle.cpp index 3574dc0d0..0a78be86f 100644 --- a/src/styles/tqsgistyle.cpp +++ b/src/styles/tqsgistyle.cpp @@ -109,7 +109,7 @@ public: /*! Constructs a TQSGIStyle. - If \a useHighlightCols is FALSE (default value), the style will + If \a useHighlightCols is false (default value), the style will polish the application's color palette to emulate the Motif way of highlighting, which is a simple inversion between the base and the text color. @@ -156,7 +156,7 @@ TQSGIStyle::applicationPolish( const TQStyleControlElementData &ceData, ControlE pal.setColor( TQPalette::Disabled, TQColorGroup::Highlight, pal.disabled().text() ); pal.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, pal.disabled().base() ); } - TQApplication::setPalette( pal, TRUE ); + TQApplication::setPalette( pal, true ); // different basecolor and highlighting in Q(Multi)LineEdit pal.setColor( TQColorGroup::Base, TQColor(211,181,181) ); @@ -167,15 +167,15 @@ TQSGIStyle::applicationPolish( const TQStyleControlElementData &ceData, ControlE pal.setColor( TQPalette::Disabled, TQColorGroup::Highlight, pal.disabled().midlight() ); pal.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, pal.disabled().text() ); - TQApplication::setPalette( pal, TRUE, "TQLineEdit" ); - TQApplication::setPalette( pal, TRUE, "TQTextEdit" ); - TQApplication::setPalette( pal, TRUE, "TQDateTimeEditBase" ); + TQApplication::setPalette( pal, true, "TQLineEdit" ); + TQApplication::setPalette( pal, true, "TQTextEdit" ); + TQApplication::setPalette( pal, true, "TQDateTimeEditBase" ); pal = TQApplication::palette(); pal.setColor( TQColorGroup::Button, pal.active().background() ); - TQApplication::setPalette( pal, TRUE, "TQMenuBar" ); - TQApplication::setPalette( pal, TRUE, "TQToolBar" ); - TQApplication::setPalette( pal, TRUE, "TQPopupMenu" ); + TQApplication::setPalette( pal, true, "TQMenuBar" ); + TQApplication::setPalette( pal, true, "TQToolBar" ); + TQApplication::setPalette( pal, true, "TQPopupMenu" ); } /*! \reimp @@ -184,7 +184,7 @@ void TQSGIStyle::applicationUnPolish( const TQStyleControlElementData&, ControlElementFlags, void * ) { TQFont f = TQApplication::font(); - TQApplication::setFont( f, TRUE ); // get rid of the special fonts for special widget classes + TQApplication::setFont( f, true ); // get rid of the special fonts for special widget classes } /*! @@ -241,16 +241,16 @@ TQSGIStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags #endif } else if ( ceData.widgetObjectTypes.contains("TQComboBox") ) { TQFont f = TQApplication::font(); - f.setBold( TRUE ); - f.setItalic( TRUE ); + f.setBold( true ); + f.setItalic( true ); widgetActionRequest(ceData, elementFlags, ptr, WAR_SetFont, TQStyleWidgetActionRequestData(f)); #ifndef TQT_NO_MENUBAR } else if ( ceData.widgetObjectTypes.contains("TQMenuBar") ) { widgetActionRequest(ceData, elementFlags, ptr, WAR_FrameSetStyle, TQStyleWidgetActionRequestData(TQFrame::StyledPanel | TQFrame::Raised)); widgetActionRequest(ceData, elementFlags, ptr, WAR_SetBackgroundMode, TQStyleWidgetActionRequestData(TQWidget::PaletteBackground)); TQFont f = TQApplication::font(); - f.setBold( TRUE ); - f.setItalic( TRUE ); + f.setBold( true ); + f.setItalic( true ); widgetActionRequest(ceData, elementFlags, ptr, WAR_SetFont, TQStyleWidgetActionRequestData(f)); #endif #ifndef TQT_NO_POPUPMENU @@ -258,8 +258,8 @@ TQSGIStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags TQStyleWidgetActionRequestData requestData; widgetActionRequest(ceData, elementFlags, ptr, WAR_FrameSetLineWidth, TQStyleWidgetActionRequestData(pixelMetric( PM_DefaultFrameWidth, TQStyleControlElementData(), CEF_None ) + 1)); TQFont f = TQApplication::font(); - f.setBold( TRUE ); - f.setItalic( TRUE ); + f.setBold( true ); + f.setItalic( true ); widgetActionRequest(ceData, elementFlags, ptr, WAR_SetFont, TQStyleWidgetActionRequestData(f)); #endif } else if ( (ceData.widgetObjectTypes.contains("TQToolBar")) || (ceData.widgetObjectTypes.contains("TQToolBarSeparator")) ) { @@ -494,7 +494,7 @@ static void drawSGIPrefix( TQPainter *p, int x, int y, TQString* miText ) { if ( miText && (!!(*miText)) ) { int amp = 0; - bool nextAmp = FALSE; + bool nextAmp = false; while ( ( amp = miText->find( '&', amp ) ) != -1 ) { if ( (uint)amp == miText->length()-1 ) return; @@ -826,7 +826,7 @@ void TQSGIStyle::drawPrimitive( PrimitiveElement pe, if ( !r.contains( d->mousePos ) ) flags &= ~Style_MouseOver; if ( r.isValid() ) - qDrawShadePanel( p, x, y, w, h, cg, FALSE, 1, hot ? &cg.brush( TQColorGroup::Midlight ) : &cg.brush( TQColorGroup::Button ) ); + qDrawShadePanel( p, x, y, w, h, cg, false, 1, hot ? &cg.brush( TQColorGroup::Midlight ) : &cg.brush( TQColorGroup::Button ) ); break; case PE_ScrollBarSlider: @@ -912,7 +912,7 @@ void TQSGIStyle::drawPrimitive( PrimitiveElement pe, r.rect(&x, &y, &w, &h); int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL); - drawPanel( p, x+sgiItemFrame, y+sgiItemFrame, checkcol, h-2*sgiItemFrame, cg, TRUE, 1, &cg.brush( TQColorGroup::Light ) ); + drawPanel( p, x+sgiItemFrame, y+sgiItemFrame, checkcol, h-2*sgiItemFrame, cg, true, 1, &cg.brush( TQColorGroup::Light ) ); } break; @@ -987,7 +987,7 @@ void TQSGIStyle::drawControl( ControlElement element, x2 -= 2; y2 -= 2; } else { - qDrawShadePanel( p, ceData.rect, cg, TRUE ); + qDrawShadePanel( p, ceData.rect, cg, true ); } } @@ -1032,10 +1032,10 @@ void TQSGIStyle::drawControl( ControlElement element, if ( act && !dis ) { if ( pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags ) > 1 ) - drawPanel( p, x, y, w, h, cg, FALSE, pw, + drawPanel( p, x, y, w, h, cg, false, pw, &cg.brush( TQColorGroup::Light ) ); else - drawPanel( p, x+1, y+1, w-2, h-2, cg, FALSE, 1, + drawPanel( p, x+1, y+1, w-2, h-2, cg, false, 1, &cg.brush( TQColorGroup::Light ) ); } else { p->fillRect( x, y, w, h, cg.brush( TQColorGroup::Button ) ); @@ -1149,7 +1149,7 @@ void TQSGIStyle::drawControl( ControlElement element, if ( active ) { p->setPen( TQPen( cg.shadow(), 1) ); p->drawRect( x, y, w, h ); - qDrawShadePanel( p, TQRect(x+1,y+1,w-2,h-2), cg, FALSE, 2, + qDrawShadePanel( p, TQRect(x+1,y+1,w-2,h-2), cg, false, 2, &cg.brush( TQColorGroup::Light )); } else { p->fillRect( x, y, w, h, cg.brush( TQColorGroup::Button )); @@ -1231,11 +1231,11 @@ void TQSGIStyle::drawComplexControl( ComplexControl control, region = region.subtract( handle ); p->setClipRegion( region ); } else { - p->setClipping( FALSE ); + p->setClipping( false ); } - qDrawShadePanel( p, d->lastSliderRect.rect, cg, TRUE, 1, &cg.brush( TQColorGroup::Dark ) ); + qDrawShadePanel( p, d->lastSliderRect.rect, cg, true, 1, &cg.brush( TQColorGroup::Dark ) ); } - p->setClipping( FALSE ); + p->setClipping( false ); } if (( sub & SC_SliderHandle ) && handle.isValid()) { @@ -1247,12 +1247,12 @@ void TQSGIStyle::drawComplexControl( ComplexControl control, TQCOORD mid = handle.x() + handle.width() / 2; qDrawShadeLine( p, mid, handle.y(), mid, handle.y() + handle.height() - 2, - cg, TRUE, 1); + cg, true, 1); } else { TQCOORD mid = handle.y() + handle.height() / 2; qDrawShadeLine( p, handle.x(), mid, handle.x() + handle.width() - 2, mid, - cg, TRUE, 1); + cg, true, 1); } } @@ -1302,7 +1302,7 @@ void TQSGIStyle::drawComplexControl( ComplexControl control, er.addCoords( -1, -1, 1, 1); qDrawShadePanel( p, TQRect( er.x()-1, er.y()-1, er.width()+2, er.height()+2 ), - cg, TRUE, 1, &cg.brush( TQColorGroup::Button ) ); + cg, true, 1, &cg.brush( TQColorGroup::Button ) ); } } #endif @@ -1353,11 +1353,11 @@ void TQSGIStyle::drawComplexControl( ComplexControl control, region.subtract( handle ); p->setClipRegion( region ); } else { - p->setClipping( FALSE ); + p->setClipping( false ); } - qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, TRUE, 1, &cg.brush( TQColorGroup::Dark ) ); + qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, true, 1, &cg.brush( TQColorGroup::Dark ) ); } - p->setClipping( FALSE ); + p->setClipping( false ); } if ( sub & SC_ScrollBarSubPage ) { TQRect er = TQStyle::visualRect( querySubControlMetrics( CC_ScrollBar, ceData, elementFlags, SC_ScrollBarSubPage, opt, widget ), ceData, elementFlags ); @@ -1381,14 +1381,14 @@ void TQSGIStyle::drawComplexControl( ComplexControl control, region.subtract( handle ); p->setClipRegion( region ); } else { - p->setClipping( FALSE ); + p->setClipping( false ); } - qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, TRUE, 1, &cg.brush( TQColorGroup::Dark ) ); + qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, true, 1, &cg.brush( TQColorGroup::Dark ) ); } - p->setClipping( FALSE ); + p->setClipping( false ); } if ( sub & SC_ScrollBarSlider ) { - p->setClipping( FALSE ); + p->setClipping( false ); if ( subActive == SC_ScrollBarSlider ) flags |= Style_Active; |
