summaryrefslogtreecommitdiffabout
path: root/microkde/kglobalsettings.cpp
Unidiff
Diffstat (limited to 'microkde/kglobalsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kglobalsettings.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index 92a2b48..5976aae 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -1,19 +1,26 @@
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#ifdef DESKTOP_VERSION
9 QColor KGlobalSettings::mAlternate = QColor( 235, 235, 235 );
10#else
11 QColor KGlobalSettings::mAlternate = QColor( 210, 210, 210 );
12#endif
13
14
8QFont KGlobalSettings::generalFont() 15QFont KGlobalSettings::generalFont()
9{ 16{
10 int size = 12; 17 int size = 12;
11 if (QApplication::desktop()->width() < 480 ) { 18 if (QApplication::desktop()->width() < 480 ) {
12 size = 10; 19 size = 10;
13 } 20 }
14#ifndef DESKTOP_VERSION 21#ifndef DESKTOP_VERSION
15 else 22 else
16 if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) 23 if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 )
17 size = 18; 24 size = 18;
18#endif 25#endif
19 QFont f = QApplication::font(); 26 QFont f = QApplication::font();
@@ -51,29 +58,31 @@ QString KGlobalSettings::timeTrackerDir()
51QFont KGlobalSettings::toolBarFont() 58QFont KGlobalSettings::toolBarFont()
52{ 59{
53 return QApplication::font(); 60 return QApplication::font();
54} 61}
55 62
56QColor KGlobalSettings::toolBarHighlightColor() 63QColor KGlobalSettings::toolBarHighlightColor()
57{ 64{
58 return QColor( "black" ); 65 return QColor( "black" );
59} 66}
60 67
61QColor KGlobalSettings::alternateBackgroundColor() 68QColor KGlobalSettings::alternateBackgroundColor()
62{ 69{
63#ifdef DESKTOP_VERSION 70 return mAlternate;
64 return QColor( 235, 235, 235 ); 71
65#else 72}
66 return QColor( 220, 220, 220 ); 73void KGlobalSettings::setAlternateBackgroundColor(QColor c)
67#endif 74{
75 mAlternate = c;
76
68} 77}
69 78
70QRect KGlobalSettings::desktopGeometry( QWidget * ) 79QRect KGlobalSettings::desktopGeometry( QWidget * )
71{ 80{
72 return QApplication::desktop()->rect(); 81 return QApplication::desktop()->rect();
73} 82}
74 83
75 /** 84 /**
76 * Returns whether KDE runs in single (default) or double click 85 * Returns whether KDE runs in single (default) or double click
77 * mode. 86 * mode.
78 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html 87 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
79 * @return true if single click mode, or false if double click mode. 88 * @return true if single click mode, or false if double click mode.