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
bae59909
Commit
bae59909
authored
May 23, 2015
by
Mark Harmstone
Committed by
Alexandre Julliard
May 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Use DPI settings for checkbox size.
parent
1812df71
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
theme_button.c
dlls/comctl32/theme_button.c
+7
-5
No files found.
dlls/comctl32/theme_button.c
View file @
bae59909
...
...
@@ -155,8 +155,7 @@ static void CB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN
{
RBS_CHECKEDNORMAL
,
RBS_CHECKEDDISABLED
,
RBS_CHECKEDHOT
,
RBS_CHECKEDPRESSED
,
RBS_CHECKEDNORMAL
}
};
static
const
int
cb_size
=
13
;
SIZE
sz
;
RECT
bgRect
,
textRect
;
HFONT
font
,
hPrevFont
=
NULL
;
LRESULT
checkState
=
SendMessageW
(
hwnd
,
BM_GETCHECK
,
0
,
0
);
...
...
@@ -186,15 +185,18 @@ static void CB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN
hPrevFont
=
SelectObject
(
hDC
,
font
);
}
if
(
FAILED
(
GetThemePartSize
(
theme
,
hDC
,
part
,
state
,
NULL
,
TS_DRAW
,
&
sz
)))
sz
.
cx
=
sz
.
cy
=
13
;
GetClientRect
(
hwnd
,
&
bgRect
);
GetThemeBackgroundContentRect
(
theme
,
hDC
,
part
,
state
,
&
bgRect
,
&
textRect
);
if
(
dtFlags
&
DT_SINGLELINE
)
/* Center the checkbox / radio button to the text. */
bgRect
.
top
=
bgRect
.
top
+
(
textRect
.
bottom
-
textRect
.
top
-
cb_size
)
/
2
;
bgRect
.
top
=
bgRect
.
top
+
(
textRect
.
bottom
-
textRect
.
top
-
sz
.
cy
)
/
2
;
/* adjust for the check/radio marker */
bgRect
.
bottom
=
bgRect
.
top
+
cb_size
;
bgRect
.
right
=
bgRect
.
left
+
cb_size
;
bgRect
.
bottom
=
bgRect
.
top
+
sz
.
cy
;
bgRect
.
right
=
bgRect
.
left
+
sz
.
cx
;
textRect
.
left
=
bgRect
.
right
+
6
;
DrawThemeParentBackground
(
hwnd
,
hDC
,
NULL
);
...
...
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