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
21c5545a
Commit
21c5545a
authored
Mar 31, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Mar 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Simplify the use of rectangles.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
66d3c80d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
menu.c
dlls/user32/menu.c
+4
-7
No files found.
dlls/user32/menu.c
View file @
21c5545a
...
...
@@ -1395,11 +1395,10 @@ static void draw_popup_arrow( HDC hdc, RECT rect, UINT arrow_bitmap_width,
static
void
MENU_DrawMenuItem
(
HWND
hwnd
,
POPUPMENU
*
menu
,
HWND
hwndOwner
,
HDC
hdc
,
MENUITEM
*
lpitem
,
BOOL
menuBar
,
UINT
odaction
)
{
RECT
rect
;
RECT
rect
,
bmprc
;
BOOL
flat_menu
=
FALSE
;
int
bkgnd
;
UINT
arrow_bitmap_width
=
0
,
arrow_bitmap_height
=
0
;
RECT
bmprc
;
HRGN
old_clip
=
NULL
,
clip
;
debug_print_menuitem
(
"MENU_DrawMenuItem: "
,
lpitem
,
""
);
...
...
@@ -1551,8 +1550,7 @@ static void MENU_DrawMenuItem( HWND hwnd, POPUPMENU *menu, HWND hwndOwner, HDC h
HPEN
oldPen
;
RECT
rc
=
rect
;
rc
.
left
++
;
rc
.
right
--
;
InflateRect
(
&
rc
,
-
1
,
0
);
rc
.
top
=
(
rc
.
top
+
rc
.
bottom
)
/
2
;
if
(
flat_menu
)
{
...
...
@@ -1601,7 +1599,6 @@ static void MENU_DrawMenuItem( HWND hwnd, POPUPMENU *menu, HWND hwndOwner, HDC h
{
HBITMAP
bm
;
INT
y
=
rect
.
top
+
rect
.
bottom
;
RECT
rc
=
rect
;
BOOL
checked
=
FALSE
;
UINT
check_bitmap_width
=
GetSystemMetrics
(
SM_CXMENUCHECK
);
UINT
check_bitmap_height
=
GetSystemMetrics
(
SM_CYMENUCHECK
);
...
...
@@ -1619,7 +1616,7 @@ static void MENU_DrawMenuItem( HWND hwnd, POPUPMENU *menu, HWND hwndOwner, HDC h
HDC
hdcMem
=
CreateCompatibleDC
(
hdc
);
SelectObject
(
hdcMem
,
bm
);
BitBlt
(
hdc
,
r
c
.
left
,
(
y
-
check_bitmap_height
)
/
2
,
BitBlt
(
hdc
,
r
ect
.
left
,
(
y
-
check_bitmap_height
)
/
2
,
check_bitmap_width
,
check_bitmap_height
,
hdcMem
,
0
,
0
,
SRCCOPY
);
DeleteDC
(
hdcMem
);
...
...
@@ -1637,7 +1634,7 @@ static void MENU_DrawMenuItem( HWND hwnd, POPUPMENU *menu, HWND hwndOwner, HDC h
DrawFrameControl
(
hdcMem
,
&
r
,
DFC_MENU
,
(
lpitem
->
fType
&
MFT_RADIOCHECK
)
?
DFCS_MENUBULLET
:
DFCS_MENUCHECK
);
BitBlt
(
hdc
,
r
c
.
left
,
(
y
-
r
.
bottom
)
/
2
,
r
.
right
,
r
.
bottom
,
BitBlt
(
hdc
,
r
ect
.
left
,
(
y
-
r
.
bottom
)
/
2
,
r
.
right
,
r
.
bottom
,
hdcMem
,
0
,
0
,
SRCCOPY
);
DeleteDC
(
hdcMem
);
DeleteObject
(
bm
);
...
...
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