Diffstat (limited to 'microkde/kglobalsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kglobalsettings.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp index b6d2feb..b837b23 100644 --- a/microkde/kglobalsettings.cpp +++ b/microkde/kglobalsettings.cpp | |||
@@ -1,47 +1,63 @@ | |||
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 | ||
8 | QFont KGlobalSettings::generalFont() | 8 | QFont 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 | } | 13 | } |
14 | #ifndef DESKTOP_VERSION | 14 | #ifndef DESKTOP_VERSION |
15 | else | 15 | else |
16 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) | 16 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) |
17 | size = 18; | 17 | size = 18; |
18 | #endif | 18 | #endif |
19 | QFont f = QApplication::font(); | 19 | QFont f = QApplication::font(); |
20 | //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); | 20 | //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); |
21 | f.setPointSize( size ); | 21 | f.setPointSize( size ); |
22 | return f; | 22 | return f; |
23 | } | 23 | } |
24 | QFont KGlobalSettings::generalMaxFont() | ||
25 | { | ||
26 | int size = 12; | ||
27 | if (QApplication::desktop()->width() < 480 ) { | ||
28 | size = 10; | ||
29 | } | ||
30 | #ifndef DESKTOP_VERSION | ||
31 | else | ||
32 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) | ||
33 | size = 18; | ||
34 | #endif | ||
35 | QFont f = QApplication::font(); | ||
36 | if ( f.pointSize() > size ) | ||
37 | f.setPointSize( size ); | ||
38 | return f; | ||
39 | } | ||
24 | QFont KGlobalSettings::toolBarFont() | 40 | QFont KGlobalSettings::toolBarFont() |
25 | { | 41 | { |
26 | return QApplication::font(); | 42 | return QApplication::font(); |
27 | } | 43 | } |
28 | 44 | ||
29 | QColor KGlobalSettings::toolBarHighlightColor() | 45 | QColor KGlobalSettings::toolBarHighlightColor() |
30 | { | 46 | { |
31 | return QColor( "black" ); | 47 | return QColor( "black" ); |
32 | } | 48 | } |
33 | 49 | ||
34 | QRect KGlobalSettings::desktopGeometry( QWidget * ) | 50 | QRect KGlobalSettings::desktopGeometry( QWidget * ) |
35 | { | 51 | { |
36 | return QApplication::desktop()->rect(); | 52 | return QApplication::desktop()->rect(); |
37 | } | 53 | } |
38 | 54 | ||
39 | /** | 55 | /** |
40 | * Returns whether KDE runs in single (default) or double click | 56 | * Returns whether KDE runs in single (default) or double click |
41 | * mode. | 57 | * mode. |
42 | * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html | 58 | * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html |
43 | * @return true if single click mode, or false if double click mode. | 59 | * @return true if single click mode, or false if double click mode. |
44 | **/ | 60 | **/ |
45 | bool KGlobalSettings::singleClick() | 61 | bool KGlobalSettings::singleClick() |
46 | { | 62 | { |
47 | KConfig *c = KGlobal::config(); | 63 | KConfig *c = KGlobal::config(); |