Created attachment 168641 [details] image1 When I scroll down in Klipper applet, some items when highlighted appear empty. Those empty items are randomly selected upon each opening.
Created attachment 168642 [details] image2
Created attachment 168643 [details] image3
Cannot reproduce. However I do have a theory regarding what's happening: the highlight effect applies a graphical effect to the text (which also causes Bug 478165) and I suspect that under certain circumstances it gets broken on certain GPUs and causes this issue. Long term, we may want to just remove the fancy effect to improve reliability and perceived bugginess here. What's your GPU hardware?
(In reply to Nate Graham from comment #3) > Cannot reproduce. However I do have a theory regarding what's happening: the > highlight effect applies a graphical effect to the text (which also causes > Bug 478165) and I suspect that under certain circumstances it gets broken on > certain GPUs and causes this issue. > > Long term, we may want to just remove the fancy effect to improve > reliability and perceived bugginess here. > > What's your GPU hardware? I only have laptops with Intel iGPU.
Me too, mine is 10th Gen, Intel HD 630. What's yours?
(In reply to Nate Graham from comment #5) > Me too, mine is 10th Gen, Intel HD 630. What's yours? i3-5005u, i3-1005g1 and T4400.
Thanks. So older hardware. That could be related, or I might be off base and it's something else. Can you test a patch? Find the file ClipboardItemDelegate.qml on your system (on mine it's located at /usr/share/plasma/plasmoids/org.kde.plasma.clipboard/contents/ui/ClipboardItemDelegate.qml) and make the following changes to it: @@ -113,7 +113,7 @@ PlasmaComponents.ItemDelegate { anchors.fill: label cached: true maskSource: labelMaskSource - visible: !!source && menuItem.ListView.isCurrentItem + visible: false TapHandler { enabled: !(toolButtonsLoader.item as DelegateToolButtons)?.hovered // https://bugreports.qt.io/browse/QTBUG-108821 @@ -126,7 +126,6 @@ PlasmaComponents.ItemDelegate { QQC.Control { id: label height: implicitHeight - visible: !menuItem.ListView.isCurrentItem anchors { left: parent.left leftMargin: Math.ceil(Kirigami.Units.gridUnit / 2) - menuItem.listMargins.left Save the file, authenticate, then restart either plasmashell or the system. If that fixes the issue, then it's a glitch in the graphical gradient effect, and I suspect it'll end up being a Qt bug unfortunately.
(In reply to Nate Graham from comment #7) > If that fixes the issue, then it's a glitch in the graphical gradient > effect, and I suspect it'll end up being a Qt bug unfortunately. I added those two changes and restarted plasmashell, for now all labels become visible, but those tools buttons are shown overlapping with the text under them. I suspect there is some error in that gradient which force it to be applied to all label's width, or something elsewhere that makes the current selected label invisible. I never wrote qml code, but when I added inside onActiveChanged the following line to track the real value of gradientThreshold: console.log("gradientThreshold: ", (label.width - toolButtonsLoader.width) / label.width); it prints some real numbers but sometimes returns NaN.
Thanks, that's helpful. I suspect that the label sometimes briefly has a width of zero. Can you test this change locally and see if it fixes the issue for you? --- klipper/declarative/qml/ClipboardItemDelegate.qml +++ klipper/declarative/qml/ClipboardItemDelegate.qml @@ -33,7 +33,7 @@ PlasmaComponents.ItemDelegate { property alias mainItem: label.contentItem property int maximumNumberOfPreviews: Math.floor(width / (Kirigami.Units.gridUnit * 4 + Kirigami.Units.smallSpacing)) - readonly property real gradientThreshold: (label.width - toolButtonsLoader.width) / label.width + readonly property real gradientThreshold: (width - toolButtonsLoader.width) / width // Consider tall to be > about 1.5x the default height for purposes of top-aligning // the buttons to preserve Fitts' Law when deleting multiple items in a row, // or else the top-alignment doesn't look deliberate enough and people will think
(In reply to Nate Graham from comment #9) > Thanks, that's helpful. I suspect that the label sometimes briefly has a > width of zero. > > Can you test this change locally and see if it fixes the issue for you? > > --- klipper/declarative/qml/ClipboardItemDelegate.qml > +++ klipper/declarative/qml/ClipboardItemDelegate.qml > @@ -33,7 +33,7 @@ PlasmaComponents.ItemDelegate { > property alias mainItem: label.contentItem > > property int maximumNumberOfPreviews: Math.floor(width / > (Kirigami.Units.gridUnit * 4 + Kirigami.Units.smallSpacing)) > - readonly property real gradientThreshold: (label.width - > toolButtonsLoader.width) / label.width > + readonly property real gradientThreshold: (width - > toolButtonsLoader.width) / width > // Consider tall to be > about 1.5x the default height for purposes of > top-aligning > // the buttons to preserve Fitts' Law when deleting multiple items in a > row, > // or else the top-alignment doesn't look deliberate enough and people > will think Sorry I was away from home for several days, I tested your suggestion but it didn't change the result. I changed the gradient colors to red and green and forced it to be always visible, and it seems to render perfectly. I also forced the visibility of the label and it always appears fine. The problem is surely coming from these two boolean checks: Item visible: !menuItem.ListView.isCurrentItem OpacityMask visible: !!source && menuItem.ListView.isCurrentItem "isCurrentItem" is crazily jumping between "false" and "true", it holds "true" only for certain cases if I scroll via mouse wheel or reenter a previously highlighted item, the same for that "source" it always holds "undefined" when I move mouse pointer over never highlighted items.
There were a number of changes to relevant code recently. Can you check again in Plasma 6.3 or later and see if this is still happening? If so, it would also be great to learn if it's happening to you only on X11, only on Wayland, or both. Thanks a lot!
(In reply to Nate Graham from comment #11) > There were a number of changes to relevant code recently. Can you check > again in Plasma 6.3 or later and see if this is still happening? > > If so, it would also be great to learn if it's happening to you only on X11, > only on Wayland, or both. > > Thanks a lot! It's still happening on Plasma 6.3.4 both on Wayland and X11.
Darn. Thanks for checking.
It seems to be fixed for now, I tested on two laptops running Wayland with Plasma 6.4.4 and those empty items are not appearing again.