┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistcontainer.cpp
AgeCommit message (Collapse)Author
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
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-20Modernize: Use override where possibleKevin Funk
Also use override instead of Q_DECL_OVERRIDE
2017-01-03Add missing Q_DECL_OVERRIDEMontel Laurent
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
2016-07-16Fix scrolling on hidpi screensMartin T. H. Sandsmark
Scrolling with libinput was unbearably slow. QScrollBar is much better at scrolling than us, so let it handle it. REVIEW: 128432 BUG: 357618
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2016-01-12Take into account QApplication::wheelScrollLines() in wheel eventsMarco Martin
when setting a different "mouse wheel scrolls by" value in the mouse kcm, the user expects every view to scroll more or less accordingly (even if it's not strictlya text view) This makes the scroll in dolphin take that into account REVIEW:126718
2015-05-06Scroll by page if Shift Key is pressedAshish Bansal
If shift key is pressed along with scroll, scroll up/down by whole page. REVIEW: 123596
2015-02-06Fix includesMontel Laurent
2014-10-27Port to QDebug*. KVBox--Montel Laurent
2014-10-18Fix includesMontel Laurent
2014-06-30Add support for high-precision touchpad scrollingKai Uwe Broulik
REVIEW: 119001
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.
2013-11-21Fix incorrect geometry updates in KItemListContainerYichao Yu
When resizing the window and when KItemListContainer::updateGeometries is called before the scrollbar visibility is updated, a relayout is triggered in `m_controller->view()->setGeometry` which updates the scrollbar visibility and calls back to `KItemListContainer::updateGeometries` again. Since the first call, which has the wrong geometry (due to the incorrect scrollbar states), updates the geometries of the scene and viewport after the second call (which has the right geometry!!) returns, the final result is a size that corresponded to the old scrollbar state before this commit. This patch uses the new geometry of the view after updating it (since it might not be the size we put in) and therefore makes the sizes consistent. BUG: 327709 FIXED-IN: 4.11.4 REVIEW: 113939
2013-11-18Fix scrollbar spacing when no scrollbar is visible in dolphin.Yichao Yu
Before this commit, Dolphin reserved space for the scrollbar spacing even when no scrollbar is visible resulting in a ugly gap in the view when: 1. the theme uses QStyle::SH_ScrollView_FrameOnlyAroundContents and 2. the theme has a positive PM_ScrollView_ScrollBarSpacing. QtCurve can have both while Oxygen have 1 but not 2. To reproduce the problem with Oxygen style. Replace the `width += ....` (which returns -2 or 0 for Oxygen) with `width += 2`. See more info here: https://github.com/QtCurve/qtcurve-qt4/issues/9#issuecomment-28630517 CCBUG: 306631 FIXED-IN: 4.11.4 REVIEW: 113902
2013-07-25Fix maximum value for scroll bar when deleting items in Details ViewFrank Reininghaus
The problem was that the view heigt minus the header height was subtracted from maximumScrollOffset() to determine the maximum value of the scroll offset of the top of the view. However, the top of the view is the part that is hiden behind the header. Therefore, the full view height must be subtracted from maximumScrollOffset. The remaining bits of bug 319951 were fixed by other recent commits. Thanks to Emmanuel Pescosta for helping to track down the problem! BUG: 319951 FIXED-IN: 4.11.0 REVIEW: 111486
2013-03-11Do not skip rows in when clicking the empty area of the scroll barFrank Reininghaus
The height of the header widget must be subtracted from the view's height in Details View to determine the "pageStep" for the scroll bar. BUG: 315619 FIXED-IN: 4.10.2 REVIEW: 109210
2012-04-21Prepare view-engine for non-KFileItem usecasePeter Penz
Up to now the view-engine only provided a model-implementation that supports file-items. The view-engine always had been designed to be able to work with any kind of model, so now a KStandardItemModel is available. The plan is to convert the places panel to the new view-engine. It should be no problem to fix this until the feature freeze - in the worst case the places-panel code could be reverted while still keeping the KStandardItemModel changes.
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-02-05Fix potential endless loop in layoutPeter Penz
Usecase: - No scrollbar is shown - Window size will be decreased so that a scrollbar gets necessary The decreased window size minus the space required for the scrollbar results in a relayout of the items. In 99 % of all cases a decreased window size won't result in showing more items in parallel in comparison to a larger window size. However in the remaining 1 % this can happen (e.g. see bug 293318 for a sample). This results in an endless loop as now no scrollbar is required anymore, the layout changes again, the scrollbar is required again, ... BUG: 293318 FIXED-IN: 4.8.1
2012-01-18Fix typo, which caused a Qt runtime warning when closing DolphinFrank Reininghaus
(cherry picked from commit dbf0bfffa72c190ed1c8b406c65c9e67b6f65d4f)
2011-12-12Respect style's viewport scrollbar layout policyChristoph Feck
REVIEW: 103381
2011-11-20Initial draft for bringing back the "Folders" panelPeter Penz
The folders panel has been adjusted to use the new view-engine. A lot of things don't work yet, but are mostly minor issues that should be fixable during the next 10 days.
2011-10-22Mousewheel-support: Use smaller scroll-stepsPeter Penz
Use only 1/4 of the scrollbar-page-size when the mousewheel is used. BUG: 284646 FIXED-IN: 4.8.0
2011-09-30Implement smooth-scrolling for horizontal and vertical scrollbarsPeter Penz
Currently only a smoothscrolling was provided into the scroll-direction, but not in case of the details-view where a horizontal scrollbar might be shown too. Some minor adjustments of the private KItemListSmoothScroller interface will be done later...
2011-09-28Details view: Improve performance when expanding itemsPeter Penz
Prevent unnecessary calls to visibleRolesSizes() when expanding items. Also the performance has been improved when resizing the window.
2011-09-25Provide scrollbar for large itemsPeter Penz
If an item does not fit into the available width/height a scrollbar should be provided (e.g. typically this represents the horizontal scrollbar in the details-view where the width can be larger than the than the visible width). Currently the interaction with the scrollbar is not implemented but this will be a quite minor task in comparison to this patch.
2011-09-19Draw styled header for the details-viewPeter Penz
2011-08-30DolphinView zoom with CTRL+MouseWheel REVIEW: 102490Vishesh Yadav
2011-08-27Improve the autoscrolling for the rubberband selectionPeter Penz
This modifications will also allow to do an autoscrolling in an easy way for drag and drop operations (not fully implemented yet).
2011-08-25Fix smooth-scrolling issue in combination with key-pressesPeter Penz
If e.g. the down-arrow-key is pressed constantly the view does not scroll as the animation always will get restarted. Assure that the animation proceeds in this case.
2011-08-25Fix smooth-scrolling issuePeter Penz
The smooth-scrolling may only get turned off after finishing the animation, if the scrollbar is not currently modified by the user.
2011-08-20Fix possible endless recursion when using the rubberbandPeter Penz
If the autoscrolling has been activated when using the rubberband, it was possible that an endless recursion occured as the autoscrolling triggered a change of the rubberband which triggered a change of the autoscrolling etc.
2011-08-18Provide basic rubberband functionalityPeter Penz
This is just a rough draft: The rubberband gets visible and an automatic scrolling is done if the autoscroll-margins have been reached. However currently no items get selected yet. Currently the autoscrolling has a severe bug if the scrollbars are manually changed before or after a rubberband selection.
2011-08-14Keep the current item visible in the viewFrank Reininghaus
2011-08-13KItemListContainer: show only the scroll bar that is neededFrank Reininghaus
Up to now, KItemListContainer would show both a vertical and horizontal scroll bar after a view mode change. This commit fixes that by setting the maximum and the value of the scroll bar that is not needed to 0 in KItemListContainer::updateScrollBars().
2011-08-10Make sure that key presses are handled in KItemListControllerFrank Reininghaus
Key press events are forwarded from KItemListContainer to KItemListController. Right now, only the 'Home' and 'End' keys are handled (arrow keys require some more work because their action depends on the view mode). Note: 1. Before key presses are handled, the view has to be clicked with the mouse. It seems that the view does not have the keyboard focus initially. 2. The view does not scroll to the new current item yet.
2011-08-09Improvements for selections, smooth scrolling, tooltips and info-panelPeter Penz
2011-07-30Merged very early alpha-version of Dolphin 2.0Peter Penz
Dolphin 2.0 will get a new view-engine with the following improvements: - Better performance - Animated transitions - No clipped filenames due to dynamic item-sizes - Grouping support for all view-modes - Non-rectangular selection areas - Simplified code for better maintenance More details will be provided in a blog-entry during the next days. Please note that the code is in a very early alpha-stage and although the most tricky parts have been implemented already very basic things like drag and drop or selections have not been pushed yet. Those things are rather trivial to implement but this still will take some time.