Bug 288748

Summary: Page Up and Page Down don't do anything on icon/compact/details view
Product: [Applications] dolphin Reporter: Lasse Liehu <lasse.liehu>
Component: generalAssignee: Peter Penz <peter.penz19>
Status: RESOLVED FIXED    
Severity: normal CC: cfeck, frank78ac
Priority: NOR Keywords: reproducible
Version: 1.99   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.0

Description Lasse Liehu 2011-12-11 18:09:57 UTC
Version:           unspecified (using Devel) 
OS:                Linux

This worked with old item views.

Reproducible: Always

Steps to Reproduce:
1. Open a folder so that its contents don't all fit to the window at the same time
2. Press Page Up or Page Down

Actual Results:  
The same item stays selected / selection doesn't change.

Expected Results:  
Selection should change in some way similar to how Page Up and Down usually work.
Comment 1 Peter Penz 2011-12-11 18:25:04 UTC
Thanks for the report, we'll fix this before 4.8.0 is out.

(internal note: When fixing this don't use 'itemsPerRow' as this does not work with grouping)
Comment 2 Frank Reininghaus 2012-01-18 09:20:19 UTC
Git commit e56a363aa6106477fa1577cb0b1bc2a6389910c8 by Frank Reininghaus.
Committed on 18/01/2012 at 10:18.
Pushed by freininghaus into branch 'KDE/4.8'.

Make PageUp/PageDown work in Dolphin's new view engine
FIXED-IN: 4.8.0
REVIEW: 103721

M  +70   -15   dolphin/src/kitemviews/kitemlistcontroller.cpp
M  +6    -6    dolphin/src/kitemviews/kitemlistcontroller.h

http://commits.kde.org/kde-baseapps/e56a363aa6106477fa1577cb0b1bc2a6389910c8
Comment 3 Frank Reininghaus 2012-01-18 09:47:25 UTC
Git commit 7b94976a3965e35486dd456223b1078a1c90fc12 by Frank Reininghaus.
Committed on 18/01/2012 at 10:18.
Pushed by freininghaus into branch 'master'.

Make PageUp/PageDown work in Dolphin's new view engine
FIXED-IN: 4.8.0
REVIEW: 103721
(cherry picked from commit e56a363aa6106477fa1577cb0b1bc2a6389910c8)

M  +70   -15   dolphin/src/kitemviews/kitemlistcontroller.cpp
M  +6    -6    dolphin/src/kitemviews/kitemlistcontroller.h

http://commits.kde.org/kde-baseapps/7b94976a3965e35486dd456223b1078a1c90fc12
Comment 4 Christoph Feck 2012-01-19 19:22:54 UTC
Here, it jumps at least one line too few. If lines 1-6 are visible, and cursor is on line 1, then pressing PgDn selects item in line 5. It should either select line 6, or the first line on next page (line 7).
Comment 5 Peter Penz 2012-01-20 10:01:18 UTC
I did never use PgDn/PgUp before and initially thought the same as Christoph. After checking the behavior in Dolphin 1.7 it turned out that the current behavior is conform to the behavior in Qt's views (I did just a short test, probably I missed something). Personally I also would expect that the (sometimes partly) clipped bottom is selected when pressing PgDn. To me it feels strange especially in a folder having huge icon sizes (e.g. where only 2 rows are fully visible and the third row is partly visilbe).

@Frank: I guess you implemented this on purpose to stay consistent with the previous behavior. Does this behavior also meet your expectations?
Comment 6 Frank Reininghaus 2012-01-20 10:26:55 UTC
Christoph: Thanks for testing this!

Peter: Yes, I did try to be consistent with what Qt's itemviews do. I'm not sure if the behaviour is the same in every case though - I didn't have much time for thorough testing because I wanted to make sure that the commit goes in before the 4.8.0 tagging.

However, I agree that the behaviour might look a bit strange at first sight. I could try to check what other file managers do and try to improve the situation for KDE 4.8.1.
Comment 7 Christoph Feck 2012-01-20 11:18:00 UTC
I patched Dolphin sources to make sure every item is the same height, and use KWin rules to make sure the view height is a multiple of the item height, so no overlap occurs. Maybe the checks for partially visible items is "one off", and fails for completely visible items.
Comment 8 Frank Reininghaus 2012-01-20 12:20:17 UTC
When I wrote the patch, I only tested the case that the items in the bottom row are partially visible, and I tried to copy the behaviour of Qt's itemviews.

I agree that PageDown should select an item in the bottom row if it is fully visible. I'll have a look at that when I find some time.