Get menu popups floating

This commit is contained in:
Isaiah Odhner 2023-04-12 22:42:48 -04:00
parent 044b404a0e
commit 2a89948717
3 changed files with 12 additions and 6 deletions

View File

@ -12,11 +12,13 @@
"Bresenham",
"Bresenham's",
"cmdpxl",
"hkey",
"𝗟𝙇",
"Odhner",
"Playscii",
"pypixelart",
"stransi",
"undos"
"undos",
"vkey"
]
}

View File

@ -80,6 +80,7 @@ class Menu(Container):
if len(self.items) > 0:
self.items[0].focus()
self.parent_menu = parent_menu
self.add_class("menu_popup")
def close(self):
for item in self.items:

View File

@ -1,5 +1,5 @@
Screen {
/* overflow: auto; */
layers: overlay;
}
#paint {
@ -103,17 +103,20 @@ Button {
}
.menu {
background: $panel;
/* border: round red; */
}
.menu_popup {
layout: vertical;
/* background: $panel; */
dock: top;
layer: overlay;
offset: 5 3;
width: auto;
height: auto;
dock: top;
/* border: round $panel-darken-2; */
}
/* MenuBar { */
.menu_bar {
layout: horizontal;
background: $panel;
width: 100%;
height: auto;
dock: top;