summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2005-02-04 18:37:56 +0000
committerGrant Gayed <ggayed>2005-02-04 18:37:56 +0000
commit28f2c95555bb2ed2b6c2a58fbef9c726a4ca8116 (patch)
tree6b63bc59bc6e9da2c1103804918a782e0527e2f8 /bundles/org.eclipse.swt/Eclipse SWT
parentd7112b9940690c795ad0ec1538ee939c8f3d27ac (diff)
downloadeclipse.platform.swt-28f2c95555bb2ed2b6c2a58fbef9c726a4ca8116.tar.gz
eclipse.platform.swt-28f2c95555bb2ed2b6c2a58fbef9c726a4ca8116.tar.xz
eclipse.platform.swt-28f2c95555bb2ed2b6c2a58fbef9c726a4ca8116.zip
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java4
2 files changed, 5 insertions, 14 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java
index ec891d0382..6048b19b8d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java
@@ -25,8 +25,6 @@ public class Tree extends Composite {
int resizeColumnX = -1;
boolean inExpand = false; /* for item creation within Expand callback */
- Color gridLineColor, highlightShadowColor, normalShadowColor;
- Color selectionBackgroundColor, selectionForegroundColor;
Rectangle expanderBounds, checkboxBounds;
static final int MARGIN_IMAGE = 3;
@@ -51,11 +49,6 @@ public Tree (Composite parent, int style) {
fontHeight = gc.getFontMetrics ().getHeight ();
gc.dispose ();
itemHeight = fontHeight + (2 * getCellPadding ());
- gridLineColor = display.getSystemColor (SWT.COLOR_BLACK);
- highlightShadowColor = display.getSystemColor (SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW);
- normalShadowColor = display.getSystemColor (SWT.COLOR_WIDGET_NORMAL_SHADOW);
- selectionBackgroundColor = display.getSystemColor (SWT.COLOR_LIST_SELECTION);
- selectionForegroundColor = display.getSystemColor (SWT.COLOR_LIST_SELECTION_TEXT);
initImages (display);
expanderBounds = getExpandedImage ().getBounds ();
checkboxBounds = getUncheckedImage ().getBounds ();
@@ -632,7 +625,7 @@ void headerPaintShadow (GC gc, Rectangle bounds, boolean paintHLines, boolean pa
Color oldForeground = gc.getForeground ();
/* draw highlight shadow */
- gc.setForeground (highlightShadowColor);
+ gc.setForeground (display.getSystemColor (SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
if (paintHLines) {
int endX = bounds.x + bounds.width;
gc.drawLine (bounds.x, bounds.y, endX, bounds.y);
@@ -646,7 +639,7 @@ void headerPaintShadow (GC gc, Rectangle bounds, boolean paintHLines, boolean pa
Point bottomShadowStop = new Point (bottomShadowStart.x + bounds.width - 2, bottomShadowStart.y);
/* light inner shadow */
- gc.setForeground (normalShadowColor);
+ gc.setForeground (display.getSystemColor (SWT.COLOR_WIDGET_NORMAL_SHADOW));
if (paintHLines) {
gc.drawLine (
bottomShadowStart.x, bottomShadowStart.y,
@@ -1146,8 +1139,6 @@ void onDispose () {
header = null;
resizeColumn = null;
expanderBounds = null;
- gridLineColor = highlightShadowColor = normalShadowColor = null;
- selectionBackgroundColor = selectionForegroundColor = null;
}
void onEnd (int stateMask) {
int lastAvailableIndex = availableItems.length - 1;
@@ -1759,7 +1750,7 @@ void onPaint (Event event) {
if (linesVisible) {
Color oldForeground = gc.getForeground ();
if (numColumns > 0 && startColumn != -1) {
- gc.setForeground (gridLineColor);
+ gc.setForeground (display.getSystemColor (SWT.COLOR_BLACK));
/* vertical column lines */
for (int i = startColumn; i <= endColumn; i++) {
int x = columns [i].getX () + columns [i].width - 1;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java
index a9c1158073..18d1971679 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java
@@ -858,7 +858,7 @@ void paint (GC gc, TreeColumn column, boolean paintCellContent) {
/* draw the selection bar if the receiver is selected */
if (isSelected () && columnIndex == 0) {
Color oldBackground = gc.getBackground ();
- gc.setBackground (parent.selectionBackgroundColor);
+ gc.setBackground (display.getSystemColor (SWT.COLOR_LIST_SELECTION));
Rectangle focusBounds = getFocusBounds ();
gc.fillRectangle (focusBounds.x + 1, focusBounds.y + 1, focusBounds.width - 2, focusBounds.height - 2);
gc.setBackground (oldBackground);
@@ -967,7 +967,7 @@ void paint (GC gc, TreeColumn column, boolean paintCellContent) {
int fontHeight = getFontHeight (columnIndex);
Color oldForeground = gc.getForeground ();
if (isSelected () && columnIndex == 0) {
- gc.setForeground (parent.selectionForegroundColor);
+ gc.setForeground (display.getSystemColor (SWT.COLOR_LIST_SELECTION_TEXT));
foregroundChanged = true;
} else {
Color foreground = getForeground (columnIndex);