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
cf4c4d2f
Commit
cf4c4d2f
authored
Aug 31, 2022
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Sep 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme: Use the brush from WM_CTLCOLORSCROLLBAR to paint SB_CTL scrollbar tracks if present.
parent
69a0acb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
13 deletions
+20
-13
misc.c
dlls/comctl32/tests/misc.c
+0
-1
scrollbar.c
dlls/uxtheme/scrollbar.c
+20
-12
No files found.
dlls/comctl32/tests/misc.c
View file @
cf4c4d2f
...
@@ -979,7 +979,6 @@ static void test_themed_background(void)
...
@@ -979,7 +979,6 @@ static void test_themed_background(void)
ok
(
color
!=
RGB
(
255
,
0
,
0
),
"Got unexpected color %#08lx.
\n
"
,
color
);
ok
(
color
!=
RGB
(
255
,
0
,
0
),
"Got unexpected color %#08lx.
\n
"
,
color
);
color
=
GetPixel
(
hdc
,
10
,
60
);
color
=
GetPixel
(
hdc
,
10
,
60
);
todo_wine
ok
(
color
==
RGB
(
255
,
0
,
0
)
||
broken
(
color
==
CLR_INVALID
),
/* Win7 on TestBots */
ok
(
color
==
RGB
(
255
,
0
,
0
)
||
broken
(
color
==
CLR_INVALID
),
/* Win7 on TestBots */
"Got unexpected color %#08lx.
\n
"
,
color
);
"Got unexpected color %#08lx.
\n
"
,
color
);
}
}
...
...
dlls/uxtheme/scrollbar.c
View file @
cf4c4d2f
...
@@ -68,9 +68,13 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
...
@@ -68,9 +68,13 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
DrawThemeBackground
(
theme
,
dc
,
SBP_SIZEBOX
,
state
,
rect
,
NULL
);
DrawThemeBackground
(
theme
,
dc
,
SBP_SIZEBOX
,
state
,
rect
,
NULL
);
}
else
{
}
else
{
int
uppertrackstate
,
lowertrackstate
,
thumbstate
;
int
uppertrackstate
,
lowertrackstate
,
thumbstate
;
HBRUSH
track_brush
=
NULL
;
RECT
partrect
;
RECT
partrect
;
SIZE
grippersize
;
SIZE
grippersize
;
if
(
bar
==
SB_CTL
)
track_brush
=
(
HBRUSH
)
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORSCROLLBAR
,
(
WPARAM
)
dc
,
(
LPARAM
)
hwnd
);
if
(
disabled
)
{
if
(
disabled
)
{
uppertrackstate
=
SCRBS_DISABLED
;
uppertrackstate
=
SCRBS_DISABLED
;
lowertrackstate
=
SCRBS_DISABLED
;
lowertrackstate
=
SCRBS_DISABLED
;
...
@@ -148,9 +152,10 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
...
@@ -148,9 +152,10 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
partrect
.
top
=
rect
->
top
+
arrowsize
;
partrect
.
top
=
rect
->
top
+
arrowsize
;
partrect
.
bottom
=
rect
->
top
+
thumbpos
;
partrect
.
bottom
=
rect
->
top
+
thumbpos
;
if
(
bar
==
SB_CTL
&&
IsThemeBackgroundPartiallyTransparent
(
theme
,
SBP_UPPERTRACKVERT
,
uppertrackstate
))
if
(
bar
==
SB_CTL
&&
track_brush
)
DrawThemeParentBackground
(
hwnd
,
dc
,
&
partrect
);
FillRect
(
dc
,
&
partrect
,
track_brush
);
DrawThemeBackground
(
theme
,
dc
,
SBP_UPPERTRACKVERT
,
uppertrackstate
,
&
partrect
,
NULL
);
else
DrawThemeBackground
(
theme
,
dc
,
SBP_UPPERTRACKVERT
,
uppertrackstate
,
&
partrect
,
NULL
);
}
}
if
(
thumbsize
>
0
)
{
if
(
thumbsize
>
0
)
{
...
@@ -178,9 +183,10 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
...
@@ -178,9 +183,10 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
partrect
.
top
=
rect
->
top
+
arrowsize
;
partrect
.
top
=
rect
->
top
+
arrowsize
;
if
(
partrect
.
bottom
>
partrect
.
top
)
if
(
partrect
.
bottom
>
partrect
.
top
)
{
{
if
(
bar
==
SB_CTL
&&
IsThemeBackgroundPartiallyTransparent
(
theme
,
SBP_LOWERTRACKVERT
,
lowertrackstate
))
if
(
bar
==
SB_CTL
&&
track_brush
)
DrawThemeParentBackground
(
hwnd
,
dc
,
&
partrect
);
FillRect
(
dc
,
&
partrect
,
track_brush
);
DrawThemeBackground
(
theme
,
dc
,
SBP_LOWERTRACKVERT
,
lowertrackstate
,
&
partrect
,
NULL
);
else
DrawThemeBackground
(
theme
,
dc
,
SBP_LOWERTRACKVERT
,
lowertrackstate
,
&
partrect
,
NULL
);
}
}
}
else
{
}
else
{
int
leftarrowstate
,
rightarrowstate
;
int
leftarrowstate
,
rightarrowstate
;
...
@@ -225,9 +231,10 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
...
@@ -225,9 +231,10 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
partrect
.
left
=
rect
->
left
+
arrowsize
;
partrect
.
left
=
rect
->
left
+
arrowsize
;
partrect
.
right
=
rect
->
left
+
thumbpos
;
partrect
.
right
=
rect
->
left
+
thumbpos
;
if
(
bar
==
SB_CTL
&&
IsThemeBackgroundPartiallyTransparent
(
theme
,
SBP_UPPERTRACKHORZ
,
uppertrackstate
))
if
(
bar
==
SB_CTL
&&
track_brush
)
DrawThemeParentBackground
(
hwnd
,
dc
,
&
partrect
);
FillRect
(
dc
,
&
partrect
,
track_brush
);
DrawThemeBackground
(
theme
,
dc
,
SBP_UPPERTRACKHORZ
,
uppertrackstate
,
&
partrect
,
NULL
);
else
DrawThemeBackground
(
theme
,
dc
,
SBP_UPPERTRACKHORZ
,
uppertrackstate
,
&
partrect
,
NULL
);
}
}
if
(
thumbsize
>
0
)
{
if
(
thumbsize
>
0
)
{
...
@@ -255,9 +262,10 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
...
@@ -255,9 +262,10 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
partrect
.
left
=
rect
->
left
+
arrowsize
;
partrect
.
left
=
rect
->
left
+
arrowsize
;
if
(
partrect
.
right
>
partrect
.
left
)
if
(
partrect
.
right
>
partrect
.
left
)
{
{
if
(
bar
==
SB_CTL
&&
IsThemeBackgroundPartiallyTransparent
(
theme
,
SBP_LOWERTRACKHORZ
,
lowertrackstate
))
if
(
bar
==
SB_CTL
&&
track_brush
)
DrawThemeParentBackground
(
hwnd
,
dc
,
&
partrect
);
FillRect
(
dc
,
&
partrect
,
track_brush
);
DrawThemeBackground
(
theme
,
dc
,
SBP_LOWERTRACKHORZ
,
lowertrackstate
,
&
partrect
,
NULL
);
else
DrawThemeBackground
(
theme
,
dc
,
SBP_LOWERTRACKHORZ
,
lowertrackstate
,
&
partrect
,
NULL
);
}
}
}
}
}
}
...
...
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