summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp31
-rw-r--r--core/pim/addressbook/configdlg.cpp9
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
@@ -609,10 +609,14 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /*
{
- ContactItem item;
+ int iconsize = fontMetrics().height();
+ QImage icon;
+ ContactItem item;
item.value = "";
for ( QValueList<int>::ConstIterator it = intFields.begin();
it != intFields.end(); ++it ) {
+ icon.reset();
+
switch ( *it ) {
default:
@@ -630,10 +634,10 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /*
item.value = entry.defaultEmail();
if ( !item.value.isEmpty() )
- item.icon = Opie::Core::OResource::loadPixmap( "addressbook/email" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/email" );
break;
case Qtopia::Emails:
item.value = entry.emails();
if ( !item.value.isEmpty() )
- item.icon = Opie::Core::OResource::loadPixmap( "addressbook/email" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/email" );
break;
case Qtopia::HomeStreet:
@@ -655,20 +659,20 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /*
item.value = entry.homePhone();
if ( !item.value.isEmpty() )
- item.icon = Opie::Core::OResource::loadPixmap( "addressbook/phonehome" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/phonehome" );
break;
case Qtopia::HomeFax:
item.value = entry.homeFax();
if ( !item.value.isEmpty() )
- item.icon = Opie::Core::OResource::loadPixmap( "addressbook/faxhome" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/faxhome" );
break;
case Qtopia::HomeMobile:
item.value = entry.homeMobile();
if ( !item.value.isEmpty() )
- item.icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilehome" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilehome" );
break;
case Qtopia::HomeWebPage:
item.value = entry.homeWebpage();
if ( !item.value.isEmpty() )
- item.icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagehome" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagehome" );
break;
case Qtopia::Company:
@@ -690,5 +694,5 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /*
item.value = entry.businessWebpage();
if ( !item.value.isEmpty() )
- item.icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagework" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagework" );
break;
case Qtopia::JobTitle:
@@ -704,15 +708,15 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /*
item.value = entry.businessPhone();
if ( !item.value.isEmpty() )
- item.icon = Opie::Core::OResource::loadPixmap( "addressbook/phonework" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/phonework" );
break;
case Qtopia::BusinessFax:
item.value = entry.businessFax();
if ( !item.value.isEmpty() )
- item.icon = Opie::Core::OResource::loadPixmap( "addressbook/faxwork" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/faxwork" );
break;
case Qtopia::BusinessMobile:
item.value = entry.businessMobile();
if ( !item.value.isEmpty() )
- item.icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilework" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilework" );
break;
case Qtopia::BusinessPager:
@@ -754,4 +758,9 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /*
break;
}
+
+ if ( !icon.isNull() ) {
+ item.icon = icon.smoothScale( iconsize, iconsize );
+ }
+
if ( !item.value.isEmpty() )
break;
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
@@ -25,9 +25,8 @@ 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 ) );
// Get the translation maps between Field ID and translated strings