mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 14: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 MAGENTA 6
|
||||||
#define BLACK 7
|
#define BLACK 7
|
||||||
|
|
||||||
|
/* Fixes text color problem on some terminals.
|
||||||
|
Uncomment if necessary */
|
||||||
|
//#define URXVT_FIX
|
||||||
|
|
||||||
typedef struct ToxWindow_ ToxWindow;
|
typedef struct ToxWindow_ ToxWindow;
|
||||||
|
|
||||||
struct ToxWindow_ {
|
struct ToxWindow_ {
|
||||||
|
@ -154,8 +154,10 @@ int add_window(Tox *m, ToxWindow w)
|
|||||||
|
|
||||||
if (w.window == NULL)
|
if (w.window == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
#ifdef URXVT_FIX
|
||||||
wbkgd(w.window, COLOR_PAIR(0));
|
/* Fixes text color problem on some terminals. */
|
||||||
|
wbkgd(w.window, COLOR_PAIR(6));
|
||||||
|
#endif
|
||||||
windows[i] = w;
|
windows[i] = w;
|
||||||
w.onInit(&w, m);
|
w.onInit(&w, m);
|
||||||
|
|
||||||
@ -245,8 +247,13 @@ static void draw_bar()
|
|||||||
|
|
||||||
for (i = 0; i < MAX_WINDOWS_NUM; ++i) {
|
for (i = 0; i < MAX_WINDOWS_NUM; ++i) {
|
||||||
if (windows[i].window) {
|
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);
|
attron(A_BOLD);
|
||||||
|
}
|
||||||
|
|
||||||
odd = (odd + 1) % blinkrate;
|
odd = (odd + 1) % blinkrate;
|
||||||
|
|
||||||
@ -259,7 +266,11 @@ static void draw_bar()
|
|||||||
if (windows[i].blink && (odd < (blinkrate / 2)))
|
if (windows[i].blink && (odd < (blinkrate / 2)))
|
||||||
attroff(COLOR_PAIR(RED));
|
attroff(COLOR_PAIR(RED));
|
||||||
|
|
||||||
if (windows + i == active_window) {
|
if (windows + i == active_window) {
|
||||||
|
#ifdef URXVT_FIX
|
||||||
|
attroff(A_BOLD | COLOR_PAIR(GREEN));
|
||||||
|
} else {
|
||||||
|
#endif
|
||||||
attroff(A_BOLD);
|
attroff(A_BOLD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user