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.
Felix Ernst [Mon, 23 Oct 2023 14:26:52 +0000 (14:26 +0000)]
Fix rubberband selection on icon in icon view mode
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.
Felix Ernst [Mon, 16 Oct 2023 14:50:07 +0000 (16:50 +0200)]
Never show status bar context menu away from status bar
The status bar context menu was hard-coded to always appear at the
cursor position. However, context menus can also be triggered by
keyboard, for example with the Menu key, in which case it makes no
sense to show the context menu at whatever random position the
mouse cursor currently is.
Instead invoke the context menu in the middle of the status bar
when it is opened by keyboard.
Amol Godbole [Sat, 14 Oct 2023 02:08:35 +0000 (21:08 -0500)]
KItemListView: add view position in scrollToItem()
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().
Felix Ernst [Mon, 16 Oct 2023 14:32:24 +0000 (16:32 +0200)]
Remove new tab shortcut Ctrl+Shift+N
Since https://commits.kde.org/kconfig/782e43f8076e5f4a10111a6b4d2cc6b1741c9798
Ctrl+Shift+N is the standard shortcut for creating a new folder
which leads to a shortcut conflict when this key combination is
invoked in Dolphin.
"New Tab" already has the more popular shortcut Ctrl+T assigned to
it, so Ctrl+Shift+N can simply be removed.
Amol Godbole [Wed, 11 Oct 2023 03:39:03 +0000 (22:39 -0500)]
DolphinView: get rid of writeStateChanged signal in setActive()
The signal writeStateChanged() was not working because it is not connected
to slotWriteStateChanged() slots when the active view changes. Replace the
signal with direct calls to the slots.
Also, do not delay openRequest signal in DolphinSearchBox::slotSearchTextChanged.
It's no longer required.
Felix Ernst [Fri, 8 Sep 2023 15:10:29 +0000 (17:10 +0200)]
Add test for accessibility ancestor tree
This is to make sure that all items that can be tabbed to and their
accessible children have the main window somewhere in their
ancestry/ancestor tree.
Felix Ernst [Mon, 17 Jul 2023 14:13:51 +0000 (17:13 +0300)]
Fix accessibility ancestor tree
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.
Amol Godbole [Wed, 4 Oct 2023 02:38:47 +0000 (21:38 -0500)]
DolphinViewContainer: Keep search box open when URL is changed
The search box was being automatically closed whenever the URL is changed.
Keep the search box open if no search text had been entered when the URL
was changed.
Méven Car [Fri, 29 Sep 2023 07:29:16 +0000 (09:29 +0200)]
DolphinPlacesModel: remove usage of alternativeApplicationName
This is now not needed anymore since `PlacesItemModel::cleanupBookmarks` (now removed) from https://phabricator.kde.org/D9333 has run for on users systems.