Icon positions are preserved by scaling the top-left coordinate pair
by the difference between the old and new grid sizes, or by recreating
the same logical column/row coordinate pair in the newly-calculated
grid if the align-to-grid option is enabled.
Icons that run out of bounds (or exceed the maximum column or row)
accumulate at the relevant screen edges. There is a precedent for
this behavior in the general align-to-grid code.
The left-to-right or right-to-left flow is taken into account when
scaling.
Smarter behaviors can be imagined as an optimization (e.g. identi-
fying groups of icons along screen edges and preserving their edge
alignment regardless of overall layout flow), but this simple scaling
implementation certainly beats throwing positions away altogether.
However, positions do still get thrown away in the non-containment
case - as the regular widget is capable of handling overflow via a
scrollbar, relayouting to exploit that felt better in practice.
CCBUG:182712
The configChanged() implementation could unnecessarily schedule a
reload due to a bug in a has-this-config-element-changed comparison,
which would result in icon position losses in scenarios such as
changing the wallpaper or the workspace theme, without having touched
any sorting-related options. Further, OK'ing the config dialog could
undo the unsorted state entered by moving an icon while the dialog
was open; this is now handled by updating the sorting mode combo box
in the dialog after the icon is dropped.
The later relies on a preceding fix in kde-workspace.git to make
Applet::isUserConfiguring() work for containments if Folder View is
used as desktop containment.
- int m_filterType -> ProxyModel::FilterType m_filterType
- ProxyModel::filterModeFromInt(int) -> static_cast<ProxyModel::FilterType>(int)
- int -> QVariant<ProxyModel::FilterType> in the config UI
- selectUnselectAll() -> two separate methods; eliminate sender() call
This also fixes filterChanged() and configAccepted() wrt this config key.
Use the actual filter mode value instead of the combobox index which is
error-prone in case the order of the items in the combobox changes.
BUG:317323
FIXED_IN:4.10.2
The ListView object ownership is transferred to Dialog upon creation, so
not deleting the Dialog object in the applet dtor results in a leaked
ListView. However, when the leaked ListView receives a repaint signal on
plasma theme change, the model pointer in that view is already invalid,
which leads to the crash in m_model->rowCount().
BUG:299077
FIXED-IN:4.9.5
Ark's drag'n'drop D-Bus interface needs to be changed: so far, the object
path was always /DndExtract, but this does not work if Ark is being used as
an embedded KPart (in Konqueror or Rekonq, for example), as all tabs will
end up calling QDBusConnection::registerObject() with the same path. Only
the first call will work, and the result is that dragging and dropping from
any tab previewing an archive with Ark will extract from the first archive
being previewed.
To fix that, applications that accept the application/x-kde-dndextract
mimetype should now be adjusted to check the
application/x-kde-ark-dndextract-service and
application/x-kde-ark-dndextract-path ones instead; the former contains the
same service information that used to be passed, while the latter tells
which object path should be talked to.
This is the folderview part of the change, modeled after the changes made to
Dolphin.
CCBUG: 304860
QGraphicsView::underMouse() can fail if the mouseEnterEvent has not been
delivered. E.g. opening a context menu in a folder peek popup and then clicking
the desktop makes subsequent underMouse() calls return false.
This replaces underMouse() with the standard Plasma method based on using the
item's scene coordinates.
BUG:300386
FIXED-IN:4.8.4