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
dcaf1377
Commit
dcaf1377
authored
Apr 27, 2003
by
Maxime Bellengé
Committed by
Alexandre Julliard
Apr 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the computation of the trackbar's size.
parent
77fde137
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
trackbar.c
dlls/comctl32/trackbar.c
+17
-9
No files found.
dlls/comctl32/trackbar.c
View file @
dcaf1377
/*
* Trackbar control
*
* Copyright 1998, 1999 Eric Kohl
<ekohl@abo.rhein-zeitung.de>
* Copyright 1998, 1999 Alex Priem
<alexp@sci.kun.nl>
* Copyright 2002 Dimitrie O. Paun
<dimi@bigfoot.com>
* Copyright 1998, 1999 Eric Kohl
* Copyright 1998, 1999 Alex Priem
* Copyright 2002 Dimitrie O. Paun
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -231,13 +231,15 @@ TRACKBAR_CalcChannel (TRACKBAR_INFO *infoPtr)
channel
->
top
=
lpRect
.
top
+
offsetedge
;
channel
->
bottom
=
lpRect
.
bottom
-
offsetedge
;
channel
->
left
=
lpRect
.
left
+
offsetthumb
;
if
(
dwStyle
&
(
TBS_BOTH
|
TBS_LEFT
))
channel
->
left
+=
8
;
if
(
dwStyle
&
(
TBS_BOTH
|
TBS_LEFT
))
channel
->
left
+=
(
lpRect
.
right
-
lpRect
.
left
-
offsetthumb
-
cyChannel
)
/
2
;
channel
->
right
=
channel
->
left
+
cyChannel
;
}
else
{
channel
->
left
=
lpRect
.
left
+
offsetedge
;
channel
->
right
=
lpRect
.
right
-
offsetedge
;
channel
->
top
=
lpRect
.
top
+
offsetthumb
;
if
(
dwStyle
&
(
TBS_BOTH
|
TBS_TOP
))
channel
->
top
+=
8
;
if
(
dwStyle
&
(
TBS_BOTH
|
TBS_TOP
))
channel
->
top
+=
(
lpRect
.
bottom
-
lpRect
.
top
-
offsetedge
-
cyChannel
)
/
2
;
channel
->
bottom
=
channel
->
top
+
cyChannel
;
}
}
...
...
@@ -247,18 +249,21 @@ TRACKBAR_CalcThumb (TRACKBAR_INFO *infoPtr, LONG lPos, RECT *thumb)
{
int
range
,
width
,
thumbdepth
;
DWORD
dwStyle
=
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL_STYLE
);
RECT
lpRect
;
range
=
infoPtr
->
lRangeMax
-
infoPtr
->
lRangeMin
;
thumbdepth
=
((
int
)(
infoPtr
->
uThumbLen
/
4
.
5
)
*
2
)
+
2
;
if
(
!
range
)
range
=
1
;
GetClientRect
(
infoPtr
->
hwndSelf
,
&
lpRect
);
if
(
dwStyle
&
TBS_VERT
)
{
width
=
infoPtr
->
rcChannel
.
bottom
-
infoPtr
->
rcChannel
.
top
;
if
(
dwStyle
&
(
TBS_BOTH
|
TBS_LEFT
))
thumb
->
left
=
10
;
thumb
->
left
=
(
lpRect
.
right
-
lpRect
.
bottom
-
infoPtr
->
uThumbLen
)
/
2
;
else
thumb
->
left
=
2
;
thumb
->
right
=
thumb
->
left
+
infoPtr
->
uThumbLen
;
...
...
@@ -276,9 +281,9 @@ TRACKBAR_CalcThumb (TRACKBAR_INFO *infoPtr, LONG lPos, RECT *thumb)
thumbdepth
/
2
;
thumb
->
right
=
thumb
->
left
+
thumbdepth
;
if
(
dwStyle
&
(
TBS_BOTH
|
TBS_TOP
))
thumb
->
top
=
10
;
thumb
->
top
=
(
lpRect
.
bottom
-
lpRect
.
top
-
infoPtr
->
uThumbLen
)
/
2
;
else
thumb
->
top
=
2
;
thumb
->
top
=
2
;
thumb
->
bottom
=
thumb
->
top
+
infoPtr
->
uThumbLen
;
}
}
...
...
@@ -1208,7 +1213,10 @@ TRACKBAR_SetUnicodeFormat (TRACKBAR_INFO *infoPtr, BOOL fUnicode)
static
LRESULT
TRACKBAR_InitializeThumb
(
TRACKBAR_INFO
*
infoPtr
)
{
infoPtr
->
uThumbLen
=
23
;
/* initial thumb length */
/* initial thumb length */
RECT
rect
;
GetClientRect
(
infoPtr
->
hwndSelf
,
&
rect
);
infoPtr
->
uThumbLen
=
(
rect
.
bottom
-
rect
.
top
-
6
);
TRACKBAR_CalcChannel
(
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