summaryrefslogtreecommitdiffstats
path: root/gui-project/cards.py
diff options
context:
space:
mode:
authorAndreeaRadoescu <randreea23@gmail.com>2024-10-16 21:48:10 +0200
committerAndreeaRadoescu <randreea23@gmail.com>2024-10-16 21:48:10 +0200
commit2310bd64d6b595709432b50e9e8f9b46f3e7bf8b (patch)
treeb724cdabfbb2201ffcb47f7407e9b04a534970cf /gui-project/cards.py
parentc3cce425598201845c4fa28c180a11d0a8a61aa9 (diff)
make text on cards be displayed with newlinesfeature/addGUI
Diffstat (limited to 'gui-project/cards.py')
-rw-r--r--gui-project/cards.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gui-project/cards.py b/gui-project/cards.py
index ac921b3..ededff9 100644
--- a/gui-project/cards.py
+++ b/gui-project/cards.py
@@ -35,19 +35,19 @@ class CardUI():
def init_front(self):
with self.row_parent:
- with ui.card().classes('bg-frontc w-[600px] h-[200px] mx-auto') as self.front:
+ with ui.card().classes('bg-frontc w-[600px] mx-auto') as self.front:
ui.markdown("**Front**")
ui.separator()
- ui.markdown(self.card.get_front())
+ ui.markdown(self.card.get_front()).style('white-space: pre-wrap')
ui.button("Revert", on_click=lambda: self.revert_card())
self.front.set_visibility(False)
def init_back(self):
with self.row_parent:
- with ui.card().classes('bg-back w-[600px] h-[200px] mx-auto') as self.back:
+ with ui.card().classes('bg-back w-[600px] mx-auto') as self.back:
ui.markdown("_Back_")
ui.separator()
- ui.markdown(self.card.get_back())
+ ui.markdown(self.card.get_back()).style('white-space: pre-wrap')
with ui.button_group():
ui.button("Got it", on_click=lambda: self.user_clicked_correct())
ui.button("Ain't got it", on_click=lambda: self.user_clicked_incorrect())