< prev index next >
src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -713,33 +713,37 @@
public boolean isOpaque(SynthContext context) {
Region region = context.getRegion();
if (region == Region.COMBO_BOX ||
region == Region.DESKTOP_PANE ||
region == Region.DESKTOP_ICON ||
- region == Region.EDITOR_PANE ||
- region == Region.FORMATTED_TEXT_FIELD ||
region == Region.INTERNAL_FRAME ||
region == Region.LIST ||
region == Region.MENU_BAR ||
region == Region.PANEL ||
- region == Region.PASSWORD_FIELD ||
region == Region.POPUP_MENU ||
region == Region.PROGRESS_BAR ||
region == Region.ROOT_PANE ||
region == Region.SCROLL_PANE ||
- region == Region.SPINNER ||
region == Region.SPLIT_PANE_DIVIDER ||
region == Region.TABLE ||
region == Region.TEXT_AREA ||
- region == Region.TEXT_FIELD ||
- region == Region.TEXT_PANE ||
region == Region.TOOL_BAR_DRAG_WINDOW ||
region == Region.TOOL_TIP ||
region == Region.TREE ||
region == Region.VIEWPORT) {
return true;
}
+ if (!GTKLookAndFeel.is3()) {
+ if (region == Region.EDITOR_PANE ||
+ region == Region.FORMATTED_TEXT_FIELD ||
+ region == Region.PASSWORD_FIELD ||
+ region == Region.SPINNER ||
+ region == Region.TEXT_FIELD ||
+ region == Region.TEXT_PANE) {
+ return true;
+ }
+ }
Component c = context.getComponent();
String name = c.getName();
if (name == "ComboBox.renderer" || name == "ComboBox.listRenderer") {
return true;
}
@@ -831,10 +835,12 @@
int focusSize =
getClassSpecificIntValue(context, "focus-line-width", 1);
int focusPad =
getClassSpecificIntValue(context, "focus-padding", 1);
return indicatorSpacing + focusSize + focusPad;
+ } else if (GTKLookAndFeel.is3() && "ComboBox.forceOpaque".equals(key)) {
+ return true;
}
// Is it a stock icon ?
GTKStockIcon stockIcon = null;
synchronized (ICONS_MAP) {
@@ -1110,10 +1116,11 @@
}
static {
CLASS_SPECIFIC_MAP = new HashMap<String,String>();
CLASS_SPECIFIC_MAP.put("Slider.thumbHeight", "slider-width");
+ 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");
< prev index next >