FolderView: various fixes

FolderView: Use let instead of var, check for item existence

We should use let keyword here instead of var, since var is scoped to whole function, while let is scoped to blocks.

This would cause the itemX and itemY grow indefinitely in some cases.

Check also for item existing before trying to check intersection to avoid warning log spam.

BUG: 490677

FolderView: Stop hovering items on mouse leave

When we clear press state, we should clear hovered state too to avoid any items being stuck in hover state.

FolderView: Dont start rubberband when dragging scrollbar

If scrollbar is being dragged by mouse, do not create rubberband object.

BUG: 468359

FolderView: Clear press state when applet is disabled

When user starts to drag and move the folderview applet, it gets disabled. This can cause the rubberband to appear due to the rubberband being created just before the folderview gets disabled.

Make sure we always clear the press state when the applet is disabled, so it's in normal state after enabled is turned back on again.

BUG: 490677

FolderViewLayer: Fix label portruding

The label with the folder path can portrude a bit off the edge of the header area. Make sure there's always a bit more space for it.

Before After
image image

FolderItemDelegate and main: Fix various warnings

This patch fixes various "null" warnings that would popup.

Edited by Akseli Lahtinen

Merge request reports

Loading
Loading