This patch (committed) fixes some of the default font settings in the Metal look and feel:

2006-09-06  David Gilbert  <[EMAIL PROTECTED]>

        * javax/swing/plaf/metal/MetalLookAndFeel.java
        (initComponentDefaults): Corrected various font defaults.

Mauve checks already committed.

Regards,

Dave
Index: javax/swing/plaf/metal/MetalLookAndFeel.java
===================================================================
RCS file: 
/sources/classpath/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java,v
retrieving revision 1.86
diff -u -r1.86 MetalLookAndFeel.java
--- javax/swing/plaf/metal/MetalLookAndFeel.java        14 Aug 2006 15:13:54 
-0000      1.86
+++ javax/swing/plaf/metal/MetalLookAndFeel.java        6 Sep 2006 11:36:44 
-0000
@@ -889,7 +889,7 @@
       "CheckBox.border", MetalBorders.getButtonBorder(),
       "CheckBox.disabledText", getInactiveControlTextColor(),
       "CheckBox.focus", getFocusColor(),
-      "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12),
+      "CheckBox.font", getControlTextFont(),
       "CheckBox.foreground", getControlTextColor(),
       "CheckBox.icon",
       new 
UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalCheckBoxIcon"),
@@ -905,7 +905,7 @@
       "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav",
       "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(),
       "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(),
-      "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12),
+      "CheckBoxMenuItem.font", getMenuTextFont(),
       "CheckBoxMenuItem.foreground", getMenuForeground(),
       "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(),
       "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(),
@@ -924,7 +924,7 @@
       "ComboBox.buttonShadow", getControlShadow(),
       "ComboBox.disabledBackground", getControl(),
       "ComboBox.disabledForeground", getInactiveSystemTextColor(),
-      "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12),
+      "ComboBox.font", getControlTextFont(),
       "ComboBox.foreground", getControlTextColor(),
       "ComboBox.selectionBackground", getPrimaryControlShadow(),
       "ComboBox.selectionForeground", getControlTextColor(),
@@ -935,10 +935,11 @@
       "DesktopIcon.foreground", getControlTextColor(),
       "DesktopIcon.width", new Integer(160),
       "DesktopIcon.border", MetalBorders.getDesktopIconBorder(),
+      "DesktopIcon.font", getControlTextFont(),
 
       "EditorPane.background", getWindowBackground(),
       "EditorPane.caretForeground", getUserTextColor(),
-      "EditorPane.font", new FontUIResource("Dialog", Font.BOLD, 12),
+      "EditorPane.font", getControlTextFont(),
       "EditorPane.foreground",  getUserTextColor(),
       "EditorPane.inactiveForeground",  getInactiveSystemTextColor(),
       "EditorPane.selectionBackground", getTextHighlightColor(),
@@ -1023,7 +1024,7 @@
       "Menu.borderPainted", Boolean.TRUE,
       "MenuItem.commandSound", "sounds/MenuItemCommand.wav",
       "Menu.disabledForeground", getMenuDisabledForeground(),
-      "Menu.font", getControlTextFont(),
+      "Menu.font", getMenuTextFont(),
       "Menu.foreground", getMenuForeground(),
       "Menu.selectionBackground", getMenuSelectedBackground(),
       "Menu.selectionForeground", getMenuSelectedForeground(),
@@ -1032,7 +1033,7 @@
 
       "MenuBar.background", getMenuBackground(),
       "MenuBar.border", new MetalBorders.MenuBarBorder(),
-      "MenuBar.font", getControlTextFont(),
+      "MenuBar.font", getMenuTextFont(),
       "MenuBar.foreground", getMenuForeground(),
       "MenuBar.highlight", getControlHighlight(),
       "MenuBar.shadow", getControlShadow(),
@@ -1046,7 +1047,7 @@
       "MenuItem.border", new MetalBorders.MenuItemBorder(),
       "MenuItem.borderPainted", Boolean.TRUE,
       "MenuItem.disabledForeground", getMenuDisabledForeground(),
-      "MenuItem.font", getControlTextFont(),
+      "MenuItem.font", getMenuTextFont(),
       "MenuItem.foreground", getMenuForeground(),
       "MenuItem.selectionBackground", getMenuSelectedBackground(),
       "MenuItem.selectionForeground", getMenuSelectedForeground(),
@@ -1087,13 +1088,13 @@
 
       "PopupMenu.background", getMenuBackground(),
       "PopupMenu.border", new MetalBorders.PopupMenuBorder(),
-      "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12),
+      "PopupMenu.font", getMenuTextFont(),
       "PopupMenu.foreground", getMenuForeground(),
       "PopupMenu.popupSound", "sounds/PopupMenuPopup.wav",
 
       "ProgressBar.background", getControl(),
       "ProgressBar.border", new 
BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1),
-      "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12),
+      "ProgressBar.font", getControlTextFont(),
       "ProgressBar.foreground", getPrimaryControlShadow(),
       "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(),
       "ProgressBar.selectionForeground", getControl(),
@@ -1127,7 +1128,7 @@
         MetalIconFactory.getRadioButtonMenuItemIcon(),
       "RadioButtonMenuItem.commandSound", "sounds/MenuItemCommand.wav",
       "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(),
-      "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(),
+      "RadioButtonMenuItem.font", getMenuTextFont(),
       "RadioButtonMenuItem.foreground", getMenuForeground(),
       "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
       "RadioButtonMenuItem.selectionBackground", 
@@ -1174,7 +1175,7 @@
       "Spinner.arrowButtonInsets", new InsetsUIResource(0, 0, 0, 0),
       "Spinner.background", getControl(),
       "Spinner.border", MetalBorders.getTextFieldBorder(),
-      "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12),
+      "Spinner.font", getControlTextFont(),
       "Spinner.foreground", getControl(),
 
       "SplitPane.background", getControl(),
@@ -1191,7 +1192,7 @@
       "TabbedPane.contentOpaque", Boolean.TRUE,
       "TabbedPane.darkShadow", getControlDarkShadow(),
       "TabbedPane.focus", getPrimaryControlDarkShadow(),
-      "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12),
+      "TabbedPane.font", getControlTextFont(),
       "TabbedPane.foreground", getControlTextColor(),
       "TabbedPane.highlight", getControlHighlight(),
       "TabbedPane.light", getControl(),
@@ -1254,7 +1255,7 @@
       "TextPane.selectionForeground", getHighlightedTextColor(),
 
       "TitledBorder.border", new LineBorderUIResource(getPrimaryControl(), 1),
-      "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12),
+      "TitledBorder.font", getControlTextFont(),
       "TitledBorder.titleColor", getSystemTextColor(),
 
       "ToggleButton.background", getControl(),
@@ -1276,7 +1277,7 @@
       "ToolBar.dockingForeground", getPrimaryControlDarkShadow(),
       "ToolBar.floatingBackground", getMenuBackground(),
       "ToolBar.floatingForeground", getPrimaryControl(),
-      "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12),
+      "ToolBar.font", getMenuTextFont(),
       "ToolBar.foreground", getMenuForeground(),
       "ToolBar.highlight", getControlHighlight(),
       "ToolBar.light", getControlHighlight(),

Reply via email to