In dolphin, click on a video or audio preview in the information panel.
The video or audio preview starts
Details
- Reviewers
elvisangelaccio ngraham - Group Reviewers
Dolphin - Commits
- R318:eaec53a7af4e: Add click to play/pause feature on previews for audio/video
Diff Detail
- Repository
- R318 Dolphin
- Branch
- mouse-click-phono
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 13741 Build 13759: arc lint + arc unit
With the latest patch, I have reduced the arrow size and used a gradient to fill it to avoid low contrast with the video :
With dark breeze:
With breeze:
Screenshots are made with the video filmstrip preview option turned off. I really like this option, the current film strip don't look nice.
Some color feedback is welcome as well.
+1, and let's use this style unconditionally. The lighting model itself doesn't change with the color scheme (only the colors themselves). So if there's going ot be a gradient like this, the top part of it should always have the lighter color.
Check the video is not already playing the current file before resetting the video preview state
Refresh the preview when a video is hidden, in auto-play mode avoid restarting a video that has been stopped when resizing the panel
On autoplay mode when a media file has already been previewed once, a none media file was previewed, and the media file is being previewed again, play it automatically as the autoplay implies
src/panels/information/informationpanelcontent.cpp | ||
---|---|---|
333–334 ↗ | (On Diff #60911) | Please always use camelCase. |
src/panels/information/phononwidget.cpp | ||
103–119 ↗ | (On Diff #60911) | Have you tried to override mousePressEvent() instead of using an event filter? |
src/panels/information/phononwidget.h | ||
76 ↗ | (On Diff #60911) | Why a slot? This is just a getter, isn't it? |
src/panels/information/phononwidget.cpp | ||
---|---|---|
103–119 ↗ | (On Diff #60911) | I did. m_preview->installEventFilter(m_phononWidget); |
Btw I think I spotted a regression:
- Start playback
- Right-click on info panel -> uncheck "Preview"
- Right-click again -> check "Preview"
The phonon widget does not show up again.
src/panels/information/phononwidget.cpp | ||
---|---|---|
103–119 ↗ | (On Diff #60911) | Why would we need that? I just tried to move this code from eventFilter() to mousePressEvent() and it seems to work fine. |
- for video previews, hide player completely when playback has finished or is stopped- better enforce video size- display the play arrow only for video files
Thank you for testing the patch.
This issue is fixed now, and was even more important than your reproducing steps suggests.
src/panels/information/phononwidget.cpp | ||
---|---|---|
103–119 ↗ | (On Diff #60911) | It is so that the preview widget can be clicked to start video playback, and thanks to this eventFilter I can reuse directly the logic for both m_phononWidget and m_preview, just use installEventFilter / removeEventFilter. Btw, my latest changes completely hide the video controls as long as the video is not playing or paused. |
Is the triangle set? How about such a triangle:
https://www.netclipart.com/pp/m/120-1201455_play-button-png-video-youtube-youtube-video-play.png
I can imagine that it can be discerned better due to the dark background casted on the image preview within the outer white ring.
For Breeze Dark, the colors could become inverted.
I am not against a better version, but the culprit is that I am no designer.
For anything more complicated we would need an icon/svg.
I am not against a better version, but the culprit is that I am no designer.
For anything more complicated we would need an icon/svg.
Me neither but I created a SVG for you with Inkscape:
You may use them for testing or change them the way you like.
Those are nice, but I would rather use those in a subsequent diff not to bloat this long standing one.
src/panels/information/informationpanelcontent.cpp | ||
---|---|---|
171–172 | The comment was moved to InformationPanelContent::refreshPreview but I have re-added it here as well. |
Patch looks almost good now.
Is it normal that that play arrow gets painted only at the beginning of a video?
src/panels/information/phononwidget.cpp | ||
---|---|---|
105 ↗ | (On Diff #60911) | Still not fixed ;) |
I don't see what you mean.
Which play arrow ? On the video preview, or on the seekslider bar ?
Either way they are painted when the videos are being previewed.
Just like :
Very happy to reach acceptability, thank you for your review @elvisangelaccio
I don't get what you exactly mean gets painted only at the beginning of a video
The preview shown is the frame at 20% playback of the video currently, and the play arrow is painted on top.