summaryrefslogtreecommitdiff
path: root/inputmethods/unikeyboard/unikeyboard.cpp
Side-by-side diff
Diffstat (limited to 'inputmethods/unikeyboard/unikeyboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/unikeyboard/unikeyboard.cpp12
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
@@ -16,17 +16,17 @@
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#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
static const int nw = 8;
@@ -130,17 +130,25 @@ static const BlockMap blockMap[] =
{0xFFF0, 0xFFEF, "Specials"},
{0xFFFF, 0xFFFF, 0} };
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 );
verticalScrollBar()->setLineStep(cellsize);