Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
174d2f6d
Commit
174d2f6d
authored
Nov 30, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use the correct alpha for the title bar gradient and simplify the mesh.
parent
76358216
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
32 deletions
+23
-32
nonclient.c
dlls/user32/nonclient.c
+23
-32
No files found.
dlls/user32/nonclient.c
View file @
174d2f6d
...
@@ -182,55 +182,46 @@ static void NC_DrawCaptionBar (HDC hdc, const RECT *rect, DWORD dwStyle,
...
@@ -182,55 +182,46 @@ static void NC_DrawCaptionBar (HDC hdc, const RECT *rect, DWORD dwStyle,
{
{
if
(
gradient
)
if
(
gradient
)
{
{
TRIVERTEX
vertices
[
6
];
TRIVERTEX
vertices
[
4
];
DWORD
colLeft
=
DWORD
colLeft
=
GetSysColor
(
active
?
COLOR_ACTIVECAPTION
:
COLOR_INACTIVECAPTION
);
GetSysColor
(
active
?
COLOR_ACTIVECAPTION
:
COLOR_INACTIVECAPTION
);
DWORD
colRight
=
DWORD
colRight
=
GetSysColor
(
active
?
COLOR_GRADIENTACTIVECAPTION
GetSysColor
(
active
?
COLOR_GRADIENTACTIVECAPTION
:
COLOR_GRADIENTINACTIVECAPTION
);
:
COLOR_GRADIENTINACTIVECAPTION
);
int
v
;
int
buttonsAreaSize
=
GetSystemMetrics
(
SM_CYCAPTION
)
-
1
;
int
buttonsAreaSize
=
GetSystemMetrics
(
SM_CYCAPTION
)
-
1
;
static
GRADIENT_RECT
mesh
[]
=
{{
0
,
1
},
{
2
,
3
},
{
4
,
5
}};
static
GRADIENT_RECT
mesh
[]
=
{{
0
,
1
},
{
1
,
2
},
{
2
,
3
}};
for
(
v
=
0
;
v
<
3
;
v
++
)
vertices
[
0
].
Red
=
vertices
[
1
].
Red
=
GetRValue
(
colLeft
)
<<
8
;
{
vertices
[
0
].
Green
=
vertices
[
1
].
Green
=
GetGValue
(
colLeft
)
<<
8
;
vertices
[
v
].
Red
=
GetRValue
(
colLeft
)
<<
8
;
vertices
[
0
].
Blue
=
vertices
[
1
].
Blue
=
GetBValue
(
colLeft
)
<<
8
;
vertices
[
v
].
Green
=
GetGValue
(
colLeft
)
<<
8
;
vertices
[
0
].
Alpha
=
vertices
[
1
].
Alpha
=
0xff00
;
vertices
[
v
].
Blue
=
GetBValue
(
colLeft
)
<<
8
;
vertices
[
2
].
Red
=
vertices
[
3
].
Red
=
GetRValue
(
colRight
)
<<
8
;
vertices
[
v
].
Alpha
=
0x8000
;
vertices
[
2
].
Green
=
vertices
[
3
].
Green
=
GetGValue
(
colRight
)
<<
8
;
vertices
[
v
+
3
].
Red
=
GetRValue
(
colRight
)
<<
8
;
vertices
[
2
].
Blue
=
vertices
[
3
].
Blue
=
GetBValue
(
colRight
)
<<
8
;
vertices
[
v
+
3
].
Green
=
GetGValue
(
colRight
)
<<
8
;
vertices
[
2
].
Alpha
=
vertices
[
3
].
Alpha
=
0xff00
;
vertices
[
v
+
3
].
Blue
=
GetBValue
(
colRight
)
<<
8
;
vertices
[
v
+
3
].
Alpha
=
0x8000
;
if
((
dwStyle
&
WS_SYSMENU
)
}
if
((
dwStyle
&
WS_SYSMENU
)
&&
((
dwStyle
&
WS_MAXIMIZEBOX
)
||
(
dwStyle
&
WS_MINIMIZEBOX
)))
&&
((
dwStyle
&
WS_MAXIMIZEBOX
)
||
(
dwStyle
&
WS_MINIMIZEBOX
)))
buttonsAreaSize
+=
2
*
(
GetSystemMetrics
(
SM_CXSIZE
)
+
1
);
buttonsAreaSize
+=
2
*
(
GetSystemMetrics
(
SM_CXSIZE
)
+
1
);
/* area behind icon; solid filled with left color */
/* area behind icon; solid filled with left color */
vertices
[
0
].
x
=
rect
->
left
;
vertices
[
0
].
x
=
rect
->
left
;
vertices
[
0
].
y
=
rect
->
top
;
vertices
[
0
].
y
=
rect
->
top
;
if
(
dwStyle
&
WS_SYSMENU
)
if
(
dwStyle
&
WS_SYSMENU
)
vertices
[
1
].
x
=
vertices
[
1
].
x
=
min
(
rect
->
left
+
GetSystemMetrics
(
SM_CXSMICON
),
rect
->
right
);
min
(
rect
->
left
+
GetSystemMetrics
(
SM_CXSMICON
),
rect
->
right
);
else
else
vertices
[
1
].
x
=
vertices
[
0
].
x
;
vertices
[
1
].
x
=
vertices
[
0
].
x
;
vertices
[
1
].
y
=
rect
->
bottom
;
vertices
[
1
].
y
=
rect
->
bottom
;
/* area behind text; gradient */
/* area behind text; gradient */
vertices
[
2
].
x
=
vertices
[
1
].
x
;
vertices
[
2
].
x
=
max
(
vertices
[
1
].
x
,
rect
->
right
-
buttonsAreaSize
)
;
vertices
[
2
].
y
=
rect
->
top
;
vertices
[
2
].
y
=
rect
->
top
;
vertices
[
3
].
x
=
max
(
vertices
[
2
].
x
,
rect
->
right
-
buttonsAreaSize
);
vertices
[
3
].
y
=
rect
->
bottom
;
/* area behind buttons; solid filled with right color */
/* area behind buttons; solid filled with right color */
vertices
[
4
].
x
=
vertices
[
3
].
x
;
vertices
[
3
].
x
=
rect
->
right
;
vertices
[
4
].
y
=
rect
->
top
;
vertices
[
3
].
y
=
rect
->
bottom
;
vertices
[
5
].
x
=
rect
->
right
;
vertices
[
5
].
y
=
rect
->
bottom
;
GdiGradientFill
(
hdc
,
vertices
,
4
,
mesh
,
3
,
GRADIENT_FILL_RECT_H
);
GdiGradientFill
(
hdc
,
vertices
,
6
,
mesh
,
3
,
GRADIENT_FILL_RECT_H
);
}
}
else
else
FillRect
(
hdc
,
rect
,
GetSysColorBrush
(
active
?
FillRect
(
hdc
,
rect
,
GetSysColorBrush
(
active
?
...
...
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