Add UI
This commit is contained in:
parent
ecd51d6fef
commit
ed9e18f932
1 changed files with 39 additions and 0 deletions
39
src/main.py
Normal file
39
src/main.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
import flet as ft
|
||||
|
||||
def main(page: ft.Page):
|
||||
page.title = "AFBT"
|
||||
page.vertical_alignment = ft.MainAxisAlignment.CENTER
|
||||
page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
|
||||
|
||||
def build(e):
|
||||
print("Build clicked!") # Placeholder action
|
||||
|
||||
versionprompt = ft.TextField(label="Version", expand=True)
|
||||
|
||||
button = ft.ElevatedButton(
|
||||
text="Build",
|
||||
on_click=build,
|
||||
height=40,
|
||||
expand=True, # This makes the button expand horizontally
|
||||
bgcolor=ft.Colors.with_opacity(0.4, ft.Colors.BLUE)
|
||||
)
|
||||
|
||||
card = ft.Card(
|
||||
content=ft.Container(
|
||||
content=ft.Column(
|
||||
controls=[versionprompt, button],
|
||||
spacing=10,
|
||||
expand=True,
|
||||
horizontal_alignment=ft.CrossAxisAlignment.STRETCH
|
||||
),
|
||||
alignment=ft.alignment.center,
|
||||
border_radius=20,
|
||||
padding=25,
|
||||
width=500,
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
page.add(card)
|
||||
|
||||
ft.app(target=main)
|
Loading…
Add table
Add a link
Reference in a new issue