Bug 572696

Summary: [aarch64] SWT.PUSH button text alignment wrong
Product: [Eclipse Project] Platform Reporter: Holger Staudacher <holger.staudacher>
Component: SWTAssignee: Lakshmi P Shanmugam <lshanmug>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: lshanmug
Version: 4.20   
Target Milestone: 4.20 M2   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/179258
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=0ffafe6d8e6bf13e386b1839f7721b07751efb38
Whiteboard:
Bug Depends on:    
Bug Blocks: 572797    
Attachments:
Description Flags
eclipse-swt-aarch64.png none

Description Holger Staudacher CLA 2021-04-08 10:01:29 EDT
Created attachment 286063 [details]
eclipse-swt-aarch64.png

While testing SWT for Apple silicon (565690) I noticed the text alignment of SWT.PUSH buttons is off. See screenshot attached.
Comment 1 Lakshmi P Shanmugam CLA 2021-04-13 04:41:42 EDT
I see this problem too. 

For some reason, the CENTER and RIGHT alignment behaviour is interchanged for SWT.PUSH and SWT.TOGGLE buttons. The Button text has RIGHT alignment when SWT.CENTER style is specified and vice-versa.

This doesn't happen on with Mac x86_64. Any ideas?
Comment 2 Eclipse Genie CLA 2021-04-13 11:41:28 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/179258
Comment 3 Lakshmi P Shanmugam CLA 2021-04-13 11:52:48 EDT
From https://developer.apple.com/documentation/apple-silicon/addressing-architectural-differences-in-your-macos-code:

The NSTextAlignment enumeration uses different numerical values for some constants on arm64 and x86_64 architectures. When referring to constants using numerical values, validate that you use the correct values on each architecture.
Comment 5 Lakshmi P Shanmugam CLA 2021-04-13 12:24:29 EDT
Label and Text widgets have the same issue. The patch fixes the problem for all controls.
Comment 6 Lakshmi P Shanmugam CLA 2021-04-14 06:26:54 EDT
Fixed with I20210414-0330.
Comment 7 Lakshmi P Shanmugam CLA 2021-05-26 17:09:06 EDT
Verified with Build id: I20210518-0200