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
927956db
Commit
927956db
authored
Apr 02, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/static: Use correct brush color for centered image background.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aaea9219
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
static.c
dlls/user32/static.c
+7
-16
No files found.
dlls/user32/static.c
View file @
927956db
...
...
@@ -18,11 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* Notes:
* - Windows XP introduced new behavior: The background of centered
* icons and bitmaps is painted differently. This is only done if
* a manifest is present.
* Because it has not yet been decided how to implement the two
* different modes in Wine, only the Windows XP mode is implemented.
* - Controls with SS_SIMPLE but without SS_NOPREFIX:
* The text should not be changed. Windows doesn't clear the
* client rectangle, so the new text must be larger than the old one.
...
...
@@ -737,10 +732,9 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
{
HDC
hMemDC
;
HBITMAP
hBitmap
,
oldbitmap
;
HBRUSH
hbrush
;
/* message is still sent, even if the returned brush is not used */
hbrush
=
STATIC_SendWmCtlColorStatic
(
hwnd
,
hdc
);
STATIC_SendWmCtlColorStatic
(
hwnd
,
hdc
);
if
((
hBitmap
=
(
HBITMAP
)
GetWindowLongPtrW
(
hwnd
,
HICON_GWL_OFFSET
))
&&
(
GetObjectType
(
hBitmap
)
==
OBJ_BITMAP
)
...
...
@@ -748,26 +742,23 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
{
BITMAP
bm
;
RECT
rcClient
;
LOGBRUSH
brush
;
GetObjectW
(
hBitmap
,
sizeof
(
bm
),
&
bm
);
oldbitmap
=
SelectObject
(
hMemDC
,
hBitmap
);
/* Set the background color for monochrome bitmaps
to the color of the background brush */
if
(
GetObjectW
(
hbrush
,
sizeof
(
brush
),
&
brush
))
{
if
(
brush
.
lbStyle
==
BS_SOLID
)
SetBkColor
(
hdc
,
brush
.
lbColor
);
}
GetClientRect
(
hwnd
,
&
rcClient
);
if
(
style
&
SS_CENTERIMAGE
)
{
FillRect
(
hdc
,
&
rcClient
,
hbrush
);
HBRUSH
hbrush
=
CreateSolidBrush
(
GetPixel
(
hMemDC
,
0
,
0
));
FillRect
(
hdc
,
&
rcClient
,
hbrush
);
rcClient
.
left
=
(
rcClient
.
right
-
rcClient
.
left
)
/
2
-
bm
.
bmWidth
/
2
;
rcClient
.
top
=
(
rcClient
.
bottom
-
rcClient
.
top
)
/
2
-
bm
.
bmHeight
/
2
;
rcClient
.
right
=
rcClient
.
left
+
bm
.
bmWidth
;
rcClient
.
bottom
=
rcClient
.
top
+
bm
.
bmHeight
;
DeleteObject
(
hbrush
);
}
StretchBlt
(
hdc
,
rcClient
.
left
,
rcClient
.
top
,
rcClient
.
right
-
rcClient
.
left
,
rcClient
.
bottom
-
rcClient
.
top
,
hMemDC
,
...
...
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