summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kglobalsettings.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index e57defe..b6d2feb 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -1,44 +1,50 @@
1#include "kglobalsettings.h" 1#include "kglobalsettings.h"
2#include "kconfig.h" 2#include "kconfig.h"
3#include "kglobal.h" 3#include "kglobal.h"
4#include "kconfigbase.h" 4#include "kconfigbase.h"
5 5
6#include <qapplication.h> 6#include <qapplication.h>
7 7
8QFont KGlobalSettings::generalFont() 8QFont KGlobalSettings::generalFont()
9{ 9{
10 int size = 12; 10 int size = 12;
11 if (QApplication::desktop()->width() < 480 ) 11 if (QApplication::desktop()->width() < 480 ) {
12 size = 10; 12 size = 10;
13 }
14#ifndef DESKTOP_VERSION
15 else
16 if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 )
17 size = 18;
18#endif
13 QFont f = QApplication::font(); 19 QFont f = QApplication::font();
14 //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); 20 //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1());
15 f.setPointSize( size ); 21 f.setPointSize( size );
16 return f; 22 return f;
17} 23}
18QFont KGlobalSettings::toolBarFont() 24QFont KGlobalSettings::toolBarFont()
19{ 25{
20 return QApplication::font(); 26 return QApplication::font();
21} 27}
22 28
23QColor KGlobalSettings::toolBarHighlightColor() 29QColor KGlobalSettings::toolBarHighlightColor()
24{ 30{
25 return QColor( "black" ); 31 return QColor( "black" );
26} 32}
27 33
28QRect KGlobalSettings::desktopGeometry( QWidget * ) 34QRect KGlobalSettings::desktopGeometry( QWidget * )
29{ 35{
30 return QApplication::desktop()->rect(); 36 return QApplication::desktop()->rect();
31} 37}
32 38
33 /** 39 /**
34 * Returns whether KDE runs in single (default) or double click 40 * Returns whether KDE runs in single (default) or double click
35 * mode. 41 * mode.
36 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html 42 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
37 * @return true if single click mode, or false if double click mode. 43 * @return true if single click mode, or false if double click mode.
38 **/ 44 **/
39bool KGlobalSettings::singleClick() 45bool KGlobalSettings::singleClick()
40{ 46{
41 KConfig *c = KGlobal::config(); 47 KConfig *c = KGlobal::config();
42 KConfigGroupSaver cgs( c, "KDE" ); 48 KConfigGroupSaver cgs( c, "KDE" );
43 return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); 49 return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK);
44} 50}