┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistwidget.cpp
AgeCommit message (Collapse)Author
2026-01-22clang-tidy: use default for trivial constructorMéven Car
2025-08-18KItemListWidget: Use strokePath instead of drawPathAkseli Lahtinen
StrokePath gives the focus frame a less blurry look Since the path is bit thinner now, we need to adjust the alpha level to make it easier to see. This is especially visible in dark themes. BUG: 507005
2025-06-20New selection effectsAkseli Lahtinen
This adds a new selection effect that is similar to what we have in QtQuick file item views. There are also changes to some usability: Instead of only the icon and text being the clickable area in icon and details mode, the whole selection is now the clickable area. Otherwise the usability should stay the same, it's mostly a visual change. See also: https://invent.kde.org/teams/vdg/issues/-/issues/94
2025-04-29Clazy fixMéven Car
2024-12-29Mirror details view mode for right-to-left languagesFelix Ernst
This commit implements mirroring of the details view mode for right-to- left languages. This is the last of the Dolphin view modes which did not adapt to right-to-left languages correctly. Implementation-wise this is mostly about adapting the math so all the information is placed correctly no matter the view mode or layout direction. While most of the view actually changes the painting code for right-to-left languages, for the column header I decided to keep the logic left-to-right and instead reverse the order of the role columns. To implement this mirroring I needed to rework quite a bit of logic, so I used the opportunity to fix some bugs/behaviur quirks: - Left and right padding is now saved and restored separately instead of only saving the left padding - Changing the right padding no longer disables "automatic column resizing". - The grip handles for column resizing can now be grabbed when near the grip handle instead of only allowing grabbing when slightly to the left of the grip. - Role column headers now only show a hover highlight effect when the mouse cursor is actually above that role and not above the grip handle or the padding. - There is now a soft-boarder when shrinking the right padding so shrinking the padding "below zero width" will no longer immediately clear automatic resize behaviour. So now it is possible to simply remove the right padding by resizing it to zero width. BUG: 449211 BUG: 495942 # Acknowledgement This work is part of a my project funded through the NGI0 Entrust Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology.
2024-02-23Add drag-open animationFelix Ernst
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
2023-11-13Remove hover fadein/fadeout animation for KItemListWidgetPiruzzolo Piruzzolo
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.
2023-11-08Adapt to KConfigGroup name officially being a QString typeFriedrich W. H. Kossebau
GIT_SILENT
2023-10-05KItemListWidget: make unfocused alternate background slightly lighterMéven Car
2023-09-02Add focusOut and focusIn event support for KFileItemListView and update ↵Méven Car
selected widget on focus change
2023-09-02k[standard]itemlistwidget: Account for view focus in selection highlightOliver Beard
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-06-13Settings Add ViewModes > Content displayMéven Car
This does not move the settings location in files though. baby step for https://invent.kde.org/system/dolphin/-/issues/36
2023-03-09Prevent a non-initialized value accessMéven Car
NO_CHANGELOG
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-08-14Don't show selection toggle areas on files while in selection modeFelix Ernst
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-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-07-04Add support for hover sequence thumbnails (via ThumbSequenceCreator)David Lerch
This shows a slideshow of thumbs when the user hovers a file item.
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.
2020-05-06Keep name readable on drag to matching backgroundChristian Christiansen
Summary: Previously, when a single item was selected and dragged, the name would become unreadable when the text colour matched the background colour it was dragged onto. This is now fixed by not deselecting the item (and hence keeping the highlighting around the text) before creating the pixmap for dragging. BUG: 405266 Test Plan: Tested with Breeze and Breeze Dark. Reviewers: #dolphin, elvisangelaccio, meven Reviewed By: #dolphin, elvisangelaccio, meven Subscribers: meven, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29378
2019-12-26Don't use nullptr/0 as flags (deprecated in qt5.15)Laurent Montel
2019-11-16Use URLs with transport encryptionYuri Chornoivan
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
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-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
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2016-11-21Call columnWidthChanged with actual previous widthDon Nguyen
REVIEW: 129334
2016-08-06Fix some low-hanging warning fruitsMartin T. H. Sandsmark
2015-03-25squash me with a some other commit in kitemlistwidgetinformantDavid Edmundson
2015-03-25Create drag pixmaps which match the device pixel ratioDavid Edmundson
2015-02-06Fix includesMontel Laurent
2015-01-30Port away from KGlobalSettings::graphicEffectsLevel()Emmanuel Pescosta
REVIEW: 122309
2015-01-28Merge branch 'Applications/14.12' into frameworksEmmanuel Pescosta
Conflicts: dolphin/src/main.cpp kdepasswd/kcm/kcm_useraccount.desktop konqueror/settings/ebrowsing/ebrowsing.desktop konqueror/settings/kio/cache.desktop konqueror/settings/kio/cookies.desktop konqueror/settings/kio/netpref.desktop konqueror/settings/kio/proxy.desktop konqueror/settings/kio/smb.desktop konqueror/settings/kio/uasproviders/firefox30oncurrent.desktop konqueror/settings/kio/uasproviders/ie90onwinnt71.desktop konqueror/settings/kio/useragent.desktop lib/konq/konq_operations.cpp
2014-11-09Make sure that m_selectionToggle is not 0 before calling deleteLater()Frank Reininghaus
Commit 1938ad54d4ee640f04d24bad3b690095bc9b8668 replaced delete by deleteLater(). However, the latter cannot be used safely with null pointers. This commit adds a safety check in order to make sure that we do not get a crash. Thanks to Christoph Feck for pointing out this issue.
2014-11-09Use deleteLater() to delete the selection toggle in KItemListWidgetFrank Reininghaus
This patch should make a crash with a backtrace as provided in the bug report impossible. I'm not sure if this would really prevent the crash - it looks like the actual cause of the problem could be in QGraphicsView or anywhere else, but it's hard to tell because the bug was reported just once and does not seem reproducible. But I'm pretty sure that this change doesn't make anything worse. BUG: 334785 REVIEW: 121087
2014-10-27Port to QDebug*. KVBox--Montel Laurent
2014-07-04Merge branch 'master' into frameworksLuca Beltrame
2014-07-04Improve drawing selected items in Compact/Details View and Places PanelFrank Reininghaus
This commit removes the icon tinting for the selected item in Compact and Details View, and extends the selection rectangle such that it includes the icon area as well. The icon tinting can be disturbing, and having a selection rectangle that only includes the text can look a bit strange, especially in the Places Panel. BUG: 304643 REVIEW: 119018 FIXED-IN: 4.14.0
2014-06-29Remove the automoc noiseChristophe Giboudeaux
2014-06-01Merge remote-tracking branch 'origin/master' into frameworksFrank Reininghaus
Conflicts: lib/konq/konq_operations.cpp
2014-05-29Use "selectionToggleRect().contains(pos)" insteadEmmanuel Pescosta
of "m_selectionToggle->contains(pos)" in KItemListWidget::setHoverPosition(const QPointF& pos). This wrong check was accidentally introduced by commit 24326d447358f0dbfc18963743207d4a3d4f1c9e BUG: 299328 REVIEW: 118320 FIXED-IN: 4.13.2
2014-05-13Merge remote-tracking branch 'origin/master' into frameworksFrank Reininghaus
Since the master branch had never been merged into frameworks since the creation of the frameworks branch, I had to fix a couple of merge conflicts and make another change in order to make it build - I hope I did not get anything wrong. We should probably merge master into frameworks on a regular basis from now on. CCMAIL:[email protected] Conflicts: dolphin/src/dolphinmainwindow.cpp dolphin/src/search/dolphinfacetswidget.cpp dolphin/src/statusbar/dolphinstatusbar.cpp dolphin/src/views/dolphinview.cpp
2014-05-05dolphin: convert kitemviews/ to qt5 signal slot syntaxAlex Richardson
This conversion was performed automatically using convert2qt5signalslot. The only manual changes required were changing the overloaded signal KDirLister::redirection and KDirLister::completed from KUrl to QUrl. All other cases were no problem since these signals are not overloaded and a static_cast for disambiguation is not necessary. Code inside HAVE_BALOO is not converted yet, will do that once I can build a version with Baloo.
2014-03-03Add a hover effect for the selection toggle.Emmanuel Pescosta
FIXED-IN: 4.13.0 REVIEW: 116028 BUG: 299328
2013-08-24Adjust the size and position of the selection toggle on iconEmmanuel Pescosta
resize (when changing the zoomlevel). BUG: 310412 REVIEW: 112250 FIXED-IN: 4.11.1