From f9443b14d5faa43f98a0a7a5cc85994599bc11a3 Mon Sep 17 00:00:00 2001 From: Siarzhuk Zharski Date: Sat, 26 Jan 2013 22:02:59 +0100 Subject: [PATCH] Reverting hrev45143:bold characters visual regression Terminal is GUI application and there are no need to emulate bold in some kind of color adjustments, especially in case the proposed emulation look is too far away from results observed on similar software like xterm, Konsole and XFCE Terminal. --- src/apps/terminal/Shell.cpp | 2 +- src/apps/terminal/TermParse.cpp | 23 ++++++++--------------- src/apps/terminal/TermView.cpp | 4 ++-- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp index 5dd10ae79d..12c3c92689 100644 --- a/src/apps/terminal/Shell.cpp +++ b/src/apps/terminal/Shell.cpp @@ -539,7 +539,7 @@ Shell::_Spawn(int row, int col, const ShellParameters& parameters) /* * setenv TERM and TTY. */ - setenv("TERM", "xterm-color", true); + setenv("TERM", "xterm", true); setenv("TTY", ttyName, true); setenv("TTYPE", parameters.Encoding(), true); diff --git a/src/apps/terminal/TermParse.cpp b/src/apps/terminal/TermParse.cpp index 6664dd0b59..0ae798a326 100644 --- a/src/apps/terminal/TermParse.cpp +++ b/src/apps/terminal/TermParse.cpp @@ -833,30 +833,23 @@ TermParse::EscParse() fAttr = FORECOLORED(7); break; - case 1: /* Bright / Bold */ - fAttr |= FORECOLORED(8); - fAttr |= FORESET; + case 1: /* Bold */ + case 5: + fAttr |= BOLD; break; case 4: /* Underline */ fAttr |= UNDERLINE; break; - case 5: - fAttr |= BOLD; - break; - case 7: /* Inverse */ fAttr |= INVERSE; break; - case 2: /* Faint: decreased intensity */ - case 21: /* Bright/Bold: off or Underline: Double */ - case 22: /* Not Bold, not bright, not faint */ - fAttr &= ~(FORECOLORED(8) | BOLD); - fAttr |= FORESET; + case 22: /* Not Bold */ + fAttr &= ~BOLD; break; - + case 24: /* Not Underline */ fAttr &= ~UNDERLINE; break; @@ -873,7 +866,7 @@ TermParse::EscParse() case 35: case 36: case 37: - fAttr &= ~FORECOLORED(7); + fAttr &= ~FORECOLOR; fAttr |= FORECOLORED(param[row] - 30); fAttr |= FORESET; break; @@ -882,7 +875,7 @@ TermParse::EscParse() { if (nparam != 3 || param[1] != 5) break; - fAttr &= ~FORECOLORED(255 - 8); + fAttr &= ~FORECOLOR; fAttr |= FORECOLORED(param[2]); fAttr |= FORESET; diff --git a/src/apps/terminal/TermView.cpp b/src/apps/terminal/TermView.cpp index c79960e357..8da3c92dc7 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -79,14 +79,14 @@ static rgb_color kTermColorTable[256] = { { 6, 152, 154, 0}, // cyan {245, 245, 245, 0}, // white - { 64, 64, 64, 0}, // black + {128, 128, 128, 0}, // black {255, 0, 0, 0}, // red { 0, 255, 0, 0}, // green {255, 255, 0, 0}, // yellow { 0, 0, 255, 0}, // blue {255, 0, 255, 0}, // magenta { 0, 255, 255, 0}, // cyan - {128, 128, 128, 0}, // white + {255, 255, 255, 0}, // white { 0, 0, 0, 0}, { 0, 0, 51, 0},