author | drw <drw> | 2005-08-29 18:08:09 (UTC) |
---|---|---|
committer | drw <drw> | 2005-08-29 18:08:09 (UTC) |
commit | 9ff75dd54765230e0058264d0d4666d6d38f94c8 (patch) (side-by-side diff) | |
tree | c4afc83d7fda536b90dee36a9ca650750c4cecc2 /core | |
parent | 8456ec4039ffb824fc727d74b9473376b26ad530 (diff) | |
download | opie-9ff75dd54765230e0058264d0d4666d6d38f94c8.zip opie-9ff75dd54765230e0058264d0d4666d6d38f94c8.tar.gz opie-9ff75dd54765230e0058264d0d4666d6d38f94c8.tar.bz2 |
Scale icons in contact table listing and in configure dialog
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 31 | ||||
-rw-r--r-- | core/pim/addressbook/configdlg.cpp | 9 |
2 files changed, 24 insertions, 16 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 539d6ba..52aff36 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp @@ -610,4 +610,6 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* - ContactItem item; + int iconsize = fontMetrics().height(); + QImage icon; + ContactItem item; item.value = ""; @@ -616,2 +618,4 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* it != intFields.end(); ++it ) { + icon.reset(); + switch ( *it ) { @@ -631,3 +635,3 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* if ( !item.value.isEmpty() ) - item.icon = Opie::Core::OResource::loadPixmap( "addressbook/email" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/email" ); break; @@ -636,3 +640,3 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* if ( !item.value.isEmpty() ) - item.icon = Opie::Core::OResource::loadPixmap( "addressbook/email" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/email" ); break; @@ -656,3 +660,3 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* if ( !item.value.isEmpty() ) - item.icon = Opie::Core::OResource::loadPixmap( "addressbook/phonehome" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/phonehome" ); break; @@ -661,3 +665,3 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* if ( !item.value.isEmpty() ) - item.icon = Opie::Core::OResource::loadPixmap( "addressbook/faxhome" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/faxhome" ); break; @@ -666,3 +670,3 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* if ( !item.value.isEmpty() ) - item.icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilehome" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilehome" ); break; @@ -671,3 +675,3 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* if ( !item.value.isEmpty() ) - item.icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagehome" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagehome" ); break; @@ -691,3 +695,3 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* if ( !item.value.isEmpty() ) - item.icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagework" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagework" ); break; @@ -705,3 +709,3 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* if ( !item.value.isEmpty() ) - item.icon = Opie::Core::OResource::loadPixmap( "addressbook/phonework" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/phonework" ); break; @@ -710,3 +714,3 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* if ( !item.value.isEmpty() ) - item.icon = Opie::Core::OResource::loadPixmap( "addressbook/faxwork" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/faxwork" ); break; @@ -715,3 +719,3 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* if ( !item.value.isEmpty() ) - item.icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilework" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilework" ); break; @@ -755,2 +759,7 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* } + + if ( !icon.isNull() ) { + item.icon = icon.smoothScale( iconsize, iconsize ); + } + if ( !item.value.isEmpty() ) diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp index a491fc7..648ad52 100644 --- a/core/pim/addressbook/configdlg.cpp +++ b/core/pim/addressbook/configdlg.cpp @@ -26,7 +26,6 @@ ConfigDlg::ConfigDlg( QWidget *parent, const char *name): // Set Pics to Buttons and Tabs - m_upButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/up" ) ) ); - m_downButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/down" ) ) ); - m_addButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/add" ) ) ); - m_removeButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/sub" ) ) ); - + m_upButton->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ); + m_downButton->setPixmap( Opie::Core::OResource::loadPixmap( "down", Opie::Core::OResource::SmallIcon ) ); + m_addButton->setPixmap( Opie::Core::OResource::loadPixmap( "addressbook/add", Opie::Core::OResource::SmallIcon ) ); + m_removeButton->setPixmap( Opie::Core::OResource::loadPixmap( "addressbook/sub", Opie::Core::OResource::SmallIcon ) ); |