Owner drawn menu size fixes with tests. -- RESEND ---

Rein Klazes wijn at wanadoo.nl
Sun Jun 19 09:53:16 CDT 2005


First send in on 2005/5/24, not committed, no comments. I am working on
some similar fixes and tests, it would be nice to know what problems
there seem to be with this patch.

This fixes the menu elongation problem mentioned on the wine-users list:


The application returns in the WM_MEASUREITEM handler a menu width of -4
to achieve perfect squares for the items. To reproduce that in wine we
have to be nearly pixel-perfect in the size adjustments. That is what
this patch achieves, I think.
If the calculations seem suspicious: the  test has been run on hundreds
of combinations of Windows versions (win95 up to winXP), menu fonts and
menu font sizes.

Also included is an improvement of fix sent in previously by Felix
Nawothnig but which was not committed. 


dlls/user	: menu.c
dlls/user/tests	: menu.c

Owner drawn menu item size calculation fixes:
- Correct width calculation of owner drawn menu items;
- Set the height value in the MEASUREITEM struct to the same value as
Windows (NT/2k/XP) does (problem debugged by Felix Nawothnig);
- Add tests for the fixes above;
- Also add tests for menu bars with owner drawn items.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: menu-od-width.diff
Type: text/x-diff
Size: 11437 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050619/99aab08a/menu-od-width.bin

More information about the wine-patches mailing list