I'll create an issue on the KNotifications repository and see what comes of it.
The reason this breaks is that on MacOS, the status controls the QT icon's isMask
. The icon is marked as a mask (i.e. it can respond to the color theme) if the status is Passive
, and marked not a mask if the icon is Active
.
I fear this behavior might have arisen because some app in the past used a color icon. The developers thought it would be neat to have the app colored when it's active, then when it's inactive it's marked as a mask so it's rendered in black or white depending on the system theme.
Nowadays, the convention is for MacOS icons to be monochrome, so isMask
should always be true. However, I don't want to break any other apps.
Pinging on this again.
I named the icon to be mac-specific since I envision for other operating systems, the icon will have to be different. So there'd also be a icons/app/sc-apps-kdeconnectindicatorwindows-disconnected.svg
.
Maybe a icons/app/sc-apps-kdeconnectindicatorlinux-disconnected.svg
too? But I think since the systray.setStatus
would be enough to instruct the OS to change the icon? I don't have a linux machine so I'm only guessing.
I've only used Windows 10 and not Windows 11, but I remember in Windows 10 the system tray icons would show a disconnection symbol in the icon. They wouldn't become transparent if something gets disconnected.
The PR is still ready for review. I think I have addressed all of the feedback thus far.
My bad—thanks for the catch. I thought I had defined it elsewhere but it turns out you're totally right—it's nowhere! The last commit should fix that.
Ryan Adolf (e5fc7e6a) at 30 Aug 04:15
Add count declaration
It was because I only have a Mac set up for testing.
Hopefully I've addressed all the comments thus far. I would love to get another review on this merge request!
Ryan Adolf (d85505e0) at 06 Apr 07:43
Rename translucent icon to disconnected
... and 7 more commits
Ryan Adolf (2e709e78) at 03 Mar 10:44
Add translucent icon for mac
I've added a new icon for MacOS so that the indicator changes color depending on whether a device is connected.
I copied the style of the Wireguard icon; the #000000
color is used but with 50% opacity. This ensures the icon displays correctly in both dark and light themes.
I decided to add a systrayActiveHook
method to the helper as there's an extra bit of logic and an extra instance variable needed for the Mac menubar to switch icons.
No devices connected | Devices connected |
---|---|
Ryan Adolf (b0f181ab) at 03 Mar 05:54
Add translucent icon for mac
Unfortunately I don't think passive/active can be used since active disables using the icon mask. However, I'll submit a new PR to change the icon. It looks like the way to do this is to use an icon with different opacity. The Wireguard icon uses 50% opacity when it is inactive.
If you mean unsupported in the sense that Qt doesn't have CI for mac arm, then I agree it would make sense to hold off on officially supporting mac arm for Craft. However, it looks like Qt will add the CI in the future, so I don't think it would harm adding the infrastructure but still defaulting to x64 builds.
For what it's worth, after the changing the qtbase blueprint to address this bug, all these qt libraries compile successfully and can be successfully linked into kde connect:
libs/qt5/qtbase : 5.15.2-6
libs/qt5/qtdeclarative : 5.15.2-1
libs/qt5/qtgraphicaleffects : 5.15.2
libs/qt5/qtmacextras : 5.15.2
libs/qt5/qtmultimedia : 5.15.2
libs/qt5/qtquickcontrols : 5.15.2
libs/qt5/qtquickcontrols2 : 5.15.2-2
libs/qt5/qtspeech : 5.15.2
libs/qt5/qtsvg : 5.15.2-2
libs/qt5/qttools : 5.15.2
libs/qt5/qttranslations : 5.15.2
Good points. I've removed this and set CraftCompiler.architecture
to arm so that can be used to check.
Ryan Adolf (944ba291) at 03 Mar 04:19
Remove isAppleSilicon, set architecture correctly on macos arm64