Reworked UI for easier workflow.
This commit is contained in:
33
ptlinux/ui/components/broadcasts_panel.py
Normal file
33
ptlinux/ui/components/broadcasts_panel.py
Normal file
@@ -0,0 +1,33 @@
|
||||
"""Latest official broadcast panel construction."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class BroadcastsPanel:
|
||||
container: Any
|
||||
content: Any
|
||||
|
||||
|
||||
def build_broadcasts_panel(
|
||||
parent: Any,
|
||||
*,
|
||||
ttk: Any,
|
||||
before: Any,
|
||||
) -> BroadcastsPanel:
|
||||
panel = ttk.Frame(parent, style="Surface.TFrame", padding=(10, 8))
|
||||
panel.pack(fill="x", pady=(0, 8), before=before)
|
||||
heading = ttk.Frame(panel, style="Surface.TFrame")
|
||||
heading.pack(fill="x")
|
||||
ttk.Label(heading, text="LATEST BROADCAST", style="Section.TLabel").pack(side="left")
|
||||
ttk.Label(
|
||||
heading,
|
||||
text="OFFICIAL DISCORD",
|
||||
style="Muted.TLabel",
|
||||
).pack(side="right")
|
||||
content = ttk.Frame(panel, style="Surface.TFrame")
|
||||
content.pack(fill="x", pady=(6, 0))
|
||||
return BroadcastsPanel(container=panel, content=content)
|
||||
Reference in New Issue
Block a user