add seating plan legend, improve ui

This commit is contained in:
David Rodenkirchen
2024-09-06 12:22:40 +02:00
parent c7c7cc7964
commit 871d8d6a3d
4 changed files with 115 additions and 9 deletions
@@ -1,6 +1,6 @@
from functools import partial
from rio import Component, Text, Icon, TextStyle, Rectangle, Spacer, Color, MouseEventListener
from rio import Component, Text, Icon, TextStyle, Rectangle, Spacer, Color, MouseEventListener, Column
from typing import Optional, Callable
from src.ez_lan_manager.types.Seat import Seat
@@ -22,7 +22,10 @@ class SeatPixel(Component):
def build(self) -> Component:
return MouseEventListener(
content=Rectangle(
content=Text(self.seat_id, style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
content=Column(
Text(f"{self.seat_id}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
Text(f"{self.seat.category[0]}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5, selectable=False, wrap=True)
),
min_width=1,
min_height=1,
fill=self.determine_color(),