> On May 29, 2016, 5:51 p.m., Kai Uwe Broulik wrote:
> >
> 
> Kai Uwe Broulik wrote:
>     Can you check whether QIcon::setIsMask works, OSX >= 10.10 tray icons are 
> monochrome usually.

Most of Apple's own icons in the menubar have always been monochrome. This is 
not true for 3rd party applications. If those show an icon it's often their app 
icon (which I think is the general idea for icons put up through 
`KStatusNotifier`).

Beyond the fact that `setIsMask` was introduced only in Qt 5.6 I see that the 
actual icon-setting is done by `QSystemTrayIcon::setIcon()`. I'd propose that 
the decision whether or not to make a monochrome version of the icon can be 
left to Qt (esp. if one's supposed not to change Qt's native platform theme by 
default O:-) )


> On May 29, 2016, 5:51 p.m., Kai Uwe Broulik wrote:
> > src/kstatusnotifieritem.cpp, line 909
> > <https://git.reviewboard.kde.org/r/126369/diff/4/?file=467228#file467228line909>
> >
> >     i18nc please

I'm not sure what to expect here, what effect is using `i18nc("!")` going to 
have? AFAIK the exclamation mark is pretty universal, and translating it might 
reduce the label's effectiveness. I've tried many options to label the Dock 
icon (that's what we're talking about here) and found no better alternative.


> On May 29, 2016, 5:51 p.m., Kai Uwe Broulik wrote:
> > src/kstatusnotifieritem.cpp, line 912
> > <https://git.reviewboard.kde.org/r/126369/diff/4/?file=467228#file467228line912>
> >
> >     Can this be done without magic numbers?

If you're referring to `overlaySize`: I'll need to initialise it to some value 
if the application doesn't have (or no longer has) an icon set. I don't 
remember exactly where the 22 comes from, that's probably the standard height 
for MenuExtra icons.
The `0.667` (2/3) value a bit further down is again a hand-tuned scale factor 
which I find a good compromise which puts a reasonably sized dot at an 
appropriate location on the icon.

Do you have a better suggestion?


- René J.V.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126369/#review95984
-----------------------------------------------------------


On May 29, 2016, 5:41 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126369/
> -----------------------------------------------------------
> 
> (Updated May 29, 2016, 5:41 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDE Frameworks.
> 
> 
> Repository: knotifications
> 
> 
> Description
> -------
> 
> OS X has a number of limitations in features used by KNotifications, notably 
> concerning the status notifier item (aka system tray icon).
> 
> This RR will likely evolve to address multiple limitations (at least also the 
> NeedsAttention state); at the moment it only proposes an emulation of 
> `QMenu::addSection`.
> 
> `QMenu::addSection` works by adding a QAction with a "texted separator" at 
> the insertion location. Texted separators do not exist in menu items in the 
> OS X "global" menubar (they become regular separators), and Qt will not 
> provide a platform-specific implementation. Loss of the section title text is 
> maybe not always an issue, but I think it is in the system tray menu. I 
> therefore propose to emulate `QMenu::addSection` by replacing the texted 
> separator with an inactive (disabled) menu item that shows the text, followed 
> by a standard separator. Menus in the notification area are much less subject 
> to interface guidelines, so the presence of an item icon is acceptable and 
> IMO useful for the `titleAction`.
> 
> Testing the NeedsAttention state with the tests/kstatusnotifieritemtest 
> application leads to disappearance of the menubar icon, i.e. the access to 
> the notifier menu becomes invisible rather than blinking (which is what I get 
> on Linux using the same packaging). Adding a few qDebug statements shows that 
> the `attentionIcon` is empty.
> I'd appreciate a crash course how this feature is supposed to work, so I can 
> see if an OS X implementation might be feasible.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 7cf8379 
>   src/CMakeLists.txt 7eb3125 
>   src/knotification.cpp 352cf49 
>   src/kstatusnotifieritem.cpp 27abfb8 
>   src/notifybypopup.cpp 7d69a36 
>   tests/kstatusnotifieritemtest.cpp 973fc85 
> 
> Diff: https://git.reviewboard.kde.org/r/126369/diff/
> 
> 
> Testing
> -------
> 
> On OS X 10.9.5 with Qt 5.5.1 and frameworks 5.17.0 .
> 
> 
> File Attachments
> ----------------
> 
> the systray icon & menu created by kstatusnotifieritemtest . This application 
> has no icon to show.
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/12/16/286037ae-07b3-454a-a226-1748854493a1__kstatusnotifieritemtest-systray.png
> The systray icon and menu created by the KDE4 kwalletmanager (code has an 
> equivalent patch)
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/12/16/4fc9d4e4-1537-478c-9196-94cbc17b6b7c__kwalletmanager-systray.png
> An Apple systray icon+menu that shows icons (which cannot be hidden)
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/12/16/fc48a963-2e18-4396-bd38-062d41688118__Apple-systray-menu-with-icons.png
> kstatusnotifieritemtest with added appIcon
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/12/17/e896e90d-f0a8-43f7-9199-847572832df7__kstatusnotifieritemtest-with-appIcon.png
> kstatusnotifieritemtest-with-appIcon+attention.png
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/12/17/f41081db-8e09-4ea2-95c1-f507c62109d4__kstatusnotifieritemtest-with-appIconattention.png
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to