aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-03-29 20:37:17 +0200
committerBoris Faure <billiob@gmail.com>2015-03-29 20:37:17 +0200
commit834ee015327d0730de4272210bb5f655912141a6 (patch)
tree23bcdc2e38257b42eda8acd9b908561bfb1ac381
parenttermio: make code more readable. Closes CID1291865 (diff)
downloadterminology-834ee015327d0730de4272210bb5f655912141a6.tar.gz
fix colors and show darkgray. Closes https://phab.enlightenment.org/T2245
-rw-r--r--src/bin/col.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/bin/col.c b/src/bin/col.c
index 003847c..65fc6ca 100644
--- a/src/bin/col.c
+++ b/src/bin/col.c
@@ -389,7 +389,7 @@ colors_term_init(Evas_Object *textgrid, Evas_Object *bg, Config *config)
for (c = 0; c < (4 * 12); c++)
{
- n = c + (24 * (c / 24));
+ n = c;
if (config->colors_use)
{
r = config->colors[c].r;
@@ -421,9 +421,19 @@ colors_term_init(Evas_Object *textgrid, Evas_Object *bg, Config *config)
r, g, b, a);
/* faint */
- evas_object_textgrid_palette_set(
- textgrid, EVAS_TEXTGRID_PALETTE_STANDARD, n + 24,
- r / 2, g / 2, b / 2, a / 2);
+ if ((n == 1) && (r == 0) && (g == 0) && (b == 0))
+ {
+ /* dark gray */
+ evas_object_textgrid_palette_set(
+ textgrid, EVAS_TEXTGRID_PALETTE_STANDARD, n + 48,
+ 127, 127, 127, 127);
+ }
+ else
+ {
+ evas_object_textgrid_palette_set(
+ textgrid, EVAS_TEXTGRID_PALETTE_STANDARD, n + 48,
+ r / 2, g / 2, b / 2, a / 2);
+ }
}
for (c = 0; c < 256; c++)
{