We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continuation of #5090
from textual import events, on from textual.app import App, ComposeResult from textual.containers import Center, Grid, Middle from textual.screen import ModalScreen from textual.widgets import Button, DataTable, Label class QuitScreen(ModalScreen): DEFAULT_CSS = """ QuitScreen { align: center middle; } #dialog { grid-size: 2; grid-gutter: 1 2; grid-rows: 1fr 3; padding: 0 1; width: 60; height: 11; border: thick $primary 80%; background: $surface; } #question { column-span: 2; height: 1fr; width: 1fr; content-align: center middle; } Button { width: 100%; } """ """Screen with a dialog to quit.""" def compose(self) -> ComposeResult: yield Grid( Label("Are you sure you want to quit?", id="question"), Button("Quit", variant="error", id="quit"), Button("Cancel", variant="primary", id="cancel"), id="dialog", ) def on_button_pressed(self, event: Button.Pressed) -> None: if event.button.id == "quit": self.app.exit() else: self.app.pop_screen() DATA = [ ["Id", "Track", "Requested By", "Played At", "Artists", "Album", "Source"], ["20371", "Hitotsubu no Kiseki", "", "19:11:42", "BUTAOTOME, Ranko", "Abyss", ""], [ "3508", "think twice", "kwevin", "19:06:32", "FUZZY CONTROL", "", "Kouchuu Ouja Mushiking Mori no Tami no Densetsu", ], ["14930", "Tomaranai Mirai", "", "19:02:23", "I-1club", "Resurrection/Tomaranai Mirai", ""], [ "25041", "crossing field - LiVE is Smile Always-ASiA TOUR 2018", "", "18:57:46", "LiSA", "“LiVE is Smile Always-ASiA TOUR 2018-[eN]” LiVE at OSAKA-JO HALL 2018.06.30-07.01", "", ], [ "19671", "HELLO, YOUR ANGEL♪", "", "18:53:14", "中谷 育 (CV: 原嶋あかり), 天空橋朋花 (CV: Koiwai Kotori)", "THE IDOLM@STER LIVE THE@TER DREAMERS 04", "THE iDOLM@STER: Million Live!", ], ["4649", "風が吹いてる", "", "18:48:40", "ヘクとパスカル", "", ""], ["6417", "Hello", "", "18:44:47", "新山詩織", "ハローグッバイ", ""], ["22184", "Masage Cannavaro", "", "18:38:58", "ATARASHII GAKKO!", "Wakage ga Itaru", ""], ["14216", "なんでもないや", "", "18:33:18", "Lefty Hand Cream", "Lefty Hand Covers", ""], ["3855", "空っぽの空に潰される", "", "18:28:17", "amazarashi", "", ""], ["7603", "フタリボシ with 伊東歌詞太郎", "", "18:23:50", "96neko", "7S", ""], ["8677", "Absolute Soul -blade-", "", "18:19:37", "Konomi Suzuki, Masami Okui", "Absolute Soul", ""], ["9212", "Endress Honey Roop", "", "18:15:09", "たま, ココ", "いのたま", ""], [ "25016", "Crow Song -2015 Budokan Live Chocolate Ver.-", "", "18:10:40", "LiSA", 'LiVE is Smile Always - PiNK & BLACK - in Nippon Budokan "Choco Doughnut"', "", ], ["21564", "farewell", "", "18:06:04", "綾倉盟", "Poptrick", ""], ["4071", "Love Wonderland", "", "18:01:39", "Happiness", "", ""], ["16781", "Yura Yura Ring-Dong Dance", "", "17:57:33", "Pastel*Palettes", "Yura Yura Ring-Dong Dance", ""], ["25330", "Zutto Soba ni", "", "17:52:26", "Co shu Nie", "LITMUS", ""], [ "24936", "Daikirai na Hazu datta.", "", "17:48:19", "HoneyWorks, Kotarou Enomoto (CV: Natsuki Hanae), Hina Setoguchi (CV: Momo Asakura)", "Sukisugite Yabai. - Kokuhaku Jikko Iinkai Character Song Collection-", "", ], ["2891", "No title", "", "17:43:28", "REOL", "", ""], ] class MyApp(App[None]): def compose(self) -> ComposeResult: with Middle(), Center(): yield DataTable() def on_mount(self) -> None: table = self.query_one(DataTable) table.add_columns(*DATA[0]) table.add_rows(DATA[1:]) self.push_screen(QuitScreen()) app = MyApp() app.run()
The text was updated successfully, but these errors were encountered:
I can't reproduce this. Please update to the latest Textual.
Sorry, something went wrong.
Still present in the latest version
No branches or pull requests
Continuation of #5090
Textual Diagnostics
Versions
MRE
The text was updated successfully, but these errors were encountered: