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

Text size is twice bigger under GTK L&F on Gnome with HiDPI enabled

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 8, 9
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Environment:

      Linux Ubuntu: 14.04
      Gnome: 3.9.90
      JDK 1.8.0_40-ea

      Description

      Steps to reproduce:

      Run the code:
      -----------------------
      import javax.swing.*;
      import com.sun.java.swing.plaf.gtk.GTKLookAndFeel;

      public class GnomeHiDPITest {

          public static void main(String[] args) {
              SwingUtilities.invokeLater(() -> {
                  try {
                      UIManager.setLookAndFeel(new GTKLookAndFeel());
                      JFrame frame = new JFrame();
                      frame.setSize(100, 100);
                      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                      JMenuBar menuBar = new JMenuBar();
                      menuBar.add(new JMenu("Test 1"));
                      menuBar.add(new JMenu("Test 2"));
                      frame.setJMenuBar(menuBar);
                      frame.setVisible(true);
                  } catch (UnsupportedLookAndFeelException ex) {
                      throw new RuntimeException(ex);
                  }
              });
          }
      }
      -----------------------

      - Enable HiDPI
      > gsettings set org.gnome.desktop.interface scaling-factor 2

      The text menu size is enlarged.

      Note that under Metal L&F the text size is not changed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                alexsch Alexander Scherbatiy (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated: