┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kstandarditemlistview.cpp
AgeCommit message (Collapse)Author
2026-01-22clang-tidy: use default for trivial constructorMéven Car
2025-06-12DolphinView: Conform to global scroll speedAleksandr Borodetckii
One scroll with the mouse wheel is supposed to scroll the view by QApplication::wheelScrollLines, however previous to this commit Dolphin scrolled the view by QApplication::wheelScrollLines^2 instead, which was wrong and way too much. This commit fixes this by defining one line height as the height of the current default font. This value is multiplied by QApplication::wheelScrollLines to determine the scroll amount per mouse wheel scroll. In details view mode however, where there really are rows to go by, this commit makes sure to always scroll by full rows. The number of rows to scroll is determined by rounding up from the scroll amount used in the other view modes. Co-authored-by: Felix Ernst
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-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-10-27Make details view mode's full row activation optionalFelix Ernst
In d3839617193e92463806580699caa595c892b8a6 the details view mode was changed in a way that made the full row of an item the click target instead of only having the item's icon and text be the representative clickable area of an item. This commit makes this new behaviour optional through a setting which can be changed in Dolphin's settings dialog. The explanation for introducing yet another setting in this case is as follows: While the introduced change is an improvement for many typical workflows, there are some workflows for which this new behaviour is problematic. Quite prominently a usage of Dolphin that tries to maximise information density is made worse by the change because now side padding is necessary to click the view's background. While the side padding is and was optional, disabling it made switching the active view in split view mode more difficult among other things. For a more complete discussion about the issues, please check out the bug report(s) and the discussion in Dolphin's gitlab issue with number 34. Co-authored-by: Ivan Čukić <[email protected]> BUG: 453700 FIXED-IN: 22.12
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
2020-10-23Compile without foreachAlexander Lohnau
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.
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2018-03-29[KItemListView] Check if KItemListStyleOption actually changed before ↵Kai Uwe Broulik
emitting a change This avoids work being done when it doesn't need to be. For instance, the preview generator waits for everything to have settled using a 200ms timer before generating a preview. This timer fired also in response to onStyleOptionChanged and needlessly delayed preview generation when navigating between folders despite the style option (e.g. icon size, view mode) not having changed. Differential Revision: https://phabricator.kde.org/D11481
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-03-03Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2015-02-06Fix includesMontel Laurent
2014-11-10make use of initializer listsEmmanuel Pescosta
2014-10-27Port to QDebug*. KVBox--Montel Laurent
2014-06-29Remove the automoc noiseChristophe Giboudeaux
2013-07-24Make sure that widgets are initialized when changing the view modeFrank Reininghaus
The problem was that DolphinItemListView overrides the virtual function onItemLayoutChanged() without calling the base class implementation. Therefore, KStandardItemListView::updateLayoutOfVisibleItems(), which calls initializeItemListWidget(), is never called. This patch refactors the "change item layout"/"supports item expanding" code a bit to make it more robust and fix the problem that the view looks "messed up" when switching from Details View without expandable folders to Icons View. I'm only pushing this patch to master (going to be KDE 4.12). The patch is a bit too intrusive for the KDE/4.11 branch for my taste at this point of the release cycle, and the bug is not a real showstopper. If it works well in master, one could consider backporting it to a 4.11.x bug fix release. Thanks to Emmanuel Pescosta for helping to analyze this issue. BUG: 302703 REVIEW: 111632 FIXED-IN: 4.12.0
2013-02-17Prevent repeated re-layouting of all items while previews are generatedFrank Reininghaus
There was some code in KStandardItemListView::itemSizeHintUpdateRequired already that was supposed to prevent an expensive re-layouting of all items when a preview is received. However, it didn't quite work as intended because also the "iconOverlays" role changed. The new approach is to only re-layout if text of a visible role changes, because this is the only way how the space needed by an item might change (see KStandardItemListWidgetInformant::itemSizeHint()). BUG: 315315 FIXED-IN: 4.10.1 REVIEW: 108984
2012-07-18Respect platform's icon sizesChristoph Feck
Use QStyle icon sizes instead of hard coding 16 or 32 pixels. Using styles that follow KDE settings (every KStyle, e.g. Oxygen) the icon sizes can be configured by the user in System Settings. The size for the icon/details view can be later changed by the user, overriding the defaults. The icon size for the places panel is not (yet?) configurable separately. (Not resolving the bug, see comment in review request) CCBUG: 301959 REVIEW: 105548
2012-04-24Provide additional default groups for the Places PanelPeter Penz
If Nepomuk is enabled, it is now possible to easily search for some most common queries by having additional groups.
2012-04-21Prepare view-engine for non-KFileItem usecasePeter Penz
Up to now the view-engine only provided a model-implementation that supports file-items. The view-engine always had been designed to be able to work with any kind of model, so now a KStandardItemModel is available. The plan is to convert the places panel to the new view-engine. It should be no problem to fix this until the feature freeze - in the worst case the places-panel code could be reverted while still keeping the KStandardItemModel changes.