Changeset 12923 in josm


Ignore:
Timestamp:
2017-10-04T19:01:26+02:00 (6 weeks ago)
Author:
bastiK
Message:

see #9995 - add advanced option to scale the menu font (gui.scale.menu.font)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r12911 r12923  
    88import java.awt.Container;
    99import java.awt.Dimension;
     10import java.awt.Font;
    1011import java.awt.GraphicsEnvironment;
    1112import java.awt.GridBagLayout;
     
    11731174            UIManager.put(p+".caretForeground", UIManager.getColor(p+".foreground"));
    11741175        }
     1176
     1177        double menuFontFactor = Config.getPref().getDouble("gui.scale.menu.font", 1.0);
     1178        if (menuFontFactor != 1.0) {
     1179            for (String key : Arrays.asList(
     1180                    "Menu.font", "MenuItem.font", "CheckBoxMenuItem.font", "RadioButtonMenuItem.font", "MenuItem.acceleratorFont")) {
     1181                Font font = UIManager.getFont(key);
     1182                if (font != null) {
     1183                    UIManager.put(key, font.deriveFont(font.getSize2D() * (float) menuFontFactor));
     1184                }
     1185            }
     1186        }
    11751187    }
    11761188
Note: See TracChangeset for help on using the changeset viewer.