┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kstandarditemlistwidget.cpp
AgeCommit message (Collapse)Author
2024-03-30Fix selection marker for RTLEugene Popov
This MR makes the selection marker to be shown on the right in RTL mode.
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-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
2023-12-14Dolphin: Remove unused code, fix clazy warningsMéven Car
2023-11-21views: Use scene devicePixelRatio rather than qAppKai Uwe Broulik
When possible, use the devicePixelRatio from the scene which on Wayland unlike the QApplication will properly support fractional scaling. A KItemViewsUtils class is introduced that can be reused elsewhere.
2023-11-08Improve size adjustment of itemlist editorYifan Zhu
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. BUG: 452587
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-10Replace qAsConst with std::as_constMé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-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 column text readableFelix Ernst
When not using the full row highlight, the text of non-name columns in details view mode was wrongly colored in a way that pretended that the full row selection highlight was active. When it isn't active we use the normal color that we generally use when the additional information is not within the selection highlight.
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-09-26Remove unused includesLaurent Montel
2022-05-26Extend selection rectangle to left edgeTravis Burrows
This commit changes it so the sizes of selection rectangles and hover highlights in compact and details view mode is identical for all items. Before this commit, selection rectangles in lists would have varying indentation of the left edge of the selection rectangle depending on the preview image's width-to-height ratio. This would cause a sort of "ragged edge" in both compact and details list view when multiple items were selected. This commit doesn't change anything about icon view mode. BUG: 453046
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-04-04Merge branch 'release/22.04'Felix Ernst
2022-04-04Revert "KStandardItemListWidget: handle RtL drawing properly"Felix Ernst
This reverts commit 3ce9d1d19e081fbb9acf020f15652175673bcf5c. This reverts commit ddba4f5fd88c4fa855e3f2eb0d9d95a6290d150a. Aside from the two bugs mentioned below, this also fixes another regression: The spacing on the left of the view does now once again follow the size of its column header. BUG: 451704 BUG: 451341
2022-03-15Fix some compile error against qt6Laurent Montel
2022-02-26KStandardItemListWidget: don't double up the expansion offsetJan Blackquill
2022-02-25Merge branch 'release/21.12'Kai Uwe Broulik
2022-02-25KStandardItemListWidget: handle RtL drawing properlyJanet Blackquill
BUG: 449211
2022-02-23Fix rating pixmap alignment on high-dpi screensKai Uwe Broulik
When calculating layout geometry based on the pixmap size, one needs to divide by `devicePixelRatio`
2022-02-23Ignore empty roles for textRect calculationKai Uwe Broulik
Avoids a text rect taller than the area that actually contains text, as can be seen by hovering files in a folder with "additional roles" that a given file does not contain.
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-29Fix my previous bad mergeFelix Ernst
I failed to notice that the changes didn't apply cleanly. With this commit everything should be a-okay again.
2022-01-29Merge branch 'release/21.12'Felix Ernst
2022-01-29Revert "[DetailsView] Improve zooming"Eugene Popov
This reverts commit 7908aff3b5ebe4484d391c1fc4797e9dae2300b2. Reverting this commit will fix the issue of not being able to rename the last file in Details View and will also make the items in Details View and Compact View have the same height. BUG: 447215 FIXED-IN: 21.12.2
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-07-18[DetailsView] Improve zoomingEugene Popov
Under some conditions, when zooming, only the size of the icon is changed, but not the entire item, which visually doesn't look good. The main idea of this MR is that when scaling the whole element should be resized, not just the icon, so I came up with some zoom levels for the main icon sizes. With this commit, zooming will resize the entire element, even if the resizing of the icon doesn't affect the size of the entire element.
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-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
2020-11-12Fix qrc iconAlexander Lohnau
Apparently the icon was not null, because the mimetype was known. But there was no icon associated with it and we got an icon which is not null, but has a null pixmap.
2020-11-04Move m_textInfo to fix ctor warning, and document why it's protected.Chris Holland
2020-11-01Use QString::rightRef() as suggested by clazyElvis Angelaccio
2020-11-01Fix warnings about scaling pixmapsMartin T. H. Sandsmark
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-10-23Compile without foreachAlexander Lohnau
2020-10-15Port away from QList::toSet()Elvis Angelaccio
The QSet range constructor requires Qt 5.14. In `DolphinView::slotHeaderContextMenuRequested()` the conversion from QList to QSet was pointless, so we just use a QList now.
2020-08-30Merge branch 'release/20.08'Alexander Lohnau
2020-08-30Fix file preview for desktop files with absolute icon pathsAlexander Lohnau
BUG: 423326 FIXED-IN: 20.08.1
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-07-12Fix selection rect after porting from QFontMetrics::width()Ismael Asensio
After porting from QFontMetrics::width() to QFontMetrics::boundigRect().width() in system/dolphin!10 we have a visual bug on selection rects, that can be seen on details and compact modes. While from https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/ the use of `boundingRect()` would seem the right option to use (and I struggle to get the difference between the two methods when applied to a whole string and not a single char), in this case the `horizontalAdvance()` seems to return the value we need. BUG: 421973 FIXED-IN: 20.07.70
2020-07-12Fix selection rect after porting from QFontMetrics::width()Ismael Asensio
After porting from QFontMetrics::width() to QFontMetrics::boundigRect().width() in system/dolphin!10 we have a visual bug on selection rects, that can be seen on details and compact modes. While from https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/ the use of `boundingRect()` would seem the right option to use (and I struggle to get the difference between the two methods when applied to a whole string and not a single char), in this case the `horizontalAdvance()` seems to return the value we need. BUG: 421973 FIXED-IN: 20.07.70