┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/selectionmode
AgeCommit message (Collapse)Author
2025-10-21Bottomcontentscontainer: don't pass a parent for a sub-layoutMéven Car
Layouts are parented to their containing layout by default, and layouts can't share a same parent. This prevent a runtime warning regarding QLayout.
2025-09-03Fix several user-facing and non-user-facing typosKunda Ki
Found via `codespell -S "*.desktop,*.po,*.svg,*.xml,./po" -L aparent,childs,goup,lokal`
2024-12-29Have special keyboard controls in selection modeFelix Ernst
Prior to this commit keyboard controls and behaviour of Dolphin's main view were identical no matter if selection mode was enabled or not. While selection mode makes it impossible to accidentally clear the selection by singular mouse clicks, any press of an arrow key on the keyboard would still clear the full selection which goes against selection mode's objective. Furthermore, keyboard-only users had no reason to ever enable selection mode because it made no difference to them. This commit changes this by offering a changed control scheme for key presses while in selection mode. Arrow key presses without modifier now only move focus between items but do no longer clear or change the selection. Similarly, Page Up/Down, Home, and End key presses only move keyboard focus. Enter, Return, and Space key presses now only toggle the selection for the current item. The above controls are however mostly unchanged when combining them with Modifier keys like Shift or Control. The type-ahead feature is also changed in selection mode to only move keyboard focus without changing the selection. This way keyboard users are less likely to clear their selection by mistake. Regression tests are added for these selection mode controls. The code changes to change this keyboard behaviour are quite minimal. Most of the added code is for making selection mode accessible. That's because we need to make sure the changed control scheme is properly announced and communicated or a blind user will be left utterly confused why the normal keyboard controls "stopped working". Enabling or disabling selection mode is announced to accessibility software. Furthermore whenever focus goes to the main view, the selection mode state is also mentioned when active. BUG: 458091
2024-09-29Add missing include mocLaurent Montel
2024-06-16Prefer en_US, "colour" -> "color"Marius P
2024-04-17Fix crash while entering selection mode with Qt6.7Felix Ernst
`deleteLater()` on a non-existing object seems to cause a crash with Qt6.7. This makes some sense but wasn't the case previously. I didn't test this yet but it is a harmless change so if anyone can confirm we can IMO merge directly. This was brought up in https://invent.kde.org/system/dolphin/-/merge_requests/764#note_920935, reported in the bug linked below, and the sentry crash reporting page also has a few dozen reports (https://crash-reports.kde.org/organizations/kde/issues/13589/?project=4&query=is%3Aunresolved&referrer=issue-stream&stream_index=1). Dolphin 24.02 is also affected but we are already past the last bug fix release for it. BUG: 485599
2024-03-13Animate most of the barsFelix Ernst
When a bar is toggled visible this usually happens because the user might want to use its functionality now. However, if bars appear without animation or at a location the user is not currently looking at, they might not notice that they have appeared at all. An animation makes it more likely that the user notices the change and can then use the newly made visible component. Another reason for animations for showing or hiding of components is that it can be disorienting for users when panels or bars suddenly appear or disappear without animation. There is no visible movement then, so the user might not know what happened if they didn't concentrate or blink at that moment. The newly appearing or disappearing component might also displace other components which can make it difficult to find what one was just looking at. These bars animate now after this change: - Search panel - Filter bar - Status bar This is implemented by extracting the animation code from SelectionMode::TopBar into a new abstract base class AnimatedHeightWidget. This class is now also used in SelectionMode::BottomBar and the animating code there was removed. These bars are left in Dolphin that stay without animation: - Menu bar (Would probably need to be implemented in KXmlGui) - Tool bar (Would probably need to be implemented in KXmlGui) - Tab bar (Needs a different appraoch because it already inherits QTabBar and therefore can not inherit AnimatedHeightWidget)
2024-03-09Handle deprecation of QGuiApplication::paletteChangedMéven Car
NO_CHANGELOG
2023-08-29Fix a bunch of clazy warningsMéven Car
2023-07-05Add explicit moc includes to sources for moc-covered headersFriedrich W. H. Kossebau
* speeds up incremental builds as changes to a header will not always need the full mocs_compilation.cpp for all the target's headers rebuild, while having a moc file sourced into a source file only adds minor extra costs, due to small own code and the used headers usually already covered by the source file, being for the same class/struct * seems to not slow down clean builds, due to empty mocs_compilation.cpp resulting in those quickly processed, while the minor extra cost of the sourced moc files does not outweigh that in summary. Measured times actually improved by some percent points. (ideally CMake would just skip empty mocs_compilation.cpp & its object file one day) * enables compiler to see all methods of a class in same compilation unit to do some sanity checks * potentially more inlining in general, due to more in the compilation unit * allows to keep using more forward declarations in the header, as with the moc code being sourced into the cpp file there definitions can be ensured and often are already for the needs of the normal class methods
2023-06-04Update my eMail to the KDE-provided oneFelix Ernst
GIT_SILENT NO_CHANGELOG
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2023-01-08Fix potential nullptr de-referenceFelix Ernst
The `break` that is replaced by a `return` here would only break out of the innermost while loop so the std::vector::end could still become accessed after that. By returning here we completely exit out of both nested loops and therefore don't access the std::vector::end.
2022-12-26Not use forward and includesLaurent Montel
2022-12-20Remove duplicate headers between cpp/h filesLaurent Montel
2022-10-15Fix dismiss button in selection mode paste barFelix Ernst
This one liner changes the signal that is emitted when the "Dismiss" button is pressed on the Paste bottom bar in selection mode. Before this commit, the `leaveSelectionModeRequested()` signal was used but it had no effect because technically the selection mode isn't active anymore when the paste bar is shown. Everything works as expected if instead `barVisibilityChangeRequested()` is emitted.
2022-09-26Remove unused includesLaurent Montel
2022-09-15Trigger "Exit Selection Mode" button on clicked and not on pressedFelix Ernst
This way it works just like every other button. This commit also removes two empty files that sneaked in by accident.
2022-08-14Add "Invert Selection" and "Select All" to bottom barFelix Ernst
In selection mode, a bottom bar with contextual actions appears when at least one item is selected. This commit makes it so this bottom bar also contains the "Invert Selection" and "Select All" actions so users have more complete control over changing what is and isn't selected while in selection mode.
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-14Address Nate's UX feedbackFelix Ernst
-More labels -More icons -"Abort" -> "Cancel"
2022-08-14Improve naming consistency and leave mode on EscapeFelix Ernst
2022-08-14Improve code qualityFelix Ernst
2022-08-14Better separation of classesFelix Ernst
Make obvious when actions trigger selection mode.
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