┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistheader.cpp
AgeCommit message (Collapse)Author
2026-01-22clang-tidy: use default for trivial constructorMé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.
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-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-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-02-24Fixes memory leak of KItemListHeaderDavid Hallas
Summary: Fixes memory leak of KItemListHeader The KItemListHeader passed the listView parent object to the QObject base class, but that pointer seems to always be nullptr causing the KItemListHeader to not be memory managed by anything. Instead simple use the listView as parent pointer. Test Plan: This leak was found using Address Sanitizer Reviewers: elvisangelaccio Reviewed By: elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D14453
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
2015-09-03Only store modified columns widths after the mouse button was releasedFrank Reininghaus
This prevents that the new widths are written to disk multiple times in quick succession, which can make column resizing quite slow. BUG: 351846 REVIEW: 351846 FIXED-IN: 15.08.1
2014-06-29Remove the automoc noiseChristophe Giboudeaux
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.
2012-04-11KItemViews: Internal directory restructurationPeter Penz
- Move all private headers from the kitemviews-directory into the 'private' subdirectory. - Get rid of DolphinDirLister and just use a directory-lister internally in KFileItemModel. - Minor interface-cleanups for signals
2012-03-25Details view: Don't reset to automatic resizing when adding columnsPeter Penz
Until now when a new column is added in the case where custom column widths are used, the automatic resizing has been turned on again. The patch fixes this so that the current widths stay and the new column gets a proper default width.
2012-03-24Cleanup and minor fixes for column-handlingPeter Penz
2012-03-23Details view: Optionally remember user changed column-widthsPeter Penz
If the user changed a column-width in the details-view, up to now the width got reset when changing a directory or when restarting Dolphin. Now the column-widths automatically get remembered for each directory in case if the user has modified the width. The automatic resizing is still turn on per default. The storing of the custom column-width can easily be reset by right clicking on the header and selecting "Automatic Column Widths" from the context-menu. Some finetuning is still necessary (e.g. the "Adjust View Properties" dialog currently is not aware about this setting) but this will be fixed during the next weeks. BUG: 264434 FIXED-IN: 4.9.0
2012-03-22Details view: Expand the name-column like in Dolphin 1.xPeter Penz
With the new view-engine the name-column always has been expanded to the maximum width of all available names. But this makes it impossible to see other columns without scrolling when having long filenames, so per default the Dolphin 1.x behavior has been applied to the new view-engine so that the name-column-width gets decreased to be able to show the other columns. This patch will be released with KDE applications 4.8.2. For Dolphin 2.1 (KDE applications 4.9) user-modified widths of the columns will be remembered per directory also between different sessions. CCBUG: 264434
2012-03-20Bypass crash with Polyester-stylePeter Penz
The Polyester style crashes when drawing a header where the parent widget is 0. BUG: 296453 FIXED-IN: 4.8.2
2012-03-07Allow custom sorting of details-view columnsPeter Penz
Fix regression that Dolphin 2.0 did not allow to adjust the sorting of the details-view columns. BUG: 164696 FIXED-IN: 4.8.2
2011-12-11Remember sort settingsPeter Penz
If the user has changed the sort-role or sort-order by clicking on the view-header of the details-view, the settings have been adjusted to the model but not remembered in the directory settings.
2011-10-08Details-view: Fix column-width issuePeter Penz
The column-width must respect the minimum width of the header-roles.
2011-10-08Context menu cleanupsPeter Penz
- Open the context menu on the mouse-press event, not on the mouse-release event. - Provide an explicit position-information and don't use QCursor::pos(). This fixes the issue that opening a context-menu by the keyboard opens below the cursor. - Provide different signals in the KItemListController for the different context-menu types (item vs. view vs. header). - Implement turning on/off roles by the header-context-menu.
2011-10-06Use QFontMetrics::height() instead of averageCharWidth()Peter Penz
QFontMetrics::averageCharWidth() is quite slow and does not work well on fonts with broken characters. In the usecases required by Dolphin QFontMetrics::height() is a better and faster alternative to get a font-dependent minimum width. Thanks go to Christoph Feck for this hint!
2011-10-02Elide the texts if the user shrinks the column-widthsPeter Penz
2011-09-23Allow resizing of columns by the userPeter Penz
Still open: - Column content is not clipped correctly - First column is not automatically increased to the available width like in Dolphin 1.7
2011-09-22KItemListHeader: Allow resizing and change of the sortingPeter Penz
KItemListView does not react on the resizing yet. Toggling the sort order and changing the sort role is already possible.
2011-09-21Improve drawing of list-headerPeter Penz
2011-09-20Show the role-description in the header of the details viewPeter Penz
2011-09-19Draw styled header for the details-viewPeter Penz
2011-09-19Rough draft for getting back the header for the details-viewPeter Penz