Ok, +1

-phil

On 12/18/19 1:04 AM, Pankaj Bansal wrote:

Hi Phil,

I have made the change you suggested. Please have a look.

webrev: http://cr.openjdk.java.net/~pbansal/8234733/webrev03/

Regards,

Pankaj

*From:*Phil Race
*Sent:* Wednesday, December 18, 2019 12:20 AM
*To:* Pankaj Bansal; Prasanta Sadhukhan
*Cc:* swing-dev@openjdk.java.net
*Subject:* Re: <Swing Dev> [13] RFR JDK-8234733: We can't distinguish if the spinner button is pressed or unpressed

   66         
UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
I think it would be better here to do something like what we have
in javax/swing/JComboBox/7082443/bug7082443.java
Eg :
     public static final String GTK_LAF_CLASS = "GTKLookAndFeel";
         for (UIManager.LookAndFeelInfo lookAndFeelInfo : 
UIManager.getInstalledLookAndFeels()) {
             if (lookAndFeelInfo.getClassName().contains(GTK_LAF_CLASS)) {
                 try {
                     UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
                 } catch (final UnsupportedLookAndFeelException ignored) {
                     return; // can't instantiate, so not a scenario to test ?
                 }
-phil.

On 12/5/19 1:53 AM, Pankaj Bansal wrote:

    Hello Prasanta,

    I have made the changes suggested by you.

    webrev: http://cr.openjdk.java.net/~pbansal/8234733/webrev02/

    Regards,

    Pankaj Bansal

    *From:*Prasanta Sadhukhan
    *Sent:* Wednesday, December 4, 2019 12:58 PM
    *To:* Pankaj Bansal; Philip Race
    *Cc:* swing-dev@openjdk.java.net <mailto:swing-dev@openjdk.java.net>
    *Subject:* Re: <Swing Dev> [13] RFR JDK-8234733: We can't
    distinguish if the spinner button is pressed or unpressed

    Hi Pankaj,

    Some comments about the test:

    I guess since we are testing for Platform.isLinux() in the test,
    there's no need of "requires" tag. But, I think it's better to use

    |System|.getProperty("os.name") so that this test can be run in standalone
    mode also(without using Platform class), otherwise it needs to be
    run in conjunction with jtreg(in which case @requires tag is better)

    Also, I guess it will be good if you use
    UIManager.setLookAndFeel(...GtkLookAndFeel..) instead of passing
    through command line as user who is running standalone may forget
    to test in GTKL&F

    Also, you are not disposing the frame if it times out so the
    instruction frame will linger even when the test fails.

    Regards

    Prasanta

    On 02-Dec-19 4:45 PM, Pankaj Bansal wrote:

        Hello Prasanta/Phil/Sergey,

        <<1) I suppose this fix is for 14, not 13.

        Yes, that was by mistake. I am not changes the subject line,
        as this would create separate mail thread. This will be pushed
        to 14 only.
        2) It is "OL", not "OEL"

        Ok.
        3) Can we create a reliable automated test for this ? If not
        we should at least create a manual one.

        Done. I have added a manual test case.
        4) A separate issue but we should consider adding a JSpinner
        demo to SwingSet2

        Yes, I was also thinking that we should do it. Do we need
        separate approvals for changing the demos. I mean approval
        from some place other than swing-dev like demo team etc.

        << Does it mean that this is the behavior of the gtk3 native
        spinner component?

        Yes, this behavior happens in native spinner. This change
        makes our Spinner much more similar to native gtk3 spinner

        webrev: http://cr.openjdk.java.net/~pbansal/8234733/webrev01/

        Regards,

        Pankaj

        *From:*Philip Race
        *Sent:* Wednesday, November 27, 2019 9:49 PM
        *To:* Prasanta Sadhukhan
        *Cc:* swing-dev@openjdk.java.net
        <mailto:swing-dev@openjdk.java.net>
        *Subject:* Re: <Swing Dev> [13] RFR JDK-8234733: We can't
        distinguish if the spinner button is pressed or unpressed

        1) I suppose this fix is for 14, not 13.
        2) It is "OL", not "OEL"
        3) Can we create a reliable automated test for this ?
        If not we should at least create a manual one.

        4) A separate issue but we should consider adding a JSpinner
        demo to SwingSet2

        -phil.


        On 11/27/19, 2:31 AM, Prasanta Sadhukhan wrote:

            It works for oel8 too. So the fix looks fine to me.

            Regards

            Prasanta

            On 27-Nov-19 3:54 PM, Prasanta Sadhukhan wrote:

                Hi Pankaj,

                I can see the issue resolved in ubuntu18.04 but not in
                OEL8. Also, SwingSet2 does not have JSpinner demo so
                we cannot put noreg-demo in JBS, so we probably need a
                regression test, even manual, for this.

                Regards

                Prasanta

                On 25-Nov-19 4:13 PM, Pankaj Bansal wrote:

                    Hi All,

                    Please review the following fix for jdk14.


                    Bug:

                    https://bugs.openjdk.java.net/browse/JDK-8234733

                    webrev:

                    http://cr.openjdk.java.net/~pbansal/8234733/webrev00/
                    <http://cr.openjdk.java.net/%7Epbansal/8234733/webrev00/>

                    Issue:

                    In GTKL&F, the spinner’s up/down buttons are drawn
                    in same way whether the button is pressed or not.
                    We can't distinguish visually whether a button is
                    pressed or not. The buttons should be highlighted
                    when they are in pressed state. The issue is due
                    to style and theme changes done in gtk3 in version
                    gtk3.20.

                    Fix:

                    The fix sets the style properly when drawing the
                    spinner buttons with gtk3.20 or higher. All works
                    as it is if the gtk3 version is lower than
                    gtk3.20. The current fix is in continuity of the
                    fixes done for issues like
                    https://bugs.openjdk.java.net/browse/JDK-8218469

                    Testing:

                    The fix can be verified by running SwingSet2 or
                    any other demo/sample of JSpinner (one is attached
                    in the JBS) and it has to be verified manually. I
                    have verified this on Ubuntu 18.04, 19.04, 19.10
                    and OEL 7.5. The issue is solved on all platforms.


                    Regards,
                    Pankaj Bansal


Reply via email to