34 lines
844 B
Python
34 lines
844 B
Python
"""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)
|