mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01:00
Show bold text in bright colors
Fixes 17. Could be made an option in the future if necessary.
This commit is contained in:
parent
b1aaf5abe5
commit
36cc010a87
1 changed files with 4 additions and 1 deletions
|
|
@ -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));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue