┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/informationpanelcontent.cpp
AgeCommit message (Collapse)Author
2025-11-20informationpanel: prevent a crash when creating video preview panel and a ↵Jean-Baptiste Mardelle
media file is selected To reproduce the crash: - Open Dolphin, disable information panel and close Dolphin - Re-open Dolphin - Select a video file - Enable information panel - Crash Problem is that some elements of the MediaWidget panel are created when the widget is shown, in `showEvent` (`m_seekSlider` and `m_topLayout`), and these elements are called before being created. This MR fixes 2 different crashes: - Crash creating panel when a video file is selected (call to `m_seekSlider` before its creation) - Crash creating panel when a video file is selected and autoplay enabled (call to `m_topLayout` before its creation)
2025-09-28informationpanelcontent: prevent repeated disabled effect on previewsPan Zhang
When switching files quickly in the Information Panel, the preview pixmap could appear progressively brighter/whiter. This happened because markOutdatedPreview() was applying KIconEffect::toDisabled() multiple times on the same pixmap while a preview job was still pending. This patch fixes the issue by: - Tracking the URL that was last disabled, and only applying the disabled effect once per URL. - Clearing the disabled state whenever a new preview job starts or when a new pixmap is shown. With this change, the "disabled preview" effect is preserved (still useful for slow HDD or network filesystems), but the progressive white-out artifact no longer occurs when navigating rapidly. BUG: 507844
2025-09-12informationpanel: use QTextEdit for filename display to avoid newlines in ↵Weinan Li
copied text QLabel does not support line wrapping at arbitrary positions. The original code achieved word wrap by manually adding newline characters to the text, which resulted in these newlines being included when the filename was selected and copied. This patch replaces QLabel with QTextEdit for filename display, leveraging QTextEdit's built-in word wrap functionality that handles line breaks purely for display without modifying the underlying text. This ensures copied filenames remain free of unintended newlines. BUG: 493279
2025-06-28mediawidget: bind arrow keys to slide in mediaMéven Car
2025-06-28InformationPanel: Port from Phonon to QtMultimediaMéven Car
2025-01-17Refactor Overlay HandlingMéven Car
Now all overlays icons in kitemviews are added in KStandardItemListWidget::updatePixmapCache. data[iconOverlays] now contains icon names. DolphinFileItemListWidget::refreshCache is the sole responsible of setting the overlays either coming from KFileItemModelRolesUpdater or KVersionControlPlugin. This garantees consistency in rendering. BUG: 497372
2025-01-15Clean stop-gap porting ifdef for KICONTHEMES_VERSIONMéven Car
That were introduced in: a55c467fbb31d822d89722812388425327830377 38ab14c87a945153e683657483fa4bcf44d6b0fb
2025-01-11Icons: when adding overlays pass in the output sizeMéven Car
Instead of the pixmap size that won't be accurate. It allow KGuiAddons::addOverlays to draw larger images to add overlays. Consequently the emblems are not longer dependant scaled based on the pixmap aspect ratio. BUG: 498211
2025-01-09information panel: scale according dprMéven Car
Also use dpr for icons. Amends cebcf8db BUG: 497576
2024-07-27Port from KIconLoader::drawOverlays to KIconUtils::addOverlaysNicolas Fella
The latter is what most other projects use
2024-07-18Port away from deprecated KIconEffect APINicolas Fella
2023-11-21panels/information: Create pixmap with explicit devicePixelRatioKai Uwe Broulik
2023-11-21Create thumbnails with scene devicePixelRatioKai Uwe Broulik
2023-07-05Merge branch 'master' into kf6Nicolas Fella
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-06-20Use non-deprecated Phonon includesVolker Krause
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-09-26Remove unused includesLaurent Montel
2022-05-11Port to QStringViewLaurent Montel
2022-02-02InformationPanel: Improve video arrow overlay appearanceMéven Car
2022-02-02Don't set ignoreMaximumSize on preview jobs for slow filesBharadwaj Raju
With this change (plus https://invent.kde.org/frameworks/kio/-/merge_requests/702), slow files will be treated as remote files for generating previews. This should make browsing local mounts of remote locations smoother.
2021-12-16[Information Panel] Remove unused PlacesItemModelKai Uwe Broulik
2021-07-16Allow to have HiDpi previewsMéven Car
BUG: 401170
2021-03-15Allow selecting filename in information panelNate Graham
BUG: 434329 FIXED-IN: 21.04
2021-02-19Use only enabled preview plugins in InformationPanelContent and ToolTipManager.David Lerch
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
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-06-06Detect animated format using mimeType instead of file pathIsmael Asensio
This allows to extend the functionality to non-local files and avoids a warning on such files (`QFSFileEngine::open: No file name specified`)
2020-05-01Information Panel: show early icons for foldersMéven Car
Summary: Folders previews can be long to generate. This can be noticeable by the user. This diff displays folder icons after a 100ms timer. BUG: 420340 FIXED-IN: 20.08 Test Plan: rm -r ~/.cache/thumbnails/ In dolphin open trash Click on download (or any directory with a long to generate preview). Reviewers: #dolphin, ngraham Reviewed By: #dolphin, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29204
2020-04-25Information Panel: hide phonon widget when starting a searchMéven Car
Summary: BUG: 420512 Test Plan: Select on hove over a video file Type Ctrl + F Type some test + enter Reviewers: ngraham, #dolphin, elvisangelaccio Reviewed By: ngraham, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29158
2020-04-25Information Panel: show the phonon when we can use phononMéven Car
Summary: Similar to D29158 Test Plan: Select a video file Type CTRL + F and some text Hit ALt + left or previous button Before: The video controls are not visible for selected video file After: Video controls are visible again. Reviewers: ngraham, elvisangelaccio, #dolphin Reviewed By: ngraham, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29160
2020-04-21Information Panel: Make icons as big as previewsMéven Car
Summary: Make icons match the preview size. It prevents a user that had a wide information panel, seeing a size difference between a preview and an icon despite they can look similar (i.e folder preview). Test Plan: Before: {F8248373, size=full} After: {F8248370, size=full} Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29002
2020-03-19Add missing includesLaurent Montel
2019-11-12[Information Panel] Allows to refresh icon and metadata for urls such as trash:/Méven Car
Summary: CCBUG: 392882 Test Plan: 1. Create a file 2. Remove it, so that it goes to the trash 3. Open trash 4. Empty trash Before: Information panel icon is still user-trash-full After: Information panel icon is changed to user-trash Reviewers: ngraham, #dolphin, elvisangelaccio Reviewed By: ngraham, #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23668
2019-10-29Replace old deleted nepomuk icon with baloo iconNate Graham
2019-09-21[dolphin] Animate gifs on previewIsmael Asensio
Summary: Adds the capability to view animated images on the preview in the information panel. This was a request from a user back in 2009 (https://bugs.kde.org/show_bug.cgi?id=182257), but I think nowadays with stickers/memes and what not, it's even more useful. It keeps the size default transition of the preview viewer before starting the animation, so that the visual integration is smoother. {F7289110} FEATURE: 182257 FIXED-IN: 19.11.80 Test Plan: Open the information panel and hover over some animated images (gif/webp/mng) Reviewers: #dolphin, #vdg, ngraham, elvisangelaccio Reviewed By: #vdg, ngraham Subscribers: pino, fuksitter, meven, broulik, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23538
2019-09-14This is not unusedIsmael Asensio
GIT_SILENT
2019-09-08GIT_SILENT: minor qstring optimizationLaurent Montel
2019-09-01Add click to play/pause feature on previews for audio/videoMéven Car
Test Plan: In dolphin, click on a video or audio preview in the information panel. The video or audio preview starts Reviewers: elvisangelaccio, #dolphin, ngraham Reviewed By: elvisangelaccio, #dolphin, ngraham Subscribers: alexde, anthonyfieroni, ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22183
2019-07-15Fix a regression preventing previews to be resizedMéven Car
Summary: e6c1b97d67f6b6c6d4ad935db14241b041b3fca4 introduced a regression preventing previews to be properly resized. Test Plan: Manual : resizing the information panel and the window Reviewers: #dolphin, ngraham Reviewed By: #dolphin, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22473
2019-06-23Allow dolphin to auto-play previewed media file, click on preview to ↵Méven Car
play/pause videos or audio Summary: It is based on D19844. I did my best to avoid glitches hence the amount of code touched. Retry after @pekkah D7539 Moved the setting to the information panel context menu, no more timer Settings screenshot : {F6700220} This would mach the same feature in the open/save dialog (although not equivalent) {F6696456} FEATURE: 378613 FIXED-IN: 19.08.0 GUI: New information panel context menu option Test Plan: Without auto play - in dolphin with the information panel opened, and the auto media play feature is disabled (right on the information panel) - hover over media files - the behavior is the same as before the patch With auto play - in dolphin with the information panel opened, and the auto media play feature is enabled - hover over media files - media is played automatically - hover over another media file, the new media is previewed Use audio or video file as media. Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: ngraham, broulik, kfm-devel, pekkah Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19782
2019-04-23[InformationPanel] Use the new inline configuration modeStefan Brüns
Summary: The current external configuration dialog has some issues: - its layout is suboptimal, as its initial size is typically to small - it is quite disassociated with the actual widget it configures, properties have a different order, and the property names can be quite abstract without the corresponding value. Doing the visibility selection inline typically avoids the sizing problem, as the containing application (dolphin) is often vertically maximized. The selection becomes more obvious, as the item order is kept, and the values are shown. Depends on D20524 CCBUG: 389571 Reviewers: #dolphin, #baloo, #frameworks, ngraham, astippich, #vdg, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20525
2019-04-22[InformationPanel] Remove obsolete intermediate wrapper widget/layoutStefan Brüns
The Baloo::MetaDataWidget is now able to stretch in a meaningful way by itself, remove the wrapper. Summary: Depends on D20667 Reviewers: #dolphin, #baloo, #frameworks, ngraham, astippich, elvisangelaccio Reviewed By: #dolphin, #baloo, ngraham, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20668
2019-04-20More coding style fixesElvis Angelaccio
GIT_SILENT
2019-04-20[InformationPanelContent] Fix coding styleElvis Angelaccio
GIT_SILENT
2019-04-18Fix missing update of file name label in information panel without previewStefan Brüns
Summary: The file name label was only updated when the preview was shown, after the function was moved into a conditional section. This is a regression caused by commit 405aa4878f75 ("[InformationPanel] Hide the video when the preview is disabled, avoid computing the preview when it is disabled"). Test Plan: Hide the preview in dolphin's information panel Hover different files, the name label reflects the hovered file again Reviewers: #dolphin, elvisangelaccio, meven, ngraham Reviewed By: meven Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20660
2019-04-14[Information Panel] Remove nullptr checks for MetaDataWidget memberStefan Brüns
Summary: The widget has the same livetime as the containing widget, no need to do any extra checks. Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20514
2019-03-24[InformationPanel] Hide the video when the preview is disabled, avoid ↵Méven Car
computing the preview when it is disabled Summary: Bug symptom : {F6698879} Fix the bugs and allow to avoid launching a PreviewJob with all files even when the preview is disabled. Test Plan: # In dolphin with an information panel with preview on # launch the video preview # Disable the preview ->bug 1: the video player control is still visible (this bug fix this) # re-enable preview -> bug 2: the video stays visible and the preview is displayed above (this bug fix this) Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19844
2019-03-17When the previewed video stops playing (because of the user or because the ↵Méven Car
media playback has ended), show the regular preview only if the preview setting is on. Summary: Bug result after test plan : {F6698812} Test Plan: In dolphin with the information panel Select a video Play the video Disable the preview through the context menu (the video stays playing and visible and this will get fixed in a subsequent review) Stop the video -> the video preview reappears when it should not Reviewers: elvisangelaccio Reviewed By: elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19843