-rw-r--r-- | inputmethods/keyboard/keyboard.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
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 | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "keyboard.h" | 21 | #include "keyboard.h" |
22 | 22 | ||
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | 24 | #include <qpe/config.h> | |
25 | #include <qwindowsystem_qws.h> | 25 | #include <qwindowsystem_qws.h> |
26 | #include <qpainter.h> | 26 | #include <qpainter.h> |
27 | #include <qfontmetrics.h> | 27 | #include <qfontmetrics.h> |
@@ -44,9 +44,16 @@ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : | |||
44 | // setPalette(QPalette(QColor(200,200,200))); // Gray | 44 | // setPalette(QPalette(QColor(200,200,200))); // Gray |
45 | setPalette(QPalette(QColor(220,220,220))); // Gray | 45 | setPalette(QPalette(QColor(220,220,220))); // Gray |
46 | 46 | ||
47 | // get the default font | ||
48 | Config *config = new Config( "qpe" ); | ||
49 | config->setGroup( "Appearance" ); | ||
50 | QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); | ||
51 | int fontSize = config->readNumEntry( "FontSize", 10 ); | ||
52 | delete config; | ||
53 | |||
47 | picks = new KeyboardPicks( this ); | 54 | picks = new KeyboardPicks( this ); |
48 | picks->setFont( QFont( "smallsmooth", 9 ) ); | 55 | picks->setFont( QFont( familyStr, fontSize ) ); |
49 | setFont( QFont( "smallsmooth", 9 ) ); | 56 | setFont( QFont( familyStr, fontSize ) ); |
50 | picks->initialise(); | 57 | picks->initialise(); |
51 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), | 58 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), |
52 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); | 59 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); |