]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
set proper background color for buttons
authorewt <ewt>
Thu, 6 Nov 1997 19:22:15 +0000 (19:22 +0000)
committerewt <ewt>
Thu, 6 Nov 1997 19:22:15 +0000 (19:22 +0000)
button.c

index e0e1216e1800a996f72a9d839b6589f185a708fa..cb60d41cba0d23c092981245c0d950d08c93e2fe 100644 (file)
--- a/button.c
+++ b/button.c
@@ -87,8 +87,10 @@ static void buttonDraw(newtComponent co) {
 static void buttonDrawIt(newtComponent co, int active, int pushed) {
     struct button * bu = co->data;
 
-    if (bu->bgColor == -1)
+    if (bu->bgColor == -1) {
+       newtGotorc(co->top, co->left);
        bu->bgColor = (SLsmg_char_at() >> 8) & 0xFF;
+    }
 
     SLsmg_set_color(NEWT_COLORSET_BUTTON);