diff options
author | Carolyn MacLeod <carolyn> | 2009-03-31 21:13:45 +0000 |
---|---|---|
committer | Carolyn MacLeod <carolyn> | 2009-03-31 21:13:45 +0000 |
commit | 83bf79434a40fc13ba09feebfd0beb9c2f12a1e2 (patch) | |
tree | b11d05ec4872331b6245fb42b5aca88ed964c085 /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java | |
parent | d8b150f7916e0bed718cb1b6682bc59249791c7a (diff) | |
download | eclipse.platform.swt-83bf79434a40fc13ba09feebfd0beb9c2f12a1e2.tar.gz eclipse.platform.swt-83bf79434a40fc13ba09feebfd0beb9c2f12a1e2.tar.xz eclipse.platform.swt-83bf79434a40fc13ba09feebfd0beb9c2f12a1e2.zip |
185204 - [CTabFolder] CTabItem.drawClose could preserve color
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java index b26a139106..d4d4e31424 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java @@ -157,6 +157,7 @@ public class CTabFolder extends Composite { static Color borderColor; // close, min/max and chevron buttons + static Color fillColor; boolean showClose = false; boolean showUnselectedClose = true; @@ -1194,6 +1195,12 @@ public Rectangle getClientArea() { height -= tabHeight; return new Rectangle(xClient, yClient, width, height); } +Color getFillColor() { + if (fillColor == null) { + fillColor = new Color(getDisplay(), CTabFolder.CLOSE_FILL); + } + return fillColor; +} /** * Return the tab that is located at the specified index. * @@ -1892,6 +1899,10 @@ void onDispose(Event event) { items[i].dispose(); } } + if (fillColor != null) { + fillColor.dispose(); + fillColor = null; + } selectionGradientColors = null; selectionGradientPercents = null; |