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
489c01ee
Commit
489c01ee
authored
Jul 17, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/trackbar: Scale thumb size with resolution.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6292c0ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
trackbar.c
dlls/comctl32/trackbar.c
+14
-11
No files found.
dlls/comctl32/trackbar.c
View file @
489c01ee
...
@@ -1468,25 +1468,28 @@ TRACKBAR_SetUnicodeFormat (TRACKBAR_INFO *infoPtr, BOOL fUnicode)
...
@@ -1468,25 +1468,28 @@ TRACKBAR_SetUnicodeFormat (TRACKBAR_INFO *infoPtr, BOOL fUnicode)
return
bTemp
;
return
bTemp
;
}
}
static
int
get_scaled_metric
(
const
TRACKBAR_INFO
*
infoPtr
,
int
value
)
{
return
MulDiv
(
value
,
GetDpiForWindow
(
infoPtr
->
hwndSelf
),
96
);
}
static
LRESULT
static
LRESULT
TRACKBAR_InitializeThumb
(
TRACKBAR_INFO
*
infoPtr
)
TRACKBAR_InitializeThumb
(
TRACKBAR_INFO
*
infoPtr
)
{
{
int
client_size
;
RECT
rect
;
RECT
rect
;
int
clientWidth
,
clientMetric
;
/* initial thumb length */
infoPtr
->
uThumbLen
=
get_scaled_metric
(
infoPtr
,
infoPtr
->
dwStyle
&
TBS_ENABLESELRANGE
?
23
:
21
);
clientMetric
=
(
infoPtr
->
dwStyle
&
TBS_ENABLESELRANGE
)
?
23
:
21
;
GetClientRect
(
infoPtr
->
hwndSelf
,
&
rect
);
GetClientRect
(
infoPtr
->
hwndSelf
,
&
rect
);
if
(
infoPtr
->
dwStyle
&
TBS_VERT
)
{
if
(
infoPtr
->
dwStyle
&
TBS_VERT
)
clientWidth
=
rect
.
right
-
rect
.
left
;
client_size
=
rect
.
right
-
rect
.
left
;
}
else
{
clientWidth
=
rect
.
bottom
-
rect
.
top
;
}
if
(
clientWidth
>=
clientMetric
)
infoPtr
->
uThumbLen
=
clientMetric
;
else
else
infoPtr
->
uThumbLen
=
clientWidth
>
9
?
clientWidth
-
6
:
4
;
client_size
=
rect
.
bottom
-
rect
.
top
;
if
(
client_size
<
infoPtr
->
uThumbLen
)
infoPtr
->
uThumbLen
=
client_size
>
get_scaled_metric
(
infoPtr
,
9
)
?
client_size
-
get_scaled_metric
(
infoPtr
,
5
)
:
get_scaled_metric
(
infoPtr
,
4
);
TRACKBAR_CalcChannel
(
infoPtr
);
TRACKBAR_CalcChannel
(
infoPtr
);
TRACKBAR_UpdateThumb
(
infoPtr
);
TRACKBAR_UpdateThumb
(
infoPtr
);
...
...
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