Fix logo display and side-by-side layout
Use full block-character logo from bin/gniza, place logo Static and OptionList directly in Horizontal container without extra nesting. Style with proper widths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,28 +18,19 @@ Screen {
|
|||||||
align: center middle;
|
align: center middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
#logo-panel {
|
#logo {
|
||||||
width: auto;
|
width: auto;
|
||||||
|
min-width: 40;
|
||||||
height: auto;
|
height: auto;
|
||||||
padding: 1 2;
|
padding: 1 3;
|
||||||
align: center middle;
|
content-align: center middle;
|
||||||
}
|
|
||||||
|
|
||||||
#menu-panel {
|
|
||||||
width: 1fr;
|
|
||||||
max-width: 40;
|
|
||||||
height: auto;
|
|
||||||
padding: 1 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#menu-list {
|
#menu-list {
|
||||||
width: 100%;
|
width: 1fr;
|
||||||
height: auto;
|
max-width: 35;
|
||||||
max-height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#logo {
|
|
||||||
height: auto;
|
height: auto;
|
||||||
|
margin: 1 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Data tables */
|
/* Data tables */
|
||||||
|
|||||||
@@ -5,13 +5,26 @@ from textual.widgets.option_list import Option
|
|||||||
from textual.containers import Horizontal, Vertical
|
from textual.containers import Horizontal, Vertical
|
||||||
|
|
||||||
LOGO = """\
|
LOGO = """\
|
||||||
[green]
|
[green]
|
||||||
\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593
|
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
|
||||||
\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593 \u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593
|
▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓
|
||||||
\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593
|
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
|
||||||
\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593
|
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
|
||||||
[/green]
|
|
||||||
gniza - Linux Backup Manager
|
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
|
||||||
|
▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓
|
||||||
|
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
|
||||||
|
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
|
||||||
|
|
||||||
|
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
|
||||||
|
▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓
|
||||||
|
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
|
||||||
|
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
|
||||||
|
▓▓▓▓▓▓▓▓▓▓
|
||||||
|
▓▓▓▓▓▓
|
||||||
|
▓▓
|
||||||
|
[/green]
|
||||||
|
gniza - Linux Backup Manager
|
||||||
"""
|
"""
|
||||||
|
|
||||||
MENU_ITEMS = [
|
MENU_ITEMS = [
|
||||||
@@ -36,13 +49,11 @@ class MainMenuScreen(Screen):
|
|||||||
def compose(self) -> ComposeResult:
|
def compose(self) -> ComposeResult:
|
||||||
yield Header()
|
yield Header()
|
||||||
with Horizontal(id="main-layout"):
|
with Horizontal(id="main-layout"):
|
||||||
with Vertical(id="logo-panel"):
|
yield Static(LOGO, id="logo", markup=True)
|
||||||
yield Static(LOGO, id="logo", markup=True)
|
yield OptionList(
|
||||||
with Vertical(id="menu-panel"):
|
*[Option(label, id=mid) for mid, label in MENU_ITEMS],
|
||||||
yield OptionList(
|
id="menu-list",
|
||||||
*[Option(label, id=mid) for mid, label in MENU_ITEMS],
|
)
|
||||||
id="menu-list",
|
|
||||||
)
|
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
def on_mount(self) -> None:
|
def on_mount(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user