mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 13:53:26 +01:00
Added define that fixes text not being visible on rxvt-unicode.
This commit is contained in:
parent
e51ebd9c7c
commit
7da72b79ef
@ -37,6 +37,10 @@
|
||||
#define MAGENTA 6
|
||||
#define BLACK 7
|
||||
|
||||
/* Fixes text color problem on some terminals.
|
||||
Uncomment if necessary */
|
||||
//#define URXVT_FIX
|
||||
|
||||
typedef struct ToxWindow_ ToxWindow;
|
||||
|
||||
struct ToxWindow_ {
|
||||
|
@ -154,8 +154,10 @@ int add_window(Tox *m, ToxWindow w)
|
||||
|
||||
if (w.window == NULL)
|
||||
return -1;
|
||||
|
||||
wbkgd(w.window, COLOR_PAIR(0));
|
||||
#ifdef URXVT_FIX
|
||||
/* Fixes text color problem on some terminals. */
|
||||
wbkgd(w.window, COLOR_PAIR(6));
|
||||
#endif
|
||||
windows[i] = w;
|
||||
w.onInit(&w, m);
|
||||
|
||||
@ -245,8 +247,13 @@ static void draw_bar()
|
||||
|
||||
for (i = 0; i < MAX_WINDOWS_NUM; ++i) {
|
||||
if (windows[i].window) {
|
||||
if (windows + i == active_window)
|
||||
if (windows + i == active_window) {
|
||||
#ifdef URXVT_FIX
|
||||
attron(A_BOLD | COLOR_PAIR(GREEN));
|
||||
} else {
|
||||
#endif
|
||||
attron(A_BOLD);
|
||||
}
|
||||
|
||||
odd = (odd + 1) % blinkrate;
|
||||
|
||||
@ -260,6 +267,10 @@ static void draw_bar()
|
||||
attroff(COLOR_PAIR(RED));
|
||||
|
||||
if (windows + i == active_window) {
|
||||
#ifdef URXVT_FIX
|
||||
attroff(A_BOLD | COLOR_PAIR(GREEN));
|
||||
} else {
|
||||
#endif
|
||||
attroff(A_BOLD);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user