mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 02:36:01 +02:00
bug 205260: [terminal] The terminal does not take the font from the preferences
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205260
This commit is contained in:
parent
3e24a83518
commit
e79b8fce94
1 changed files with 13 additions and 12 deletions
|
@ -33,7 +33,7 @@ public class StyleMap {
|
||||||
private static final String BLUE = "blue"; //$NON-NLS-1$
|
private static final String BLUE = "blue"; //$NON-NLS-1$
|
||||||
private static final String GREEN = "green"; //$NON-NLS-1$
|
private static final String GREEN = "green"; //$NON-NLS-1$
|
||||||
private static final String RED = "red"; //$NON-NLS-1$
|
private static final String RED = "red"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final String PREFIX = "org.eclipse.tm.internal."; //$NON-NLS-1$
|
private static final String PREFIX = "org.eclipse.tm.internal."; //$NON-NLS-1$
|
||||||
// TODO propagate the name of the fonf in the FontRegistry
|
// TODO propagate the name of the fonf in the FontRegistry
|
||||||
String fFontName="terminal.views.view.font.definition"; //$NON-NLS-1$
|
String fFontName="terminal.views.view.font.definition"; //$NON-NLS-1$
|
||||||
|
@ -44,14 +44,15 @@ public class StyleMap {
|
||||||
private boolean fInvertColors;
|
private boolean fInvertColors;
|
||||||
StyleMap() {
|
StyleMap() {
|
||||||
addColor(WHITE, 255,255,255);
|
addColor(WHITE, 255,255,255);
|
||||||
addColor(BLACK, 0,0,0);
|
addColor(BLACK, 0,0,0);
|
||||||
addColor(RED, 255,128,128);
|
addColor(RED, 255,128,128);
|
||||||
addColor(GREEN, 128,255,128);
|
addColor(GREEN, 128,255,128);
|
||||||
addColor(BLUE, 128,128,255);
|
addColor(BLUE, 128,128,255);
|
||||||
addColor(YELLOW, 255,255,0);
|
addColor(YELLOW, 255,255,0);
|
||||||
addColor(CYAN, 0,255,255);
|
addColor(CYAN, 0,255,255);
|
||||||
addColor(MAGENTA, 255,255,0);
|
addColor(MAGENTA, 255,255,0);
|
||||||
addColor(GRAY, 128,128,128);
|
addColor(GRAY, 128,128,128);
|
||||||
|
fDefaultStyle=Style.getStyle(StyleColor.getStyleColor(BLACK),StyleColor.getStyleColor(WHITE));
|
||||||
updateFont();
|
updateFont();
|
||||||
}
|
}
|
||||||
private void addColor(String name, int r, int g, int b) {
|
private void addColor(String name, int r, int g, int b) {
|
||||||
|
@ -90,8 +91,8 @@ public class StyleMap {
|
||||||
if(invert==fInvertColors)
|
if(invert==fInvertColors)
|
||||||
return;
|
return;
|
||||||
fInvertColors=invert;
|
fInvertColors=invert;
|
||||||
swapColors(WHITE,BLACK);
|
swapColors(WHITE,BLACK);
|
||||||
fDefaultStyle=Style.getStyle(StyleColor.getStyleColor(BLACK),StyleColor.getStyleColor(WHITE));
|
fDefaultStyle=Style.getStyle(StyleColor.getStyleColor(BLACK),StyleColor.getStyleColor(WHITE));
|
||||||
}
|
}
|
||||||
void swapColors(String n1, String n2) {
|
void swapColors(String n1, String n2) {
|
||||||
swapColors2(n1, n2);
|
swapColors2(n1, n2);
|
||||||
|
@ -103,7 +104,7 @@ public class StyleMap {
|
||||||
Color c2=getColor(StyleColor.getStyleColor(n2));
|
Color c2=getColor(StyleColor.getStyleColor(n2));
|
||||||
fColorMap.put(StyleColor.getStyleColor(n1), c2);
|
fColorMap.put(StyleColor.getStyleColor(n1), c2);
|
||||||
fColorMap.put(StyleColor.getStyleColor(n2), c1);
|
fColorMap.put(StyleColor.getStyleColor(n2), c1);
|
||||||
|
|
||||||
}
|
}
|
||||||
// static Font getBoldFont(Font font) {
|
// static Font getBoldFont(Font font) {
|
||||||
// FontData fontDatas[] = font.getFontData();
|
// FontData fontDatas[] = font.getFontData();
|
||||||
|
|
Loading…
Add table
Reference in a new issue