Diffstat (limited to 'microkde/kglobalsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kglobalsettings.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp index b65ce66..92a2b48 100644 --- a/microkde/kglobalsettings.cpp +++ b/microkde/kglobalsettings.cpp | |||
@@ -13,65 +13,74 @@ QFont KGlobalSettings::generalFont() | |||
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() | 24 | QFont KGlobalSettings::generalMaxFont() |
25 | { | 25 | { |
26 | int size = 12; | 26 | int size = 12; |
27 | if (QApplication::desktop()->width() < 480 ) { | 27 | if (QApplication::desktop()->width() < 480 ) { |
28 | size = 10; | 28 | size = 10; |
29 | } | 29 | } |
30 | #ifndef DESKTOP_VERSION | 30 | #ifndef DESKTOP_VERSION |
31 | else | 31 | else |
32 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) | 32 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) |
33 | size = 18; | 33 | size = 18; |
34 | #endif | 34 | #endif |
35 | QFont f = QApplication::font(); | 35 | QFont f = QApplication::font(); |
36 | if ( f.pointSize() > size ) | 36 | if ( f.pointSize() > size ) |
37 | f.setPointSize( size ); | 37 | f.setPointSize( size ); |
38 | return f; | 38 | return f; |
39 | } | 39 | } |
40 | 40 | ||
41 | QString KGlobalSettings::timeTrackerDir() | 41 | QString KGlobalSettings::timeTrackerDir() |
42 | { | 42 | { |
43 | static QString dir; | 43 | static QString dir; |
44 | if ( dir.isEmpty() ) { | 44 | if ( dir.isEmpty() ) { |
45 | dir = locateLocal( "data", "timetrackerdir/d.ttl" ); | 45 | dir = locateLocal( "data", "timetrackerdir/d.ttl" ); |
46 | dir = dir.left ( dir.length() - 5); | 46 | dir = dir.left ( dir.length() - 5); |
47 | } | 47 | } |
48 | return dir; | 48 | return dir; |
49 | } | 49 | } |
50 | 50 | ||
51 | QFont KGlobalSettings::toolBarFont() | 51 | QFont KGlobalSettings::toolBarFont() |
52 | { | 52 | { |
53 | return QApplication::font(); | 53 | return QApplication::font(); |
54 | } | 54 | } |
55 | 55 | ||
56 | QColor KGlobalSettings::toolBarHighlightColor() | 56 | QColor KGlobalSettings::toolBarHighlightColor() |
57 | { | 57 | { |
58 | return QColor( "black" ); | 58 | return QColor( "black" ); |
59 | } | 59 | } |
60 | 60 | ||
61 | QColor KGlobalSettings::alternateBackgroundColor() | ||
62 | { | ||
63 | #ifdef DESKTOP_VERSION | ||
64 | return QColor( 235, 235, 235 ); | ||
65 | #else | ||
66 | return QColor( 220, 220, 220 ); | ||
67 | #endif | ||
68 | } | ||
69 | |||
61 | QRect KGlobalSettings::desktopGeometry( QWidget * ) | 70 | QRect KGlobalSettings::desktopGeometry( QWidget * ) |
62 | { | 71 | { |
63 | return QApplication::desktop()->rect(); | 72 | return QApplication::desktop()->rect(); |
64 | } | 73 | } |
65 | 74 | ||
66 | /** | 75 | /** |
67 | * Returns whether KDE runs in single (default) or double click | 76 | * Returns whether KDE runs in single (default) or double click |
68 | * mode. | 77 | * mode. |
69 | * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html | 78 | * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html |
70 | * @return true if single click mode, or false if double click mode. | 79 | * @return true if single click mode, or false if double click mode. |
71 | **/ | 80 | **/ |
72 | bool KGlobalSettings::singleClick() | 81 | bool KGlobalSettings::singleClick() |
73 | { | 82 | { |
74 | KConfig *c = KGlobal::config(); | 83 | KConfig *c = KGlobal::config(); |
75 | KConfigGroupSaver cgs( c, "KDE" ); | 84 | KConfigGroupSaver cgs( c, "KDE" ); |
76 | return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); | 85 | return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); |
77 | } | 86 | } |