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
2248cfbb
Commit
2248cfbb
authored
May 09, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 09, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix disabled thumb painting, for TBS_BOTH use edged rectangle.
parent
0325dc61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
36 deletions
+38
-36
trackbar.c
dlls/comctl32/trackbar.c
+38
-36
No files found.
dlls/comctl32/trackbar.c
View file @
2248cfbb
...
...
@@ -613,18 +613,11 @@ TRACKBAR_DrawTics (const TRACKBAR_INFO *infoPtr, HDC hdc)
}
static
void
TRACKBAR_DrawThumb
(
const
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
)
{
HBRUSH
oldbr
;
HPEN
oldpen
;
RECT
thumb
=
infoPtr
->
rcThumb
;
int
BlackUntil
=
3
;
int
PointCount
=
6
;
POINT
points
[
6
];
int
fillClr
;
int
PointDepth
;
TRACKBAR_DrawThumb
(
TRACKBAR_INFO
*
infoPtr
,
HDC
hdc
)
{
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwndSelf
);
HBRUSH
brush
;
if
(
theme
)
{
int
partId
;
...
...
@@ -645,32 +638,42 @@ TRACKBAR_DrawThumb (const TRACKBAR_INFO *infoPtr, HDC hdc)
else
stateId
=
TUS_NORMAL
;
DrawThemeBackground
(
theme
,
hdc
,
partId
,
stateId
,
&
thumb
,
0
);
DrawThemeBackground
(
theme
,
hdc
,
partId
,
stateId
,
&
infoPtr
->
rcThumb
,
NULL
);
return
;
}
fillClr
=
infoPtr
->
flags
&
TB_DRAG_MODE
?
COLOR_BTNHILIGHT
:
COLOR_BTNFACE
;
oldbr
=
SelectObject
(
hdc
,
GetSysColorBrush
(
fillClr
));
SetPolyFillMode
(
hdc
,
WINDING
);
if
(
infoPtr
->
dwStyle
&
WS_DISABLED
)
{
if
(
comctl32_color
.
clr3dHilight
==
comctl32_color
.
clrWindow
)
brush
=
COMCTL32_hPattern55AABrush
;
else
brush
=
GetSysColorBrush
(
COLOR_SCROLLBAR
);
SetTextColor
(
hdc
,
comctl32_color
.
clr3dFace
);
SetBkColor
(
hdc
,
comctl32_color
.
clr3dHilight
);
}
else
brush
=
GetSysColorBrush
(
infoPtr
->
flags
&
TB_DRAG_MODE
?
COLOR_BTNHILIGHT
:
COLOR_BTNFACE
);
if
(
infoPtr
->
dwStyle
&
TBS_BOTH
)
{
points
[
0
].
x
=
thumb
.
right
;
points
[
0
].
y
=
thumb
.
top
;
points
[
1
].
x
=
thumb
.
right
;
points
[
1
].
y
=
thumb
.
bottom
;
points
[
2
].
x
=
thumb
.
left
;
points
[
2
].
y
=
thumb
.
bottom
;
points
[
3
].
x
=
thumb
.
left
;
points
[
3
].
y
=
thumb
.
top
;
points
[
4
].
x
=
points
[
0
].
x
;
points
[
4
].
y
=
points
[
0
].
y
;
PointCount
=
5
;
BlackUntil
=
3
;
FillRect
(
hdc
,
&
infoPtr
->
rcThumb
,
brush
);
DrawEdge
(
hdc
,
&
infoPtr
->
rcThumb
,
EDGE_RAISED
,
BF_RECT
|
BF_SOFT
);
return
;
}
else
{
HBRUSH
oldbr
=
SelectObject
(
hdc
,
brush
);
RECT
thumb
=
infoPtr
->
rcThumb
;
int
BlackUntil
=
3
;
int
PointCount
=
6
;
POINT
points
[
6
];
int
PointDepth
;
HPEN
oldpen
;
SetPolyFillMode
(
hdc
,
WINDING
);
if
(
infoPtr
->
dwStyle
&
TBS_VERT
)
{
PointDepth
=
(
thumb
.
bottom
-
thumb
.
top
)
/
2
;
...
...
@@ -742,16 +745,15 @@ TRACKBAR_DrawThumb (const TRACKBAR_INFO *infoPtr, HDC hdc)
}
}
/* Draw the thumb now */
Polygon
(
hdc
,
points
,
PointCount
);
oldpen
=
SelectObject
(
hdc
,
GetStockObject
(
BLACK_PEN
));
Polyline
(
hdc
,
points
,
BlackUntil
);
SelectObject
(
hdc
,
GetStockObject
(
WHITE_PEN
));
Polyline
(
hdc
,
&
points
[
BlackUntil
-
1
],
PointCount
+
1
-
BlackUntil
);
SelectObject
(
hdc
,
oldpen
);
SelectObject
(
hdc
,
oldbr
);
}
/* Draw the thumb now */
Polygon
(
hdc
,
points
,
PointCount
);
oldpen
=
SelectObject
(
hdc
,
GetStockObject
(
BLACK_PEN
));
Polyline
(
hdc
,
points
,
BlackUntil
);
SelectObject
(
hdc
,
GetStockObject
(
WHITE_PEN
));
Polyline
(
hdc
,
&
points
[
BlackUntil
-
1
],
PointCount
+
1
-
BlackUntil
);
SelectObject
(
hdc
,
oldpen
);
SelectObject
(
hdc
,
oldbr
);
}
...
...
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