(remap_menubar):
Only include the menu-margin in the initial X & Y positions for horizontal menu-bars. (fit_to_screen): If moving a sub-menu to the left-side, increment its x-position by the shadow-thickness to make it look more attached to the invoking menu-item (similarly to the way it would be displayed on the right side).
This commit is contained in:
parent
43aa2f1bef
commit
b7fa4a0675
2 changed files with 13 additions and 3 deletions
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
* xlwmenu.c (XlwMenuSetValues): Only frob the display if the menu
|
||||
is actually displayed.
|
||||
(remap_menubar): Only include the menu-margin in the initial X & Y
|
||||
positions for horizontal menu-bars.
|
||||
(fit_to_screen): If moving a sub-menu to the left-side, increment
|
||||
its x-position by the shadow-thickness to make it look more
|
||||
attached to the invoking menu-item (similarly to the way it would
|
||||
be displayed on the right side).
|
||||
|
||||
2000-09-03 Miles Bader <miles@gnu.org>
|
||||
|
||||
|
|
|
|||
|
|
@ -1208,7 +1208,11 @@ fit_to_screen (mw, ws, previous_ws, horizontal_p)
|
|||
else if (ws->x + ws->width > screen_width)
|
||||
{
|
||||
if (!horizontal_p)
|
||||
ws->x = previous_ws->x - ws->width;
|
||||
/* The addition of shadow-thickness for a sub-menu's position is
|
||||
to reflect a similar adjustment when the menu is displayed to
|
||||
the right of the invoking menu-item; it makes the sub-menu
|
||||
look more `attached' to the menu-item. */
|
||||
ws->x = previous_ws->x - ws->width + mw->menu.shadow_thickness;
|
||||
else
|
||||
ws->x = screen_width - ws->width;
|
||||
if (ws->x < 0)
|
||||
|
|
@ -1305,7 +1309,7 @@ remap_menubar (mw)
|
|||
|
||||
ws->x = (previous_ws->x + selection_position.x
|
||||
+ mw->menu.shadow_thickness);
|
||||
if (i == 1)
|
||||
if (mw->menu.horizontal && i == 1)
|
||||
ws->x += mw->menu.margin;
|
||||
|
||||
#if 0
|
||||
|
|
@ -1315,7 +1319,7 @@ remap_menubar (mw)
|
|||
|
||||
ws->y = (previous_ws->y + selection_position.y
|
||||
+ mw->menu.shadow_thickness);
|
||||
if (i == 1)
|
||||
if (mw->menu.horizontal && i == 1)
|
||||
ws->y += mw->menu.margin;
|
||||
|
||||
size_menu (mw, i);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue