Add Dispatch_V0.1.1
This commit is contained in:
40
Dispatch_V0.1.1/ui/ticket_placeholder_page.py
Normal file
40
Dispatch_V0.1.1/ui/ticket_placeholder_page.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# hub/ticket/ui/ticket_placeholder_page.py
|
||||
|
||||
"""Временная страница-заглушка Ticket для внутренних разделов shell."""
|
||||
|
||||
from gui.components.label import Label
|
||||
from gui.containers import SContainer, VContainer
|
||||
|
||||
|
||||
class TicketPlaceholderPage(SContainer):
|
||||
"""Временная страница для разделов, которые ещё будут перенесены."""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
title: str,
|
||||
description: str,
|
||||
notes: tuple[str, ...] = (),
|
||||
parent=None,
|
||||
):
|
||||
super().__init__(width_percent=100, height_percent=100, parent=parent)
|
||||
self._title = title
|
||||
self._description = description
|
||||
self._notes = notes
|
||||
self._setup_ui()
|
||||
|
||||
def _setup_ui(self) -> None:
|
||||
"""Показать временную страницу до переноса полноценного UI."""
|
||||
# Root-контейнер заглушки: показывает название раздела, описание и вспомогательные заметки.
|
||||
main_container = VContainer(margin=18, spacing=10, parent=self)
|
||||
title_label = Label(self._title, alignment="left", style="TICKET_LIST_HEADER")
|
||||
description_label = Label(
|
||||
self._description,
|
||||
alignment="left",
|
||||
style="TICKET_EMPTY_LABEL",
|
||||
)
|
||||
main_container.add_widget(title_label)
|
||||
main_container.add_widget(description_label)
|
||||
for note in self._notes:
|
||||
note_label = Label(note, alignment="left", style="TICKET_LIST_SUBTITLE")
|
||||
main_container.add_widget(note_label)
|
||||
Reference in New Issue
Block a user