From 42860986468bb90c55783fcebc1b20bd3ee460ac Mon Sep 17 00:00:00 2001 From: ulf69 Date: Wed, 11 Aug 2004 01:56:15 +0000 Subject: changed the Desktopsize to meaningfull values --- (limited to 'microkde/kglobal.cpp') diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp index 2b1bd34..bf7e238 100644 --- a/microkde/kglobal.cpp +++ b/microkde/kglobal.cpp @@ -14,10 +14,10 @@ KLocale *KGlobal::locale() { if ( !mLocale ) { ASSERT(mAppName); - + mLocale = new KLocale();//mAppName); } - + return mLocale; } @@ -32,14 +32,16 @@ KConfig *KGlobal::config() //mConfig is set inside setAppName. Though it has to be the first function you call. return mConfig; } - + KGlobal::Size KGlobal::getDesktopSize() { #ifdef DESKTOP_VERSION 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; #endif @@ -69,7 +71,7 @@ KIconLoader *KGlobal::iconLoader() if ( !mIconLoader ) { mIconLoader = new KIconLoader(); } - + return mIconLoader; } @@ -78,14 +80,14 @@ KStandardDirs *KGlobal::dirs() if ( !mDirs ) { mDirs = new KStandardDirs(); } - + return mDirs; } void KGlobal::setAppName( const QString &appName ) { mAppName = appName; - + mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) ); } @@ -95,7 +97,7 @@ QString KGlobal::getAppName() return mAppName; } QString KGlobal::formatMessage ( QString mess, int maxlen ) -{ +{ //int maxlen = 80; int start = 0; int end = mess.length(); -- cgit v0.9.0.2