┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.cpp
AgeCommit message (Collapse)Author
2012-03-27KItemListView interface and implementation simplificationPeter Penz
- Remove KItemListView::preferredRoleColumnWidth() and allow implementing this as part of derived classes from KItemListWidget. Those derived classes are aware about the layout and hence also can provide the preferred role width. - Make KItemListView::itemSizeHint() non-virtual and also allow implementing the size hint as part of derived classes from KItemListWidget.
2012-03-26Rename KItemListView::preferredColumnWidth() to preferredRoleColumnWidth()Peter Penz
2012-03-26Internal interface cleanupPeter Penz
Let derived classes from KItemListView just implement preferredColumnWidth() for one role of an item instead of returning a hashtable for a given item-range.
2012-03-25Details view: Don't reset to automatic resizing when adding columnsPeter Penz
Until now when a new column is added in the case where custom column widths are used, the automatic resizing has been turned on again. The patch fixes this so that the current widths stay and the new column gets a proper default width.
2012-03-24Cleanup and minor fixes for column-handlingPeter Penz
2012-03-23Details view: Optionally remember user changed column-widthsPeter Penz
If the user changed a column-width in the details-view, up to now the width got reset when changing a directory or when restarting Dolphin. Now the column-widths automatically get remembered for each directory in case if the user has modified the width. The automatic resizing is still turn on per default. The storing of the custom column-width can easily be reset by right clicking on the header and selecting "Automatic Column Widths" from the context-menu. Some finetuning is still necessary (e.g. the "Adjust View Properties" dialog currently is not aware about this setting) but this will be fixed during the next weeks. BUG: 264434 FIXED-IN: 4.9.0
2012-03-22Details view: Expand the name-column like in Dolphin 1.xPeter Penz
With the new view-engine the name-column always has been expanded to the maximum width of all available names. But this makes it impossible to see other columns without scrolling when having long filenames, so per default the Dolphin 1.x behavior has been applied to the new view-engine so that the name-column-width gets decreased to be able to show the other columns. This patch will be released with KDE applications 4.8.2. For Dolphin 2.1 (KDE applications 4.9) user-modified widths of the columns will be remembered per directory also between different sessions. CCBUG: 264434
2012-03-20Fix alternate background issuePeter Penz
When items get inserted or deleted, the alternate background must be updated.
2012-03-09Prevent endless scrolling of list when dragging itemsPeter Penz
BUG: 295584 FIXED-IN: 4.8.2
2012-03-09Details view: Allow to turn off expandable folders like in Dolphin 1.7Peter Penz
The option for turning off expandable folders has been removed with the new view-engine. Due to several requests this option has been readded again. As for 4.8.x no new user-interface strings may be introduced, the line ExpandableFolders=false must be manually added below the section "[DetailsMode]" in the file ~/.kde/share/config/dolphinrc if the expandable-folders feature should be disabled. Thanks to H.H. "cyberbeat" for the initial patch! BUG: 289090 FIXED-IN: 4.8.2
2012-03-07Allow custom sorting of details-view columnsPeter Penz
Fix regression that Dolphin 2.0 did not allow to adjust the sorting of the details-view columns. BUG: 164696 FIXED-IN: 4.8.2
2012-02-28Update siblings when turning on/off groupingPeter Penz
2012-02-28Finetuning of margins and alternate row colorsPeter Penz
Thanks to Martin Zilz for the ongoing support.
2012-02-23Whitespace cleanups and documentation fixesPeter Penz
2012-02-22Fix alternate backgrounds when enabling groupingPeter Penz
Up to now the alternating backgrounds just have been calculated by checking whether the item index is odd. This does not work well when grouping is enabled: In this case the alternate background color of the first item of a group should stay consistent.
2012-02-21Fix possible crash if no model is setPeter Penz
When updating the siblings-information by e.g. a call to setSupportsItemExpanding() it is possible that the model is not set yet.
2012-02-21Don't trigger assert when switching to details-viewPeter Penz
If the visible roles of the details-view are equal to the visible roles of other views, then switching to the details-view will trigger an assert because the invisible roles don't get updated. Thanks to Frank Reininghaus for the detailed analyses! In the context of this fix optimizations have been done when switching view-modes: The "don't-animate-workaround" could be removed. BUG: 294531 FIXED-IN: 4.8.1
2012-02-17Remember the row- and column-information for visible itemsPeter Penz
Up to now KItemListView has not been aware to which column or row an item belongs to. This has been handled internally in KItemListViewLayouter. But for deciding whether a move-animation might result in overlapping items it is mandatory to be aware about the column/row. The current approach to guess a column/row change by comparing the source- and target-rectangle works very well but breaks on some corner-cases when e.g. zooming. Now the layouter allows to access the information. This assures that in the vertical alignment no move-animation is done between rows and the in the horizontal alignment no move-animation is done between the columns.
2012-02-16Compact view: Padding- and margin-improvements for grouped alignmentsPeter Penz
2012-02-14Details view: Fix filter issue with sibblingsPeter Penz
When the filter has been enabled, the sibblings got not updated. Explicitely update the sibblings when inserting, removing or moving items. For layouting implicitely update the sibblings only for recycled widgets.
2012-02-14Details view: Siblings fixesPeter Penz
The siblings should only range within one group.
2012-02-14Details view: Fix indicator-branchesPeter Penz
Up to now no indicator-branches have been drawn when showing a tree. The patch fixes this so that that the style-dependent branches are drawn. The main part of the patch is the implementation of KItemListView::updateSiblingsInformation(). Most of the other changes are related due to an internal renaming of the expansionsLevel-role to expandedParentsCount and some related cleanups. BUG: 290276 FIXED-IN: 4.8.1
2012-02-11Group header layout fixesPeter Penz
- Don't use a margin for the first group header - Provide margins between the groups - Use a more subtle coloring - Prevent animation glitches when resizing a window
2012-02-08Layout optimizationsPeter Penz
- Differ internally between margins and paddings - Add a small padding in the icons-view and the compact-views - Optimize the width of the icons-view if previews are shown
2012-02-06Group header improvementsPeter Penz
- Use a simpler background and colors as suggested by Martin Zilz. This is just an early draft, I need to post some comparison screenshots to Martin for review. - Fixes of some layout issues that have been revealed because of adjusting the group header heights. - More clever animation/no-animation detection when doing listview-property changes in parallel.
2012-02-05Fix potential endless loop in layoutPeter Penz
Usecase: - No scrollbar is shown - Window size will be decreased so that a scrollbar gets necessary The decreased window size minus the space required for the scrollbar results in a relayout of the items. In 99 % of all cases a decreased window size won't result in showing more items in parallel in comparison to a larger window size. However in the remaining 1 % this can happen (e.g. see bug 293318 for a sample). This results in an endless loop as now no scrollbar is required anymore, the layout changes again, the scrollbar is required again, ... BUG: 293318 FIXED-IN: 4.8.1
2012-02-04Icons view: Layout optimizationsPeter Penz
- Assure that landscape-previews use the whole available width of the icon-area instead of only using the square width. This waste of space occured if the text-width was larger than the icon-width. - Only use one margin instead of two between the icons and the text to improve the visual appearance (thanks to Martin Zilz for the hint) BUG: 293268 FIXED-IN: 4.8.1 CCMAIL: [email protected]
2012-02-03The autoscroll timer should be only a single-shot timerPeter Penz
2012-02-02Fix pending zooming animationPeter Penz
If doLayout() is invoked with the 'NoAnimation' hint, it must be assured that any ongoing animations are stopped.
2012-02-01Don't animate items if the number of grid elements has been changedPeter Penz
Having animated items is useful when e.g. deleting or inserting one item or when the size or position slightly changes by increasing the zoom level or the window size. However if the number of rows or columns change, the animation gets obtrusive and in this case lets just apply the final layout.
2012-01-31Animation optimizationsPeter Penz
Prevent that the moving-animation crosses other items when zooming or changing the window size.
2012-01-30Only move the items if at least one direction is within the item sizePeter Penz
2012-01-30Further animation optimizationsPeter Penz
- Assure a proper minimim width in the compact mode. - Don't calculate the old position of hidden items to animate the moving. Just show them directly.
2012-01-30Fix crash in Compact View if view height is smaller then item heightFrank Reininghaus
CCBUG: 292816 FIXED-IN: 4.8.1 (cherry picked from commit f5ecaee9c40c940fe8e1bf4a7d50fe0b18e1932b)
2012-01-29Make moving animations less obtrusivePeter Penz
Only animate the moving of items if the new position is within the same row or the same column. Otherwise just fade in the icon on the new position. This makes the the animations when resizing the window or changing the zoom-level a lot more pleasant. CCBUG: 289238
2012-01-19Do not make items invisible when turning off previewsFrank Reininghaus
This commit fixes a problem in KItemListView::doLayout(): This function assumed that firstVisibleIndex is a constant. However, if the view is scrolled to the bottom with previews enabled, and then previews are disabled (and the icon size is much smaller without previews), this function changes the scroll offset, which also changes the the first visible index. Using the unchanged variable causes trouble later on (i.e., it makes items which are actually inside the view area invisible). lastVisibleIndex is not needed before the scroll offset change and is const after that, so its calculation is moved a few lines down. CCBUG: 291841 FIXED-IN: 4.8.1 (cherry picked from commit cc8f5b4939062df44ce0bd314ac4ae04973b9830)
2012-01-17Avoid unnecessary animations when switching view modesPeter Penz
Thanks to Nikita Skovoroda for the initial patch and the analyses. BUG: 290947 FIXED-IN: 4.8.0
2012-01-17Do a synchronous layout for dynamic item sizes when changing the geometryPeter Penz
This prevents a delayed update when resizing the window e.g. in the details view. As no animated item position changes can happen for dynamic item sizes the synchronous relayout is fine from a performance point of view. BUG: 290953 FIXED-IN: 4.8.0
2012-01-15Don't select items if the selection toggle has been disabledPeter Penz
2011-12-26Improve item offset scrollingPeter Penz
Don't check whether the m_layoutTimer is active: Changing the item offset must always trigger a synchronous layout, otherwise the smooth-scrolling might get jerky.
2011-12-26Fix keyboard issues when groups are enabledPeter Penz
When groups are enabled in Dolphin the key-up and key-down keys did not behave consistent in comparison to traditional views or like done in editors. CCBUG: 261995 CCBUG: 262038
2011-12-20Fix autoscroll issue when selecting itemsPeter Penz
If items get selected with the rubberband the scroll offset must stay inside the visible range. BUG: 282353 FIXED-IN: 4.8.0
2011-12-16Animation finetuningPeter Penz
If dynamic item sizes are used don't animate the size of the widget in along the dynamic direction. This prevents unnecessary animations when increasing the window width in combination with e.g. the details view.
2011-12-16Minor layout and coding style cleanupsPeter Penz
- Disable performance debugging output - Force a synchronous layout during scrolling. This prevents having a jerky scroll-animation if there are pending operations ongoing in parallel. - Minor coding style cleanups
2011-12-11Remember sort settingsPeter Penz
If the user has changed the sort-role or sort-order by clicking on the view-header of the details-view, the settings have been adjusted to the model but not remembered in the directory settings.
2011-12-11Fix KItemListView::scrollToItem()Peter Penz
Don't let the item be invisible if the header is shown.
2011-12-07Enable "menu key" functionalityPeter Penz
Bring back the functionality that a context-menu is opened if the "menu key" has been pressed. In opposite to Dolphin 1.7 the context-menu is shown above the selected item and not on the (probably unrelated) mouse position. A new method KItemListView::itemContextRect() has been introduced: The method is now also used as reference for tooltips which fixes the issue that tooltips had a wrong horizontal alignment in the details-view. BUG: 288366 FIXED-IN: 4.8.0
2011-11-26Folders Panel fixesPeter Penz
The following functionality from Dolphin 1.x has been ported to the new view-engine: - Allow expanding/collapsing of items - Automatically select the current item - Context menu for items Related improvements to the view-engine: - Make the expanding/collapsing interface already accessible in the base classes KItemModelBase and KItemListView. If no expanding/collapsing is supported at all by derived models (which is usually the default case) simply not reimplementing those 3 methods is sufficient and it does not introduce an additional complexity like in QAbstractItemModel/QModelIndex. - Automatically handle the expanding/collapsing in KItemListController. This also includes the key-handling, which is quite special for expandable items. - Don't let KItemListView automatically scroll to the current item if the current item got changed. The automatic scrolling should only be done if the current item has been changed by the user. Hence this functionality has been moved to the KItemListController which currently only triggers the automatic scrolling if the current item has been changed by the keyboard (we might extend the usecases later if required).
2011-11-20Initial draft for bringing back the "Folders" panelPeter Penz
The folders panel has been adjusted to use the new view-engine. A lot of things don't work yet, but are mostly minor issues that should be fixable during the next 10 days.
2011-11-13Bring back the selection-markersPeter Penz
Still some finetuning is necessary, but lets first bring back the missing features from Dolphin 1.x to 2.0 before starting with this.