diff options
author | louis <louis.braun@gmx.de> | 2013-01-27 13:57:07 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-01-27 13:57:07 +0100 |
commit | de9bc2df7e2418269e86abbf452d212a75cdb201 (patch) | |
tree | fa2577c4e57ae31d8b56ac76dc5c12d5f5f09b96 /imageloader.c | |
parent | c145a916766969c9e3fef7166d09b5d95fe29c02 (diff) | |
download | skin-nopacity-de9bc2df7e2418269e86abbf452d212a75cdb201.tar.gz skin-nopacity-de9bc2df7e2418269e86abbf452d212a75cdb201.tar.bz2 |
Using theme specific icons, added new theme 'green' with appropriate icons
Diffstat (limited to 'imageloader.c')
-rw-r--r-- | imageloader.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/imageloader.c b/imageloader.c index 1676175..058affa 100644 --- a/imageloader.c +++ b/imageloader.c @@ -38,10 +38,18 @@ bool cImageLoader::LoadIcon(const char *cIcon, int size) { return false; bool success = false; if (config.iconPathSet) { - success = LoadImage(cString(cIcon), config.iconPath, "png"); + cString iconThemePath = cString::sprintf("%s%s/", *config.iconPath, Setup.OSDTheme); + success = LoadImage(cString(cIcon), iconThemePath, "png"); + if (!success) { + success = LoadImage(cString(cIcon), config.iconPath, "png"); + } } if (!success) { - success = LoadImage(cString(cIcon), config.iconPathDefault, "png"); + cString iconThemePath = cString::sprintf("%s%s/", *config.iconPathDefault, Setup.OSDTheme); + success = LoadImage(cString(cIcon), iconThemePath, "png"); + if (!success) { + success = LoadImage(cString(cIcon), config.iconPathDefault, "png"); + } } if (!success) return false; @@ -55,10 +63,18 @@ bool cImageLoader::LoadIcon(const char *cIcon, int width, int height) { return false; bool success = false; if (config.iconPathSet) { - success = LoadImage(cString(cIcon), config.iconPath, "png"); + cString iconThemePath = cString::sprintf("%s%s/", *config.iconPath, Setup.OSDTheme); + success = LoadImage(cString(cIcon), iconThemePath, "png"); + if (!success) { + success = LoadImage(cString(cIcon), config.iconPath, "png"); + } } if (!success) { - success = LoadImage(cString(cIcon), config.iconPathDefault, "png"); + cString iconThemePath = cString::sprintf("%s%s/", *config.iconPathDefault, Setup.OSDTheme); + success = LoadImage(cString(cIcon), iconThemePath, "png"); + if (!success) { + success = LoadImage(cString(cIcon), config.iconPathDefault, "png"); + } } if (!success) return false; |