author | zautrix <zautrix> | 2005-04-05 23:31:44 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-05 23:31:44 (UTC) |
commit | cf4848d972efe96640f2d5f5d52704306d0cbe4c (patch) (side-by-side diff) | |
tree | 123a2075927def5f7f59a20949d6b59174ae79b6 /microkde/kglobalsettings.cpp | |
parent | 6add774cf9841377f32613c7aa23161a823aa1da (diff) | |
download | kdepimpi-cf4848d972efe96640f2d5f5d52704306d0cbe4c.zip kdepimpi-cf4848d972efe96640f2d5f5d52704306d0cbe4c.tar.gz kdepimpi-cf4848d972efe96640f2d5f5d52704306d0cbe4c.tar.bz2 |
fixes
-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,50 +1,66 @@ #include "kglobalsettings.h" #include "kconfig.h" #include "kglobal.h" #include "kconfigbase.h" #include <qapplication.h> QFont KGlobalSettings::generalFont() { int size = 12; if (QApplication::desktop()->width() < 480 ) { size = 10; } #ifndef DESKTOP_VERSION else if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) size = 18; #endif QFont f = QApplication::font(); //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); f.setPointSize( size ); return f; } +QFont KGlobalSettings::generalMaxFont() +{ + int size = 12; + if (QApplication::desktop()->width() < 480 ) { + size = 10; + } +#ifndef DESKTOP_VERSION + else + if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) + size = 18; +#endif + QFont f = QApplication::font(); + if ( f.pointSize() > size ) + f.setPointSize( size ); + return f; +} QFont KGlobalSettings::toolBarFont() { return QApplication::font(); } QColor KGlobalSettings::toolBarHighlightColor() { return QColor( "black" ); } QRect KGlobalSettings::desktopGeometry( QWidget * ) { return QApplication::desktop()->rect(); } /** * Returns whether KDE runs in single (default) or double click * mode. * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html * @return true if single click mode, or false if double click mode. **/ bool KGlobalSettings::singleClick() { KConfig *c = KGlobal::config(); KConfigGroupSaver cgs( c, "KDE" ); return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); } |