JDK-6401956 : Vista: The right mark of the CheckboxMenu item is broken when compared with winXP
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2006-03-22
  • Updated: 2011-01-19
  • Resolved: 2006-08-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b95Fixed
Related Reports
Relates :  
Description
Step to reproduce:
----------------------
1) Run the attached program.
2) Click in the 'Menu1' menu.
3) Click on CheckboxMenuItem1:1. Observe that right mark on the CheckboxMenuItem is broken.

I tested this on Vista beta2 (build 5308) on Mustang b75.

Comments
EVALUATION On Vista font-size of menu item is 9 by default (it's 8 on XP). You could observe this setting using "Appearance" dialog. So ::GetSystemMetrics(SM_CXMENUCHECK) returns value on Vista which is different from value on XP. This change in Vista makes the bug visible. We need to implement the following issues on Windows: 1) drawing check-mark as polygon. It will help us avoid the distortion scaling. 2) scaling check-mark depend on font size for MenuItem. 3) forcing WM_MEASUREITEM when font size for MenuItem is changed. Otherwise, MenuItem.setFont() doesn't change size of menu item at all. To make the fix low-risk we expect to resolve only first issue along with this CR.
03-07-2006

EVALUATION The same issue can be noticed on XP as well - just change font size to large. We use custom check-mark bitmap for displaying a selected menu item. Resizing the bitmap at run time by using the StretchBlt function leads to distortion (look at awt_MenuItem.cpp / DrawItem(HDC,RECT)).
31-03-2006