┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kitemlistsmoothscroller.cpp
AgeCommit message (Collapse)Author
2026-01-22clang-tidy: use default for trivial constructorMéven Car
2025-04-29Clazy fixMéven Car
2024-12-02KItemListSmoothScroller: stop animation on property or targetobject changeAkseli Lahtinen
Due to changes in 15e0c2a98f480f203ce168b6fa9a2e1f2b0ed8f8 we do not automatically stop animations now on property or targetobject change, which causes warnings and timeouts. This patch makes sure we stop them if their state is Running, before modifying them. See also: https://invent.kde.org/system/dolphin/-/merge_requests/857#note_1083279
2024-11-29Make "open path" and "open path in new tab" scroll to the selected itemAkseli Lahtinen
**Open Path** When user clicks on "Open Path" after searching for an item, user expects the view to show the item immediately. We wait for the KItemListSmoothScroller to be done with its animation before the scrollbar sizes are being changed. **Open Path in New Tab** When user selects "Open Path in New Tab", we open a new tab to the folder where the file is, then select and set the file current. We need to get the correct tab when opening one, so it has been added as a return value. BUG:495613
2024-07-17Remove dead codeManuel Alcaraz Zambrano
2024-07-05Add support for Plasma's global smooth scrolling settingNathan Misner
KItemListSmoothScroller now checks whether smooth scrolling is enabled globally and listens for any changes to the setting via DBus.
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-31Port away from copying QEvent when building with Qt6Ahmad Samir
Copying QEvent in Qt6 isn't allowed, instead use clone().
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-10-15Drop obsolete version checkElvis Angelaccio
We require Qt 5.14 now.
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-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-27Port away from deprecated QStyle::SH_Widget_AnimateElvis Angelaccio
Summary: Use the new QStyle::SH_Widget_Animation_Duration instead, which allows us to not manually hardcode the duration. We still use 1 if animations are disabled, otherwise the scroll would not work at all. See also D5883 for some background. Test Plan: Played with different values in the Animation tab of the Breeze config dialog. Reviewers: #dolphin, broulik Reviewed By: broulik Subscribers: broulik Differential Revision: https://phabricator.kde.org/D10005
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-05-31Revert "Increase smooth scrolling animation duration from 100 to 300 ms and ↵Elvis Angelaccio
set easing curve to InOutQuart" This reverts commit 58c5eae1953bbdcf6d4150b21cb7ffdad07a5257. Reasons against this change: 1. Scroll is now too fast with devices such as touchpads or trackpoints. 2. Scroll behavior is now inconsistent between Dolphin and other applications (e.g. the Plasma file dialog). Breeze's default animation duration is 100 ms. 3. Many people complained and this feature is currently not configurable. We should introduce a QStyle::SH_Widget_Animation_Duration hint that would allow us to not hardcode durations in Dolphin (i.e. respect whatever duration the users set in their QStyle). Proposal in https://codereview.qt-project.org/#/c/195712/ Reviewers: #vdg, #plasma, emmanuelp, davidedmundson Reviewed By: #plasma, davidedmundson Differential Revision: https://phabricator.kde.org/D5883
2017-02-26Increase smooth scrolling animation duration from 100 to 300 ms and set ↵Vishal Rao
easing curve to InOutQuart Summary: The current animation duration for smooth scrolling is 100 ms which feels as if there is no smooth scroll animation in the first place. Bumping this up to something like 300 ms seems to make the scrolling actually appear smooth. Also, based on diff comments the easing curve is set to InOutQuart. Test Plan: Built this change locally and tried scrolling a folder with many items both single step mouse wheel and also larger steps of the mouse wheel. Reviewers: elvisangelaccio, emmanuelp Reviewed By: emmanuelp Subscribers: htietze, colomar, andreask, emmanuelp, elvisangelaccio Differential Revision: https://phabricator.kde.org/D4560
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-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-09-01Scrolling fixes for DolphinMaxim Mikityanskiy
KItemListSmoothScroller::handleWheelEvent has some issues: 1. When I scroll file list holding mouse over the list, one mouse wheel tick corresponds to 1/4 page interval, but when I hover on QScrollBar, one wheel tick corresponds to 1 page interval. 2. In KItemListSmoothScroller::eventFilter we don't return true, so that QScrollBar also handles this event, and total scroll interval is m_scrollBar->pageStep() + m_scrollBar->singleStep(). 3. When I use touchpad that supports smooth scrolling via XInput2, and I hover it over QScrollBar, I can only scroll content if I move my fingers very fast, because numSteps = event->delta() / 8 / 15 is just zero unless I move very fast (event->delta() in this case is less than 120). 4. Holding Shift while scrolling has no effect when holding mouse over QScrollBar in contrast to scrolling faster when holding mouse over file list. The patch eliminates all these issues making the behavior of KItemListSmoothScroller the same as in KItemListContainer::wheelEvent, adding support for QWheelEvent::pixelDelta() and removing usage of deprecated QWheelEvent::delta(). REVIEW: 124670 FIXED-IN: 15.12.0
2015-02-06Fix includesMontel Laurent
2015-01-30Port away from KGlobalSettings::graphicEffectsLevel()Emmanuel Pescosta
REVIEW: 122309
2014-10-27Port to QDebug*. KVBox--Montel Laurent
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-07-22Do not try to smooth-scroll past the end of the viewFrank Reininghaus
KItemListSmoothScroller::scrollTo(qreal position) did not check if 'position' is a valid value. Even if the view is scrolled to the bottom already, it tried to scroll further and activated "smooth scrolling" when the mouse wheel is used. Because it never got out of the "smooth scrolling" state then, it got confused when changing the directory, and restoring the correct scroll offset could fail. BUG: 322212 FIXED-IN: 4.11.0 REVIEW: 111557
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