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
fbd7f881
Commit
fbd7f881
authored
Dec 11, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix font style when item is bold and hovered in track mode.
parent
9336a390
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
treeview.c
dlls/comctl32/treeview.c
+17
-1
No files found.
dlls/comctl32/treeview.c
View file @
fbd7f881
...
...
@@ -110,6 +110,7 @@ typedef struct tagTREEVIEW_INFO
HFONT
hDefaultFont
;
HFONT
hBoldFont
;
HFONT
hUnderlineFont
;
HFONT
hBoldUnderlineFont
;
HCURSOR
hcurHand
;
HWND
hwndToolTip
;
...
...
@@ -303,11 +304,22 @@ TREEVIEW_CreateUnderlineFont(HFONT hOrigFont)
return
CreateFontIndirectW
(
&
font
);
}
static
HFONT
TREEVIEW_CreateBoldUnderlineFont
(
HFONT
hfont
)
{
LOGFONTW
font
;
GetObjectW
(
hfont
,
sizeof
(
font
),
&
font
);
font
.
lfWeight
=
FW_BOLD
;
font
.
lfUnderline
=
TRUE
;
return
CreateFontIndirectW
(
&
font
);
}
static
inline
HFONT
TREEVIEW_FontForItem
(
const
TREEVIEW_INFO
*
infoPtr
,
const
TREEVIEW_ITEM
*
item
)
{
if
((
infoPtr
->
dwStyle
&
TVS_TRACKSELECT
)
&&
(
item
==
infoPtr
->
hotItem
))
return
infoPtr
->
hUnderlineFont
;
return
i
tem
->
state
&
TVIS_BOLD
?
infoPtr
->
hBoldUnderlineFont
:
i
nfoPtr
->
hUnderlineFont
;
if
(
item
->
state
&
TVIS_BOLD
)
return
infoPtr
->
hBoldFont
;
return
infoPtr
->
hFont
;
...
...
@@ -1903,8 +1915,10 @@ TREEVIEW_SetFont(TREEVIEW_INFO *infoPtr, HFONT hFont, BOOL bRedraw)
DeleteObject
(
infoPtr
->
hBoldFont
);
DeleteObject
(
infoPtr
->
hUnderlineFont
);
DeleteObject
(
infoPtr
->
hBoldUnderlineFont
);
infoPtr
->
hBoldFont
=
TREEVIEW_CreateBoldFont
(
infoPtr
->
hFont
);
infoPtr
->
hUnderlineFont
=
TREEVIEW_CreateUnderlineFont
(
infoPtr
->
hFont
);
infoPtr
->
hBoldUnderlineFont
=
TREEVIEW_CreateBoldUnderlineFont
(
infoPtr
->
hFont
);
if
(
!
infoPtr
->
bHeightSet
)
infoPtr
->
uItemHeight
=
TREEVIEW_NaturalHeight
(
infoPtr
);
...
...
@@ -5059,6 +5073,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
infoPtr
->
hFont
=
infoPtr
->
hDefaultFont
=
CreateFontIndirectW
(
&
lf
);
infoPtr
->
hBoldFont
=
TREEVIEW_CreateBoldFont
(
infoPtr
->
hFont
);
infoPtr
->
hUnderlineFont
=
TREEVIEW_CreateUnderlineFont
(
infoPtr
->
hFont
);
infoPtr
->
hBoldUnderlineFont
=
TREEVIEW_CreateBoldUnderlineFont
(
infoPtr
->
hFont
);
infoPtr
->
hcurHand
=
LoadCursorW
(
NULL
,
(
LPWSTR
)
IDC_HAND
);
infoPtr
->
uItemHeight
=
TREEVIEW_NaturalHeight
(
infoPtr
);
...
...
@@ -5118,6 +5133,7 @@ TREEVIEW_Destroy(TREEVIEW_INFO *infoPtr)
DeleteObject
(
infoPtr
->
hDefaultFont
);
DeleteObject
(
infoPtr
->
hBoldFont
);
DeleteObject
(
infoPtr
->
hUnderlineFont
);
DeleteObject
(
infoPtr
->
hBoldUnderlineFont
);
Free
(
infoPtr
);
return
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