[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/ksplashml/themeengine/redmond
From: Ravikiran Rajagopal <ravi () ee ! eng ! ohio-state ! edu>
Date: 2003-05-25 1:21:20
[Download RAW message or body]
CVS commit by ravi:
Make sure all the options work. Minor efficiency fix.
M +34 -36 themeredmond.cpp 1.3
--- kdebase/ksplashml/themeengine/redmond/themeredmond.cpp #1.2:1.3
@@ -31,8 +31,8 @@
#include <qwidget.h>
+#include <objkstheme.h>
#include "themeredmond.h"
#include "previewredmond.h"
#include "themeredmond.moc"
-#include "../objkstheme.h"
K_EXPORT_COMPONENT_FACTORY( libksplashredmond, KGenericFactory<ThemeRedmond> );
@@ -86,9 +86,4 @@ void ThemeRedmond::_initUi()
QRect fullScreen = KGlobalSettings::desktopGeometry(0L);
- QString resource_prefix = "pics/xp/";
-
- if( mPixmap.isNull() )
- mPixmap = DesktopIcon( "go", 48 );
-
mImage.resize( fullScreen.width(), fullScreen.height() );
@@ -102,5 +97,5 @@ void ThemeRedmond::_initUi()
// Start by seeing if the theme prefers a particular image.
if( !mBackgroundImage.isNull() )
- bgimg = locate("appdata", mBackgroundImage );
+ bgimg = locate("appdata", mTheme->themeDir() +"/" + mBackgroundImage );
/*
@@ -136,6 +131,9 @@ void ThemeRedmond::_initUi()
bgimg = locate("appdata", mTheme->themeDir() + "/Background.png");
- if( bgimg.isNull() )
- bgimg = locate("appdata", resource_prefix + "Background.png");
+ //if( bgimg.isNull() )
+ // bgimg = locate("appdata", resource_prefix + "Background.png");
+
+ if( mPixmap.isNull() )
+ mPixmap = DesktopIcon( "go", 48 );
QPixmap pix( bgimg );
@@ -164,25 +162,22 @@ void ThemeRedmond::_initUi()
// Paint the "Welcome" message, if we are instructed to. Optionally dispense with the
// shadow.
- if( mShowWelcomeTextShadow && mShowWelcomeText )
+ if ( mShowWelcomeText )
{
- p.setPen( mWelcomeTextShadowColor );
- p.drawText(
- (screen.width()/2) - fmet.width() - 25 + 2,
- (screen.height()/2) - (fmet.height()/2) + fmet.height() + 2,
- mWelcomeText );
+ if( mWelcomeTextPosition == QPoint( 0, 0 ) )
+ {
+ mWelcomeTextPosition = QPoint( (screen.width()/2) - fmet.width() - 25,
+ (screen.height()/2) - (fmet.height()/2) + fmet.height() );
+ }
}
if( mShowWelcomeText )
{
- QPoint pos = mWelcomeTextPosition;
- if( pos == QPoint( 0, 0 ) )
+ if( mShowWelcomeTextShadow )
{
- pos = QPoint(
- (screen.width()/2) - fmet.width() - 25,
- (screen.height()/2) - (fmet.height()/2) + fmet.height()
- );
+ p.setPen( mWelcomeTextShadowColor );
+ p.drawText( mWelcomeTextPosition+QPoint(2,2), mWelcomeText );
}
p.setPen( mWelcomeTextColor );
- p.drawText( pos, mWelcomeText );
+ p.drawText( mWelcomeTextPosition, mWelcomeText );
}
@@ -262,4 +257,6 @@ void ThemeRedmond::paintEvent( QPaintEve
&mImage, r.x(), r.y(), r.width(), r.height() );
+ if (mShowActionText)
+ {
p.setPen( mActionTextColor );
QFont f = mActionFont;
@@ -277,4 +274,5 @@ void ThemeRedmond::paintEvent( QPaintEve
}
p.drawText( mMsgPos, mText );
+ }
p.end();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic