-rw-r--r-- | microkde/kglobal.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp index 2b1bd34..bf7e238 100644 --- a/microkde/kglobal.cpp +++ b/microkde/kglobal.cpp @@ -17,50 +17,52 @@ KLocale *KGlobal::locale() mLocale = new KLocale();//mAppName); } return mLocale; } //US void KGlobal::setLocale(KLocale *kg) { mLocale = kg; } 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 } KGlobal::Orientation KGlobal::getOrientation() { if (QApplication::desktop()->width() > QApplication::desktop()->height()) return KGlobal::Landscape; else return KGlobal::Portrait; } int KGlobal::getDesktopWidth() { return QApplication::desktop()->width(); } int KGlobal::getDesktopHeight() { return QApplication::desktop()->height(); } |