comctl32/monthcal: Fix today label position.
authorNikolay Sivov <nsivov@codeweavers.com>
Tue, 20 Sep 2011 06:45:24 +0000 (10:45 +0400)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 20 Sep 2011 14:21:40 +0000 (16:21 +0200)
dlls/comctl32/monthcal.c

index f46ec5f2e2067c937ed6bd42ae6cb7d7af541e91..dfa3d6e96dc33e86c7404be0251bcb8848364d3e 100644 (file)
@@ -963,9 +963,8 @@ static void MONTHCAL_PaintTodayTitle(const MONTHCAL_INFO *infoPtr, HDC hdc, cons
 
   col = infoPtr->dwStyle & MCS_NOTODAYCIRCLE ? 0 : 1;
   if (infoPtr->dwStyle & MCS_WEEKNUMBERS) col--;
-  /* TODO: when multiple calendars layout is calculated use first column/last row calendar for that
-     imaginary day position */
-  MONTHCAL_GetDayRectI(infoPtr, &text_rect, col, 6, 0);
+  /* label is located below first calendar last row */
+  MONTHCAL_GetDayRectI(infoPtr, &text_rect, col, 6, infoPtr->dim.cx * infoPtr->dim.cy - infoPtr->dim.cx);
   box_rect = text_rect;
 
   GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &infoPtr->todaysDate, NULL,