Detlef Riekenberg : comctl32: Make the status control height dpi and theme aware.
Module: wine Branch: master Commit: dd8515915575203bc5fc8383675e3ad4a86a53b2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=dd8515915575203bc5fc838367... Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sun Feb 1 11:59:11 2009 +0100 comctl32: Make the status control height dpi and theme aware. --- dlls/comctl32/status.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index d107329..35d3bd4 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -95,7 +95,6 @@ typedef struct #define HORZ_BORDER 0 #define VERT_BORDER 2 #define HORZ_GAP 2 -#define MIN_PANE_HEIGHT 18 static const WCHAR themeClass[] = { 'S','t','a','t','u','s',0 }; @@ -649,7 +648,9 @@ STATUSBAR_SetIcon (STATUS_INFO *infoPtr, INT nPart, HICON hIcon) static BOOL STATUSBAR_SetMinHeight (STATUS_INFO *infoPtr, INT height) { - infoPtr->minHeight = max(height, MIN_PANE_HEIGHT); + DWORD ysize = GetSystemMetrics(SM_CYSIZE); + if (ysize & 1) ysize--; + infoPtr->minHeight = max(height, ysize); infoPtr->height = STATUSBAR_ComputeHeight(infoPtr); /* like native, don't resize the control */ return TRUE; @@ -921,7 +922,8 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) infoPtr->horizontalBorder = HORZ_BORDER; infoPtr->verticalBorder = VERT_BORDER; infoPtr->horizontalGap = HORZ_GAP; - infoPtr->minHeight = MIN_PANE_HEIGHT; + infoPtr->minHeight = GetSystemMetrics(SM_CYSIZE); + if (infoPtr->minHeight & 1) infoPtr->minHeight--; STATUSBAR_NotifyFormat(infoPtr, infoPtr->Notify, NF_REQUERY);
participants (1)
-
Alexandre Julliard