Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b8e0a334
Commit
b8e0a334
authored
Oct 05, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Remove today rectangle and focus drawing code from loops.
parent
9723e621
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
22 deletions
+19
-22
monthcal.c
dlls/comctl32/monthcal.c
+19
-22
No files found.
dlls/comctl32/monthcal.c
View file @
b8e0a334
...
...
@@ -130,6 +130,9 @@ static const int DayOfWeekTable[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};
static
const
WCHAR
themeClass
[]
=
{
'S'
,
'c'
,
'r'
,
'o'
,
'l'
,
'l'
,
'b'
,
'a'
,
'r'
,
0
};
/* empty SYSTEMTIME const */
static
const
SYSTEMTIME
st_null
;
#define MONTHCAL_GetInfoPtr(hwnd) ((MONTHCAL_INFO *)GetWindowLongPtrW(hwnd, 0))
/* helper functions */
...
...
@@ -482,11 +485,7 @@ static BOOL MONTHCAL_SetDayFocus(MONTHCAL_INFO *infoPtr, const SYSTEMTIME *st)
infoPtr
->
focusedSel
.
wMonth
,
&
r
);
if
(
!
st
&
MONTHCAL_ValidateDate
(
&
infoPtr
->
focusedSel
))
{
static
const
SYSTEMTIME
st_null
;
infoPtr
->
focusedSel
=
st_null
;
}
/* on set invalidates new day, on reset clears previous focused day */
InvalidateRect
(
infoPtr
->
hwndSelf
,
&
r
,
FALSE
);
...
...
@@ -573,10 +572,6 @@ static void MONTHCAL_DrawDay(const MONTHCAL_INFO *infoPtr, HDC hdc, int day, int
SetTextColor
(
hdc
,
oldCol
);
SetBkColor
(
hdc
,
oldBk
);
}
/* draw focus rectangle */
if
((
day
==
infoPtr
->
focusedSel
.
wDay
)
&&
(
month
==
infoPtr
->
focusedSel
.
wMonth
))
DrawFocusRect
(
hdc
,
&
r
);
}
...
...
@@ -777,16 +772,8 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT
MONTHCAL_CalcDayRect
(
infoPtr
,
&
rcDay
,
i
,
0
);
if
(
IntersectRect
(
&
rcTemp
,
&
(
ps
->
rcPaint
),
&
rcDay
))
{
MONTHCAL_DrawDay
(
infoPtr
,
hdc
,
day
,
infoPtr
->
curSel
.
wMonth
,
i
,
0
,
infoPtr
->
monthdayState
[
m
]
&
mask
);
if
((
infoPtr
->
curSel
.
wMonth
==
infoPtr
->
todaysDate
.
wMonth
)
&&
(
day
==
infoPtr
->
todaysDate
.
wDay
)
&&
(
infoPtr
->
curSel
.
wYear
==
infoPtr
->
todaysDate
.
wYear
))
{
if
(
!
(
infoPtr
->
dwStyle
&
MCS_NOTODAYCIRCLE
))
MONTHCAL_CircleDay
(
infoPtr
,
hdc
,
day
,
infoPtr
->
curSel
.
wMonth
);
}
}
mask
<<=
1
;
...
...
@@ -802,12 +789,6 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT
{
MONTHCAL_DrawDay
(
infoPtr
,
hdc
,
day
,
infoPtr
->
curSel
.
wMonth
,
i
,
j
,
infoPtr
->
monthdayState
[
m
]
&
mask
);
if
((
infoPtr
->
curSel
.
wMonth
==
infoPtr
->
todaysDate
.
wMonth
)
&&
(
day
==
infoPtr
->
todaysDate
.
wDay
)
&&
(
infoPtr
->
curSel
.
wYear
==
infoPtr
->
todaysDate
.
wYear
))
if
(
!
(
infoPtr
->
dwStyle
&
MCS_NOTODAYCIRCLE
))
MONTHCAL_CircleDay
(
infoPtr
,
hdc
,
day
,
infoPtr
->
curSel
.
wMonth
);
}
mask
<<=
1
;
day
++
;
...
...
@@ -843,6 +824,22 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT
}
SetTextColor
(
hdc
,
infoPtr
->
txt
);
/* draw today mark rectangle */
if
((
infoPtr
->
curSel
.
wMonth
==
infoPtr
->
todaysDate
.
wMonth
)
&&
(
infoPtr
->
curSel
.
wYear
==
infoPtr
->
todaysDate
.
wYear
)
&&
!
(
infoPtr
->
dwStyle
&
MCS_NOTODAYCIRCLE
))
{
MONTHCAL_CircleDay
(
infoPtr
,
hdc
,
infoPtr
->
todaysDate
.
wDay
,
infoPtr
->
todaysDate
.
wMonth
);
}
/* draw focused day */
if
(
!
MONTHCAL_IsDateEqual
(
&
infoPtr
->
focusedSel
,
&
st_null
))
{
MONTHCAL_CalcPosFromDay
(
infoPtr
,
infoPtr
->
focusedSel
.
wDay
,
infoPtr
->
focusedSel
.
wMonth
,
&
rcDay
);
DrawFocusRect
(
hdc
,
&
rcDay
);
}
/* draw `today' date if style allows it, and draw a circle before today's
* date if necessary */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment