Compare commits

..

No commits in common. "7002b4437e88cf413f7b8e0d595a53c86ef8c60b" and "28492688a5a5246c57520b527c4a25b2fb3a65a6" have entirely different histories.

19
main.py
View File

@ -156,12 +156,9 @@ class FlashcardCreator:
# Add file picker to page overlay # Add file picker to page overlay
page.overlay.append(self.file_picker) page.overlay.append(self.file_picker)
# Create a scrollable column for the main content # Update the page.add call to include the container instead of table directly
main_content = ft.Column( page.add(
[ ft.Row([self.source_dropdown, self.target_dropdown, self.settings_button]),
ft.Row(
[self.source_dropdown, self.target_dropdown, self.settings_button]
),
ft.Divider(), ft.Divider(),
ft.Text("Input Text", size=16, weight=ft.FontWeight.BOLD), ft.Text("Input Text", size=16, weight=ft.FontWeight.BOLD),
self.input_text, self.input_text,
@ -172,7 +169,7 @@ class FlashcardCreator:
self.stack_description, self.stack_description,
ft.Divider(), ft.Divider(),
ft.Text("Generated Flashcards", size=16, weight=ft.FontWeight.BOLD), ft.Text("Generated Flashcards", size=16, weight=ft.FontWeight.BOLD),
flashcard_table_container, flashcard_table_container, # Use the container instead of direct table
ft.Row( ft.Row(
[ [
self.add_to_anki_button, self.add_to_anki_button,
@ -180,14 +177,8 @@ class FlashcardCreator:
self.export_csv_button, self.export_csv_button,
] ]
), ),
],
scroll=ft.ScrollMode.AUTO,
expand=True,
) )
# Add the scrollable content to the page
page.add(main_content)
def on_source_language_change(self, e): def on_source_language_change(self, e):
self.source_language = e.control.value self.source_language = e.control.value
@ -221,7 +212,7 @@ class FlashcardCreator:
f, f,
) )
e.page.close(dialog) e.close(dialog)
e.page.update() e.page.update()
# Load settings if they exist # Load settings if they exist