From 34ae22499b91f483f1cf505e515047ea11e8eaf0 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Wed, 05 Jan 2005 15:22:09 +0000 Subject: remove hard coded fonts for dvorak, keyboard, multikey, pickboard, and unikeyboard --- (limited to 'inputmethods/unikeyboard/unikeyboard.cpp') 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 @@ -21,7 +21,7 @@ #include "unikeyboard.h" #include - +#include #include #include #include @@ -135,7 +135,15 @@ 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 ) ); -- cgit v0.9.0.2