Made true color detection method static
This commit is contained in:
parent
d21cf0869e
commit
ab8da360f8
@ -60,7 +60,7 @@ void term::progress(int prefixlen,
|
||||
*_out << ' ' << std::setw(3) << perc << '%';
|
||||
}
|
||||
|
||||
bool term::has_truecolor() const {
|
||||
bool term::has_truecolor() {
|
||||
char* tc = getenv("COLORTERM");
|
||||
std::string colorterm {tc ? tc : ""};
|
||||
return colorterm.size() > 0 && (colorterm == "truecolor" || colorterm == "24bit");
|
||||
|
@ -25,7 +25,7 @@ namespace sc {
|
||||
double cur,
|
||||
double total) const;
|
||||
|
||||
bool has_truecolor() const;
|
||||
static bool has_truecolor();
|
||||
};
|
||||
|
||||
class cursor_hider {
|
||||
|
Loading…
x
Reference in New Issue
Block a user