Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 283212 Details for
Bug 564162
[Win] Disabled Checkbox with set foreground color is drawn slightly left compared to an enabled one
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Snippet to reproduce
DisabledCheckboxMoves.java (text/plain), 1.11 KB, created by
Thomas Singer
on 2020-06-10 05:33:14 EDT
(
hide
)
Description:
Snippet to reproduce
Filename:
MIME Type:
Creator:
Thomas Singer
Created:
2020-06-10 05:33:14 EDT
Size:
1.11 KB
patch
obsolete
>import org.eclipse.swt.*; >import org.eclipse.swt.layout.*; >import org.eclipse.swt.widgets.*; > >/** > * @author Thomas Singer > */ >public class DisabledCheckboxMoves { > > public static void main(String[] args) { > final Display display = new Display(); > > final Shell shell = new Shell(display); > shell.setLayout(new GridLayout(2, false)); > > final Button checkbox = new Button(shell, SWT.CHECK); > checkbox.setText("When disabled, this text slightly moves left"); > checkbox.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); > checkbox.setForeground(shell.getForeground()); // <- this is important > > final Button button = new Button(shell, SWT.PUSH); > button.setText("Toggle Enabled State"); > button.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); > button.addListener(SWT.Selection, event -> checkbox.setEnabled(!checkbox.isEnabled())); > > shell.setSize(shell.computeSize(SWT.DEFAULT, SWT.DEFAULT)); > shell.open(); > > button.setFocus(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > > display.dispose(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 564162
: 283212 |
283213