┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kstandarditemlistwidget.h
AgeCommit message (Collapse)Author
2025-09-03Fix several user-facing and non-user-facing typosKunda Ki
Found via `codespell -S "*.desktop,*.po,*.svg,*.xml,./po" -L aparent,childs,goup,lokal`
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-06-17Add setting to select filename eliding behaviorGleb Kasachou
Introduces a setting in Content Display Tab that allows to choose how filenames are truncated when they do not fit in the maximum filename length, i.e elide. BUG: 504795
2025-03-09kstandarditemlistwidget: render overlays in paintMéven Car
This allows to keep the original pixmap in m_pixmap when resizing so it can have nice rendering when being resized and simplifies implementation
2025-01-17Refactor Overlay HandlingMéven Car
Now all overlays icons in kitemviews are added in KStandardItemListWidget::updatePixmapCache. data[iconOverlays] now contains icon names. DolphinFileItemListWidget::refreshCache is the sole responsible of setting the overlays either coming from KFileItemModelRolesUpdater or KVersionControlPlugin. This garantees consistency in rendering. BUG: 497372
2025-01-07Elide file names in the middle againNate Graham
In ye olden days, filenames were elided on the right. This prevented seeing the filename extension and any suffix style text the user included in the filename (e.g. "myfile 1", "myfile 2" and so on). In 97f49347482519b9ad53b7596d7462e68b7c2e14, this was changed to elide in the middle, fixing both problems and bringing Dolphin into Jakobs' Law style consistency with MacOS Finder and Windows Explorer, and possibly other file managers too. However it worsened the situation for users who name their files such that most of the information was on the left. After some complaints, it was changed in 99cf24c03def1c0722ba8dbd86a27b9dbc521f43 to right-elide again, but excluding the filename extension. Unfortunately user complaints have continued. At this point it's clear that nothing will satisfy everyone due to diversity of file naming styles. In such a situation, Jakobs' Law consistency with the rest of the industry is the best solution short of making it configurable, which has its own drawbacks. Accordingly, return to middle-elision. BUG: 497664 CCBUG: 404955 FIXED-IN: 25.04.0
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-10-28Overhaul main view accessibilityFelix Ernst
This commit brings the main view of Dolphin into a usable state accessibility-wise. Users of screen readers should have a way better experience while browsing files and folders and navigating along the file system hierarchy. This commit fixes most of the remaining already-identified accessibility issues listed in https://invent.kde.org/teams/accessibility/collaboration/-/issues/28, but not all. Namely, these should now be fixed: 1. Orca should read the element type in dolphin (file, folder, device, link to folder, link to file) 2. Orca should read complete label in icon and compact view mode, currently it only speaks the name, but there could be additional information like the number of elements or the file size. 3. Orca is not able to announce Selecting / Unselecting files in Dolphin. It also never announces how many items are selected in total. (Announcing the total selection can be done by reading out the view element or by pressing the Tab key to get to the status bar with the relevant information.) 4. Dolphin opens on the home directory, but Orca doesn't tell you so. Consider enclosing the area in a frame/panel which updates its accessible name each time you modify the current path by entering or leaving a directory. 5. I don't know what the folder presentation widget is, but it should be presented as a grid view. Currently, we have a terrible experience because the entire row of folders is read at once, with no indication that we can move left and right with the arrows to go between the elements of a row. When I found that out, however, I discovered that when you're on the last icon of the first row and press right arrow, you get to the first icon of the next row, but that's not announced, instead, the whole row is announced at once 6. Orca should announce the current elements instead of "layered pane" when the Folder / File view gets the focus in dolphin 7. Orca reads only name in Table View only of Dolphin 8. Items are sometimes confusingly announced as "collapsed" in contexts in which there is no concept of collapsing/expanding e.g. in icon view mode. A lot of code was moved around and renamed. The three accessibility classes, which all used to be in the same file, are moved into separate files. *Acknowledgement* Thanks to Christian Hempfling and bgt lover for testing as well as originally identifying a lot of the pain points being addressed here. 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. https://kde.org/announcements/2024_ngi_openletter/
2024-08-17KStandardItemListWidget: remove obselete commentYifan Zhu
2024-08-13KStandardItemListWidget: select by number of unicode charsYifan Zhu
Previously during rename, the number of QChar is used for selection, which might be different from number of unicode characters. Test plan: - create the file zz❤️❤️.txt - rename the file - verify that the first 4 characters are correctly selected, which didn't work before the patch. BUG: 466814
2024-02-27Fix compile with Qt 6.7nerdopolis turfwalker
2024-02-23Resolve conflict between activateSoonAnimation and hoverSequenceAnimationFelix Ernst
Prior to this commit, the activateSoonAnimation would not play for folders using previews. That was because the hoverSequences of folder previews would always take priority over the activateSoonAnimation. This commit prioritises the activateSoonAnimation for the quick moments in which it is active.
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
2024-02-18Add documentationFelix Ernst
2023-12-14Dolphin: Remove unused code, fix clazy warningsMéven Car
2023-10-24Merge branch 'master' into kf6Nicolas Fella
2023-10-23Display newline in filename as Unicode line breakYifan Zhu
BUG: 422998 CCBUG: 444747
2023-09-10Merge remote-tracking branch 'origin/master' into kf6Mé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-08-23KStandardItemListWidget: Render pixmap with explicit dprKai Uwe Broulik
Instead of using the one from QApplication, use the one from the window.
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
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-12-28Add name-only tooltip and make logicalHeightHints a pair of qreal and boolLeo Treloar
2021-10-07Fix typo: PascalCase in docsivan tkachenko
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.
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
2020-11-04Move m_textInfo to fix ctor warning, and document why it's protected.Chris Holland
2020-11-04Draw 2 Rectangles below mount points to represent a disk capacity barChris Holland
Draws overtop text that's goes below the baseline like a 'j'. It's fairly difficult to add extra space below the text as the places view is a "details" view, so the text is vertically centered in the widget's "row" as you'd desire it to in the main file view. We can make the widget 8px taller, adding 4px above and below so there's adequate room for the capacitybar, but that wastes 4px for each mount point. Ideally we'd use the "compact" view, which displays the text/size in a column beside the icon. However the compact view was not designed to take up the entire width of the viewport. It's also designed to overflow with a horizontal scrollbar.
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-18Left-elide file/folders while keeping their extension visibleMéven Car
Summary: Tweak behavior introduced in D19471. BUG: 404955 Test Plan: Before: {F8325282} After: {F8325283} {F8325284} Reviewers: ngraham, #dolphin, elvisangelaccio, #vdg Reviewed By: ngraham, #dolphin, elvisangelaccio, #vdg Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29794
2019-05-04Fix wrong apidoxElvis Angelaccio
There is no KStandardItemView class in dolphin. This apidox has been wrong since the beginning (see commit ae4d11d918938fd9087f2035dac). GIT_SILENT
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
2017-12-03Remove duplicate definition of the function.Ben Cooksley
Looks like this is the result of a bad merge. CCMAIL: [email protected]
2017-12-02Merge remote-tracking branch 'origin/Applications/17.12'Heiko Becker
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-11-20Modernize: Use override where possibleKevin Funk
Also use override instead of Q_DECL_OVERRIDE
2017-11-19Fix scrolling during inline renaming causes rename of wrong fileAndreas Krutzler
Summary: Scrolling during inline renaming accepts the renaming now, like if one would hit Return for example. I chose this approach because it seems the easiest way to fix this. This also fixes the “possible” Ui glitch where the renaming KTextField doesn’t move along with the list item. Possible glitch, because I don’t know if this is intentional, but for me it looks broken. BUG: 378786 Fixes T7443 Test Plan: * Enable "Rename inline" in dolphin settings * Go to a folder where you have to scroll through items (many files, big zoom,…) * Start to rename a file (context menu, F2, …) * Scroll with mouse wheel * Rename accepted -> file is renamed Reviewers: ngraham, rkflx, #dolphin, elvisangelaccio Reviewed By: ngraham, rkflx, #dolphin, elvisangelaccio Subscribers: anthonyfieroni, elvisangelaccio, #dolphin Maniphest Tasks: T7443 Differential Revision: https://phabricator.kde.org/D8822
2017-11-18Fix scrolling during inline renaming causes rename of wrong fileAndreas Krutzler
Summary: Scrolling during inline renaming accepts the renaming now, like if one would hit Return for example. I chose this approach because it seems the easiest way to fix this. This also fixes the “possible” Ui glitch where the renaming KTextField doesn’t move along with the list item. Possible glitch, because I don’t know if this is intentional, but for me it looks broken. BUG: 378786 Fixes T7443 Test Plan: * Enable "Rename inline" in dolphin settings * Go to a folder where you have to scroll through items (many files, big zoom,…) * Start to rename a file (context menu, F2, …) * Scroll with mouse wheel * Rename accepted -> file is renamed Reviewers: ngraham, rkflx, #dolphin, elvisangelaccio Reviewed By: ngraham, rkflx, #dolphin, elvisangelaccio Subscribers: anthonyfieroni, elvisangelaccio, #dolphin Maniphest Tasks: T7443 Differential Revision: https://phabricator.kde.org/D8822
2016-05-13use selected icon state for selected sidebar itemMarco Martin
Since now the breeze icons can be recolored by kiconloader with svg stylesheets, use this feature to recolor the currently selected icon in the sidebar and in the details view (not the icon view) look wouldn't change if used with icon themes that don't support this feature This makes it look more in line with the breeze style REVIEW:127877
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2015-03-25Paint icons at the correct sizeDavid Edmundson
2015-02-25Move the KVersionControlPlugin2 interface from konqlib to Dolphin and remove ↵Emmanuel Pescosta
the deprecated KVersionControlPlugin interface from konqlib REVIEW: 122687
2014-11-20Fix Exports.Andrius da Costa Ribas
REVIEW: 121078
2014-11-03Q_DECL_OVERRIDELukáš Tinkl
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-05Separate width and height info in the layouting codeFrank Reininghaus
By separating the width and height info, we can save some unnecessary overhead in terms of memory and CPU cycles, and make the calculation of the height of a row (or the width of a column in Compact View) a bit simpler. To achieve this, this patch extends the concept of "logical rows" (which are actually columns in Compact View) to "logical width" and "logical height" (which is the actual height and width, respectively, in Compact View). The distinction between rows/columns and "logical" rows/columns may be a bit confusing, but the confusion is already in the current code, and I hope that it will be mitigated a bit by prefixing the corresponding variables with "logical". REVIEW: 118454
2014-03-05Fix Bug 326210 - Dolphin unnecessarily truncates names of soft links in ↵Emmanuel Pescosta
compact mode FIXED-IN: 4.13.0 BUG: 326210 BUG: 310592 REVIEW: 116121