┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
AgeCommit message (Collapse)Author
2022-08-14Simplify implementation of mouse long-press detectionFelix Ernst
Now uses the same method as for touch long-press detection.
2022-08-14Don't show selection toggle areas on files while in selection modeFelix Ernst
2022-08-14Address Nate's UX feedback: Episode 2Felix Ernst
- Make Esc leave selection mode and have it only clear selection when already outside selection mode. - Let translators know that the "More" overflow button should only have a short text on it. - Fix a crash that happened when any code tried to exit selection mode even though selection mode had never been enabled to begin with.
2022-08-14Make touch tap to select items work in selection modeFelix Ernst
Thanks to Steffen Hartleib for the help.
2022-08-14Improve naming consistency and leave mode on EscapeFelix Ernst
2022-08-14Keep working towards a reviewable stateFelix Ernst
- Various code improvements - Smoother animations - The bottom bar in General Mode only becomes visible if items are currently selected - Removed the selection mode action from the default toolbar since it can already be toggled in various ways - More documentation - Some cleaning
2022-08-14Add Selection ModeFelix Ernst
The selection mode action is a checkable toggle action named "Select Files and Folders" which has "Space" as the default shortcut. In selection mode a bottom bar with contextual actions is shown. These should mostly mirror the actions which are available through the right-click context menu aka DolphinContextMenu. Resizing of the window might make a overflow button appear in the bottom selection mode bar. This commit makes press and hold in the view activate selection mode. This behaviour is not triggered if the press and hold is used to either start a rubberband selection or a drag operation within a short time. The length of the short timeframe is defined by a QStyleHint. This is currently not implemented in touch because I can't test it. Mix the selection mode bars' background colors using a nice combination of colors from the current color scheme BUG: 427202
2022-07-18Remove references to KServiceTypeTrader in commentsNicolas Fella
2022-07-18KItemListHeaderWidget: Use QHeaderView fontKai Uwe Broulik
Makes it consistent with "real" tab widgets.
2022-07-11portalize drag urlsHarald Sitter
this enables sandboxed application to receive drop events
2022-06-16Don't consider drops on a row as drops on the row's itemFelix Ernst
Since d3839617193e92463806580699caa595c892b8a6 in details view mode clicking anywhere within the row is considered a click on the item. That commit also changed it so that dropping files anywhere inside a row would make it so the files are received by the folder of that row. This commit reverts the drop behaviour to be identical to the old one. I am having trouble explaining why this is better because one can look at it in different ways. Bottom line is that one doesn't really feel like one is dropping files inside a folder unless the mouse cursor is actually directly above a folder's icon or name. Another argument is that it is normal behaviour to just throw files onto an application and the files then being opened by it. Having potentially large parts of the view area covered by the rows of folders means that there has to be more of a conscious effort to not drop the files inside one of the folders by accident while with this commit one has to aim precisely onto a folder to do it intentionally. CCBUG: 453700
2022-06-15Cleanup config-dolphin.h includesAhmad Samir
2022-06-15Use cmakedefine01Ahmad Samir
This way we get a build time warning if the var isn't defined at all, e.g. a missing check_include_files() CMake call.
2022-06-15Use one config-dolphin.h.cmake configuration fileAhmad Samir
2022-06-11Fix install/load plugins from kf<version>Laurent Montel
2022-06-07KItemListView fix valgrind issue "Conditional jump or move depends on ↵Marius P
uninitialised value" KItemListView::setAlternateBackgrounds(bool) (kitemlistview.cpp:489) In C++, a data member of an object is not automatically initialized to "zero". In this case a bool had random values such as the integer 255.
2022-05-31Port away from copying QEvent when building with Qt6Ahmad Samir
Copying QEvent in Qt6 isn't allowed, instead use clone().
2022-05-31kfileitemmodel: sortRoleCompare: allow to sort by access time.Méven Car
We had all sorts of weird behavior when sorting by access time. The comparison was simply missing in sortRoleCompare.
2022-05-27Remove hover highlight before opening view context menuFelix Ernst
If one was fast to open the right-click context menu on the row of an item in details view mode, the hover highlight would persist while the context menu for the view was open. This one-liner makes it so the highlight on the row is always removed before the right-click context menu for the view is opened so it is as clear as possible that the newly opened context menu has no relation to the fileItem.
2022-05-27Fix paste on row while in details view modeFelix Ernst
Before this change, right-clicking the row of an unselected item in details view mode would be in a weird state: - It didn't really count as a click on the item because the item didn't get selected by this click before opening the context menu. - It didn't really count as a click on the view background either because the actions that showed up depended on the item in that row. This commit fixes this by considering a right-click in the same row as an unselected item as a click on the view background. The behaviour of right-clicking the icon or name of a file directly is unchanged. This fixes the following bugs: - The Paste action that shows up when right-clicking in the unselected row of a folder now works (instead of doing nothing). It now pastes the clipboard contents onto the view background. - When right-clicking the unselected row of a file (not a folder) a Paste action once again shows up.
2022-05-26Extend selection rectangle to left edgeTravis Burrows
This commit changes it so the sizes of selection rectangles and hover highlights in compact and details view mode is identical for all items. Before this commit, selection rectangles in lists would have varying indentation of the left edge of the selection rectangle depending on the preview image's width-to-height ratio. This would cause a sort of "ragged edge" in both compact and details list view when multiple items were selected. This commit doesn't change anything about icon view mode. BUG: 453046
2022-05-26Change wording "Leading Column Padding" to "Side Padding"Jin Liu
Since it actually adds padding on both left and right sides, "Side Padding" might be more accurate. This change is also propagated to variable and method names. BUG: 453172
2022-05-08KItemList: fix warningsMéven Car
NO_CHANGELOG
2022-05-04REmove duplicate header between header/fileLaurent Montel
2022-05-01Merge branch 'release/22.04'Felix Ernst
2022-05-01Fix icon resize animationEugene Popov
This MR fixes an issue where, under certain conditions, an icon resize animation is performed that shouldn't be there.
2022-04-26Revert "Combine modificationtime, creationtime and accesstime roles into one ↵Eugene Popov
group" This reverts commit b6640f4a135dce194242644d9d0622c0964e8f1d.
2022-04-26Eliminate remarksEugene Popov
2022-04-26Combine modificationtime, creationtime and accesstime roles into one groupEugene Popov
2022-04-26Add the ability to sort by file extensionEugene Popov
Currently, Dolphin doesn't have the ability to sort by file extension (sorting by type means that files will be sorted by mimetype but not by extension). This MR fixes this shortcoming. BUG: 429579
2022-04-20Don't deselect on Ctrl+Right-ClickFelix Ernst
(Part of my work towards !273) Currently, when items are selected and a user right-clicks a selected item while having the Ctrl key pressed down, the item is first deselected and then a context menu is opened that doesn't involve the item that was just deselected. This is slightly confusing because normally one right-clicks an item to see its context menu. Right-click being able to deselect an item seems like unintended functionality in the first place but in this scenario it also means that the intended opening of a context menu for the pressed item doesn't even happen. There is a good chance that nobody is even aware of this behaviour because the normal way to deselect an item would be to Ctrl+Left-Click if anything. Why would someone choose to open a context menu and deselect items in a single step? Why would they have selected an item they don't want to open a context menu for in the first place? Because of a discussion in this merge request deselecting on Ctrl+Middle-Click was also removed for consistency with Ctrl+Right-Click and Ctrl+Shift+Middle-Click. This commit also makes a later implementation of a selection mode more straightforward.
2022-04-19Add additional Document role for "Author"Kai Uwe Broulik
It comes in handy when organizing your books collection
2022-04-09Merge branch 'release/22.04'Felix Ernst
2022-04-08Add symmetric padding on right side of details viewFelix Ernst
There have been some reports that users were unable to figure out that the padding on the left of the left-most "name" column can be used for deselecting or for dropping file items. All of these reports were by people using a Dolphin version in which that padding was way too narrow because of a regression (that has since been fixed). Nonetheless this highlights the potential problem that some users might be unable to notice/figure out the usefulness of the left padding. This commit adds a similar area on the right side of the view when the column widths are set automatically by Dolphin. The width of the right padding column mirrors the width of the left padding column when sized automatically. Both can manually be hidden or resized similarly to resizing other columns. There are various usability advantages to having this padding by default on both sides of the view and not only on the left: - The right margin is more discoverable since the item highlight ends right before the padding column - Less mouse travel time to reach either of the areas - More than double the likelihood of users figuring out the advantages of these padding areas for deselecting or dropping - More visual symmetry I had suggested also having this kind of right padding even before the initial implementation of the left padding. The contributor implementing it was in favour of it. It only wasn't implemented because the contributor said it was impossible without a lot of work. Turns out adding two characters at the right position seems to suffice in most ways. This commit does not contain the string change of renaming "Leading Column Padding" to "Column Padding" (since it changes two paddings now) to not infringe on the string freeze. BUG: 452273
2022-04-04Merge branch 'release/22.04'Felix Ernst
2022-04-04Improve details mode ctrl-press rubberband creationFelix Ernst
Since d3839617193e92463806580699caa595c892b8a6 dragging the highlighted row of already selected items in the details view mode will begin a drag operation of all selected items. As a unintended side-effect of this change, dragging the row of a previously unselected item while holding the control key would also begin a drag operation. After this commit, dragging the row of a previously unselected item while holding the control key in details view mode will instead create a rubberband. Ctrl-dragging the item's icon or text directly will drag the item as expected. With this change, using multiple rubberbands to select scattered items among a list of items should be as convenient as it was previously. BUG: 452181
2022-04-04Merge branch 'release/22.04'Felix Ernst
2022-04-04Revert "KStandardItemListWidget: handle RtL drawing properly"Felix Ernst
This reverts commit 3ce9d1d19e081fbb9acf020f15652175673bcf5c. This reverts commit ddba4f5fd88c4fa855e3f2eb0d9d95a6290d150a. Aside from the two bugs mentioned below, this also fixes another regression: The spacing on the left of the view does now once again follow the size of its column header. BUG: 451704 BUG: 451341
2022-04-01Merge branch 'release/22.04'Felix Ernst
2022-04-01Fix tooltip closing while mouse moves over itemGeorge Florea Bănuș
The itemHovered signal is emitted whenever the mouses moves causing the tooltip to close.
2022-03-23Using the gesture recognizer from KWidgetsAddonsSteffen Hartleib
Using the gesture recognizer from KWidgetsAddons, so that the source code for the gestures is only in one place
2022-03-23Allow for more explicit button labelsFelix Ernst
This commit allows us to very explicitly refer to any set of items in text. This way buttons don't need to be labeled generically like "Permanently Delete" but can be enriched to be labeled "Permanently Delete "FileName"" or "Copy 7 Selected Folders" or "Copy 6 Files" or "Rename "file1", "file2", "file3", "file4" and "folder5"". This commit tries to save translators a lot of work by using a translation puzzle. This might be problematic for some languages. The alternative on the other hand would mean that any label which wants to be explicit would need to have over 10 translations just for one label which seems quite bad as well. A fallback is to be implemented for languages that can't really accommodate for any specific word puzzle. This is explained in the documentation.
2022-03-15Fix some compile error against qt6Laurent Montel
2022-03-04Fix issue where newly inserted items end up in the wrong directoryDavid Edmundson
If we have directory "a" and "a/b" and expand both, then collapse "a" we tell KDirWatcher to stop watching both these directories. However, KDirWatcher keeps them in the listersCurrentlyHolding list as well as the listersCurrentlyListing list and will still notify of changes. If a new file appears in "a/b/" we will still get change notifications. When dolphin processes these changes we cannot find the relevant parent node. It then gets confused and inserts the item into the root directory from the POV of the model notifications. When we then open the relevant folder the model knows a node with that URL exists and fails to add it correctly. This can also be reproduced by continually downloading files into a subdirectory tree and rapidly expanding and collapsing folders a few levels deep.
2022-03-04Always select items on activationFelix Ernst
There is an unintended side-effect in d3839617193e92463806580699caa595c892b8a6 which this MR fixes. Normally in Dolphin, when clicking on an item to open/activate it, it is both selected by the click and opened/activated. Prior to this MR, the item wasn't selected when all of these conditions were met: - Use ActivateItemOnSingleClick also knwon as single-click mode - Have more than one item selected already - Click on an item that was previously not selected Prior to this MR, the click would deselect all items and activate the clicked item but not select it. With this MR, the click will deselect all items, activate the clicked item and also select it and move the anchor there. When testing this with folders, make sure to navigate back after activating the folder. The folder should then still be selected. This is then consistent with the behaviour when the specific conditions mentioned above are not met.
2022-03-03KItemListHeaderWidget: don't crash if widget == nullptrJanet Blackquill
BUG: 449238
2022-02-26KStandardItemListWidget: don't double up the expansion offsetJan Blackquill
2022-02-25Merge branch 'release/21.12'Kai Uwe Broulik
2022-02-25[CompactView] Remove animation on file renameEugene Popov
This MR fixes an issue where the label is cut off when renaming in Compact View mode. BUG: 449179 FIXED-IN: 22.04
2022-02-25KStandardItemListWidget: handle RtL drawing properlyJanet Blackquill
BUG: 449211