-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | inputmethods/dvorak/dvorak.cpp | 13 | ||||
-rw-r--r-- | inputmethods/keyboard/keyboard.cpp | 13 | ||||
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 6 | ||||
-rw-r--r-- | inputmethods/pickboard/pickboard.cpp | 15 | ||||
-rw-r--r-- | inputmethods/unikeyboard/unikeyboard.cpp | 12 |
6 files changed, 45 insertions, 17 deletions
@@ -7,3 +7,4 @@ ---------- - * #1501 - Fixing bug in todo sql backend (eilers) + * #1501 - Fixed bug in todo sql backend (eilers) + * n.a - Removed hard coded font sizes in a couple of inputmethods (mickeyl) diff --git a/inputmethods/dvorak/dvorak.cpp b/inputmethods/dvorak/dvorak.cpp index 2137f22..3781e38 100644 --- a/inputmethods/dvorak/dvorak.cpp +++ b/inputmethods/dvorak/dvorak.cpp @@ -23,3 +23,3 @@ #include <qpe/global.h> - +#include <qpe/config.h> #include <qwindowsystem_qws.h> @@ -45,5 +45,12 @@ Keyboard::Keyboard(QWidget* parent, const char* name, WFlags f) : + // get the default font + Config *config = new Config( "qpe" ); + config->setGroup( "Appearance" ); + QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); + int fontSize = config->readNumEntry( "FontSize", 10 ); + delete config; + picks = new KeyboardPicks( this ); - picks->setFont( QFont( "smallsmooth", 9 ) ); - setFont( QFont( "smallsmooth", 9 ) ); + picks->setFont( QFont( familyStr, fontSize ) ); + setFont( QFont( familyStr, fontSize ) ); picks->initialise(); diff --git a/inputmethods/keyboard/keyboard.cpp b/inputmethods/keyboard/keyboard.cpp index fb88f2a..39d44cd 100644 --- a/inputmethods/keyboard/keyboard.cpp +++ b/inputmethods/keyboard/keyboard.cpp @@ -23,3 +23,3 @@ #include <qpe/global.h> - +#include <qpe/config.h> #include <qwindowsystem_qws.h> @@ -46,5 +46,12 @@ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : + // get the default font + Config *config = new Config( "qpe" ); + config->setGroup( "Appearance" ); + QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); + int fontSize = config->readNumEntry( "FontSize", 10 ); + delete config; + picks = new KeyboardPicks( this ); - picks->setFont( QFont( "smallsmooth", 9 ) ); - setFont( QFont( "smallsmooth", 9 ) ); + picks->setFont( QFont( familyStr, fontSize ) ); + setFont( QFont( familyStr, fontSize ) ); picks->initialise(); diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index f8cafd5..96fb484 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp @@ -68,2 +68,3 @@ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); + int fontSize = config->readNumEntry( "FontSize", 10 ); delete config; @@ -76,7 +77,6 @@ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : - - setFont( QFont( familyStr, 10 ) ); + setFont( QFont( familyStr, fontSize ) ); picks = new KeyboardPicks( this ); - picks->setFont( QFont( familyStr, 10 ) ); + picks->setFont( QFont( familyStr, fontSize ) ); picks->initialise(); diff --git a/inputmethods/pickboard/pickboard.cpp b/inputmethods/pickboard/pickboard.cpp index 1611cb0..e5365ba 100644 --- a/inputmethods/pickboard/pickboard.cpp +++ b/inputmethods/pickboard/pickboard.cpp @@ -24,3 +24,3 @@ #include <qpe/global.h> - +#include <qpe/config.h> #include <qpainter.h> @@ -94,6 +94,11 @@ Pickboard::Pickboard(QWidget* parent, const char* name, WFlags f) : d = new PickboardPrivate(this); -// under Win32 we may not have smallsmooth font -#ifndef Q_OS_WIN32 - setFont( QFont( "smallsmooth", 9 ) ); -#endif + + // get the default font + Config *config = new Config( "qpe" ); + config->setGroup( "Appearance" ); + QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); + int fontSize = config->readNumEntry( "FontSize", 10 ); + delete config; + + setFont( QFont( familyStr, fontSize ) ); } diff --git a/inputmethods/unikeyboard/unikeyboard.cpp b/inputmethods/unikeyboard/unikeyboard.cpp index aa74c66..23d96ad 100644 --- a/inputmethods/unikeyboard/unikeyboard.cpp +++ b/inputmethods/unikeyboard/unikeyboard.cpp @@ -23,3 +23,3 @@ #include <qpe/fontmanager.h> - +#include <qpe/config.h> #include <qpainter.h> @@ -137,3 +137,11 @@ UniScrollview::UniScrollview(QWidget* parent, const char* name, int f) : // smallFont.setRawName( "-adobe-courier-medium-r-normal--10-100-75-75-m-60-iso8859-1" ); //###### - smallFont = QFont( "Helvetica", 8 ); + + // get the default font + Config *config = new Config( "qpe" ); + config->setGroup( "Appearance" ); + QString familyStr = config->readEntry( "FontFamily", "Helvetica" ); + int fontSize = config->readNumEntry( "FontSize", 8 ) - 2; + delete config; + + smallFont = QFont( familyStr, fontSize ); QFontMetrics sfm( smallFont ); |