|
Lines 85-95
Link Here
|
| 85 |
|
85 |
|
| 86 |
private void removeSelectionInformation(Event event, ViewerCell cell) { |
86 |
private void removeSelectionInformation(Event event, ViewerCell cell) { |
| 87 |
GC gc = event.gc; |
87 |
GC gc = event.gc; |
| 88 |
gc.setBackground(cell.getViewerRow().getBackground( |
88 |
gc.setBackground(getUnselectedCellBackgroundColor(cell)); |
| 89 |
cell.getColumnIndex())); |
89 |
gc.setForeground(getUnselectedCellForegroundColor(cell)); |
| 90 |
gc.setForeground(cell.getViewerRow().getForeground( |
90 |
gc.fillRectangle(event.getBounds()); |
| 91 |
cell.getColumnIndex())); |
91 |
|
| 92 |
gc.fillRectangle(cell.getBounds()); |
|
|
| 93 |
event.detail &= ~SWT.SELECTED; |
92 |
event.detail &= ~SWT.SELECTED; |
| 94 |
} |
93 |
} |
| 95 |
|
94 |
|
|
Lines 173-178
Link Here
|
| 173 |
} |
172 |
} |
| 174 |
|
173 |
|
| 175 |
/** |
174 |
/** |
|
|
175 |
* @param cell |
| 176 |
* @return n |
| 177 |
*/ |
| 178 |
protected Color getUnselectedCellBackgroundColor(ViewerCell cell) { |
| 179 |
return cell.getViewerRow().getBackground( |
| 180 |
cell.getColumnIndex()); |
| 181 |
} |
| 182 |
|
| 183 |
/** |
| 184 |
* @param cell |
| 185 |
* @return n |
| 186 |
*/ |
| 187 |
protected Color getUnselectedCellForegroundColor(ViewerCell cell) { |
| 188 |
return cell.getViewerRow().getForeground( |
| 189 |
cell.getColumnIndex()); |
| 190 |
} |
| 191 |
|
| 192 |
/** |
| 176 |
* Controls whether the whole cell or only the text-area is highlighted |
193 |
* Controls whether the whole cell or only the text-area is highlighted |
| 177 |
* |
194 |
* |
| 178 |
* @param cell |
195 |
* @param cell |
|
Lines 194-200
Link Here
|
| 194 |
int width = newCell.getColumnIndex() == 0 ? rect.x + rect.width |
211 |
int width = newCell.getColumnIndex() == 0 ? rect.x + rect.width |
| 195 |
: rect.width; |
212 |
: rect.width; |
| 196 |
// 1 is a fix for Linux-GTK |
213 |
// 1 is a fix for Linux-GTK |
| 197 |
newCell.getControl().redraw(x, rect.y - 1, width, rect.height + 1, |
214 |
newCell.getControl().redraw(x, rect.y - 1, width, rect.height + 2, |
| 198 |
true); |
215 |
true); |
| 199 |
} |
216 |
} |
| 200 |
|
217 |
|
|
Lines 204-210
Link Here
|
| 204 |
int width = oldCell.getColumnIndex() == 0 ? rect.x + rect.width |
221 |
int width = oldCell.getColumnIndex() == 0 ? rect.x + rect.width |
| 205 |
: rect.width; |
222 |
: rect.width; |
| 206 |
// 1 is a fix for Linux-GTK |
223 |
// 1 is a fix for Linux-GTK |
| 207 |
oldCell.getControl().redraw(x, rect.y - 1, width, rect.height + 1, |
224 |
oldCell.getControl().redraw(x, rect.y - 1, width, rect.height + 2, |
| 208 |
true); |
225 |
true); |
| 209 |
} |
226 |
} |
| 210 |
} |
227 |
} |