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
b0ec8a66
Commit
b0ec8a66
authored
Aug 22, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Aug 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: The offset between the button and the text is half the digit width.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
94a87819
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
button.c
dlls/user32/button.c
+5
-5
No files found.
dlls/user32/button.c
View file @
b0ec8a66
...
...
@@ -851,7 +851,7 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
{
RECT
rbox
,
rtext
,
client
;
HBRUSH
hBrush
;
int
delta
;
int
delta
,
text_offset
;
UINT
dtFlags
;
HFONT
hFont
;
LONG
state
=
get_button_state
(
hwnd
);
...
...
@@ -869,6 +869,8 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
rbox
=
rtext
=
client
;
if
((
hFont
=
get_button_font
(
hwnd
)))
SelectObject
(
hDC
,
hFont
);
GetCharWidthW
(
hDC
,
'0'
,
'0'
,
&
text_offset
);
text_offset
/=
2
;
parent
=
GetParent
(
hwnd
);
if
(
!
parent
)
parent
=
hwnd
;
...
...
@@ -881,14 +883,12 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
if
(
style
&
BS_LEFTTEXT
)
{
/* magic +4 is what CTL3D expects */
rtext
.
right
-=
checkBoxWidth
+
4
;
rtext
.
right
-=
checkBoxWidth
+
text_offset
;
rbox
.
left
=
rbox
.
right
-
checkBoxWidth
;
}
else
{
rtext
.
left
+=
checkBoxWidth
+
4
;
rtext
.
left
+=
checkBoxWidth
+
text_offset
;
rbox
.
right
=
checkBoxWidth
;
}
...
...
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