X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbits%2FColorTheme.java;h=3efce633243c9f82433d0212ad13e6caefe4922c;hb=c4cefaa04ec122fc02efb6542451a31fdf722c32;hp=83f09f4ea41de68911696e3434b1dee5a5a08217;hpb=a69ed767c9c07cf35cf1c5f7821fc009cfe79cd2;p=nikiroo-utils.git diff --git a/src/jexer/bits/ColorTheme.java b/src/jexer/bits/ColorTheme.java index 83f09f4..3efce63 100644 --- a/src/jexer/bits/ColorTheme.java +++ b/src/jexer/bits/ColorTheme.java @@ -178,8 +178,11 @@ public class ColorTheme { return; } - while (token.equals("bold") || token.equals("blink")) { - if (token.equals("bold")) { + while (token.equals("bold") + || token.equals("bright") + || token.equals("blink") + ) { + if (token.equals("bold") || token.equals("bright")) { bold = true; token = tokenizer.nextToken(); } @@ -231,8 +234,8 @@ public class ColorTheme { // Invalid line. continue; } - String key = line.substring(0, line.indexOf(':')).trim(); - String text = line.substring(line.indexOf(':') + 1); + String key = line.substring(0, line.indexOf('=')).trim(); + String text = line.substring(line.indexOf('=') + 1); setColorFromString(key, text); } // All done. @@ -362,6 +365,11 @@ public class ColorTheme { color.setBackColor(Color.BLUE); color.setBold(true); colors.put("tlabel", color); + color = new CellAttributes(); + color.setForeColor(Color.YELLOW); + color.setBackColor(Color.BLUE); + color.setBold(true); + colors.put("tlabel.mnemonic", color); // TText text color = new CellAttributes(); @@ -393,6 +401,16 @@ public class ColorTheme { color.setBackColor(Color.BLACK); color.setBold(true); colors.put("tcheckbox.active", color); + color = new CellAttributes(); + color.setForeColor(Color.YELLOW); + color.setBackColor(Color.BLUE); + color.setBold(true); + colors.put("tcheckbox.mnemonic", color); + color = new CellAttributes(); + color.setForeColor(Color.RED); + color.setBackColor(Color.BLACK); + color.setBold(true); + colors.put("tcheckbox.mnemonic.highlighted", color); // TComboBox color = new CellAttributes(); @@ -456,6 +474,16 @@ public class ColorTheme { color.setBackColor(Color.BLACK); color.setBold(true); colors.put("tradiobutton.active", color); + color = new CellAttributes(); + color.setForeColor(Color.YELLOW); + color.setBackColor(Color.BLUE); + color.setBold(true); + colors.put("tradiobutton.mnemonic", color); + color = new CellAttributes(); + color.setForeColor(Color.RED); + color.setBackColor(Color.BLACK); + color.setBold(true); + colors.put("tradiobutton.mnemonic.highlighted", color); // TRadioGroup color = new CellAttributes(); @@ -608,6 +636,92 @@ public class ColorTheme { color.setBackColor(Color.BLUE); color.setBold(false); colors.put("teditor", color); + color = new CellAttributes(); + color.setForeColor(Color.BLACK); + color.setBackColor(Color.CYAN); + color.setBold(false); + colors.put("teditor.selected", color); + + // TTable + color = new CellAttributes(); + color.setForeColor(Color.WHITE); + color.setBackColor(Color.BLUE); + color.setBold(false); + colors.put("ttable.inactive", color); + color = new CellAttributes(); + color.setForeColor(Color.BLACK); + color.setBackColor(Color.CYAN); + color.setBold(false); + colors.put("ttable.active", color); + color = new CellAttributes(); + color.setForeColor(Color.YELLOW); + color.setBackColor(Color.CYAN); + color.setBold(true); + colors.put("ttable.selected", color); + color = new CellAttributes(); + color.setForeColor(Color.BLACK); + color.setBackColor(Color.WHITE); + color.setBold(false); + colors.put("ttable.label", color); + color = new CellAttributes(); + color.setForeColor(Color.BLUE); + color.setBackColor(Color.WHITE); + color.setBold(false); + colors.put("ttable.label.selected", color); + color = new CellAttributes(); + color.setForeColor(Color.WHITE); + color.setBackColor(Color.BLUE); + color.setBold(false); + colors.put("ttable.border", color); + + // TSplitPane + color = new CellAttributes(); + color.setForeColor(Color.WHITE); + color.setBackColor(Color.BLUE); + color.setBold(false); + colors.put("tsplitpane", color); + + // THelpWindow border - during window movement + color = new CellAttributes(); + color.setForeColor(Color.GREEN); + color.setBackColor(Color.CYAN); + color.setBold(true); + colors.put("thelpwindow.windowmove", color); + + // THelpWindow border + color = new CellAttributes(); + color.setForeColor(Color.GREEN); + color.setBackColor(Color.CYAN); + color.setBold(true); + colors.put("thelpwindow.border", color); + + // THelpWindow background + color = new CellAttributes(); + color.setForeColor(Color.WHITE); + color.setBackColor(Color.CYAN); + color.setBold(true); + colors.put("thelpwindow.background", color); + + // THelpWindow text + color = new CellAttributes(); + color.setForeColor(Color.WHITE); + color.setBackColor(Color.BLUE); + color.setBold(false); + colors.put("thelpwindow.text", color); + + // THelpWindow link + color = new CellAttributes(); + color.setForeColor(Color.YELLOW); + color.setBackColor(Color.BLUE); + color.setBold(true); + colors.put("thelpwindow.link", color); + + // THelpWindow link - active + color = new CellAttributes(); + color.setForeColor(Color.YELLOW); + color.setBackColor(Color.CYAN); + color.setBold(true); + colors.put("thelpwindow.link.active", color); }