-rw-r--r-- | core/pim/addressbook/abtable.cpp | 11 | ||||
-rw-r--r-- | core/pim/addressbook/abtable.h | 1 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 8 |
3 files changed, 20 insertions, 0 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 0911edf..17277b4 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp @@ -17,8 +17,10 @@ ** not clear to you. ** **********************************************************************/ +#define QTOPIA_INTERNAL_CONTACT_MRE + #include <qpe/categoryselect.h> #include <qpe/config.h> #include <qpe/stringutil.h> #include <qpe/qcopenvelope_qws.h> @@ -448,8 +450,17 @@ void AbTable::addEntry( const Contact &newCnt ) setCurrentCell( row, 0 ); updateVisible(); } +void AbTable::resizeRows( int size ) { + + if (numRows()) { + for (int i = 0; i < numRows(); i++) { + setRowHeight( i, size ); + } + } +} + void AbTable::updateJournal( const Contact &cnt, Contact::journal_action action, int row ) { QFile f( journalFileName() ); diff --git a/core/pim/addressbook/abtable.h b/core/pim/addressbook/abtable.h index 9b96997..53635ee 100644 --- a/core/pim/addressbook/abtable.h +++ b/core/pim/addressbook/abtable.h @@ -85,8 +85,9 @@ public: QStringList choiceSelection(int index) const; void setShowCategory( const QString &c ); QString showCategory() const; QStringList categories(); + void resizeRows( int size ); void show(); void setPaintingEnabled( bool e ); diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index b7b35bc..95a8521 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -236,26 +236,34 @@ void AddressbookWindow::slotSetFont( int size ) { size = 1; startFontSize = size; + QFont *currentFont; + switch (size) { case 0: fontMenu->setItemChecked(0, true); fontMenu->setItemChecked(1, false); fontMenu->setItemChecked(2, false); abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); + currentFont = new QFont (abList->font()); + abList->resizeRows(currentFont->pixelSize() + 7); break; case 1: fontMenu->setItemChecked(0, false); fontMenu->setItemChecked(1, true); fontMenu->setItemChecked(2, false); abList->setFont( *defaultFont ); + currentFont = new QFont (abList->font()); + abList->resizeRows(currentFont->pixelSize() + 7); break; case 2: fontMenu->setItemChecked(0, false); fontMenu->setItemChecked(1, false); fontMenu->setItemChecked(2, true); abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) ); + currentFont = new QFont (abList->font()); + abList->resizeRows(currentFont->pixelSize() + 7); break; } } |