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
ce9d006a
Commit
ce9d006a
authored
Nov 11, 2021
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Nov 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/button: Support BS_PUSHLIKE for themed command links.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3a2d2adc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
button.c
dlls/comctl32/button.c
+9
-9
No files found.
dlls/comctl32/button.c
View file @
ce9d006a
...
...
@@ -3040,6 +3040,7 @@ static void CL_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
NMCUSTOMDRAW
nmcd
;
LRESULT
cdrf
;
HWND
parent
;
int
part
;
RECT
rc
;
if
(
infoPtr
->
font
)
SelectObject
(
hDC
,
infoPtr
->
font
);
...
...
@@ -3054,9 +3055,10 @@ static void CL_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
cdrf
=
SendMessageW
(
parent
,
WM_NOTIFY
,
nmcd
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmcd
);
if
(
cdrf
&
CDRF_SKIPDEFAULT
)
return
;
if
(
IsThemeBackgroundPartiallyTransparent
(
theme
,
BP_COMMANDLINK
,
state
))
part
=
GetWindowLongW
(
infoPtr
->
hwnd
,
GWL_STYLE
)
&
BS_PUSHLIKE
?
BP_PUSHBUTTON
:
BP_COMMANDLINK
;
if
(
IsThemeBackgroundPartiallyTransparent
(
theme
,
part
,
state
))
DrawThemeParentBackground
(
infoPtr
->
hwnd
,
hDC
,
NULL
);
DrawThemeBackground
(
theme
,
hDC
,
BP_COMMANDLINK
,
state
,
&
rc
,
NULL
);
DrawThemeBackground
(
theme
,
hDC
,
part
,
state
,
&
rc
,
NULL
);
if
(
cdrf
&
CDRF_NOTIFYPOSTERASE
)
{
...
...
@@ -3076,7 +3078,7 @@ static void CL_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
SIZE
img_size
;
WCHAR
*
text
;
GetThemeBackgroundContentRect
(
theme
,
hDC
,
BP_COMMANDLINK
,
state
,
&
rc
,
&
r
);
GetThemeBackgroundContentRect
(
theme
,
hDC
,
part
,
state
,
&
rc
,
&
r
);
/* The text alignment and styles are fixed and don't depend on button styles */
dtFlags
=
DT_TOP
|
DT_LEFT
|
DT_WORDBREAK
;
...
...
@@ -3096,10 +3098,9 @@ static void CL_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
UINT
len
=
lstrlenW
(
text
);
RECT
text_rect
;
GetThemeTextExtent
(
theme
,
hDC
,
BP_COMMANDLINK
,
state
,
text
,
len
,
dtFlags
|
DT_END_ELLIPSIS
,
&
r
,
&
text_rect
);
DrawThemeText
(
theme
,
hDC
,
BP_COMMANDLINK
,
state
,
text
,
len
,
dtFlags
|
DT_END_ELLIPSIS
,
0
,
&
r
);
GetThemeTextExtent
(
theme
,
hDC
,
part
,
state
,
text
,
len
,
dtFlags
|
DT_END_ELLIPSIS
,
&
r
,
&
text_rect
);
DrawThemeText
(
theme
,
hDC
,
part
,
state
,
text
,
len
,
dtFlags
|
DT_END_ELLIPSIS
,
0
,
&
r
);
txt_h
=
text_rect
.
bottom
-
text_rect
.
top
;
heap_free
(
text
);
...
...
@@ -3114,8 +3115,7 @@ static void CL_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
opts
.
dwSize
=
sizeof
(
opts
);
opts
.
dwFlags
=
DTT_FONTPROP
;
opts
.
iFontPropId
=
TMT_BODYFONT
;
DrawThemeTextEx
(
theme
,
hDC
,
BP_COMMANDLINK
,
state
,
infoPtr
->
note
,
infoPtr
->
note_length
,
DrawThemeTextEx
(
theme
,
hDC
,
part
,
state
,
infoPtr
->
note
,
infoPtr
->
note_length
,
dtFlags
|
DT_NOPREFIX
,
&
r
,
&
opts
);
}
...
...
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