summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar/toolbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TopToolBar/toolbar.cpp')
-rw-r--r--plugins/TopToolBar/toolbar.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp
index e9d6525c15..a9467708c2 100644
--- a/plugins/TopToolBar/toolbar.cpp
+++ b/plugins/TopToolBar/toolbar.cpp
@@ -207,12 +207,14 @@ TopButtonInt* CreateButton(TTBButton* but)
b->pszName = mir_strdup(but->name);
- if (b->dwFlags & TTBBF_ICONBYHANDLE) {
- b->hIconUp = Skin_GetIconByHandle(b->hIconHandleUp = but->hIconHandleUp);
- if (but->hIconHandleDn)
- b->hIconDn = Skin_GetIconByHandle(b->hIconHandleDn = but->hIconHandleDn);
- else
- b->hIconDn = 0, b->hIconHandleDn = 0;
+ b->hIconHandleUp = (HANDLE)CallService(MS_SKIN2_ISMANAGEDICON, WPARAM(but->hIconHandleUp), 0);
+ if (b->hIconHandleUp) {
+ b->hIconUp = Skin_GetIconByHandle(b->hIconHandleUp);
+ if (but->hIconHandleDn) {
+ b->hIconHandleDn = (HANDLE)CallService(MS_SKIN2_ISMANAGEDICON, WPARAM(but->hIconHandleDn), 0);
+ b->hIconDn = Skin_GetIconByHandle(b->hIconHandleDn);
+ }
+ else b->hIconDn = 0, b->hIconHandleDn = 0;
}
else {
char buf[256];