provide the ability to do horizontal centering of menus, and make that
the default. XXX: currently can't be turned back on for individual menus if overridden by the menu definition's default setting.
This commit is contained in:
parent
9ac9208434
commit
8c3bc73ea2
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.5 1999/06/20 02:07:18 cgd Exp $ */
|
||||
/* $NetBSD: main.c,v 1.6 1999/06/20 05:41:45 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -83,7 +83,7 @@ main (int argc, char **argv)
|
|||
default_info.helpstr = NULL;
|
||||
default_info.exitstr = NULL;
|
||||
default_info.mopt = 0;
|
||||
default_info.x = 0;
|
||||
default_info.x = -1;
|
||||
default_info.y = 0;
|
||||
default_info.h = 0;
|
||||
default_info.w = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: menu_sys.def,v 1.19 1999/06/20 02:07:18 cgd Exp $ */
|
||||
/* $NetBSD: menu_sys.def,v 1.20 1999/06/20 05:41:45 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -285,7 +285,9 @@ static void init_menu (struct menudesc *m)
|
|||
exit(1);
|
||||
|
||||
}
|
||||
if (m->x + m->w + wadd > max_cols)
|
||||
if (m->x == -1)
|
||||
m->x = (max_cols - (m->w + wadd)) / 2; /* center */
|
||||
else if (m->x + m->w + wadd > max_cols)
|
||||
m->x = max_cols - (m->w + wadd);
|
||||
|
||||
/* Get the windows. */
|
||||
|
|
Loading…
Reference in New Issue