diff --git a/lib/widget/groupbox.c b/lib/widget/groupbox.c index 30d3b6a06..fe52d50aa 100644 --- a/lib/widget/groupbox.c +++ b/lib/widget/groupbox.c @@ -67,18 +67,20 @@ groupbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void case MSG_DRAW: { + WDialog *h = w->owner; + gboolean disabled; disabled = (w->options & W_DISABLED) != 0; - tty_setcolor (disabled ? DISABLED_COLOR : COLOR_NORMAL); + tty_setcolor (disabled ? DISABLED_COLOR : h->color[DLG_COLOR_NORMAL]); tty_draw_box (w->y, w->x, w->lines, w->cols, TRUE); if (g->title != NULL) { Widget *wo = WIDGET (w->owner); - tty_setcolor (disabled ? DISABLED_COLOR : COLOR_TITLE); - widget_move (wo, w->y - wo->y, w->x - wo->x + 1); + tty_setcolor (disabled ? DISABLED_COLOR : h->color[DLG_COLOR_TITLE]); + widget_move (w, 0, 1); tty_print_string (g->title); } return MSG_HANDLED;