summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-11-10 03:13:39 (UTC)
committer llornkcor <llornkcor>2002-11-10 03:13:39 (UTC)
commitea3334042e9625c0f67c9a7293a482849f60e4e2 (patch) (side-by-side diff)
treed9c36920818ed681a4a80d3e7af14524e66fa942
parent7601c75b529d9ff205403a32206b9431845cfc91 (diff)
downloadopie-ea3334042e9625c0f67c9a7293a482849f60e4e2.zip
opie-ea3334042e9625c0f67c9a7293a482849f60e4e2.tar.gz
opie-ea3334042e9625c0f67c9a7293a482849f60e4e2.tar.bz2
use opie's FontDatabase so to be able to use freetype
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-write/mainwindow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/apps/opie-write/mainwindow.cpp b/noncore/apps/opie-write/mainwindow.cpp
index ed95e83..bcafd16 100644
--- a/noncore/apps/opie-write/mainwindow.cpp
+++ b/noncore/apps/opie-write/mainwindow.cpp
@@ -23,6 +23,8 @@
#include <qpe/fileselector.h>
#include <qpe/applnk.h>
#include <qpe/resource.h>
+#include <qpe/fontdatabase.h>
+
//#include "qspellchecker.h"
#include "qtextedit.h"
#include <qaction.h>
@@ -208,11 +210,13 @@ void MainWindow::setupActions()
tbFont->setHorizontalStretchable(TRUE);
comboFont = new QComboBox( FALSE, tbFont );
- QFontDatabase db;
+ FontDatabase db;
+ QStringList f= db.families();
comboFont->insertStringList( db.families() );
connect( comboFont, SIGNAL( activated( const QString & ) ),
this, SLOT( textFamily( const QString & ) ) );
comboFont->setCurrentItem( comboFont->listBox()->index( comboFont->listBox()->findItem( QApplication::font().family() ) ) );
+ comboFont->setMaximumWidth(90);
comboSize = new QComboBox( TRUE, tbFont );
QValueList<int> sizes = db.standardSizes();
@@ -277,7 +281,7 @@ void MainWindow::doConnections( Qt3::QTextEdit *e )
void MainWindow::updateFontSizeCombo( const QFont &f )
{
comboSize->clear();
- QFontDatabase fdb;
+ FontDatabase fdb;
QValueList<int> sizes = fdb.pointSizes( f.family() );
QValueList<int>::Iterator it = sizes.begin();
for ( ; it != sizes.end(); ++it )