Felix Ernst [Wed, 13 Mar 2024 15:39:00 +0000 (15:39 +0000)]
Animate most of the bars
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)
Jin Liu [Tue, 12 Mar 2024 09:43:44 +0000 (09:43 +0000)]
Enable custom view properties for special folders even if "remember for each folder" is off
Special folders include: search, trash, recents, timeline
Not including Downloads, although we have a custom view when "remember
for each folder" is on.
Rational: These folders really need the custom view. So even if the
user selects a global view for all "normal" folders, s/he probably
still want a custom view for special folders.
Nicolas Fella [Fri, 8 Mar 2024 17:46:32 +0000 (18:46 +0100)]
Remove unneeded code for toggeling dockwidget visibility
QDockWidget::toggleViewAction::toggled is emitted when minimizing
the application window on X11 (https://bugreports.qt.io/browse/QTBUG-48161
potentially related). This will cause the dockwidget to be hidden when
minimizing the window.
We don't actually seem to need that connection, triggering the action
(via shortcut or menu) seems to correctly show/hide the dockwidget
without it
Akseli Lahtinen [Fri, 8 Mar 2024 11:37:20 +0000 (11:37 +0000)]
Start autoActivationTimer only if hovering over a directory
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.
Nico Kreipke [Sat, 2 Mar 2024 16:44:41 +0000 (17:44 +0100)]
Add option to completely disable directory size counting
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.
Jonathan Marten [Wed, 6 Mar 2024 14:31:59 +0000 (14:31 +0000)]
Remove 'Id' field from JSON plugin metadata
KPluginMetaData (since kcoreaddons commit be10ddbf) now derives the
plugin ID from the file name and ignores the ID field. Eliminates many
runtime warnings of the form:
konqueror/kf.coreaddons KPluginMetaData::KPluginMetaData: The plugin
"/usr/lib64/plugins/kf6/parts/dolphinpart.so" explicitly states an 'Id'
in the embedded metadata. This value should be removed, the resulting
pluginId will not be affected by it
Jin Liu [Thu, 29 Feb 2024 23:13:47 +0000 (23:13 +0000)]
DragAndDropHelper::updateDropAction: use StatJob for remote URLs
When dragging onto tabs/Places from a remote URL, we don't process
the QDropEvent immediately, but start a StatJob and process the
event when it finishes.
Also, the result of the StatJob is cached for 30 seconds, to avoid
starting duplicate jobs.
Jin Liu [Tue, 20 Feb 2024 12:09:26 +0000 (20:09 +0800)]
Fix: can't drop into remote dir
KFileItem::isDir() only works when it's created from listDir(),
or from a local QUrl. For a remote QUrl, isDir always returns
false, so we can't use that in supportsDropping().
As a workaround, now supportsDropping() always returns true in
remote dirs -- we don't check if a remote dir is writable when
dropping.
Felix Ernst [Mon, 19 Feb 2024 11:32:32 +0000 (12:32 +0100)]
Resolve conflict between activateSoonAnimation and hoverSequenceAnimation
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.
Felix Ernst [Sun, 18 Feb 2024 12:15:18 +0000 (13:15 +0100)]
Add drag-open animation
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
Felix Ernst [Fri, 23 Feb 2024 09:45:53 +0000 (09:45 +0000)]
Avoid searching for the knetattach service on startup
The installed services might change while Dolphin is running, so it is
better to only search when they are actually needed instead.
The very first time such a search happens (e.g. after updating the
system), is also somewhat slow, which could slow down the very first
Dolphin startup.
This commit might also produce a very slight general startup speed
improvement. However, the measured change is within the margin of
error.
Felix Ernst [Fri, 26 Jan 2024 18:12:23 +0000 (19:12 +0100)]
Fix focus chain
Prior to this commit pressing Tab repeatedly would bring the focus to
the end of the status bar but not further.
This commit makes sure the tab focus doesn't get stuck on the invisible tab
bar by explicitly removing the DolphinTabBar from the focus chain while it
is hidden. I don't understand why pressing Tab doesn't do anything for
the invisible tab bar, but removing an invisible and currently useless
widget from the focus chain seems sensible in any case.
Improve the accessibility autotest to prevent regressions concerning this.
Felix Ernst [Tue, 30 Jan 2024 16:12:11 +0000 (17:12 +0100)]
Speed up autoSaveSession test
Normally, the session is only saved after a few seconds. The autotest
waits for that to happen. This commit reduces the time until the session
is saved to a fraction of a seconds which means that the autotest will
complete faster.
Felix Ernst [Wed, 10 Jan 2024 17:47:22 +0000 (18:47 +0100)]
Improve arrow key navigation for right-to-left languages
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.
Felix Ernst [Mon, 22 Jan 2024 17:33:09 +0000 (18:33 +0100)]
Slightly refactor count resorting
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.
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.
Remove popout action from toolbar when split screen is closed
It's pointless to show the popout action when splitscreen is closed,
so we'll remove it as a child of the splitscreen action whenever the
screen is not split.
Joshua Goins [Thu, 30 Nov 2023 03:14:06 +0000 (22:14 -0500)]
Use a separate menu action for split view action
Now that it's a KMenuAction, it becomes impossible to trigger the root
action when it's in a menu. To work around this, we create a new action
that mirrors the state of the original. It also takes the default
shortcut.
If you have a split view open, you can now pop the active half out into a new window by clicking the "Pop out" button in the toolbar or by activating "View > Pop out".