diff --git a/effects.cpp b/effects.cpp index 708acca521..6157a9e840 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1664,7 +1664,7 @@ EffectFrameImpl::EffectFrameImpl( EffectFrameStyle style, bool staticSize, QPoin , m_alignment( alignment ) , m_shader( NULL ) { - if( m_style == Styled ) + if( m_style == EffectFrameStyled ) { m_frame.setImagePath( "widgets/background" ); m_frame.setCacheAllRenderedFrames( true ); @@ -1743,7 +1743,7 @@ void EffectFrameImpl::setGeometry( const QRect& geometry, bool force ) return; } - if( m_style == Styled ) + if( m_style == EffectFrameStyled ) { qreal left, top, right, bottom; m_frame.getMargins( left, top, right, bottom ); // m_geometry is the inner geometry diff --git a/effects/boxswitch/boxswitch.cpp b/effects/boxswitch/boxswitch.cpp index ef0f17d052..8fd96c9f7e 100644 --- a/effects/boxswitch/boxswitch.cpp +++ b/effects/boxswitch/boxswitch.cpp @@ -41,7 +41,7 @@ KWIN_EFFECT( boxswitch, BoxSwitchEffect ) BoxSwitchEffect::BoxSwitchEffect() : mActivated( 0 ) , mMode( 0 ) - , thumbnailFrame( effects->effectFrame( Styled ) ) + , thumbnailFrame( effects->effectFrame( EffectFrameStyled ) ) , selected_window( 0 ) , painting_desktop( 0 ) , animation( false ) @@ -698,7 +698,7 @@ void BoxSwitchEffect::calculateItemSizes() EffectWindow* w = ordered_windows.at( i ); windows[ w ] = new ItemInfo(); - windows[ w ]->iconFrame = effects->effectFrame( Unstyled, false ); + windows[ w ]->iconFrame = effects->effectFrame( EffectFrameUnstyled, false ); windows[ w ]->iconFrame->setAlignment( Qt::AlignTop | Qt::AlignLeft ); windows[ w ]->iconFrame->setIcon( w->icon() ); @@ -736,7 +736,7 @@ void BoxSwitchEffect::calculateItemSizes() EffectWindow* w = original_windows.at( i ); windows[ w ] = new ItemInfo(); - windows[ w ]->iconFrame = effects->effectFrame( Unstyled, false ); + windows[ w ]->iconFrame = effects->effectFrame( EffectFrameUnstyled, false ); windows[ w ]->iconFrame->setAlignment( Qt::AlignTop | Qt::AlignLeft ); windows[ w ]->iconFrame->setIcon( w->icon() ); diff --git a/effects/coverswitch/coverswitch.cpp b/effects/coverswitch/coverswitch.cpp index 9124bbb18f..1dee9816cd 100644 --- a/effects/coverswitch/coverswitch.cpp +++ b/effects/coverswitch/coverswitch.cpp @@ -53,7 +53,7 @@ CoverSwitchEffect::CoverSwitchEffect() , scaleFactor( 0.0 ) , direction( Left ) , selected_window( 0 ) - , captionFrame( effects->effectFrame( Styled ) ) + , captionFrame( effects->effectFrame( EffectFrameStyled ) ) , primaryTabBox( false ) , secondaryTabBox( false ) { diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index 9cbb3ff9f5..f4a00bc60c 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -56,7 +56,7 @@ CubeEffect::CubeEffect() , cubeOpacity( 1.0 ) , opacityDesktopOnly( true ) , displayDesktopName( false ) - , desktopNameFrame( effects->effectFrame( Styled ) ) + , desktopNameFrame( effects->effectFrame( EffectFrameStyled ) ) , reflection( true ) , rotating( false ) , desktopChangedWhileRotating( false ) diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 9e37191f29..f9967f2116 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -1192,7 +1192,7 @@ void DesktopGridEffect::setup() font.setPointSize( 12 ); for( int i = 0; i < effects->numberOfDesktops(); i++ ) { - EffectFrame* frame = effects->effectFrame( Unstyled, false ); + EffectFrame* frame = effects->effectFrame( EffectFrameUnstyled, false ); frame->setFont( font ); frame->setText( effects->desktopName( i+1 )); frame->setAlignment( desktopNameAlignment ); @@ -1437,7 +1437,7 @@ void DesktopGridEffect::desktopsAdded( int old ) font.setPointSize( 12 ); for( int i = old; i < desktop; i++ ) { - EffectFrame* frame = effects->effectFrame( Unstyled, false ); + EffectFrame* frame = effects->effectFrame( EffectFrameUnstyled, false ); frame->setFont( font ); frame->setText( effects->desktopName( i+1 )); frame->setAlignment( desktopNameAlignment ); diff --git a/effects/flipswitch/flipswitch.cpp b/effects/flipswitch/flipswitch.cpp index aba7c64278..bc5d8cc34a 100644 --- a/effects/flipswitch/flipswitch.cpp +++ b/effects/flipswitch/flipswitch.cpp @@ -44,7 +44,7 @@ FlipSwitchEffect::FlipSwitchEffect() , m_stop( false ) , m_animation( false ) , m_hasKeyboardGrab( false ) - , m_captionFrame( effects->effectFrame( Styled ) ) + , m_captionFrame( effects->effectFrame( EffectFrameStyled ) ) { reconfigure( ReconfigureAll ); diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index d98a4caa52..b12fdeca2b 100644 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -53,7 +53,7 @@ PresentWindowsEffect::PresentWindowsEffect() , m_mode( ModeCurrentDesktop ) , m_managerWindow( NULL ) , m_highlightedWindow( NULL ) - , m_filterFrame( effects->effectFrame( Styled, false ) ) + , m_filterFrame( effects->effectFrame( EffectFrameStyled, false ) ) { m_atomDesktop = XInternAtom( display(), "_KDE_PRESENT_WINDOWS_DESKTOP", False ); m_atomWindows = XInternAtom( display(), "_KDE_PRESENT_WINDOWS_GROUP", False ); @@ -377,12 +377,12 @@ void PresentWindowsEffect::windowAdded( EffectWindow *w ) m_windowData[w].visible = isVisibleWindow( w ); m_windowData[w].opacity = 0.0; m_windowData[w].highlight = 0.0; - m_windowData[w].textFrame = effects->effectFrame( Unstyled, false ); + m_windowData[w].textFrame = effects->effectFrame( EffectFrameUnstyled, false ); QFont font; font.setBold( true ); font.setPointSize( 12 ); m_windowData[w].textFrame->setFont( font ); - m_windowData[w].iconFrame = effects->effectFrame( Unstyled, false ); + m_windowData[w].iconFrame = effects->effectFrame( EffectFrameUnstyled, false ); m_windowData[w].iconFrame->setAlignment( Qt::AlignRight | Qt::AlignBottom ); m_windowData[w].iconFrame->setIcon( w->icon() ); if( isSelectableWindow( w )) @@ -1550,12 +1550,12 @@ void PresentWindowsEffect::setActive( bool active, bool closingTab ) if( w->isOnCurrentDesktop() && !w->isMinimized() ) m_windowData[w].opacity = 1.0; m_windowData[w].highlight = 1.0; - m_windowData[w].textFrame = effects->effectFrame( Unstyled, false ); + m_windowData[w].textFrame = effects->effectFrame( EffectFrameUnstyled, false ); QFont font; font.setBold( true ); font.setPointSize( 12 ); m_windowData[w].textFrame->setFont( font ); - m_windowData[w].iconFrame = effects->effectFrame( Unstyled, false ); + m_windowData[w].iconFrame = effects->effectFrame( EffectFrameUnstyled, false ); m_windowData[w].iconFrame->setAlignment( Qt::AlignRight | Qt::AlignBottom ); m_windowData[w].iconFrame->setIcon( w->icon() ); } diff --git a/lib/kwineffects.h b/lib/kwineffects.h index 1f44c2f064..a194ec8386 100644 --- a/lib/kwineffects.h +++ b/lib/kwineffects.h @@ -205,9 +205,9 @@ enum DataRole */ enum EffectFrameStyle { - None, ///< Displays no frame around the contents. - Unstyled, ///< Displays a basic box around the contents. - Styled ///< Displays a Plasma-styled frame around the contents. + EffectFrameNone, ///< Displays no frame around the contents. + EffectFrameUnstyled, ///< Displays a basic box around the contents. + EffectFrameStyled ///< Displays a Plasma-styled frame around the contents. }; /** diff --git a/scene_opengl.cpp b/scene_opengl.cpp index a15948b099..680d89896b 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -1926,7 +1926,7 @@ SceneOpenGL::EffectFrame::EffectFrame( EffectFrameImpl* frame ) , m_selectionTexture( NULL ) , m_unstyledVBO( NULL ) { - if( m_effectFrame->style() == Unstyled && !m_unstyledTexture ) + if( m_effectFrame->style() == EffectFrameUnstyled && !m_unstyledTexture ) { updateUnstyledTexture(); } @@ -2020,7 +2020,7 @@ void SceneOpenGL::EffectFrame::render( QRegion region, double opacity, double fr glPushMatrix(); // Render the actual frame - if( m_effectFrame->style() == Unstyled ) + if( m_effectFrame->style() == EffectFrameUnstyled ) { if( !m_unstyledVBO ) { @@ -2135,7 +2135,7 @@ void SceneOpenGL::EffectFrame::render( QRegion region, double opacity, double fr m_unstyledVBO->render( region, GL_TRIANGLES ); m_unstyledTexture->unbind(); } - else if( m_effectFrame->style() == Styled ) + else if( m_effectFrame->style() == EffectFrameStyled ) { if( !m_texture ) // Lazy creation updateTexture(); @@ -2248,7 +2248,7 @@ void SceneOpenGL::EffectFrame::render( QRegion region, double opacity, double fr void SceneOpenGL::EffectFrame::updateTexture() { delete m_texture; - if( m_effectFrame->style() == Styled ) + if( m_effectFrame->style() == EffectFrameStyled ) { QPixmap pixmap = m_effectFrame->frame().framePixmap(); m_texture = new Texture( pixmap.handle(), pixmap.size(), pixmap.depth() ); @@ -2279,7 +2279,7 @@ void SceneOpenGL::EffectFrame::updateTextTexture() image.fill( Qt::transparent ); QPainter p( &image ); p.setFont( m_effectFrame->font() ); - if( m_effectFrame->style() == Styled ) + if( m_effectFrame->style() == EffectFrameStyled ) p.setPen( m_effectFrame->styledTextColor() ); else // TODO: What about no frame? Custom color setting required p.setPen( Qt::white ); diff --git a/scene_xrender.cpp b/scene_xrender.cpp index 99c952fe65..5b79412453 100644 --- a/scene_xrender.cpp +++ b/scene_xrender.cpp @@ -914,10 +914,10 @@ void SceneXrender::EffectFrame::render( QRegion region, double opacity, double f } // Render the actual frame - if( m_effectFrame->style() == Unstyled ) + if( m_effectFrame->style() == EffectFrameUnstyled ) xRenderRoundBox( effects->xrenderBufferPicture(), m_effectFrame->geometry().adjusted( -5, -5, 5, 5 ), 5, QColor( 0, 0, 0, int( opacity * frameOpacity * 255 ))); - else if( m_effectFrame->style() == Styled ) + else if( m_effectFrame->style() == EffectFrameStyled ) { if( !m_picture ) // Lazy creation { @@ -971,7 +971,7 @@ void SceneXrender::EffectFrame::render( QRegion region, double opacity, double f void SceneXrender::EffectFrame::updatePicture() { delete m_picture; - if( m_effectFrame->style() == Styled ) + if( m_effectFrame->style() == EffectFrameStyled ) m_picture = new XRenderPicture( m_effectFrame->frame().framePixmap() ); } @@ -1003,7 +1003,7 @@ void SceneXrender::EffectFrame::updateTextPicture() pixmap.fill( Qt::transparent ); QPainter p( &pixmap ); p.setFont( m_effectFrame->font() ); - if( m_effectFrame->style() == Styled ) + if( m_effectFrame->style() == EffectFrameStyled ) { p.setPen( m_effectFrame->styledTextColor() ); }