author | mickeyl <mickeyl> | 2005-01-05 15:22:09 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-05 15:22:09 (UTC) |
commit | 34ae22499b91f483f1cf505e515047ea11e8eaf0 (patch) (side-by-side diff) | |
tree | 555ad0f77c87d445f1ca688f96a78fe903211190 /inputmethods/unikeyboard | |
parent | 80823d4cbd234a54a15d6b439bd37a8ea42e7904 (diff) | |
download | opie-34ae22499b91f483f1cf505e515047ea11e8eaf0.zip opie-34ae22499b91f483f1cf505e515047ea11e8eaf0.tar.gz opie-34ae22499b91f483f1cf505e515047ea11e8eaf0.tar.bz2 |
remove hard coded fonts for dvorak, keyboard, multikey, pickboard, and unikeyboard
-rw-r--r-- | inputmethods/unikeyboard/unikeyboard.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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 @@ -18,13 +18,13 @@ ** **********************************************************************/ #include "unikeyboard.h" #include <qpe/fontmanager.h> - +#include <qpe/config.h> #include <qpainter.h> #include <qfontmetrics.h> #include <qcombobox.h> #if defined(Q_WS_QWS) || defined(_WS_QWS_) #include <qwindowsystem_qws.h> #endif @@ -132,13 +132,21 @@ static const BlockMap blockMap[] = UniScrollview::UniScrollview(QWidget* parent, const char* name, int f) : QScrollView(parent, name, 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 ); xoff = sfm.width( "AAA" ); setFont( FontManager::unicodeFont( FontManager::Fixed ) ); QFontMetrics fm( font() ); cellsize = fm.lineSpacing() + 2; resizeContents( cellsize*nw, cellsize*65536/nw ); |