Desktop Favicon Failed - How to fix this (help Wanted) #5212
WorldOfDex
started this conversation in
General
Replies: 1 comment 1 reply
-
Are you using Windows or Mac? Is this when built (Flet Build), or when using Flet Run, or are you using Flet Pack? Try using Flet Build, and see what you get - I'm unsure whether the Favicon will be picked up using Flet Run (although, I haven't developed on Windows since Flet Pack tbh) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
File: test_icon.py (Save in the same folder as main.py, e.g., Src/)
import flet as ft
from pathlib import Path
import sys
def main(page: ft.Page):
page.title = "Icon Test"
script_dir = Path(file).parent.resolve()
assets_path = script_dir / "assets" # Assumes 'assets' is next to this script
icon_filename = "favicon.ico" # Using .ico as requested
icon_abs_path = assets_path / icon_filename
--- Running the minimal app ---
if name == "main":
script_dir = Path(file).parent.resolve()
# Define assets directory relative to this script file
assets_dir_for_app = str(script_dir / "assets")
Beta Was this translation helpful? Give feedback.
All reactions