-rw-r--r-- | microkde/kglobal.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp index 2b1bd34..bf7e238 100644 --- a/microkde/kglobal.cpp +++ b/microkde/kglobal.cpp @@ -15,8 +15,8 @@ KLocale *KGlobal::locale() if ( !mLocale ) { ASSERT(mAppName); - + mLocale = new KLocale();//mAppName); } - + return mLocale; } @@ -33,5 +33,5 @@ KConfig *KGlobal::config() return mConfig; } - + KGlobal::Size KGlobal::getDesktopSize() { @@ -39,6 +39,8 @@ KGlobal::Size KGlobal::getDesktopSize() return KGlobal::Desktop; #else - if ( QApplication::desktop()->width() < 480 ) + if ( QApplication::desktop()->width() <= 320 ) return KGlobal::Small; + else if ( QApplication::desktop()->width() > 480) + return KGlobal::Desktop; else return KGlobal::Medium; @@ -70,5 +72,5 @@ KIconLoader *KGlobal::iconLoader() mIconLoader = new KIconLoader(); } - + return mIconLoader; } @@ -79,5 +81,5 @@ KStandardDirs *KGlobal::dirs() mDirs = new KStandardDirs(); } - + return mDirs; } @@ -86,5 +88,5 @@ void KGlobal::setAppName( const QString &appName ) { mAppName = appName; - + mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) ); } @@ -96,5 +98,5 @@ QString KGlobal::getAppName() } QString KGlobal::formatMessage ( QString mess, int maxlen ) -{ +{ //int maxlen = 80; int start = 0; |