Archived
0
0

fix: 滚动

This commit is contained in:
2025-12-15 16:35:07 +08:00
parent 6efd041f72
commit b6c719fb21
12 changed files with 26 additions and 53 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3
from textual.app import ComposeResult
from textual.widgets import Header, Footer, Label, Static, Button
from textual.containers import Center, Container
from textual.containers import Center, ScrollableContainer
from textual.screen import Screen
from textual.reactive import reactive
from enum import Enum, auto
@@ -70,12 +70,13 @@ class MemScreen(Screen):
def compose(self) -> ComposeResult:
yield Header(show_clock=True)
with Center():
yield Static(
f"当前进度: {self.procession.process()}/{self.procession.total_length()}"
)
# self.mount(self.current_widget()) # type: ignore
yield Container(id="puzzle-container")
with ScrollableContainer():
with Center():
yield Static(
f"当前进度: {self.procession.process()}/{self.procession.total_length()}"
)
# self.mount(self.current_widget()) # type: ignore
yield ScrollableContainer(id="puzzle-container")
# yield Button("重新学习此单元", id="re-recognize", variant="warning")
yield Footer()