┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/statusbar
AgeCommit message (Collapse)Author
2026-01-31mountpointobservercache: Use Solid for determining mountpointKai Uwe Broulik
KFilePlacesModel already has all the devices, so we can use it rather than having KMountPoint query the list of mounts all the time.
2026-01-22clang-tidy: use default for trivial constructorMéven Car
2025-04-29Clazy fixMéven Car
2025-04-24DolphinStatusBar: Fix premature text squeezingAkseli Lahtinen
The text would get squeezed and elided prematurely due to some clipping calculations and paddings created for the clipping. This slightly modifies the clipping code, that we extend the painted area and then clip off the excess, instead of moving the area to specific place and then clipping off the excess. This also makes sure the text width accounts for one extra character plus the clippings we do, so that text will always fit the statusbar. BUG: 503164
2025-04-22DolphinStatusbar: Fix background and margins for non-Breeze stylesAkseli Lahtinen
There is a bug where non-Breeze styles, such as fusion, do not always have background color for the small statusbar. There is also a bug that made the statusbar too small for other themes. This patch makes us always draw a background, and uses marginLeft and marginRight from QStyle.
2025-04-19Add Filelight menu to Tools menuFelix Ernst
The menu for installing and launching Filelight was only available through the status bar free space info button until now. By default we do no longer show the free space info button because the status bar has been changed to show less information by default. This commit adds the "Manage Disk Space Usage" menu to the "Tools" menu in the menu bar so it is more discoverable for users.
2025-03-04dolphinstatusbar: Fix negative value warnings with small statusbar fixedwidthAkseli Lahtinen
During splitview animations the parentWidget()->width could be lower than scrollbarWidth. If it goes to negatives it causes a lot of warnings. Make sure to bound the value between 0 and parentWidget()->width() so that it can't go into negatives.
2025-02-26Do not show the Zoom toggle context menu on small statusbarAkseli Lahtinen
Small statusbar should not have zoom slider enabled, but this could be bypassed by using the context menu. If we have small statusbar, just return early instead.
2025-02-24Add smaller statusbar and set it as defaultAkseli Lahtinen
- Statusbar has three modes: Small, FullWidth and Disabled - FullWidth is the original statusbar - Small is the new default statusbar - This statusbar overlays on top of the items instead of taking space - It changes size according to content - Disabled turns statusbar completely off - Zoom slider and space information is only shown in full-width statusbar - Space information is now always on - If user navigates with keyboard, or scrolls to selection, the scrolling will take the statusbar into account - This makes sure the statusbar does not cover any items Related discussion: https://invent.kde.org/system/dolphin/-/issues/50
2025-01-10SpaceInfoObserver: don't instantiate MountPointObserver if m_url is emptyMéven Car
This prevents "Invalid URL:" on dolphin start.
2024-11-12Avoid flickering of space info on startupFelix Ernst
Prior to this commit, when Dolphin was opening in a directory for which the free space information cannot be retrieved, the free space info in the status bar would still briefly be visible before hiding for good. This commit avoids this flickering by keeping the space info hidden until space info has been successfully retrieved. There is no use showing an empty/wrong space info before that anyway. I assume the error in the previous code was that it assumed that one could prevent a widget from being shown by overriding QWidget::showEvent(). This does not work because this method is only called to notify QWidgets of their state change. This commit was primarily written because the brief showing of an empty space info was messing with automatic tests.
2024-10-28Overhaul main view accessibilityFelix Ernst
This commit brings the main view of Dolphin into a usable state accessibility-wise. Users of screen readers should have a way better experience while browsing files and folders and navigating along the file system hierarchy. This commit fixes most of the remaining already-identified accessibility issues listed in https://invent.kde.org/teams/accessibility/collaboration/-/issues/28, but not all. Namely, these should now be fixed: 1. Orca should read the element type in dolphin (file, folder, device, link to folder, link to file) 2. Orca should read complete label in icon and compact view mode, currently it only speaks the name, but there could be additional information like the number of elements or the file size. 3. Orca is not able to announce Selecting / Unselecting files in Dolphin. It also never announces how many items are selected in total. (Announcing the total selection can be done by reading out the view element or by pressing the Tab key to get to the status bar with the relevant information.) 4. Dolphin opens on the home directory, but Orca doesn't tell you so. Consider enclosing the area in a frame/panel which updates its accessible name each time you modify the current path by entering or leaving a directory. 5. I don't know what the folder presentation widget is, but it should be presented as a grid view. Currently, we have a terrible experience because the entire row of folders is read at once, with no indication that we can move left and right with the arrows to go between the elements of a row. When I found that out, however, I discovered that when you're on the last icon of the first row and press right arrow, you get to the first icon of the next row, but that's not announced, instead, the whole row is announced at once 6. Orca should announce the current elements instead of "layered pane" when the Folder / File view gets the focus in dolphin 7. Orca reads only name in Table View only of Dolphin 8. Items are sometimes confusingly announced as "collapsed" in contexts in which there is no concept of collapsing/expanding e.g. in icon view mode. A lot of code was moved around and renamed. The three accessibility classes, which all used to be in the same file, are moved into separate files. *Acknowledgement* Thanks to Christian Hempfling and bgt lover for testing as well as originally identifying a lot of the pain points being addressed here. 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. https://kde.org/announcements/2024_ngi_openletter/
2024-07-08Improve Filelight installation UXFelix Ernst
Before this commit pressing the free space button when Filelight is not installed would show a singular action called "Install Filelight to View Disk Usage Statistics…". Pressing this button would open the store page for Filelight. This is an okay user experience, but we can do better. This commit makes it so pressing the free space button when Filelight is not installed shows an attractive UI that makes clear that freeing up disk space can be accomplished nicely by installing Filelight. The "Install Filelight…" button on this UI is connected to PackageKit directly, so we do not need to show a separate store like Discover and instead trigger an installation right then and there. For this, the recently introduced DolphinPackageInstaller KJob is used. Installation progress is reported through the status bar similar to the progress reporting of slowly loading directories or searches. Installation failure or success is ultimately shown within Dolphin as a passive notification above the view. On Microsoft Windows or when PackageKit is not available, the install button will only open a store page for Filelight. CCBUG: 477739
2024-06-20Prevent inconsistent status bar progress reporting statesFelix Ernst
Merge setting title and progress percent into one method. This makes sure that the method can be called from all over the place and will still always show a consistent state instead of partially showing the progress percent for one progress but the label for a different one. This is to enable various tasks reporting progress at the same time in a way that doesn't lead to a confusing mess for users. Usually multiple tasks do not show progress at the same time, but when it happens this commit should make sure that the user experience is at least bearable. Allow not having a "Stop" button next to the progress report for tasks that cannot be stopped.
2024-05-30Offer installing Filelight if no disk usage analyzer was foundNicolas Fella
This avoids an empty menu and points the user towards a useful tool BUG: 477739
2024-03-23Avoid wrapping text in the status barEugene Popov
The size of the status bar isn't intended to display multiline text.
2024-03-13Animate most of the barsFelix Ernst
When a bar is toggled visible this usually happens because the user might want to use its functionality now. However, if bars appear without animation or at a location the user is not currently looking at, they might not notice that they have appeared at all. An animation makes it more likely that the user notices the change and can then use the newly made visible component. Another reason for animations for showing or hiding of components is that it can be disorienting for users when panels or bars suddenly appear or disappear without animation. There is no visible movement then, so the user might not know what happened if they didn't concentrate or blink at that moment. The newly appearing or disappearing component might also displace other components which can make it difficult to find what one was just looking at. These bars animate now after this change: - Search panel - Filter bar - Status bar This is implemented by extracting the animation code from SelectionMode::TopBar into a new abstract base class AnimatedHeightWidget. This class is now also used in SelectionMode::BottomBar and the animating code there was removed. These bars are left in Dolphin that stay without animation: - Menu bar (Would probably need to be implemented in KXmlGui) - Tool bar (Would probably need to be implemented in KXmlGui) - Tab bar (Needs a different appraoch because it already inherits QTabBar and therefore can not inherit AnimatedHeightWidget)
2024-01-12Explain free space button usage in tooltipFelix Ernst
This is to make sure that users do not have to guess why they would want to press the button.
2023-12-28Add separator in Dolphin Status BarCarl Schwan
See https://invent.kde.org/plasma/breeze/-/merge_requests/390 for explanation and screenshots
2023-11-24Reduce status bar minimum widthFelix Ernst
This is to make sure that when the window is resized it is less likely that the places panel will be resized only because the status bar doesn't want to become very narrow in width.
2023-11-24Turn free space label into a flat buttonFelix Ernst
The usage of a label to show this space information is problematic because there are features/actions hidden behind clicking the label. A button makes this clear. It also fixes the accessibility of this control because previously this info would never be read out by screen readers as it couldn't get keyboard focus. A side-effect of this change is that the free disk space bar looks more normal with non-Breeze styles. This had been a long-standing issue.
2023-11-10Adapt to frame change in BreezeCarl Schwan
Reduce margins in some places, make the dolphinstatusbar use a QStatusBar style, and mark the kitemlistcontainer as no frame
2023-11-08Port away from KMoreToolsNicolas Fella
The idea behind KMoreTools was to point the user at external tools for a given job. It provides a rather complex framework for that, including suggesting not-yet-installed tools. The UX behind that isn't great though, which somewhat deep menu hierarchies and a somewhat arbitrary list of tools. Most KDE apps have moved away from it, with only Dolphin remaining. Instead provide direct integration with relevant KDE tools (Filelight, KDiskFree, KFind)
2023-10-24Merge branch 'master' into kf6Nicolas Fella
2023-10-18Never show status bar context menu away from status barFelix Ernst
The status bar context menu was hard-coded to always appear at the cursor position. However, context menus can also be triggered by keyboard, for example with the Menu key, in which case it makes no sense to show the context menu at whatever random position the mouse cursor currently is. Instead invoke the context menu in the middle of the status bar when it is opened by keyboard.
2023-07-27Minor code improvementMéven Car
NO_CHANGELOG
2023-07-26Update following removing of KIO::FileSystemFreeSpaceJob::result overloadMéven Car
NO_CHANGELOG
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-09-26Remove unused includesLaurent Montel
2022-05-18Add tooltip to free space info widget showing full disk capacityShubham
BUG: 452867 FIXED-IN: 22.08
2022-05-13Drop KNS3 prefix for KMoreTools includesAlexander Lohnau
In KF6 KMoreTools should become it's own library and thus the KNS3 prefix should get removed. Considering that the classes are not in any namespace, having a namespaced include is not needed and only causes noise.
2021-11-29[Status Bar] Don't mess with status bar visibility in extensionsKai Uwe Broulik
"Extensions" is additions to the status bar like free space bar and zoom slider which should hide while loading. The status bar itself should only show/hide based on the global setting. BUG: 443132
2021-04-07Add option to hide entire status barMichael Lang
2021-02-14[Status Bar] Hide zoomLabel also in menu handlerKai Uwe Broulik
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
2021-01-23Make zoom slider and free space bar a little smaller by defaultNate Graham
This makes more room for the new explanatory label for the zoom slider. The zoom slider in particular was huge, and probably would have stood to be reduced in width anyway even if we didn't add an explanaory label.
2021-01-23Add explanatory label to status bar's icon size sliderNate Graham
Right now the slider has no label. Let's add one so it's clear what it does. BUG: 429255 FIXED-IN: 21.04
2020-10-23Compile with QT_NO_KEYWORDSAlexander 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.
2020-08-23Fix 'show space' setting not being re-appliedNazar Kalinowski
BUG: 425542
2020-06-08Status bar: Hide the space free bar when size is unknownMéven Car
Summary: BUG: 420027 BUG: 422226 FIXED-IN: 20.08 Test Plan: {F8312398} Reviewers: #dolphin, ngraham, broulik, #vdg, elvisangelaccio Reviewed By: #dolphin, ngraham, #vdg, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29213
2020-05-31[DolphinStatusBar] Fix free space info height with bigger fontsAhmad Samir
When the font height is more than the zoom slider height, use the former to set the fixed height of the free space widget on the status bar. Otherwise the text is cut-off. This works with Breeze, Oxygen and Fusion styles.
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-11-09[Status Bar] Remove file status Timer, add text update delayMéven Car
Summary: Currently when hovering over a file we have its name, mimetype type and size display in the status bar for 1 second, after which the status of the folder is displayed. This patch removes this timer making the status bar behavior more predictable and user friendly. Instead there is a 50ms delay between when the status bar gets new text to display (for instance mouse hovering or keyboard navigation) and when the status bar displayed text is updated. This is to avoid flickering. FIXED-IN: 19.12 BUG: 399267 Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25218
2019-06-23Add "What's This?" to nearly everything in the main windowFelix Ernst
Summary: This commit adds "What's This?" help to nearly everything in the Dolphin main window (panels, views, buttons, ...). It adds the "?" to the title bar so this help can easily be called. For links in those help texts to work the WhatsThisClickedEvents are handled in the main window class. This doesn't work for menus because events from them aren't forwarded to the main window for some reason so EventFilters are installed for the Control button menus. Modifying the "Help" menu of KXmlGui is deprecated so no EventFilter can be installed in the menubar. Therefore help texts without links are provided for the menubar. Test Plan: Check if the event handling might make any problems. Check for any big mistakes in the help messages. Reviewers: #dolphin, elvisangelaccio Subscribers: broulik, elvisangelaccio, yurchor, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20471
2019-01-15Drop unused includesElvis Angelaccio
GIT_SILENT
2018-10-25Fix minor typosYuri Chornoivan
2018-10-09[MountPointObserverCache] Update mounts less frequentlyKai Uwe Broulik
Even on fastest disks, filling up the disk in 10 seconds is unlikely. Moreover, Plasma's "low disk" warning only polls every minute as well and Dolphin doesn't warn you about the fact that it's full. Reduces needless wake ups of disks and network. CCBUG: 398612 Differential Revision: https://phabricator.kde.org/D15507
2018-09-19Update disk space info on refreshKai Uwe Broulik
When explicitly refreshing the view (e.g. F5) also refresh disk space info. This would also allow us to raise the refresh interval somewhat. CCBUG: 398612 Differential Revision: https://phabricator.kde.org/D15508