awful.menu: Place submenus on the correct height
Before this commit, a submenu was border_width pixels lower than its parent menu entry. Fix this by not adding the border_width to the submenu's position. We still have to add the border_width to the parent menu's width so that the border of the submenu entry doesn't overlap the content of its parent menu (the borders of the two menus do overlap!). Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
8c62698bf6
commit
e38c52349a
|
@ -135,7 +135,6 @@ local function set_coords(menu, screen_idx, m_coords)
|
||||||
if menu.parent then
|
if menu.parent then
|
||||||
local w, h = item_position(menu.parent, menu)
|
local w, h = item_position(menu.parent, menu)
|
||||||
w = w + menu.parent.theme.border_width
|
w = w + menu.parent.theme.border_width
|
||||||
h = h + menu.parent.theme.border_width
|
|
||||||
|
|
||||||
menu.y = menu.parent.y + h + menu.height > screen_h and
|
menu.y = menu.parent.y + h + menu.height > screen_h and
|
||||||
screen_h - menu.height or menu.parent.y + h
|
screen_h - menu.height or menu.parent.y + h
|
||||||
|
|
Loading…
Reference in New Issue