feature/make-disabled-catering-items-clearer #56

Merged
Typhus merged 2 commits from feature/make-disabled-catering-items-clearer into main 2026-02-23 20:47:33 +00:00
Showing only changes of commit 8b02390bee - Show all commits

View File

@ -42,14 +42,14 @@ class CateringSelectionItem(Component):
content=Column( content=Column(
Row( Row(
Text(article_name_top, align_x=0, overflow="wrap", min_width=19, Text(article_name_top, align_x=0, overflow="wrap", min_width=19,
style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9), strikethrough=not self.is_sensitive),
Text(AccountingService.make_euro_string_from_decimal(self.article_price), Text(AccountingService.make_euro_string_from_decimal(self.article_price),
style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
IconButton( IconButton(
icon="material/add", icon="material/add" if self.is_sensitive else "material/do_not_disturb_on_total_silence",
min_size=2, min_size=2,
color=self.session.theme.success_color, color=self.session.theme.success_color if self.is_sensitive else self.session.theme.danger_color,
style="plain-text", style="colored-text",
on_press=lambda: self.on_add_callback(self.article_id), on_press=lambda: self.on_add_callback(self.article_id),
is_sensitive=self.is_sensitive is_sensitive=self.is_sensitive
), ),
@ -66,7 +66,8 @@ class CateringSelectionItem(Component):
align_x=0, align_x=0,
overflow="wrap", overflow="wrap",
min_width=19, min_width=19,
style=TextStyle(fill=self.session.theme.background_color, font_size=0.6) style=TextStyle(fill=self.session.theme.background_color, font_size=0.6),
strikethrough=not self.is_sensitive
), ),
margin_top=0 margin_top=0
), ),