From: ewt Date: Tue, 5 May 1998 15:17:21 +0000 (+0000) Subject: remove bgColor stuff -- it just made things break X-Git-Tag: r0-24~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a22c91ea43b7372f7e4ec58225ad304655beb2a;p=thirdparty%2Fnewt.git remove bgColor stuff -- it just made things break --- diff --git a/button.c b/button.c index 03f68a5..f1a3593 100644 --- a/button.c +++ b/button.c @@ -7,7 +7,6 @@ struct button { char * text; - char bgColor; int compact; }; @@ -54,7 +53,6 @@ static newtComponent createButton(int left, int row, const char * text, int comp co->isMapped = 0; newtGotorc(co->top, co->left); - bu->bgColor = -1; return co; } @@ -76,13 +74,10 @@ static void buttonDestroy(newtComponent co) { } static void buttonPlace(newtComponent co, int newLeft, int newTop) { - struct button * bu = co->data; - co->top = newTop; co->left = newLeft; newtGotorc(co->top, co->left); - bu->bgColor = (SLsmg_char_at() >> 8) & 0xFF; } static void buttonDraw(newtComponent co) { @@ -94,11 +89,6 @@ static void buttonDrawIt(newtComponent co, int active, int pushed) { if (!co->isMapped) return; - if (bu->bgColor == -1) { - newtGotorc(co->top, co->left); - bu->bgColor = (SLsmg_char_at() >> 8) & 0xFF; - } - SLsmg_set_color(NEWT_COLORSET_BUTTON); if (bu->compact) { @@ -115,7 +105,7 @@ static void buttonDrawIt(newtComponent co, int active, int pushed) { SLsmg_set_color(NEWT_COLORSET_BUTTON); newtDrawBox(co->left + 1, co->top + 1, co->width - 1, 3, 0); - SLsmg_set_color(bu->bgColor); + SLsmg_set_color(NEWT_COLORSET_WINDOW); newtClearBox(co->left, co->top, co->width, 1); newtClearBox(co->left, co->top, 1, co->height); } else {