mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
WGroupbox: respect dialog's colors.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
b918ff1499
commit
ace07e4239
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user