improve catering management popup styling
This commit is contained in:
parent
8971f4b73f
commit
3123f756ab
@ -27,10 +27,22 @@ class CateringOrderInfoPopup(Component):
|
||||
min_height=40,
|
||||
on_press=self.close_cb
|
||||
)
|
||||
rows = []
|
||||
is_contrast_line = True
|
||||
for item, amount in self.order.items.items():
|
||||
style = TextStyle(fill=self.session.theme.secondary_color if is_contrast_line else self.session.theme.neutral_color)
|
||||
is_contrast_line = not is_contrast_line
|
||||
rows.append(
|
||||
Row(
|
||||
Text(f"{amount}x", style=style),
|
||||
Spacer(),
|
||||
Text(f"{item.name}", style=style)
|
||||
)
|
||||
)
|
||||
return Card(
|
||||
content=Column(
|
||||
Text(f"Bestellung {self.order.order_id}", style=TextStyle(font_size=1.2), margin_bottom=1),
|
||||
*[Row(Text(f"{amount}x"), Spacer(), Text(f"{item.name}")) for item, amount in self.order.items.items()],
|
||||
*rows,
|
||||
Spacer(),
|
||||
Row(Text("Gesamtpreis:"), Spacer(), Text(self.session[AccountingService].make_euro_string_from_int(self.order.price)))
|
||||
),
|
||||
@ -39,7 +51,9 @@ class CateringOrderInfoPopup(Component):
|
||||
min_width=40,
|
||||
min_height=40,
|
||||
on_press=self.close_cb,
|
||||
corner_radius=0.5
|
||||
corner_radius=0.5,
|
||||
elevate_on_hover=False,
|
||||
colorize_on_hover=False
|
||||
)
|
||||
|
||||
@dataclass
|
||||
@ -105,7 +119,8 @@ class ManageCateringPage(Component):
|
||||
anchor=header_text,
|
||||
content=CateringOrderInfoPopup(order=self.order_popup_order, close_cb=self.close_cb),
|
||||
is_open=self.order_popup_open,
|
||||
position="bottom"
|
||||
position="bottom",
|
||||
corner_radius=0.5
|
||||
)
|
||||
return Column(
|
||||
MainViewContentBox(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user