https://bugs.kde.org/show_bug.cgi?id=485734

--- Comment #10 from medin <med.medin.2...@gmail.com> ---
(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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to