In short:
> The above change moves the `m_view->setFocus()` towards a point in time in
> which `DolphinViewContainer`'s selection mode state is consistent again.
Akseli Lahtinen [Fri, 15 Dec 2023 13:07:12 +0000 (13:07 +0000)]
Resort directory size count after refreshing
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
Akseli Lahtinen [Fri, 8 Dec 2023 10:59:19 +0000 (10:59 +0000)]
Do not reset expandability when loading previews
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:
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.
David Edmundson [Thu, 7 Dec 2023 11:14:45 +0000 (12:14 +0100)]
Do not cache indexes across async tasks
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.
Felix Ernst [Fri, 24 Nov 2023 11:18:19 +0000 (12:18 +0100)]
Reduce status bar minimum width
This is to make sure that when the window is resized it is less
likely that the places panel will be resized only because the
status bar doesn't want to become very narrow in width.
Felix Ernst [Sat, 18 Nov 2023 11:31:00 +0000 (12:31 +0100)]
Turn free space label into a flat button
The usage of a label to show this space information is problematic
because there are features/actions hidden behind clicking the
label. A button makes this clear. It also fixes the accessibility
of this control because previously this info would never be read
out by screen readers as it couldn't get keyboard focus.
A side-effect of this change is that the free disk space bar looks
more normal with non-Breeze styles. This had been a long-standing
issue.
Felix Ernst [Mon, 13 Nov 2023 16:50:24 +0000 (17:50 +0100)]
Make main view react to context menu events
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.
Felix Ernst [Wed, 15 Nov 2023 10:48:31 +0000 (11:48 +0100)]
Fix accessibility ancestor tree for folders panel
This is a followup to 549fad2daeeccac53b88b4777dcc9effbc2110e5.
That previous commit made sure that the accessibility tree for
Dolphin's main view was complete even though the view had no
parent by explicitly setting an accessible parent.
The folders panel also has a view though and that previous commit
did not contain an explicit call to also set an accessible parent
for it. This commit rectifies that.
Fixes a sanity check & crash in the debug build.
Belongs to Dolphin issue #47.
Carl Schwan [Sun, 12 Nov 2023 11:01:41 +0000 (12:01 +0100)]
Remove some frames from the settings
QTabWidget with setDocumentMode is more adapted as the QTabWidget in the
settings are filling the whole view and we only need to draw a separator
at the top.
Remove hover fadein/fadeout animation for KItemListWidget
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.
Felix Ernst [Wed, 8 Nov 2023 15:32:51 +0000 (16:32 +0100)]
Align location bar splitter with view area splitter
https://commits.kde.org/breeze/18734eea941446d81624a505a18ceed132f0f480
has turned the splitter in our default Breeze style visible. This
made it very apparent that the two splitters visible when Dolphin
is in split view area mode are not aligned perfectly. The
computation is slightly off because the width of the splitter
itself was not taken into account. This commit fixes this.
Yifan Zhu [Wed, 25 Oct 2023 01:40:39 +0000 (18:40 -0700)]
Improve size adjustment of itemlist editor
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.