Comments (4)
Exposing a call particularly useful for macOS kinda goes against platform-agnostic design. Passing in a ThemedResource allows us to do the right thing per-platform under the hood.
from fyne.
There's a lot of interesting thoughts here, but I don't follow how having a version of an icon called "_templated" helps to use template icons in systray?
More simply we could either add SetTemplateSystrayIcon
or just make use of the existing ThemedResource
to be used as a template image in the systray context?
i.e. SetSystemTrayIcon(theme.NewThemedResource(iconData))
?
seems much simpler and uses existing APIs.
from fyne.
Simply exposing SetTemplateSystrayIcon
is probably a good start, though given the general guidance to prefer templated images on macOS, it's probably worth considering how it might be handled in a default way. I like the idea of using ThemedResource
for that, since, as you say, it already exists. It wasn't clear on how themed resources worked when I first submitted the issue, but after digging around in the code, it looks as if they require an SVG and then just swap out the fill color? If that's the case, SetSystemTrayIcon
could then just conditionally rasterize themed resources to black on macOS, which would solve the issue neatly!
from fyne.
Fixed on the develop branch as proposed (passing theme.ThemedResource) will be available in v2.5.0
from fyne.
Related Issues (20)
- FileDialog.SetOnClosed not always working HOT 2
- Complete internationalisation support
- New threading model HOT 2
- GridWrap ScrollToOffset API doesn't properly validate offset when viewport is larger than the full content
- Rework fix for #4445 for v2.4.5, avoiding atomic primitives
- CTRL+A shortcut not working (CTRL+S etc works though) HOT 6
- run demo error:# runtime/cgo cgo: cannot parse $WORK\b228\_cgo_.o as ELF, Mach-O, PE or XCOFF HOT 1
- Slider input do not implement Disableable HOT 4
- layout.formLayout do not handle canvas.Text well in second column HOT 5
- Add IntToFloat (and FloatToInt) in bindings HOT 1
- random render HOT 1
- Need to hook the fyne generated "Quit" menu item in fyne system tray menu HOT 7
- Quit menu item appearing in menus of sub windows of fyne system tray app HOT 14
- Mouse clicks missed HOT 4
- Hello author, I use fyne-io/fyne-cross for packaging...
- Improper utf-8 to ascii character conversion on paste from clipboard (Windows). A space follows apostrophe in text widget. HOT 3
- Make bound(External)Untyped.Set more useful by making value comparison more capable HOT 1
- Double-click to select a file in FileOpen / FileSave dialogs
- SetOnDropped functionallity missing when running app in a browser
- The "tree" disappears in the "split" after a certain time HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fyne.