Bug 431214 - Wrong spacing of list after editing the order using ListItemDragHandle
Summary: Wrong spacing of list after editing the order using ListItemDragHandle
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.77.0
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-06 09:38 UTC by Till Schäfer
Modified: 2021-01-06 17:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.78
Sentry Crash Report:


Attachments
video showing the behavior (1.21 MB, video/x-matroska)
2021-01-06 09:38 UTC, Till Schäfer
Details
QML test case (1.76 KB, text/plain)
2021-01-06 12:07 UTC, Ismael Asensio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Till Schäfer 2021-01-06 09:38:14 UTC
SUMMARY
When I edit the window rules list in systemsettings, it adds some empty space to the top under some conditions.

STEPS TO REPRODUCE
1. Have some window rules configured
2. drag the top rule to the bottom of the list. Important: Bottom means the bottom of the container space, not the last entry in list. 


OBSERVED RESULT
The rules list has some empty space on the top and the last rule is aligned to the bottom of the container. 

EXPECTED RESULT
The first rule is aligned to the top of the container, that empty space is on the bottom. 

Operating System: Gentoo Linux
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2
Kernel Version: 5.9.14-gentoo
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-3770 CPU @ 3.40GHz
Memory: 30.9 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4000
Comment 1 Till Schäfer 2021-01-06 09:38:44 UTC
Created attachment 134605 [details]
video showing the behavior
Comment 2 Ismael Asensio 2021-01-06 12:07:01 UTC
Good catch!

Reassigning it to Kirigami, since it can be reproduced in a test case.

It only happens when the content height is smaller than the view height, so I'm guessing it's hitting some rearrange code for the scrolling case.
Comment 3 Ismael Asensio 2021-01-06 12:07:43 UTC
Created attachment 134613 [details]
QML test case
Comment 4 Bug Janitor Service 2021-01-06 12:38:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/202
Comment 5 Ismael Asensio 2021-01-06 17:32:35 UTC
Git commit ccb063b0116639345bf7dcd285861a86f76973e1 by Ismael Asensio.
Committed on 06/01/2021 at 12:35.
Pushed by iasensio into branch 'master'.

[controls/ListItemDragHandle] Fix wrong arrangement on no-scrolling case

Disable the scroll threshold when the list content does not need
scrolling (the content is shorter than the list view).

This fixes the items being wrongly re-arranged when the item
is dragged near the list view bottom.
FIXED-IN: 5.78

M  +1    -1    src/controls/ListItemDragHandle.qml

https://invent.kde.org/frameworks/kirigami/commit/ccb063b0116639345bf7dcd285861a86f76973e1