mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Bug 566732: Connect selection preference page to terminal
Bug 549697 introduced the new UI for setting colors, but the selection color (while added to the pref page) was never connected to the code. Change-Id: I9934efe595efe141a14f0bca3bdf355f436d907d
This commit is contained in:
parent
9b94dbd5ef
commit
e2b94a324f
1 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,6 @@ package org.eclipse.tm.internal.terminal.textcanvas;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.eclipse.swt.SWT;
|
|
||||||
import org.eclipse.swt.graphics.Color;
|
import org.eclipse.swt.graphics.Color;
|
||||||
import org.eclipse.swt.graphics.Device;
|
import org.eclipse.swt.graphics.Device;
|
||||||
import org.eclipse.swt.graphics.Font;
|
import org.eclipse.swt.graphics.Font;
|
||||||
|
@ -78,8 +77,9 @@ public class TextLineRenderer implements ILinelRenderer {
|
||||||
drawCursor(model, doubleBufferGC, line, 0, 0, colFirst);
|
drawCursor(model, doubleBufferGC, line, 0, 0, colFirst);
|
||||||
}
|
}
|
||||||
if (fModel.hasLineSelection(line)) {
|
if (fModel.hasLineSelection(line)) {
|
||||||
doubleBufferGC.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT));
|
TerminalStyle style = TerminalStyle.getStyle(TerminalColor.SELECTION_FOREGROUND,
|
||||||
doubleBufferGC.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_SELECTION));
|
TerminalColor.SELECTION_BACKGROUND);
|
||||||
|
setupGC(doubleBufferGC, style);
|
||||||
Point start = model.getSelectionStart();
|
Point start = model.getSelectionStart();
|
||||||
Point end = model.getSelectionEnd();
|
Point end = model.getSelectionEnd();
|
||||||
char[] chars = model.getTerminalText().getChars(line);
|
char[] chars = model.getTerminalText().getChars(line);
|
||||||
|
|
Loading…
Add table
Reference in a new issue