Bug 566633 - Partial outline of radio button does not follow selection
Summary: Partial outline of radio button does not follow selection
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.16   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-03 05:06 EDT by Andreu B CLA
Modified: 2020-09-03 05:06 EDT (History)
0 users

See Also:


Attachments
video of the observed behavior (403.74 KB, image/gif)
2020-09-03 05:06 EDT, Andreu B CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreu B CLA 2020-09-03 05:06:12 EDT
Created attachment 284029 [details]
video of the observed behavior

1 - Run the snippet below.
2 - Select one of the radio buttons.
3 - Switch to some other window (Alt+Tab) then switch again to the first window.
4 - Notice how the button you selected now has an orange outline.
5 - Select another button. The button you selected first still retains the outline.
6 - Repeat step 3. Observe step 4 again (the last button you selected now has the outline).

Expected behavior:
Ideally no outline would be shown. If this is not possible, second best would be that at least the outlined button is always the selected one, i.e. the outline follows the selection as you select different buttons.

Attached GIF showing the issue.

---------------------------------------------------------

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class App {

    public static void main(String[] argv) {
        Display display = new Display();
        Shell shell = new Shell(display);
        shell.setLayout(new GridLayout());

        new Button(shell, SWT.RADIO).setText("Option 1");
        new Button(shell, SWT.RADIO).setText("Option 2");
        new Button(shell, SWT.RADIO).setText("Option 3");

        shell.open();

        while (!shell.isDisposed()) {
            if (!display.readAndDispatch()) {
                display.sleep();
            }
        }

        display.dispose();
    }
}