Bug 572696 - [aarch64] SWT.PUSH button text alignment wrong
Summary: [aarch64] SWT.PUSH button text alignment wrong
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.20   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.20 M2   Edit
Assignee: Lakshmi P Shanmugam CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 572797
  Show dependency tree
 
Reported: 2021-04-08 10:01 EDT by Holger Staudacher CLA
Modified: 2021-05-26 17:09 EDT (History)
1 user (show)

See Also:


Attachments
eclipse-swt-aarch64.png (386.75 KB, image/png)
2021-04-08 10:01 EDT, Holger Staudacher CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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