D22183: Add click to play/pause feature on previews for audio/video

Méven Car noreply at phabricator.kde.org
Wed Aug 14 10:29:07 BST 2019


meven marked an inline comment as done.
meven added inline comments.

INLINE COMMENTS

> elvisangelaccio wrote in phononwidget.cpp:103-119
> Why would we need that? I just tried to move this code from `eventFilter()` to `mousePressEvent()` and it seems to work fine.

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.
Using mousePressEvent would force me to add two mousePressEvent in PhononWidget and PixmapViewer and add a code path to call PhononWidget::play() from PixmapViewer::mousePressEvent().

Btw, my latest changes completely hide the video controls as long as the video is not playing or paused.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D22183

To: meven, elvisangelaccio, #dolphin, ngraham
Cc: anthonyfieroni, ngraham, kfm-devel, aprcela, vmarinescu, fprice, MrPepe, fbampaloukas, alexde, feverfew, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190814/d2fb772d/attachment.htm>


More information about the kfm-devel mailing list