Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6489585

GTK L&F: buttons, checkboxes, and radiobuttons are sized incorrectly

    Details

    • Subcomponent:
    • Resolved In Build:
      b07
    • CPU:
      generic
    • OS:
      generic, solaris_9
    • Verification:
      Verified

      Backports

        Description

        While investigating 6479305 (involving toolbars and their buttons under Swing's
        GTK L&F), I began to question the current approach to calculating button insets.
        It is clear from running any Swing app with the GTK L&F that JButtons (as well as
        JCheckBoxes and JRadioButtons) are sized differently than their native equivalents,
        specifically they appear to be much wider (esp. for JButtons) and their height is
        sometimes a couple pixels off.

        I'm attaching the usual JavaWidgetFactory and native "The Widget Factory" testcases
        where you can see these differences. It is apparent under any theme, but it's easier
        to see (esp. for JCheckBox and JRadioButton) if you use a theme like Simple, where
        the background of the checkbox/radiobutton is filled with a different color on mouse
        over events.

        The specific problems include:
        1) JButtons have extra padding on the left/sides, which makes them look much wider
        than native. They are also a couple pixels taller than native in most cases.

        2) JCheckBoxes and JRadioButtons have lots of padding around all sides, which makes
        them layout with much more spacing than in native apps.

        3) JCheckBoxes and JRadioButtons do not have the correct amount of spacing between
        the indicator icon and the text.

        Fixing these issues at the source will make it much easier to resolve the toolbar
        issues described in 6479305.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  campbell Christopher Campbell (Inactive)
                  Reporter:
                  campbell Christopher Campbell (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: