--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java Fri Jul 08 18:43:12 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java Fri Jul 08 20:28:28 2016 +0300
@@ -1339,14 +1339,14 @@
Graphics g, int state, int x, int y, int w, int h) {
ENGINE.paintExpander(g, context, Region.TREE,
GTKLookAndFeel.synthStateToGTKState(context.getRegion(), state),
- ExpanderStyle.EXPANDED, "treeview", x, y, w, h);
+ ExpanderStyle.EXPANDED, "expander", x, y, w, h);
}
public void paintTreeCollapsedIcon(SynthContext context,
Graphics g, int state, int x, int y, int w, int h) {
ENGINE.paintExpander(g, context, Region.TREE,
GTKLookAndFeel.synthStateToGTKState(context.getRegion(), state),
- ExpanderStyle.COLLAPSED, "treeview", x, y, w, h);
+ ExpanderStyle.COLLAPSED, "expander", x, y, w, h);
}
public void paintCheckBoxIcon(SynthContext context,
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java Fri Jul 08 18:43:12 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java Fri Jul 08 20:28:28 2016 +0300
@@ -854,6 +854,12 @@
return indicatorSpacing + focusSize + focusPad;
} else if (GTKLookAndFeel.is3() && "ComboBox.forceOpaque".equals(key)) {
return true;
+ } else if ("Tree.expanderSize".equals(key)) {
+ Object value = getClassSpecificValue("expander-size");
+ if (value instanceof Integer) {
+ return (Integer)value + 4;
+ }
+ return null;
}
// Is it a stock icon ?
@@ -1136,7 +1142,6 @@
CLASS_SPECIFIC_MAP.put("Slider.thumbWidth", "slider-length");
CLASS_SPECIFIC_MAP.put("Slider.trackBorder", "trough-border");
CLASS_SPECIFIC_MAP.put("SplitPane.size", "handle-size");
- CLASS_SPECIFIC_MAP.put("Tree.expanderSize", "expander-size");
CLASS_SPECIFIC_MAP.put("ScrollBar.thumbHeight", "slider-width");
CLASS_SPECIFIC_MAP.put("ScrollBar.width", "slider-width");
CLASS_SPECIFIC_MAP.put("TextArea.caretForeground", "cursor-color");
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c Fri Jul 08 18:43:12 2016 +0300
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c Fri Jul 08 20:28:28 2016 +0300
@@ -1586,13 +1586,17 @@
fp_gtk_style_context_save (context);
GtkStateFlags flags = get_gtk_flags(state_type);
+ if (expander_style == GTK_EXPANDER_EXPANDED) {
+ flags |= GTK_STATE_FLAG_ACTIVE;
+ }
+
fp_gtk_style_context_set_state(context, flags);
if (detail != 0) {
transform_detail_string(detail, context);
}
- fp_gtk_render_expander (context, cr, x, y, width, height);
+ fp_gtk_render_expander (context, cr, x + 2, y + 2, width - 4, height - 4);
fp_gtk_style_context_restore (context);
}