8160054: The FileChooser didn't displayed large font with GTK LAF option.
Reviewed-by: alexsch, serb
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Fri Sep 09 13:15:10 2016 +0530
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Fri Sep 09 16:37:16 2016 +0300
@@ -504,7 +504,7 @@
public Object createValue(UIDefaults table) {
GTKStyleFactory factory = (GTKStyleFactory)getStyleFactory();
GTKStyle style = (GTKStyle)factory.getStyle(null, region);
- return style.getFontForState(null);
+ return style.getDefaultFont();
}
}
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java Fri Sep 09 13:15:10 2016 +0530
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java Fri Sep 09 16:37:16 2016 +0300
@@ -282,7 +282,17 @@
return getColorForState(context, type);
}
+ Font getDefaultFont() {
+ return font;
+ }
+
protected Font getFontForState(SynthContext context) {
+ Font propFont = UIManager
+ .getFont(context.getRegion().getName() + ".font");
+ if (propFont != null) {
+ // if font property got a value then return it
+ return propFont;
+ }
return font;
}