Feat/country flag tray icon - #25
Open
mhabedini wants to merge 5 commits into
Open
Conversation
Optional (off by default) tray icon that reflects the country of the current public IP, so VPN/proxy exit nodes can be verified without opening the app. The flags shipped by country_flags are vectors and the tray only accepts a file path, so FlagTrayIcon rasterises them on demand into the app support directory: a multi resolution .ico on Windows, a .png on Linux. Icons are rendered once per country per run and reused afterwards. When the country is unknown, or the flag cannot be rendered, the tray falls back to the bundled IRNet icons. A leak keeps being reported while a flag is shown by badging it with a red dot. macOS is excluded: system_tray loads macOS icons through the asset bundle, so it cannot display an icon generated at runtime.
The Inno script pointed at C:\Workspace\Flutter\ir_net for the license file and the build output, so ISCC failed on every machine but the one it was written on. Inno resolves relative paths against the directory holding the .iss, so the repo layout is enough.
The flag of the detected IP country replaces the globe marker on the "Connected from" card (both layouts) and in the header chip, so the location is recognisable at a glance. CountryFlagTile falls back to the globe whenever the country is still unknown or has no flag of its own, which also covers the first seconds after launch while the IP lookup is running.
Keeps the tray icon recognisable as this app once it shows a flag. The shield is drawn as a path (same silhouette as the launcher icon) in the bottom left, diagonally opposite the leak badge, with a dark rim so it survives on light flags. It reads as a shield on the 32px and 48px frames; at 16px it is only a small brand coloured mark, which is as much as that canvas allows next to a flag.
This reverts commit 24b18d2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.