[BeFree CVS] neptune/libneptune-xdg ChangeLog,1.12,1.13 bicontheme.cpp,1.12,1.13 bicontheme.h,1.8,1.
Status: Planning
Brought to you by:
plfiorini
|
From: Pier L. F. <plf...@us...> - 2005-01-07 03:36:57
|
Update of /cvsroot/befree/neptune/libneptune-xdg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12095/libneptune-xdg Modified Files: ChangeLog bicontheme.cpp bicontheme.h Log Message: BIconTheme::loadIcon() returns icon with both small and large size Index: bicontheme.h =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-xdg/bicontheme.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- bicontheme.h 1 Jan 2005 21:50:43 -0000 1.8 +++ bicontheme.h 7 Jan 2005 03:36:48 -0000 1.9 @@ -75,8 +75,7 @@ QString iconPath(const QString &icon, Q_INT32 iconsize = 48, Context dircontext = Any); - QIcon loadIcon(const QString &name, Qt::IconSize size = Qt::LargeIconSize, - Context dircontext = Any); + QIcon loadIcon(const QString &name, Context dircontext = Any); private: bool directoryMatchesSize(const QString &dir, Q_INT32 iconsize); Index: bicontheme.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-xdg/bicontheme.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- bicontheme.cpp 7 Jan 2005 03:09:21 -0000 1.12 +++ bicontheme.cpp 7 Jan 2005 03:36:48 -0000 1.13 @@ -272,8 +272,7 @@ return QString(); } -QIcon BIconTheme::loadIcon(const QString &name, Qt::IconSize size, - BIconTheme::Context dircontext) +QIcon BIconTheme::loadIcon(const QString &name, BIconTheme::Context dircontext) { QStringList dataDirs = BBaseDirectory::dataDirectories(); bool found = false; @@ -296,20 +295,17 @@ if (!found) { - // Determine icon size - if (size == Qt::SmallIconSize) - iconsize = BConfiguration::smallIconSize(); - else - iconsize = BConfiguration::largeIconSize(); + // Get small icon + iconsize = BConfiguration::smallIconSize(); + path = iconPath(name, iconsize, dircontext); + icon.setPixmap(path, Qt::SmallIconSize); - // Get icon path + // Get large icon + iconsize = BConfiguration::largeIconSize(); path = iconPath(name, iconsize, dircontext); + icon.setPixmap(path, Qt::LargeIconSize); } - // Set icon if found - if (!path.isEmpty()) - icon.setPixmap(path, size); - return icon; } Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-xdg/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ChangeLog 7 Jan 2005 03:09:21 -0000 1.12 +++ ChangeLog 7 Jan 2005 03:36:48 -0000 1.13 @@ -1,7 +1,8 @@ 2005-01-07 Pier Luigi Fiorini <pie...@mo...> - * bicontheme.cpp (BIconTheme::loadIcon): Check for icons in - datadir/pixmaps/ first. + * bicontheme.cpp (BIconTheme::loadIcon): + Check for icons in datadir/pixmaps/ first. + Return icon with both small and large size. 2005-01-01 Pier Luigi Fiorini <pie...@mo...> |