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
c93a5207
Commit
c93a5207
authored
Oct 09, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/datetime: Fix selections painting - use text rectangle, not whole field.
parent
26ab381f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
16 deletions
+22
-16
datetime.c
dlls/comctl32/datetime.c
+22
-16
No files found.
dlls/comctl32/datetime.c
View file @
c93a5207
...
...
@@ -632,19 +632,15 @@ DATETIME_ReturnFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int count, SHO
static
void
DATETIME_Refresh
(
DATETIME_INFO
*
infoPtr
,
HDC
hdc
)
{
int
i
,
prevright
;
RECT
*
field
;
RECT
*
rcDraw
=
&
infoPtr
->
rcDraw
;
RECT
*
calbutton
=
&
infoPtr
->
calbutton
;
RECT
*
checkbox
=
&
infoPtr
->
checkbox
;
SIZE
size
;
COLORREF
oldTextColor
;
SHORT
fieldWidth
=
0
;
/* draw control edge */
TRACE
(
"
\n
"
);
if
(
infoPtr
->
dateValid
)
{
int
i
,
prevright
;
RECT
*
field
;
RECT
*
rcDraw
=
&
infoPtr
->
rcDraw
;
SIZE
size
;
COLORREF
oldTextColor
;
SHORT
fieldWidth
=
0
;
HFONT
oldFont
=
SelectObject
(
hdc
,
infoPtr
->
hFont
);
INT
oldBkMode
=
SetBkMode
(
hdc
,
TRANSPARENT
);
WCHAR
txt
[
80
];
...
...
@@ -653,25 +649,35 @@ DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc)
GetTextExtentPoint32W
(
hdc
,
txt
,
strlenW
(
txt
),
&
size
);
rcDraw
->
bottom
=
size
.
cy
+
2
;
prevright
=
checkbox
->
right
=
((
infoPtr
->
dwStyle
&
DTS_SHOWNONE
)
?
18
:
2
);
prevright
=
infoPtr
->
checkbox
.
right
=
((
infoPtr
->
dwStyle
&
DTS_SHOWNONE
)
?
18
:
2
);
for
(
i
=
0
;
i
<
infoPtr
->
nrFields
;
i
++
)
{
DATETIME_ReturnTxt
(
infoPtr
,
i
,
txt
,
sizeof
(
txt
)
/
sizeof
(
txt
[
0
]));
GetTextExtentPoint32W
(
hdc
,
txt
,
strlenW
(
txt
),
&
size
);
DATETIME_ReturnFieldWidth
(
infoPtr
,
hdc
,
i
,
&
fieldWidth
);
field
=
&
infoPtr
->
fieldRect
[
i
];
field
->
left
=
prevright
;
field
->
right
=
prevright
+
fieldWidth
;
field
->
top
=
rcDraw
->
top
;
field
->
left
=
prevright
;
field
->
right
=
prevright
+
fieldWidth
;
field
->
top
=
rcDraw
->
top
;
field
->
bottom
=
rcDraw
->
bottom
;
prevright
=
field
->
right
;
if
(
infoPtr
->
dwStyle
&
WS_DISABLED
)
oldTextColor
=
SetTextColor
(
hdc
,
comctl32_color
.
clrGrayText
);
else
if
((
infoPtr
->
haveFocus
)
&&
(
i
==
infoPtr
->
select
))
{
RECT
selection
;
/* fill if focused */
HBRUSH
hbr
=
CreateSolidBrush
(
comctl32_color
.
clrActiveCaption
);
FillRect
(
hdc
,
field
,
hbr
);
selection
.
right
=
field
->
right
;
selection
.
left
=
selection
.
right
-
size
.
cx
;
selection
.
top
=
0
;
selection
.
bottom
=
size
.
cy
;
/* center rectangle */
OffsetRect
(
&
selection
,
0
,
(
field
->
bottom
-
size
.
cy
)
/
2
);
FillRect
(
hdc
,
&
selection
,
hbr
);
DeleteObject
(
hbr
);
oldTextColor
=
SetTextColor
(
hdc
,
comctl32_color
.
clrWindow
);
}
...
...
@@ -687,7 +693,7 @@ DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc)
}
if
(
!
(
infoPtr
->
dwStyle
&
DTS_UPDOWN
))
{
DrawFrameControl
(
hdc
,
calbutton
,
DFC_SCROLL
,
DrawFrameControl
(
hdc
,
&
infoPtr
->
calbutton
,
DFC_SCROLL
,
DFCS_SCROLLDOWN
|
(
infoPtr
->
bCalDepressed
?
DFCS_PUSHED
:
0
)
|
(
infoPtr
->
dwStyle
&
WS_DISABLED
?
DFCS_INACTIVE
:
0
)
);
}
...
...
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