Huw Davies : regedit: Use the system metrics to retrieve the treeview icon sizes.
Module: wine Branch: master Commit: 6bc8ecafe87ad4117dc0aec295e881a5793f78ab URL: http://source.winehq.org/git/wine.git/?a=commit;h=6bc8ecafe87ad4117dc0aec295... Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Apr 27 14:27:21 2017 +0100 regedit: Use the system metrics to retrieve the treeview icon sizes. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/treeview.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c index 4b5e1ca..d11793c 100644 --- a/programs/regedit/treeview.c +++ b/programs/regedit/treeview.c @@ -43,8 +43,6 @@ int Image_Open; int Image_Closed; int Image_Root; -#define CX_ICON 16 -#define CY_ICON 16 #define NUM_ICONS 3 static BOOL UpdateExpandingTree(HWND hwndTV, HTREEITEM hItem, int state); @@ -599,10 +597,11 @@ static BOOL InitTreeViewImageLists(HWND hwndTV) { HIMAGELIST himl; /* handle to image list */ HICON hico; /* handle to icon */ + INT cx = GetSystemMetrics(SM_CXSMICON); + INT cy = GetSystemMetrics(SM_CYSMICON); /* Create the image list. */ - if ((himl = ImageList_Create(CX_ICON, CY_ICON, - ILC_MASK, 0, NUM_ICONS)) == NULL) + if ((himl = ImageList_Create(cx, cy, ILC_MASK, 0, NUM_ICONS)) == NULL) return FALSE; /* Add the open file, closed file, and document bitmaps. */
participants (1)
-
Alexandre Julliard