Community
Participate
Working Groups
Rigorously test the attempt of bug 23837 to turn SWT into a Swing-like toolkit. When re-implementing native widgets, the ControlExample is a good test bed to verify an initial contribution. Launch it once without the changes, and then launch it again with the changes, place the two windows on top of each other, and then visually compare them by switching between the two (Alt+Tab). This verification needs to be done with different OS fonts and at different resolutions. Notable differences in master (after bug 508141 comment 6) for custom-drawn Button widgets on Windows 7 100% with Tahoma 8 as system font: - CHECK and RADIO buttons with Image and Text: should draw focus ring only around text - PUSH and TOGGLE buttons with Image and Text: text is moved 1 px to the left; image is moved 3 px to the left Enable Horizontal and Vertical Fill. - CHECK and RADIO buttons with Text (and Image): Focus ring is around whole button instead of just around the text - PUSH Buttons with Text, Alignment > Left/Right: text is 1 px too close to the margin - CHECK and RADIO buttons with Text and Image: Alignment of native buttons stays at Left regardless of the current setting; For owner-drawn buttons, alignment stays at Center instead. (Alignment at Center for PUSH and TOGGLE buttons is correct in owner-draw mode.)
Hi Conrad/Lars, Please this bug plan for 4.7
Hi Conrad/Lars, Please plan this bug plan for 4.7
New Gerrit change created: https://git.eclipse.org/r/90362
Created attachment 266638 [details] test application with different button styles
(In reply to Eclipse Genie from comment #3) > New Gerrit change created: https://git.eclipse.org/r/90362 Niraj, please review.
Tested with patch set 2. (In reply to Markus Keller from comment #0) > Rigorously test the attempt of bug 23837 to turn SWT into a Swing-like > toolkit. > > When re-implementing native widgets, the ControlExample is a good test bed > to verify an initial contribution. Launch it once without the changes, and > then launch it again with the changes, place the two windows on top of each > other, and then visually compare them by switching between the two (Alt+Tab). > > This verification needs to be done with different OS fonts and at different > resolutions. > > > Notable differences in master (after bug 508141 comment 6) for custom-drawn > Button widgets on Windows 7 100% with Tahoma 8 as system font: > > - CHECK and RADIO buttons with Image and Text: should draw focus ring only > around text Fixed with patch set 2 > - PUSH and TOGGLE buttons with Image and Text: text is moved 1 px to the > left; image is moved 3 px to the left Fixed with patch set 2 > Enable Horizontal and Vertical Fill. > > - CHECK and RADIO buttons with Text (and Image): Focus ring is around whole > button instead of just around the text Fixed with patch set 2 > - PUSH Buttons with Text, Alignment > Left/Right: text is 1 px too close to > the margin Not fixed yet. > - CHECK and RADIO buttons with Text and Image: Alignment of native buttons > stays at Left regardless of the current setting; For owner-drawn buttons, > alignment stays at Center instead. (Alignment at Center for PUSH and TOGGLE > buttons is correct in owner-draw mode.) I didn't noticed this problem. Apart from this notice, patch set 2 introduced below problem: - CHECK and RADIO buttons without Vertical fill, top part of the focus ring is not drawn properly. I have a fix for this, will update the gerrit patch shortly.
Gerrit change https://git.eclipse.org/r/90362 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=82b8cf40f11f7c0a7dd0bd7e6d9bcc1e41f1c10e
(In reply to Eclipse Genie from comment #7) > Gerrit change https://git.eclipse.org/r/90362 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=82b8cf40f11f7c0a7dd0bd7e6d9bcc1e41f1c10e > Committed above patch, which fixes most of the issues related to focus ring. Below issue can be addressed as a separate patch: - PUSH Buttons with Text, Alignment > Left/Right: text is 1 px too close to the margin
Created attachment 268071 [details] Proposed solution for Push_Button_Left_Right_FocusRing problem (In reply to Niraj Modi from comment #8) > Below issue can be addressed as a separate patch: > - PUSH Buttons with Text, Alignment > Left/Right: text is 1 px too close to > the margin There can be two possible solutions to this (both have a down side): 1. We shift the text 1px away from the current position of focus ring, so that it doesn't touches the focus ring. Down side of this approach: Text location of colored buttons will differ from that of Default native buttons(Push/Toggle) 2. Second solution is we shift the focus ring further closer to the edges on Left and Right sides. So the text location remains exactly at the same location as default native buttons(Push/Toggle) Down side of this approach: Focus ring is not equidistant from the edges of the buttons(Push/Toggle) IMO, second solution looks better of the two.(Sharing a screen shot for Push button with Left/Right alignment with this fix) Will share a gerrit patch for this, shortly.
New Gerrit change created: https://git.eclipse.org/r/96049
(In reply to Niraj Modi from comment #6) > Tested with patch set 2. > > - CHECK and RADIO buttons with Text and Image: Alignment of native buttons > > stays at Left regardless of the current setting; For owner-drawn buttons, > > alignment stays at Center instead. (Alignment at Center for PUSH and TOGGLE > > buttons is correct in owner-draw mode.) > I didn't noticed this problem. Note: This problem is also fixed, by patch committed in comment 7
Gerrit change https://git.eclipse.org/r/96049 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=6bb8c69300babe2e016ac34edf179de2c3937bbf
Thanks Conrad for the patch, resolving now.
Verified fix on Win7 using Eclipse Build id: I20170508-2000