Summary: | No highlight on hover over CompactRepresentation | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Nate Graham <nate> |
Component: | Battery Monitor | Assignee: | Kai Uwe Broulik <kde> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | kde, materka, me, plasma-bugs, postix |
Priority: | NOR | Keywords: | junior-jobs |
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/-/commit/39f05d2d5b74057ed6d9a0a8a1022865ff5046e8 | Version Fixed In: | 6.0 |
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 400295 |
Description
Nate Graham
2020-01-15 20:24:26 UTC
Or implement glow effect in PlasmaCore.SvgItem The icon is composed of different layers and parts, not just a single icon. Hmm, then maybe we can implement this effect in QML, like: import QtGraphicalEffects 1.12 ... GammaAdjust { anchors.fill: batteryIcon source: batteryItem gamma: root.containsMouse ? (1.0 / 0.7) : 1 Behavior on gamma { PropertyAnimation { easing: Easing.InOutQuad duration: 250 } } } I can provide a patch. The only problem is to maintain consistency with IconItem (animation easing, duration) and with KIconEffect (effect type, values). Some parameters are hardcoded, some are read from kglobalconfig, like: ["DesktopIcons"]["ActiveEffect"]["value"]. I was not able to find any usage of these config values, but some themes may use it. In addition, it might be a good idea to extract this as a separate component. I was wondering if perhaps an IconEffects QML item should be added where you can tell it what effects to apply (disabled, hovered, etc) on any item. (In reply to Kai Uwe Broulik from comment #4) > I was wondering if perhaps an IconEffects QML item should be added where you > can tell it what effects to apply (disabled, hovered, etc) on any item. Yes, I had something like that in my mind. Can we discuss it in https://phabricator.kde.org/D26719 ? Luckily with mostly white icon this issue is barely noticable. However, it does feel inconsistent when an applet is placed on a desktop, and enters Edit Mode. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3138 PlasmaCore.IconItem is no more, and we even use Kirigami.Icon here now, but it still doesn't work. Will investigate; re-titling to be more accurate, Git commit 39f05d2d5b74057ed6d9a0a8a1022865ff5046e8 by Nate Graham. Committed on 24/08/2023 at 20:13. Pushed by ngraham into branch 'master'. applets/{batterymonitor,notifications}: Show CompactRep hover highlights Battery Monitor and Notifications have custom CompactRepresentations, but were not conditionally setting the active: property on hover for their custom icon items, causing them to lack the hover highlight effect that all other System Tray icons have. Related: bug 416311 FIXED-IN: 6.0 M +3 -1 applets/batterymonitor/package/contents/ui/CompactRepresentation.qml M +4 -0 applets/notifications/package/contents/ui/CompactRepresentation.qml M +5 -0 components/workspace/BatteryIcon.qml https://invent.kde.org/plasma/plasma-workspace/-/commit/39f05d2d5b74057ed6d9a0a8a1022865ff5046e8 |