summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kglobalsettings.cpp16
-rw-r--r--microkde/kglobalsettings.h1
-rw-r--r--microkde/kutils/kcmultidialog.cpp2
3 files changed, 18 insertions, 1 deletions
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index b6d2feb..b837b23 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -12,24 +12,40 @@ QFont KGlobalSettings::generalFont()
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}
24QFont 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}
24QFont KGlobalSettings::toolBarFont() 40QFont KGlobalSettings::toolBarFont()
25{ 41{
26 return QApplication::font(); 42 return QApplication::font();
27} 43}
28 44
29QColor KGlobalSettings::toolBarHighlightColor() 45QColor KGlobalSettings::toolBarHighlightColor()
30{ 46{
31 return QColor( "black" ); 47 return QColor( "black" );
32} 48}
33 49
34QRect KGlobalSettings::desktopGeometry( QWidget * ) 50QRect KGlobalSettings::desktopGeometry( QWidget * )
35{ 51{
diff --git a/microkde/kglobalsettings.h b/microkde/kglobalsettings.h
index 7df8012..075bb1c 100644
--- a/microkde/kglobalsettings.h
+++ b/microkde/kglobalsettings.h
@@ -3,24 +3,25 @@
3 3
4#include <qfont.h> 4#include <qfont.h>
5#include <qrect.h> 5#include <qrect.h>
6 6
7 7
8#define KDE_DEFAULT_SINGLECLICK true 8#define KDE_DEFAULT_SINGLECLICK true
9 9
10 10
11class KGlobalSettings 11class KGlobalSettings
12{ 12{
13 public: 13 public:
14 static QFont generalFont(); 14 static QFont generalFont();
15 static QFont generalMaxFont();
15 static QFont toolBarFont(); 16 static QFont toolBarFont();
16 17
17 static QColor toolBarHighlightColor(); 18 static QColor toolBarHighlightColor();
18 static QRect desktopGeometry( QWidget * ); 19 static QRect desktopGeometry( QWidget * );
19 20
20 /** 21 /**
21 * Returns whether KDE runs in single (default) or double click 22 * Returns whether KDE runs in single (default) or double click
22 * mode. 23 * mode.
23 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html 24 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
24 * @return true if single click mode, or false if double click mode. 25 * @return true if single click mode, or false if double click mode.
25 **/ 26 **/
26 static bool singleClick(); 27 static bool singleClick();
diff --git a/microkde/kutils/kcmultidialog.cpp b/microkde/kutils/kcmultidialog.cpp
index bb41b18..9c87682 100644
--- a/microkde/kutils/kcmultidialog.cpp
+++ b/microkde/kutils/kcmultidialog.cpp
@@ -33,25 +33,25 @@
33#include <krun.h> 33#include <krun.h>
34#include <kprocess.h> 34#include <kprocess.h>
35#include <kglobalsettings.h> 35#include <kglobalsettings.h>
36 36
37#include "kcmultidialog.h" 37#include "kcmultidialog.h"
38//US #include "kcmultidialog.moc" 38//US #include "kcmultidialog.moc"
39//US #include "kcmoduleloader.h" 39//US #include "kcmoduleloader.h"
40 40
41KCMultiDialog::KCMultiDialog(const QString& baseGroup, QWidget *parent, const char *name, bool modal) 41KCMultiDialog::KCMultiDialog(const QString& baseGroup, QWidget *parent, const char *name, bool modal)
42 : KDialogBase(IconList, i18n("Configure"), Default |Cancel | Apply | Ok, Ok, 42 : KDialogBase(IconList, i18n("Configure"), Default |Cancel | Apply | Ok, Ok,
43 parent, name, modal, true), d(0L) 43 parent, name, modal, true), d(0L)
44{ 44{
45 setFont( KGlobalSettings::generalFont() ); 45 setFont( KGlobalSettings::generalMaxFont() );
46 enableButton(Apply, false); 46 enableButton(Apply, false);
47 //connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *))); 47 //connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *)));
48 48
49 connect( this, SIGNAL( defaultClicked() ), SLOT( slotDefault() ) ); 49 connect( this, SIGNAL( defaultClicked() ), SLOT( slotDefault() ) );
50 50
51 _baseGroup = baseGroup; 51 _baseGroup = baseGroup;
52 mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed ); 52 mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed );
53 setMainWidget(mMainWidget ); 53 setMainWidget(mMainWidget );
54#ifdef DESKTOP_VERSION 54#ifdef DESKTOP_VERSION
55 resize(640,480); 55 resize(640,480);
56#else 56#else
57 //resize(640,480); 57 //resize(640,480);