FEATURE-758: This commit enhances the already made changes to also fix the size of the icons in the destination picker and the context menu. On top of that, if a large icon size is selected we try to get a larger (more defined) icon from the application unfortunately that doesn't improve the build in icons.

This commit is contained in:
RKrom 2014-11-05 12:38:01 +01:00
commit 9df25bdd76
13 changed files with 129 additions and 27 deletions

View file

@ -336,7 +336,15 @@ namespace GreenshotPlugin.Core {
IntPtr ICON_BIG = new IntPtr(1);
IntPtr ICON_SMALL2 = new IntPtr(2);
IntPtr iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_SMALL2, IntPtr.Zero);
IntPtr iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_BIG, IntPtr.Zero);
if (conf.UseLargeIcons) {
iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_BIG, IntPtr.Zero);
if (iconHandle == IntPtr.Zero) {
iconHandle = User32.GetClassLongWrapper(hwnd, (int)ClassLongIndex.GCL_HICON);
}
} else {
iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_SMALL2, IntPtr.Zero);
}
if (iconHandle == IntPtr.Zero) {
iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_SMALL, IntPtr.Zero);
}