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
c72a7219
Commit
c72a7219
authored
Mar 28, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Mar 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add a helper to retrieve the height of the scroll arrows.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a8344b96
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
menu.c
dlls/user32/menu.c
+11
-6
No files found.
dlls/user32/menu.c
View file @
c72a7219
...
...
@@ -404,6 +404,14 @@ static HBITMAP get_up_arrow_inactive_bitmap(void)
return
arrow_bitmap
;
}
static
inline
UINT
get_scroll_arrow_height
(
const
POPUPMENU
*
menu
)
{
BITMAP
bmp
;
GetObjectW
(
get_up_arrow_bitmap
(),
sizeof
(
bmp
),
&
bmp
);
return
bmp
.
bmHeight
;
}
/***********************************************************************
* MENU_CopySysPopup
*
...
...
@@ -699,13 +707,10 @@ MENU_AdjustMenuItemRect(const POPUPMENU *menu, LPRECT rect)
{
if
(
menu
->
bScrolling
)
{
UINT
arrow_bitmap_height
;
BITMAP
bmp
;
UINT
arrow_height
;
GetObjectW
(
get_up_arrow_bitmap
(),
sizeof
(
bmp
),
&
bmp
);
arrow_bitmap_height
=
bmp
.
bmHeight
;
rect
->
top
+=
arrow_bitmap_height
-
menu
->
nScrollPos
;
rect
->
bottom
+=
arrow_bitmap_height
-
menu
->
nScrollPos
;
arrow_height
=
get_scroll_arrow_height
(
menu
);
OffsetRect
(
rect
,
0
,
arrow_height
-
menu
->
nScrollPos
);
}
}
...
...
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