mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-04 09:45:45 +08:00
Show bold text in bright colors
Fixes 17. Could be made an option in the future if necessary.
This commit is contained in:
@@ -205,7 +205,10 @@ final class TerminalRenderer {
|
|||||||
final boolean strikeThrough = (effect & TextStyle.CHARACTER_ATTRIBUTE_STRIKETHROUGH) != 0;
|
final boolean strikeThrough = (effect & TextStyle.CHARACTER_ATTRIBUTE_STRIKETHROUGH) != 0;
|
||||||
final boolean dim = (effect & TextStyle.CHARACTER_ATTRIBUTE_DIM) != 0;
|
final boolean dim = (effect & TextStyle.CHARACTER_ATTRIBUTE_DIM) != 0;
|
||||||
|
|
||||||
int foreColorARGB = palette[foreColor];
|
// Let bold have bright colors if applicable (one of the first 8):
|
||||||
|
final int actualForeColor = foreColor + (bold && foreColor < 8 ? 8 : 0);
|
||||||
|
|
||||||
|
int foreColorARGB = palette[actualForeColor];
|
||||||
if (dim) {
|
if (dim) {
|
||||||
int red = (0xFF & (foreColorARGB >> 16));
|
int red = (0xFF & (foreColorARGB >> 16));
|
||||||
int green = (0xFF & (foreColorARGB >> 8));
|
int green = (0xFF & (foreColorARGB >> 8));
|
||||||
|
Reference in New Issue
Block a user