[ros-diffs] [weiden] 30047: Increase size of current date selection

weiden at svn.reactos.org weiden at svn.reactos.org
Thu Nov 1 18:41:00 CET 2007


Author: weiden
Date: Thu Nov  1 20:41:00 2007
New Revision: 30047

URL: http://svn.reactos.org/svn/reactos?rev=30047&view=rev
Log:
Increase size of current date selection

Modified:
    trunk/reactos/dll/cpl/timedate/monthcal.c

Modified: trunk/reactos/dll/cpl/timedate/monthcal.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/monthcal.c?rev=30047&r1=30046&r2=30047&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/timedate/monthcal.c (original)
+++ trunk/reactos/dll/cpl/timedate/monthcal.c Thu Nov  1 20:41:00 2007
@@ -542,7 +542,20 @@
 
                         if (Day == infoPtr->Day)
                         {
-                            rcHighlight = rcText;
+                            SIZE TextSel;
+
+                            TextSel.cx = (infoPtr->CellSize.cx * 2) / 3;
+                            TextSel.cy = (infoPtr->CellSize.cy * 3) / 4;
+
+                            if (TextSel.cx < rcText.right - rcText.left)
+                                TextSel.cx = rcText.right - rcText.left;
+                            if (TextSel.cy < rcText.bottom - rcText.top)
+                                TextSel.cy = rcText.bottom - rcText.top;
+
+                            rcHighlight.left = rcCell.left + (infoPtr->CellSize.cx / 2) - (TextSel.cx / 2);
+                            rcHighlight.right = rcHighlight.left + TextSel.cx;
+                            rcHighlight.top = rcCell.top + (infoPtr->CellSize.cy / 2) - (TextSel.cy / 2);
+                            rcHighlight.bottom = rcHighlight.top + TextSel.cy;
 
                             InflateRect(&rcHighlight,
                                         GetSystemMetrics(SM_CXFOCUSBORDER),




More information about the Ros-diffs mailing list