┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.cpp
AgeCommit message (Collapse)Author
2020-11-08Iterate over a const copy list of containersIsmael Asensio
This effectively reverts the mutable iterations approach on 2448f88c5f42d7a2040fcf3bcd3c5f2a2f62cd03, and fix crashes and ghost items when using the filter bar BUG: 428374
2020-11-04Improve padding in the Places ViewEzike Ebuka
2020-10-24Use mutable iterators where requiredAlexander Lohnau
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-10-23Compile without foreachAlexander Lohnau
2020-09-26Allow interaction with folder/files with the stylus againSteffen Hartleib
This Patch works for Wayland and X. BUG: 426582
2020-09-13Improve Touch supportSteffen Hartleib
With this patch dolphin now supports the following touch gestures: * Tap gesture to interact/open with directories, files and so on * TapAndHold and release gesture for access to the context menu (main window, panel folder, places and information) * TapAndHold and moving gesture for drag and drop action (main windows, panel folder and places) * pinch gesture for zoom in main window * kinetic scrolling (QScroller) for main window, panel folder, panel places, panel information, setting preview and service * two fingers swipe gesture to left, right and up as shortcut to navigate back, forward and up * two finger tap gesture to toggle item selection, similar to Ctrl and left mouse click FEATURE: 385066 FIXED-IN: 20.11.80 You are currently rebasing branch 'touch' on '85241a924'.
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-01-27Merge branch 'release/19.12'Nate Graham
2020-01-27Change drop indicator colorGeorge Vogiatzis
Summary: Change drop indicator color form highlight to text. This makes more visible, when indicator is adjacent to a highlight item, of a list. BUG: 415010 Test Plan: Before vs After {F7974679} Reviewers: #dolphin, #vdg, elvisangelaccio, ngraham Reviewed By: #dolphin, #vdg, ngraham Subscribers: meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26936
2019-12-21Merge branch 'release/19.12'Nate Graham
2019-12-21Improve scroll wheel speed by basing it on label height, not icon heightNate Graham
Summary: Dolphin currently scrolls by the height of three items at a time per "step" when using a scroll wheel. Because item height is highly variable, this leads to scroll speed being inconsistent between views, and generally far too fast when using icon view with icons larger than 22px size. This patch makes the size of the scroll step based on the text label rather than the icon size just like D25683, ensuring that the scroll speed does not vary and become super fast when using large icons in particular. It also reverts 90beb4a5e37b887caad1e767046a42dad0af1ab3, which is no longer needed. BUG: 386379 FIXED-IN: 19.12.1 Test Plan: Use a mouse with a scroll wheel and scroll in Dolphin item views with list view, details view, icon view, etc, using different item sizes. Speed should be consistent in all views now, and also feel consistent with other KDE apps. Also try with multiple scale factors to make sure the behavior does not change. No change with high-resolution two-finger touchpad scrolling. Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: ahiemstra, lots0logs, anthonyfieroni, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19190
2019-11-16Use URLs with transport encryptionYuri Chornoivan
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-03-10port to std::stable_sortLaurent Montel
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-07-04Use more nullptrFriedrich W. H. Kossebau
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
2018-01-29base scrolling on the smallest itemMarco Martin
Summary: CCBUG: 386379 after recent highdpi patches on scrolling that delegated it completely to the scrollbar, based upon the scrollbar singleStep setted to the tallest of the items in the view. tough this makes scrolling way too fast, and on folders where just few filenames are longer than most we can get a single scrolling step almost double the number of lines configured in the mouse kcm. Using the shortest item instead of the tallest mitigates this problem making it a bit more usable Test Plan: tested on different folders in different view modes both with mouse and touchpad Reviewers: #dolphin, broulik, ngraham Reviewed By: #dolphin, ngraham Subscribers: ngraham, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D10102
2017-11-21Modernize: Use nullptr everywhereKevin Funk
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
2017-11-01Remove not necessary check pointerMontel Laurent
Test Plan: compile Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: #dolphin Differential Revision: https://phabricator.kde.org/D8565
2017-10-27Two clicks on file/folder to renameAndreas Krutzler
Summary: Make renaming of files/folders faster by clicking a second time on the items text to start renaming. BUG: 205157 Test Plan: This feature works as follows: 1. select an item by single-click, or one is already selected 2. wait the "double-click-interval" 3. click on the items text 4. none of the cancellations (see below) happens within the double-click-interval 5. inline-renaming starts Cancellations: * open any file/folder * select different item(s) * start dragging items * Dolphin loses focus This feature is just enabled while "Double-click to open files and folders" in system-settings and "Rename inline" in Dolphin are enabled. Reviewers: #dolphin, #kde_applications, elvisangelaccio, emmanuelp, ngraham, markg, rkflx Reviewed By: #dolphin, #kde_applications, elvisangelaccio, ngraham, rkflx Subscribers: rkflx, markg, funkybomber, sars, elvisangelaccio, ngraham Differential Revision: https://phabricator.kde.org/D7647
2016-11-20Fix slow scrolling in dock panelsElvis Angelaccio
Commit f688bcd1f1 fixed slow scrolling with xf86-input-libinput on DolphinView. However the commit also exposed a bug in the Dolphin scrolling algorithm, which was previously hidden. This resulted in slow scrolling in dock panels (Places and Folders), with both xf86-input-evdev and xf86-input-libinput drivers, as well as libinput on Wayland. KItemListContainer::updateScrollOffsetScrollBar() relied on the view's itemSize() method to compute the scrollbar's singleStep, but this QSize was invalid for the dock panels' views. We use a new itemSizeHint() method instead, which is always valid and also adapts to the current icon size set in the view. BUG: 365968 FIXED-IN: 16.12.0 REVIEW: 129409
2015-03-19Fix some EBN issuesYuri Chornoivan
2015-02-24Replace kDebug/kWarning by categorized logging (org.kde.dolphin)Emmanuel Pescosta
2014-10-27Port to QDebug*. KVBox--Montel Laurent
2014-10-18Fix includesMontel Laurent
2014-08-10Port accessibility to Qt 5Frederik Gladhorn
REVIEW: 119428
2014-07-04Merge branch 'master' into frameworksLuca Beltrame
2014-07-04Remove current item highlighting in the Places PanelFrank Reininghaus
In the Places Panel, there is always exactly one selected item, which is equal to the current item. Since the selected item is highlighted by drawing its background in a different color, it is not really necessary to highlight additionally that it is the current item. This is achieved by removing the calls to KItemListWidget::setCurrent(true) from KItemListView. The "current" information in the widget is only used for deciding if the "current item highlighting", like an underline in Oxygen, should be drawn. The motivation for this change is that I have seem some complaints about the "current item" highlighting, which can be even more distracting with non-Oxygen styles. REVIEW: 119019
2014-06-29Remove the automoc noiseChristophe Giboudeaux
2014-06-05Merge remote-tracking branch 'origin/master' into frameworksFrank Reininghaus
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-06-01Merge remote-tracking branch 'origin/master' into frameworksFrank Reininghaus
Conflicts: lib/konq/konq_operations.cpp
2014-05-29Fix Bug 334696 - File/directory icons/names move to the right when ↵Emmanuel Pescosta
opening/refreshing contents of Dolphin Take the scrollbar spacing into account. BUG: 334696 REVIEW: 118319 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-05-05completely disable QAccessible for now, since it causes assertionsAlex Richardson
2014-05-05Allow compiling Dolphin with KF5Alex Richardson
This does not work properly yet, there are probably quite a few bad signal/ slot connections due to KUrl -> QUrl. However dolphin starts without crashing. Accessibility is not ported since that changed quite a lot from Qt4 -> Qt5 and I have no idea how it is supposed to be used. This is the first commit for review 117395
2014-02-24Make the handling of the "maximum text lines" setting more robustFrank Reininghaus
If the user sets a maximum number of text lines in the settings, this number was translated into a maximum height in pixels using QFontMetrics::lineSpacing() before this commit. In KStandardItemListWidgetInformant::itemSizeHint(), this maximum height limited the size that is reserved for the item. However, in KStandardItemListWidget::updateIconsLayoutTextCache(), the maximum height was translated back into a maximum number of lines, which limits the number of lines that are created using the QTextLayout. This approach could lead to problems if the real height of the layouted text is 1 pixel more or less than QFontMetrics::lineSpacing() times "number of lines". Now we do not store a "maximum height" inside the "maximum size" explicitly, but store a maximum number of lines and a maximum with (for Compact View) separately, and then use the number of lines also to calculate the required size in KStandardItemListWidgetInformant::itemSizeHint(). This should make sure that the correct height is reserved for each item. Thanks to Christoph Feck and Emmanuel Pescosta for helping to debug this problem and testing the patch. BUG: 323841 FIXED-IN: 4.13 REVIEW: 113871
2014-02-24Handle font and palette changes in Dolphin list views.Emmanuel Pescosta
Also update the font of the meta data widget in InformationPanelContent (smallest readable font). BUG: 329186 BUG: 315061 FIXED-IN: 4.13 REVIEW: 115958
2014-02-11Ensure that KItemListViewLayouter always has a size hint resolverFrank Reininghaus
KItemListViewLayouter uses a KItemListSizeHintResolver to find out how much space the items will need in the view. Before this commit, the size hint resolver object could be changed at runtime, and it could also be null. However, we never made use of these possibilities, so all the code that checks if m_sizeHintResolver is null is actually not needed at all.
2014-01-12Calculate all item size hints at once.Emmanuel Pescosta
The speed up is really small, but theses changes are mostly straightforward and make the code a bit nicer - break the KStandardItemListWidgetInformant::itemSizeHint beast into three smaller functions. FIXED-IN: 4.13 REVIEW: 112979
2013-10-30Store the selected items in a more efficient wayFrank Reininghaus
Since Dolphin 2.0, we have stored the selected items in a QSet<int>, which is neither space-efficient nor particularly fast when inserting many items which are in a consecutive range. This commit replaces the QSet<int> by a new class "KItemSet", which stores the items in a sorted list of ranges. For each range, we only store the first index and the length of the range, so we need a lot less memory for most common selection patterns, and we also save quite a few CPU cycles in many situations, because adding an item to the KItemSet will in many cases not need a memory allocation at all, and it's particularly easy when inserting sorted items into the KItemSet in a row. KItemSet contains a minimal subset of QSet's API which makes it suitable as a drop-in replacement for our needs. It also has iterators, such that the items can be iterated through easily, also with foreach. One advantage of KItemSet compared to QSet<int> is that the items are always iterated through in ascending order. REVIEW: 113488
2013-09-14Merge remote-tracking branch 'origin/KDE/4.11'Frank Reininghaus
2013-09-12Fix Bug 311099 - View the underscore when using Ctrl + PagDownEmmanuel Pescosta
Take the style option vertical/horizontal margin into account for the calculation of the new scroll offset. Thanks to Frank for pointing out two other problems with "Page Up/Down" and providing a better way to fix these problems. :) BUG: 311099 FIXED-IN: 4.11.2 REVIEW: 112678
2013-08-15Merge remote-tracking branch 'origin/KDE/4.11'Frank Reininghaus