Ticket #3468: mc-3468-groupbox_colors.patch

File mc-3468-groupbox_colors.patch, 1.2 KB (added by mooffie, 7 years ago)
  • lib/widget/groupbox.c

    diff --git a/lib/widget/groupbox.c b/lib/widget/groupbox.c
    index 30d3b6a..21bb576 100644
    a b static cb_ret_t 
    5656groupbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) 
    5757{ 
    5858    WGroupbox *g = GROUPBOX (w); 
     59    WDialog *h = w->owner; 
    5960 
    6061    switch (msg) 
    6162    { 
    groupbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void 
    7071            gboolean disabled; 
    7172 
    7273            disabled = (w->options & W_DISABLED) != 0; 
    73             tty_setcolor (disabled ? DISABLED_COLOR : COLOR_NORMAL); 
     74            tty_setcolor (disabled ? DISABLED_COLOR : h->color[DLG_COLOR_NORMAL]); 
    7475            tty_draw_box (w->y, w->x, w->lines, w->cols, TRUE); 
    7576 
    7677            if (g->title != NULL) 
    7778            { 
    78                 Widget *wo = WIDGET (w->owner); 
    79  
    80                 tty_setcolor (disabled ? DISABLED_COLOR : COLOR_TITLE); 
    81                 widget_move (wo, w->y - wo->y, w->x - wo->x + 1); 
     79                tty_setcolor (disabled ? DISABLED_COLOR : h->color[DLG_COLOR_TITLE]); 
     80                widget_move (w, 0, 1); 
    8281                tty_print_string (g->title); 
    8382            } 
    8483            return MSG_HANDLED;