diff options
| author | Miles Bader | 2000-09-04 13:04:49 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-09-04 13:04:49 +0000 |
| commit | b7fa4a06756836235d9c72d8d77b082eb9c14832 (patch) | |
| tree | 52da5d8e94e4e1a4831de5fba489b66af3743025 | |
| parent | 43aa2f1bef83891cc9500f7015f1cc2d27b4d4a1 (diff) | |
| download | emacs-b7fa4a06756836235d9c72d8d77b082eb9c14832.tar.gz emacs-b7fa4a06756836235d9c72d8d77b082eb9c14832.zip | |
(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).
| -rw-r--r-- | lwlib/ChangeLog | 6 | ||||
| -rw-r--r-- | lwlib/xlwmenu.c | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 53432b4dd25..dd1e6f2d5c0 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog | |||
| @@ -2,6 +2,12 @@ | |||
| 2 | 2 | ||
| 3 | * xlwmenu.c (XlwMenuSetValues): Only frob the display if the menu | 3 | * xlwmenu.c (XlwMenuSetValues): Only frob the display if the menu |
| 4 | is actually displayed. | 4 | is actually displayed. |
| 5 | (remap_menubar): Only include the menu-margin in the initial X & Y | ||
| 6 | positions for horizontal menu-bars. | ||
| 7 | (fit_to_screen): If moving a sub-menu to the left-side, increment | ||
| 8 | its x-position by the shadow-thickness to make it look more | ||
| 9 | attached to the invoking menu-item (similarly to the way it would | ||
| 10 | be displayed on the right side). | ||
| 5 | 11 | ||
| 6 | 2000-09-03 Miles Bader <miles@gnu.org> | 12 | 2000-09-03 Miles Bader <miles@gnu.org> |
| 7 | 13 | ||
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 0d0ab35a1a2..b09f31a9fdd 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c | |||
| @@ -1208,7 +1208,11 @@ fit_to_screen (mw, ws, previous_ws, horizontal_p) | |||
| 1208 | else if (ws->x + ws->width > screen_width) | 1208 | else if (ws->x + ws->width > screen_width) |
| 1209 | { | 1209 | { |
| 1210 | if (!horizontal_p) | 1210 | if (!horizontal_p) |
| 1211 | ws->x = previous_ws->x - ws->width; | 1211 | /* The addition of shadow-thickness for a sub-menu's position is |
| 1212 | to reflect a similar adjustment when the menu is displayed to | ||
| 1213 | the right of the invoking menu-item; it makes the sub-menu | ||
| 1214 | look more `attached' to the menu-item. */ | ||
| 1215 | ws->x = previous_ws->x - ws->width + mw->menu.shadow_thickness; | ||
| 1212 | else | 1216 | else |
| 1213 | ws->x = screen_width - ws->width; | 1217 | ws->x = screen_width - ws->width; |
| 1214 | if (ws->x < 0) | 1218 | if (ws->x < 0) |
| @@ -1305,7 +1309,7 @@ remap_menubar (mw) | |||
| 1305 | 1309 | ||
| 1306 | ws->x = (previous_ws->x + selection_position.x | 1310 | ws->x = (previous_ws->x + selection_position.x |
| 1307 | + mw->menu.shadow_thickness); | 1311 | + mw->menu.shadow_thickness); |
| 1308 | if (i == 1) | 1312 | if (mw->menu.horizontal && i == 1) |
| 1309 | ws->x += mw->menu.margin; | 1313 | ws->x += mw->menu.margin; |
| 1310 | 1314 | ||
| 1311 | #if 0 | 1315 | #if 0 |
| @@ -1315,7 +1319,7 @@ remap_menubar (mw) | |||
| 1315 | 1319 | ||
| 1316 | ws->y = (previous_ws->y + selection_position.y | 1320 | ws->y = (previous_ws->y + selection_position.y |
| 1317 | + mw->menu.shadow_thickness); | 1321 | + mw->menu.shadow_thickness); |
| 1318 | if (i == 1) | 1322 | if (mw->menu.horizontal && i == 1) |
| 1319 | ws->y += mw->menu.margin; | 1323 | ws->y += mw->menu.margin; |
| 1320 | 1324 | ||
| 1321 | size_menu (mw, i); | 1325 | size_menu (mw, i); |