summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp11
-rw-r--r--core/pim/addressbook/abtable.h1
-rw-r--r--core/pim/addressbook/addressbook.cpp8
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
@@ -18,6 +18,8 @@
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#define QTOPIA_INTERNAL_CONTACT_MRE
22
21#include <qpe/categoryselect.h> 23#include <qpe/categoryselect.h>
22#include <qpe/config.h> 24#include <qpe/config.h>
23#include <qpe/stringutil.h> 25#include <qpe/stringutil.h>
@@ -449,6 +451,15 @@ void AbTable::addEntry( const Contact &newCnt )
449 updateVisible(); 451 updateVisible();
450} 452}
451 453
454void AbTable::resizeRows( int size ) {
455
456 if (numRows()) {
457 for (int i = 0; i < numRows(); i++) {
458 setRowHeight( i, size );
459 }
460 }
461}
462
452void AbTable::updateJournal( const Contact &cnt, 463void AbTable::updateJournal( const Contact &cnt,
453 Contact::journal_action action, int row ) 464 Contact::journal_action action, int row )
454{ 465{
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
@@ -86,6 +86,7 @@ public:
86 void setShowCategory( const QString &c ); 86 void setShowCategory( const QString &c );
87 QString showCategory() const; 87 QString showCategory() const;
88 QStringList categories(); 88 QStringList categories();
89 void resizeRows( int size );
89 90
90 void show(); 91 void show();
91 void setPaintingEnabled( bool e ); 92 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
@@ -237,24 +237,32 @@ void AddressbookWindow::slotSetFont( int size ) {
237 237
238 startFontSize = size; 238 startFontSize = size;
239 239
240 QFont *currentFont;
241
240 switch (size) { 242 switch (size) {
241 case 0: 243 case 0:
242 fontMenu->setItemChecked(0, true); 244 fontMenu->setItemChecked(0, true);
243 fontMenu->setItemChecked(1, false); 245 fontMenu->setItemChecked(1, false);
244 fontMenu->setItemChecked(2, false); 246 fontMenu->setItemChecked(2, false);
245 abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); 247 abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) );
248 currentFont = new QFont (abList->font());
249 abList->resizeRows(currentFont->pixelSize() + 7);
246 break; 250 break;
247 case 1: 251 case 1:
248 fontMenu->setItemChecked(0, false); 252 fontMenu->setItemChecked(0, false);
249 fontMenu->setItemChecked(1, true); 253 fontMenu->setItemChecked(1, true);
250 fontMenu->setItemChecked(2, false); 254 fontMenu->setItemChecked(2, false);
251 abList->setFont( *defaultFont ); 255 abList->setFont( *defaultFont );
256 currentFont = new QFont (abList->font());
257 abList->resizeRows(currentFont->pixelSize() + 7);
252 break; 258 break;
253 case 2: 259 case 2:
254 fontMenu->setItemChecked(0, false); 260 fontMenu->setItemChecked(0, false);
255 fontMenu->setItemChecked(1, false); 261 fontMenu->setItemChecked(1, false);
256 fontMenu->setItemChecked(2, true); 262 fontMenu->setItemChecked(2, true);
257 abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) ); 263 abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) );
264 currentFont = new QFont (abList->font());
265 abList->resizeRows(currentFont->pixelSize() + 7);
258 break; 266 break;
259 } 267 }
260} 268}