summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorSteve Northover <steve>2003-03-04 02:40:21 +0000
committerSteve Northover <steve>2003-03-04 02:40:21 +0000
commit0a2e3d1a8ddcd8d467725d1060c394344c5527de (patch)
treeafec52f0c310d4150f9f80eb8c0c453f48c2af27 /bundles
parent0379926df0ca2e34cb09e797cca0032957ed66b5 (diff)
downloadeclipse.platform.swt-0a2e3d1a8ddcd8d467725d1060c394344c5527de.tar.gz
eclipse.platform.swt-0a2e3d1a8ddcd8d467725d1060c394344c5527de.tar.xz
eclipse.platform.swt-0a2e3d1a8ddcd8d467725d1060c394344c5527de.zip
*** empty log message ***
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java8
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java9
2 files changed, 17 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java
index 395ddfbfb3..bf9b6d4938 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java
@@ -409,6 +409,14 @@ public void setFont (Font font) {
}
relayout ();
}
+void setForegroundPixel (int pixel) {
+ super.setForegroundPixel (pixel);
+ for (int i = 0; i < items.length; i++) {
+ if (items[i] != null) {
+ items[i].setForegroundPixel (pixel);
+ }
+ }
+}
public void setRedraw (boolean redraw) {
checkWidget();
if (redraw) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java
index c4f9976832..66cde49cf1 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java
@@ -648,6 +648,15 @@ public void setEnabled (boolean enabled) {
int [] argList = {OS.XmNsensitive, enabled ? 1 : 0};
OS.XtSetValues (handle, argList, argList.length / 2);
}
+void setForegroundPixel(int pixel) {
+ int [] argList = {OS.XmNforeground, pixel};
+ OS.XtSetValues (handle, argList, argList.length / 2);
+ int xDisplay = OS.XtDisplay (handle);
+ if (xDisplay == 0) return;
+ int xWindow = OS.XtWindow (handle);
+ if (xWindow == 0) return;
+ OS.XClearArea (xDisplay, xWindow, 0, 0, 0, 0, true);
+}
/**
* Sets the receiver's disabled image to the argument, which may be
* null indicating that no disabled image should be displayed.