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
9efcbd11
Commit
9efcbd11
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: Scale the button size with screen resolution.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b0ec8a66
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
button.c
dlls/user32/button.c
+4
-13
No files found.
dlls/user32/button.c
View file @
9efcbd11
...
...
@@ -143,10 +143,6 @@ static const pfPaint btnPaintFunc[MAX_BTN_TYPE] =
OB_Paint
/* BS_OWNERDRAW */
};
static
HBITMAP
hbitmapCheckBoxes
=
0
;
static
WORD
checkBoxWidth
=
0
,
checkBoxHeight
=
0
;
/*********************************************************************
* button class descriptor
*/
...
...
@@ -243,14 +239,6 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
break
;
case
WM_CREATE
:
if
(
!
hbitmapCheckBoxes
)
{
BITMAP
bmp
;
hbitmapCheckBoxes
=
LoadBitmapW
(
0
,
MAKEINTRESOURCEW
(
OBM_CHECKBOXES
));
GetObjectW
(
hbitmapCheckBoxes
,
sizeof
(
bmp
),
&
bmp
);
checkBoxWidth
=
bmp
.
bmWidth
/
4
;
checkBoxHeight
=
bmp
.
bmHeight
/
3
;
}
if
(
btn_type
>=
MAX_BTN_TYPE
)
return
-
1
;
/* abort */
...
...
@@ -851,7 +839,7 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
{
RECT
rbox
,
rtext
,
client
;
HBRUSH
hBrush
;
int
delta
,
text_offset
;
int
delta
,
text_offset
,
checkBoxWidth
,
checkBoxHeight
;
UINT
dtFlags
;
HFONT
hFont
;
LONG
state
=
get_button_state
(
hwnd
);
...
...
@@ -868,6 +856,9 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
GetClientRect
(
hwnd
,
&
client
);
rbox
=
rtext
=
client
;
checkBoxWidth
=
12
*
GetDeviceCaps
(
hDC
,
LOGPIXELSX
)
/
96
+
1
;
checkBoxHeight
=
12
*
GetDeviceCaps
(
hDC
,
LOGPIXELSY
)
/
96
+
1
;
if
((
hFont
=
get_button_font
(
hwnd
)))
SelectObject
(
hDC
,
hFont
);
GetCharWidthW
(
hDC
,
'0'
,
'0'
,
&
text_offset
);
text_offset
/=
2
;
...
...
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