mirror of
https://git.srhtnin.garden/sarah/SaraFem.git
synced 2026-10-15 02:23:17 +02:00
Windows support
This commit is contained in:
1 parent
6b2b35f5da
commit
b295db3fb6
9 files changed
+136
-26
No files matched your search
@@ -18,8 +18,9 @@ from Sidebar import Sidebar
|
||||
def _SetCursorThemeFallback() -> None:
|
||||
"""GTK's cursor lookup reads XCURSOR_THEME directly; it isn't always inherited
|
||||
from the desktop session (shows as 'Unable to load ... from the cursor theme').
|
||||
Fill it in from gsettings if missing, so the warning has nowhere to come from."""
|
||||
if os.environ.get("XCURSOR_THEME"):
|
||||
Fill it in from gsettings if missing, so the warning has nowhere to come from.
|
||||
GTK/GNOME only: nothing to do on Windows."""
|
||||
if os.environ.get("XCURSOR_THEME") or sys.platform == "win32":
|
||||
return
|
||||
try:
|
||||
Result = subprocess.run(
|
||||
@@ -233,6 +234,9 @@ def Main(Page: ft.Page) -> None:
|
||||
Page.padding = 0
|
||||
Page.window.width = 1100
|
||||
Page.window.height = 700
|
||||
if sys.platform == "win32":
|
||||
# The taskbar/title bar icon (on Linux it comes from the desktop entry).
|
||||
Page.window.icon = str(Path(__file__).resolve().parent / "assets" / "Icon.ico")
|
||||
Page.window.title_bar_hidden = Appearance.HideWindowTitleBar
|
||||
|
||||
PickerArgs = _ParsePickerArgs()
|
||||
@@ -246,7 +250,7 @@ def Main(Page: ft.Page) -> None:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--portal-service" in sys.argv:
|
||||
if "--portal-service" in sys.argv and sys.platform != "win32": # Linux's file-picker portal only
|
||||
# No Flet page at all here — the D-Bus FileChooser backend is a
|
||||
# plain asyncio service (see PortalService.py) that
|
||||
# spawns *this same executable* again with --pick-* flags for the
|
||||
|
||||
Reference in new issue
Block a user