Set full screen differently, so it always works

This commit is contained in:
Lance Edgar 2023-11-30 14:43:57 -06:00
parent c8788e282e
commit f18e0d3c3c

View file

@ -162,8 +162,6 @@ def main(page: ft.Page):
threading.excepthook = thread_exc_hook threading.excepthook = thread_exc_hook
page.title = f"WuttaPOS v{wuttapos.__version__}" page.title = f"WuttaPOS v{wuttapos.__version__}"
page.window_full_screen = True
# page.vertical_alignment = ft.MainAxisAlignment.CENTER
# global defaults for button/text styles etc. # global defaults for button/text styles etc.
page.data = { page.data = {
@ -221,6 +219,11 @@ def main(page: ft.Page):
elif page.route == '/login': elif page.route == '/login':
page.views.append(LoginView(config, '/login')) page.views.append(LoginView(config, '/login'))
# nb. setting this "last minute" on page change seems to be
# more reliable, otherwise the app doesn't always startup in
# full screen for some reason
page.window_full_screen = True
page.update() page.update()
# TODO: this was in example docs but not sure what it's for? # TODO: this was in example docs but not sure what it's for?