┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
AgeCommit message (Collapse)Author
2024-03-08Start autoActivationTimer only if hovering over a directoryAkseli Lahtinen
Before starting autoActivationTimer, check that we're hovering the item on top of a directory. If we don't check for it, the the autoActivationTimer will try to open the hovered item in it's default application, which can be distracting and break the actual action the user was trying to do, like moving the file to a directory. BUG:479960
2024-03-07Add option to completely disable directory size countingNico Kreipke
Dolphin shows the size of directories by listing their contents, which for some users might cause unwanted load on the file system. Depending on the size of the subdirectories in question and how the storage is accessed, this might cause noticeable delays and even freezing. This commit adds a new option under "View -> Content Display" that enables users to set "Folder size:" to "No size", completely disabling directory size counting. Directory size counting is still enabled by default. As a third option for "Folder size" is added, the DirectorySizeCount boolean setting is replaced with a DirectorySizeMode enum setting. The old setting is migrated using a kconf_update script. FEATURE: 477187 GUI:
2024-02-27Fix compile with Qt 6.7nerdopolis turfwalker
2024-02-23Resolve conflict between activateSoonAnimation and hoverSequenceAnimationFelix Ernst
Prior to this commit, the activateSoonAnimation would not play for folders using previews. That was because the hoverSequences of folder previews would always take priority over the activateSoonAnimation. This commit prioritises the activateSoonAnimation for the quick moments in which it is active.
2024-02-23Add drag-open animationFelix Ernst
This commit adds an animation for folders that makes clear that they will open or expand soon. This is the case when the option to open folders during drag operations is enabled and a user drags an item on top of a folder. The animation goes like this: - Replace the folder's icon with the "folder-open" icon - Go back to the folder's original icon - Replace the folder's icon with the "folder-open" icon once more
2024-02-18Add documentationFelix Ernst
2024-02-17Improve DnD handling in read-only dirsJin Liu
1. Places panel and tabbar update drag status in read-only dir 2. Don't create drop job in readonly directories
2024-01-30Improve arrow key navigation for right-to-left languagesFelix Ernst
While using right-to-left languages most of Dolphin is mirrored. However, the logic of what happens when the arrow keys are pressed to move between items in the main view was never adapted to account for that. Basically nothing works as expected because of this. It's more like dealing with a psychopath who misinterprets every command you give: Left is right, right is left, up is most of the time right but sometimes not, down is most the time left but sometimes not. This commit fixes and adapts the logic if a right-to-left layout is used. This fully fixes icon view mode and improves compact view mode, though compact view mode still has more issues which aren't addressed here. This work for the benefit of the minority that use right-to-left languages both in Europe and the world is sponsored by NLnet and the European Commission which I think is beautfiul. BUG: 453933
2024-01-23Slightly refactor count resortingFelix Ernst
The bug fix 8f043b2958477d3fe2ef094b7e42f792f4cf0b02 introduced a secondary code path to trigger a resort of items. However, the previous way to trigger it only required a small bug fix to work and gives us a couple of optimisations for free. This commit removes the secondary code path and fixes the primary one. CCBUG: 473999
2024-01-22Avoid sorting too frequentlyFelix Ernst
d98037745fe6b5efbe9b145da7d20fa2f731b6a6 changed the time from 500 ms to 50 ms. This commit changes it to 100 ms. Information relevant for sorting might change repeatedly. Prior to this commit here we would resort within 50 ms of sorting being requested. If a lot of resorts would be requested in a short time frame, this could lead to the item order changing within the view up to 20 times a second which would lead to a lot of unnecessary movement and make it impossible to read even file names during the repeated sorting. 100 ms is half as bad in that regard. Bigger values might be even better but it is a trade-off.
2024-01-20rolesupdater: set isExpandable to false when dir is emptyMéven Car
Signed-off-by: Méven Car <[email protected]>
2024-01-14DolphinView: Use SingleShot and Queued ConnectionsAmol Godbole
A minor refactor where Qt::SingleShotConnection has been utilized. Also, signal delay using QTimer has been replaced with a Qt::QueuedConnection.
2024-01-13Add setting also hide application/x-trash files when hiding hidden filesMéven Car
BUG: 475805
2024-01-10KItemListRoleEditor: Disable spellcheckingAkseli Lahtinen
No need for spellchecking when renaming folders/filenames. BUG:477897
2023-12-26Do not rely on KIO source-code compat codeAlexander Lohnau
2023-12-25Fix issues if QT_NO_CAST_FROM_ASCII is definedMarius P
Fix issues e.g. "error: ‘QString::QString(const QByteArray&)’ is private within this context".
2023-12-15Resort directory size count after refreshingAkseli Lahtinen
After refreshing the view when size count is selected as the sortRole, count is 0 at first. When the actual count is loaded, the sorting is done according to the count being 0. This can break the sort order and cause view and model to be out of sync. Making sure we always resort all items when the directory size/item count is changed fixes this BUG:473999
2023-12-15Change resortAllItemsInterval to 50msAkseli Lahtinen
Related to https://invent.kde.org/system/dolphin/-/merge_requests/675 Reduces the delay for sorting items when something changes
2023-12-14Dolphin: Remove unused code, fix clazy warningsMéven Car
2023-12-08Do not reset expandability when loading previewsAkseli Lahtinen
Fixes a weird bug with the treeview if one has ``` [PreviewSettings] Plugins=audiothumbnail ``` in their `dolphinrc`. It can be any PreviewSettings plugin, as long as there it at least one. Check the bug report for more, but in short, the bug is reproducible like this: ``` create folder tree inside a test folder with mkdir -p 1/A/B/C/D/E/F/G/H/I mkdir -p 2/A/B/C/D/E/F/G/H/I mkdir -p 3/A/B/C/D/E/F/G/H/I make sure you see the test folder, and expand it expand folder 1, no need to expand all sub folders expand folder 2 collapse and expand test folder 3 loses its expansion arrow if all folders are expanded, only 3 keeps its order if 1 and all its subfolders are expanded, then test is toggled, folder 2 also loses its expansion arrow ``` Video of the bug: ![Screencast_20231207_112700](/uploads/4fad2a62a5a9a67760fa7faa8e3bec40/Screencast_20231207_112700.webm) The path to the bug is: `KFileItemModelRolesUpdater::slotPreviewFailed` -> `KFileItemModelRolesUpdater::applyResolvedRoles` -> `KFileItemModelRolesUpdater::rolesData` -> `KFileItemModelRolesUpdater::startDirectorySizeCounting`. This causes Dolphin with preview plugins enabled trying to count the directories again, and the data gets reset even if there is something there. This then resets the `isExpandable` flag and that breaks the treeview, causing all kinds of issues, like being able to expand non-directories and makes things out of sync. BUG:477607
2023-12-08Do not cache indexes across async tasksDavid Edmundson
Capturing an index is unsafe as it could be out of date when this is processed. The user could have changed directory inserted a file or changed sorting order.
2023-11-21Create thumbnails with scene devicePixelRatioKai Uwe Broulik
2023-11-21views: Use scene devicePixelRatio rather than qAppKai Uwe Broulik
When possible, use the devicePixelRatio from the scene which on Wayland unlike the QApplication will properly support fractional scaling. A KItemViewsUtils class is introduced that can be reused elsewhere.
2023-11-18Make main view react to context menu eventsFelix Ernst
Before this commit, Dolphin's main view would not react to any context menu events. It only showed context menus based on hard-coded mouse or keyboard events i.e. mouse right-click and presses of the "Menu" key. This commit removes those hard-coded reactions and instead makes it so the view shows a context menu whenever a QContextMenuEvent is received. Therefore, a context menu will now be opened when any platform- or system-specific context menu triggers are invoked e.g. the Shift+F10 keyboard shortcut. Aside from this, the only side-effect is a partial removal of an unrelated bug: Previously, the hover highlight on items was never cleared when the header column in details view mode was hovered. With this commit, the hover is now correctly cleared most of the time.
2023-11-13Remove hover fadein/fadeout animation for KItemListWidgetPiruzzolo Piruzzolo
Removes hover fade animations for the file item. Hovering is more effective when it provides instant feedback. Over the years, we have moved in the direction of removing animations entirely from our hover-based list and grid views to alleviate a perceived sluggishness.
2023-11-08Improve size adjustment of itemlist editorYifan Zhu
Currently multi-line file names in dolphin only display a single line when renaming. This commit ensures multi-line filenames have all lines displayed by calling `document()->adjustSize` in `KItemListRoleEditor::autoAdjustSize`, and by calling the latter function after setting up the editor. BUG: 452587
2023-11-08Adapt to KConfigGroup name officially being a QString typeFriedrich W. H. Kossebau
GIT_SILENT
2023-10-24Merge branch 'master' into kf6Nicolas Fella
2023-10-23Display newline in filename as Unicode line breakYifan Zhu
BUG: 422998 CCBUG: 444747
2023-10-23Fix rubberband selection on icon in icon view modeFelix Ernst
As an unintended side-effect of d9a18b04ea0b1b4e427f45083fdc0cdec87cbbfd items would no longer be selected in icon view mode when the selection rectangle intersected with the item's icon. This commit fixes this.
2023-10-19Replace a deprecated qAsConst with std::as_constFelix Ernst
2023-10-17KItemListView: add view position in scrollToItem()Amol Godbole
An item, on being scrolled to, is always located at the nearest edge of the view. This is not always convenient. Allow specifying where the item should be positioned with respect to the view in scrollToItem(). BUG: 423884
2023-10-05Merge branch 'master' into kf6Nate Graham
2023-10-05Fix accessibility ancestor treeFelix Ernst
Before this commit, KItemListViewAccessible would always return nullptr as its parent. This meant that accessibility software would have to guess to which window/hierarchy the KItemListView belongs to. Guessing shouldn't be necessary here. This commit makes sure that the KItemListView always returns a sensible parent in the accessible hierarchy. It does so by explicitly setting the accessible parent for every KItemListView after construction in the DolphinView contructor. Since KItemListView now always knows about its accessible parent, the accessibleInterfaceFactory can always ask the KItemListView for that information when constructing the QAccessibleInterfaces. Fixes https://invent.kde.org/system/dolphin/-/issues/47.
2023-10-05KItemListWidget: make unfocused alternate background slightly lighterMéven Car
2023-09-23selection: fix rubberband verticesMarco Savelli
2023-09-23selection: select-on-rubberband-on-row as new defaultMarco Savelli
Sets a rectangular, non-full-width rubberband as the new default. User selection is made wherever the rubberband intersects with the row.
2023-09-10Merge remote-tracking branch 'origin/master' into kf6Méven Car
2023-09-10Replace qAsConst with std::as_constMéven Car
2023-09-05KItemListView: Fix inconsistencies in requiredWidth calculationAmol Godbole
Commits d3839617 and 3bf471e0 introduced a few changes to requiredWidth calculation. This commit makes the calculation of requiredWidth consistent across KItemListView.
2023-09-04KFileItemModel: Delay emitting currentDirectoryRemoved() signalAmol Godbole
The KCoreDirLister object is modified before KCoreDirListerCache::deleteDir() returns because the signal currentDirectoryRemoved() is emitted. This prevents removal of the deleted lister from dirData.listersCurrentlyHolding in KCoreDirListerCache::forgetDirs() when the tab is closed, which causes the crash described in the bug. Hence, the signal currentDirectoryRemoved() is delayed to ensure this does not occur. BUG: 473377
2023-09-02Add focusOut and focusIn event support for KFileItemListView and update ↵Méven Car
selected widget on focus change
2023-09-02k[standard]itemlistwidget: Account for view focus in selection highlightOliver Beard
2023-08-29Fix a bunch of clazy warningsMéven Car
2023-08-28Clean obsolete ifdefs since dolphin requires KF 5.101+Méven Car
2023-08-23KStandardItemListWidget: Render pixmap with explicit dprKai Uwe Broulik
Instead of using the one from QApplication, use the one from the window.
2023-08-23Merge branch 'master' into kf6Méven Car
2023-08-20KItemListView: Use own palette rather than go hunt for the sceneKai Uwe Broulik
Documentation for `QGraphicsWidget::palette` says: > When a widget's palette changes, it resolves its entries against its > parent widget, or if it doesn't have a parent widget, it resolves against the scene. So I don't see why we would need to do that ourselves. More importantly, though, it seems in Qt 6 the palette isn't updated in time, so when changing color schemes, Dolphin picks the old color instead of the new one, leading to illegible font when e.g. switching between Breeze Light and Dark.
2023-08-13Don't compute size for non-local urlsMéven Car
Hide progressInfo for listDir job on the non-recursize path. BUG: 472912
2023-08-10Merge branch 'master' into kf6Nicolas Fella