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
38e71538
Commit
38e71538
authored
May 08, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/trackbar: Fix reseting to default page size.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0aead094
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
14 deletions
+28
-14
trackbar.c
dlls/comctl32/tests/trackbar.c
+11
-0
trackbar.c
dlls/comctl32/trackbar.c
+17
-14
No files found.
dlls/comctl32/tests/trackbar.c
View file @
38e71538
...
...
@@ -613,6 +613,17 @@ static void test_page_size(void)
r
=
SendMessageA
(
hWndTrackbar
,
TBM_GETPAGESIZE
,
0
,
0
);
ok
(
r
==
10
,
"Unexpected page size %d.
\n
"
,
r
);
r
=
SendMessageA
(
hWndTrackbar
,
TBM_SETPAGESIZE
,
0
,
-
1
);
ok
(
r
==
10
,
"Unexpected page size %d.
\n
"
,
r
);
r
=
SendMessageA
(
hWndTrackbar
,
TBM_GETPAGESIZE
,
0
,
0
);
ok
(
r
==
7
,
"Unexpected page size %d.
\n
"
,
r
);
SendMessageA
(
hWndTrackbar
,
TBM_SETRANGEMAX
,
0
,
100
);
r
=
SendMessageA
(
hWndTrackbar
,
TBM_GETPAGESIZE
,
0
,
0
);
ok
(
r
==
19
,
"Unexpected page size %d.
\n
"
,
r
);
DestroyWindow
(
hWndTrackbar
);
hWndTrackbar
=
create_trackbar
(
defaultstyle
,
hWndParent
);
...
...
dlls/comctl32/trackbar.c
View file @
38e71538
...
...
@@ -1196,18 +1196,30 @@ TRACKBAR_SetLineSize (TRACKBAR_INFO *infoPtr, LONG lLineSize)
return
lTemp
;
}
static
void
TRACKBAR_UpdatePageSize
(
TRACKBAR_INFO
*
infoPtr
)
{
if
(
infoPtr
->
flags
&
TB_USER_PAGE
)
return
;
infoPtr
->
lPageSize
=
(
infoPtr
->
lRangeMax
-
infoPtr
->
lRangeMin
)
/
5
;
if
(
infoPtr
->
lPageSize
==
0
)
infoPtr
->
lPageSize
=
1
;
}
static
inline
LONG
TRACKBAR_SetPageSize
(
TRACKBAR_INFO
*
infoPtr
,
LONG
lPageSize
)
{
LONG
lTemp
=
infoPtr
->
lPageSize
;
if
(
lPageSize
!=
-
1
)
infoPtr
->
lPageSize
=
lPageSize
;
if
(
lPageSize
==
-
1
)
{
infoPtr
->
flags
&=
~
TB_USER_PAGE
;
TRACKBAR_UpdatePageSize
(
infoPtr
);
}
else
infoPtr
->
lPageSize
=
TB_DEFAULTPAGESIZE
;
infoPtr
->
flags
|=
TB_USER_PAGE
;
{
infoPtr
->
flags
|=
TB_USER_PAGE
;
infoPtr
->
lPageSize
=
lPageSize
;
}
return
lTemp
;
}
...
...
@@ -1234,15 +1246,6 @@ TRACKBAR_SetPos (TRACKBAR_INFO *infoPtr, BOOL fPosition, LONG lPosition)
return
0
;
}
static
void
TRACKBAR_UpdatePageSize
(
TRACKBAR_INFO
*
infoPtr
)
{
if
(
infoPtr
->
flags
&
TB_USER_PAGE
)
return
;
infoPtr
->
lPageSize
=
(
infoPtr
->
lRangeMax
-
infoPtr
->
lRangeMin
)
/
5
;
if
(
infoPtr
->
lPageSize
==
0
)
infoPtr
->
lPageSize
=
1
;
}
static
inline
LRESULT
TRACKBAR_SetRange
(
TRACKBAR_INFO
*
infoPtr
,
BOOL
redraw
,
LONG
range
)
{
...
...
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