mirror of
https://github.com/1j01/textual-paint.git
synced 2024-10-27 01:41:29 +03:00
Get menu popups floating
This commit is contained in:
parent
044b404a0e
commit
2a89948717
@ -12,11 +12,13 @@
|
||||
"Bresenham",
|
||||
"Bresenham's",
|
||||
"cmdpxl",
|
||||
"hkey",
|
||||
"𝗟𝙇",
|
||||
"Odhner",
|
||||
"Playscii",
|
||||
"pypixelart",
|
||||
"stransi",
|
||||
"undos"
|
||||
"undos",
|
||||
"vkey"
|
||||
]
|
||||
}
|
||||
|
1
menus.py
1
menus.py
@ -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:
|
||||
|
13
paint.css
13
paint.css
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user