┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.cpp
AgeCommit message (Collapse)Author
2024-03-30Fix layout in Compact View mode for RTLEugene Popov
This MR fixes the layout in Compact View mode when items are grouped.
2024-03-27Better support for RTLEugene Popov
This MR fixes some issues related to RTL scripts: - wrong layout in Compact View mode - broken horizontal scrolling in Icon View and Details View modes - broken navigation with left and right arrow keys in Details View mode BUG: 484012 BUG: 449493
2024-03-23KItemListView: Improve scrollToItem()Eugene Popov
Prevent an item with a long name from scrolling to the right edge when navigating in Compact View mode.
2023-11-18Make main view react to context menu eventsFelix Ernst
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.
2023-10-24Merge branch 'master' into kf6Nicolas Fella
2023-10-17KItemListView: add view position in scrollToItem()Amol Godbole
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(). BUG: 423884
2023-10-05Merge branch 'master' into kf6Nate Graham
2023-10-05Fix accessibility ancestor treeFelix Ernst
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. Fixes https://invent.kde.org/system/dolphin/-/issues/47.
2023-09-10Merge remote-tracking branch 'origin/master' into kf6Méven Car
2023-09-10Replace qAsConst with std::as_constMéven Car
2023-09-05KItemListView: Fix inconsistencies in requiredWidth calculationAmol Godbole
Commits d3839617 and 3bf471e0 introduced a few changes to requiredWidth calculation. This commit makes the calculation of requiredWidth consistent across KItemListView.
2023-09-02Add focusOut and focusIn event support for KFileItemListView and update ↵Méven Car
selected widget on focus change
2023-08-20KItemListView: Use own palette rather than go hunt for the sceneKai Uwe Broulik
Documentation for `QGraphicsWidget::palette` says: > When a widget's palette changes, it resolves its entries against its > parent widget, or if it doesn't have a parent widget, it resolves against the scene. So I don't see why we would need to do that ourselves. More importantly, though, it seems in Qt 6 the palette isn't updated in time, so when changing color schemes, Dolphin picks the old color instead of the new one, leading to illegible font when e.g. switching between Breeze Light and Dark.
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-02-18DolphinView: Allow to have tootips on columns headersMéven Car
Add events columnHovered/columnUnHovered to KItemListview and KItemListHeaderWidget.
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
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-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-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-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-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-13Fix zooming animationEugene Popov
Current implementation of the zooming animation is a bit buggy. This MR fixes the following issues: * in the Icon view mode, the icons sometimes "jump" * in the Compact view mode, the labels sometimes are cut off BUG: 449179
2022-01-16Full row highlight implementationTom Lin
This commit implements full-row selection and hover highlights for the details view mode. This commit also contains fixes for 444680, 444753, both uncovered during this change. BUG: 181438 BUG: 444680 BUG: 444753 FIXED-IN: 22.04
2021-12-28kitemlistview: Port KItemListView::itemAt to std::optionalFushan Wen
Use `value_or(-1)` for those functions that don't use `std::optional`.
2021-12-28Add name-only tooltip and make logicalHeightHints a pair of qreal and boolLeo Treloar
2021-12-06Fix various typosluz paz
Found via `codespell -q 3 -S *.desktop,*.xml`
2021-12-01Port deprecated QFontMetrics::horizontalAdvanceAlexander Lohnau
2021-05-29Revert "Improve padding in the Places View"Eugene Popov
This reverts commit e9a39700fc004004b1ff231023e9d5333a2b8317.
2021-04-19When renaming files, move to next file using tab key or up/downMéven Car
To rename previous file: Up or Shift-Tab To rename next file: Down or Tab Credit goes to msciubidlo FEATURE: 403931 FEATURE: 269987 BUG: 334533 FIXED-IN: 21.08
2021-04-09Remove dead variableMéven Car
2021-02-10Remove item move animation on view resizeFelix Ernst
This commit removes an animation that happens when the view is resized. Before this commit, whenever the geometry of the view changed, the items in the view drifted towards their new position in the layout after a 300 ms delay. It would look like the items are slow to find their position. This commit simply moves them to their new position in an instant which will abort any ongoing move animations.
2020-11-28[kitemlistview]: Animate rubberband fading outCarson Black
2020-11-08Iterate over a const copy list of containersIsmael Asensio
This effectively reverts the mutable iterations approach on 2448f88c5f42d7a2040fcf3bcd3c5f2a2f62cd03, and fix crashes and ghost items when using the filter bar BUG: 428374
2020-11-04Improve padding in the Places ViewEzike Ebuka
2020-10-24Use mutable iterators where requiredAlexander Lohnau
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-10-23Compile without foreachAlexander Lohnau
2020-09-26Allow interaction with folder/files with the stylus againSteffen Hartleib
This Patch works for Wayland and X. BUG: 426582
2020-09-13Improve Touch supportSteffen Hartleib
With this patch dolphin now supports the following touch gestures: * Tap gesture to interact/open with directories, files and so on * TapAndHold and release gesture for access to the context menu (main window, panel folder, places and information) * TapAndHold and moving gesture for drag and drop action (main windows, panel folder and places) * pinch gesture for zoom in main window * kinetic scrolling (QScroller) for main window, panel folder, panel places, panel information, setting preview and service * two fingers swipe gesture to left, right and up as shortcut to navigate back, forward and up * two finger tap gesture to toggle item selection, similar to Ctrl and left mouse click FEATURE: 385066 FIXED-IN: 20.11.80 You are currently rebasing branch 'touch' on '85241a924'.
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2020-01-27Merge branch 'release/19.12'Nate Graham
2020-01-27Change drop indicator colorGeorge Vogiatzis
Summary: Change drop indicator color form highlight to text. This makes more visible, when indicator is adjacent to a highlight item, of a list. BUG: 415010 Test Plan: Before vs After {F7974679} Reviewers: #dolphin, #vdg, elvisangelaccio, ngraham Reviewed By: #dolphin, #vdg, ngraham Subscribers: meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26936
2019-12-21Merge branch 'release/19.12'Nate Graham
2019-12-21Improve scroll wheel speed by basing it on label height, not icon heightNate Graham
Summary: Dolphin currently scrolls by the height of three items at a time per "step" when using a scroll wheel. Because item height is highly variable, this leads to scroll speed being inconsistent between views, and generally far too fast when using icon view with icons larger than 22px size. This patch makes the size of the scroll step based on the text label rather than the icon size just like D25683, ensuring that the scroll speed does not vary and become super fast when using large icons in particular. It also reverts 90beb4a5e37b887caad1e767046a42dad0af1ab3, which is no longer needed. BUG: 386379 FIXED-IN: 19.12.1 Test Plan: Use a mouse with a scroll wheel and scroll in Dolphin item views with list view, details view, icon view, etc, using different item sizes. Speed should be consistent in all views now, and also feel consistent with other KDE apps. Also try with multiple scale factors to make sure the behavior does not change. No change with high-resolution two-finger touchpad scrolling. Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: ahiemstra, lots0logs, anthonyfieroni, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19190
2019-11-16Use URLs with transport encryptionYuri Chornoivan
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-03-10port to std::stable_sortLaurent Montel
2018-12-03KItemListWidget: Use initStyleOptionAnton Kreuzkamp
Instead of using QStyleOption::initFrom, let's use QGraphicsWidget::initStyleOption, which is made for exactly the purpose of KItemListWidget. This is especially important since, according to the docs of QGraphicsItem::paint "The widget argument is optional. [...] For cached painting, widget is always 0.". Even though currently no code in dolphin does cached painting, for the sake of modularity one should not rely on widget to be non-null. Using QStyleOption::initFrom does assume that, though. In fact, GammaRay asks the items to do cached painting when attaching it to the application, causing it to crash.
2018-07-04Use more nullptrFriedrich W. H. Kossebau