[FolderView] Allow chosing list or icon view in popup
ClosedPublic

Authored by broulik on Feb 24 2016, 2:52 PM.

Details

Summary

While I really like the list view for the popup, I also have a "Screenshots" folderview and there I prefer to have huge icons to see everything at a glance. This allows to choose between the default list view and the icon view mode with cascading popups identical to what you get on the desktop.

BUG: 359618
FIXED-IN: 5.6.0

Test Plan

It works nicely. Switching between view modes at runtime is broken, though, ie. the dialog doesn't update its size and also the delegates that were already there aren't updated until I scroll them out of view and back.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik updated this revision to Diff 2456.Feb 24 2016, 2:52 PM
broulik retitled this revision from to [FolderView] Allow chosing list or icon view in popup.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, hein.
broulik set the repository for this revision to R119 Plasma Desktop.
broulik added a project: Plasma.
Restricted Application added a subscriber: plasma-devel. · View Herald TranscriptFeb 24 2016, 2:52 PM
hein edited edge metadata.Feb 24 2016, 4:20 PM

Uh that doesn't sound like "it works nicely" ... I'll review a more complete revision later? ;)

hein added a comment.Feb 24 2016, 4:25 PM

Oh and: We recently got a user feature request to allow configuring the icon size in popup mode, it probably makes sense to do this as part of this change if you want to. Note that list mode and the current icon size should IMHO be the defaults.

This review is all about that Bug 359618.

I don't change the list view, it's just that if you don't like the list view in the popup (which is still the default) you can choose icon mode and there you can also choose the icon size.

broulik updated this revision to Diff 2458.EditedFeb 24 2016, 7:51 PM
broulik edited edge metadata.
  • Fix updating popup size when changing icon size or view mode (it's always 3x2 icons no matter the icon size, would be cool to have a default popup size and then show more icons if more fit in there)
  • Fix stale delegates when switching view modes
hein added a comment.Feb 25 2016, 9:38 AM

Did you look into why the invalidate hack is necessary? Why don't the delegates adjust properly?

hein added a comment.Feb 26 2016, 11:45 AM

So basically to get this moving along I'd like investigation of why those delegates don't fix themselves -- let's see if we can't avoid adding a new FIXME?

broulik updated this revision to Diff 2473.EditedFeb 26 2016, 2:38 PM
  • Fix switching between list view and icon view at runtime

Using States {} I can achieve atomic anchor changes; it seems when you use regular bindings and you have horizontal/verticalCenter and a left/right/top/bottom anchor and you try to swap them, it might break or be ignored depending on the order of evaluation because how dare you have more than one anchor for one axis.

I wanted to make one huge State {} at the top but I got frequent crashes with it deep down in QQuickAnchor setTop when starting a drag operation; this does not happen with the two smaller ones.

hein accepted this revision.Feb 26 2016, 3:09 PM
hein edited edge metadata.
This revision is now accepted and ready to land.Feb 26 2016, 3:09 PM
This revision was automatically updated to reflect the committed changes.