Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e7116725
Commit
e7116725
authored
Mar 24, 2015
by
Mark Harmstone
Committed by
Alexandre Julliard
Mar 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Use correct font for themed headers.
parent
9a3fdffe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
header.c
dlls/comctl32/header.c
+20
-4
No files found.
dlls/comctl32/header.c
View file @
e7116725
...
...
@@ -333,6 +333,7 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
INT
oldBkMode
;
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwndSelf
);
NMCUSTOMDRAW
nmcd
;
int
state
=
0
;
TRACE
(
"DrawItem(iItem %d bHotTrack %d unicode flag %d)
\n
"
,
iItem
,
bHotTrack
,
(
infoPtr
->
nNotifyFormat
==
NFR_UNICODE
));
...
...
@@ -340,6 +341,9 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
if
(
r
.
right
-
r
.
left
==
0
)
return
phdi
->
rect
.
right
;
if
(
theme
)
state
=
(
phdi
->
bDown
)
?
HIS_PRESSED
:
(
bHotTrack
?
HIS_HOT
:
HIS_NORMAL
);
/* Set the colors before sending NM_CUSTOMDRAW so that it can change them */
SetTextColor
(
hdc
,
(
bHotTrack
&&
!
theme
)
?
COLOR_HIGHLIGHT
:
COLOR_BTNTEXT
);
SetBkColor
(
hdc
,
comctl32_color
.
clr3dFace
);
...
...
@@ -418,8 +422,14 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
RECT
textRect
;
SetRectEmpty
(
&
textRect
);
DrawTextW
(
hdc
,
phdi
->
pszText
,
-
1
,
&
textRect
,
DT_LEFT
|
DT_VCENTER
|
DT_SINGLELINE
|
DT_CALCRECT
);
if
(
theme
)
{
GetThemeTextExtent
(
theme
,
hdc
,
HP_HEADERITEM
,
state
,
phdi
->
pszText
,
-
1
,
DT_LEFT
|
DT_VCENTER
|
DT_SINGLELINE
,
NULL
,
&
textRect
);
}
else
{
DrawTextW
(
hdc
,
phdi
->
pszText
,
-
1
,
&
textRect
,
DT_LEFT
|
DT_VCENTER
|
DT_SINGLELINE
|
DT_CALCRECT
);
}
cw
=
textRect
.
right
-
textRect
.
left
+
2
*
infoPtr
->
iMargin
;
}
...
...
@@ -512,8 +522,14 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
oldBkMode
=
SetBkMode
(
hdc
,
TRANSPARENT
);
r
.
left
=
tx
;
r
.
right
=
tx
+
tw
;
DrawTextW
(
hdc
,
phdi
->
pszText
,
-
1
,
&
r
,
DT_LEFT
|
DT_END_ELLIPSIS
|
DT_VCENTER
|
DT_SINGLELINE
);
if
(
theme
)
{
DrawThemeText
(
theme
,
hdc
,
HP_HEADERITEM
,
state
,
phdi
->
pszText
,
-
1
,
DT_LEFT
|
DT_END_ELLIPSIS
|
DT_VCENTER
|
DT_SINGLELINE
,
0
,
&
r
);
}
else
{
DrawTextW
(
hdc
,
phdi
->
pszText
,
-
1
,
&
r
,
DT_LEFT
|
DT_END_ELLIPSIS
|
DT_VCENTER
|
DT_SINGLELINE
);
}
if
(
oldBkMode
!=
TRANSPARENT
)
SetBkMode
(
hdc
,
oldBkMode
);
}
...
...
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