Changeset View
Changeset View
Standalone View
Standalone View
src/panels/information/informationpanelcontent.cpp
Show First 20 Lines • Show All 220 Lines • ▼ Show 20 Line(s) | 190 | } else { | |||
---|---|---|---|---|---|
221 | if (usePhonon) { | 221 | if (usePhonon) { | ||
222 | 222 | | |||
223 | if (InformationPanelSettings::previewsAutoPlay() && isVideo) { | 223 | if (InformationPanelSettings::previewsAutoPlay() && isVideo) { | ||
224 | // hides the preview now to avoid flickering when the autoplay video starts | 224 | // hides the preview now to avoid flickering when the autoplay video starts | ||
225 | m_preview->hide(); | 225 | m_preview->hide(); | ||
226 | } else { | 226 | } else { | ||
227 | // the video won't play before the preview is displayed | 227 | // the video won't play before the preview is displayed | ||
228 | m_preview->show(); | 228 | m_preview->show(); | ||
229 | m_preview->installEventFilter(m_phononWidget); | ||||
229 | } | 230 | } | ||
230 | 231 | | |||
231 | m_phononWidget->show(); | 232 | m_phononWidget->show(); | ||
232 | m_phononWidget->setUrl(m_item.targetUrl(), isVideo ? PhononWidget::MediaKind::Video : PhononWidget::MediaKind::Audio); | 233 | m_phononWidget->setUrl(m_item.targetUrl(), isVideo ? PhononWidget::MediaKind::Video : PhononWidget::MediaKind::Audio); | ||
233 | m_phononWidget->setVideoSize(m_preview->size()); | 234 | m_phononWidget->setVideoSize(m_preview->size()); | ||
234 | } else { | 235 | } else { | ||
235 | // When we don't need it, hide the phonon widget first to avoid flickering | 236 | // When we don't need it, hide the phonon widget first to avoid flickering | ||
236 | m_phononWidget->hide(); | 237 | m_phononWidget->hide(); | ||
237 | m_preview->show(); | 238 | m_preview->show(); | ||
239 | m_preview->removeEventFilter(m_phononWidget); | ||||
238 | } | 240 | } | ||
239 | } | 241 | } | ||
240 | } else { | 242 | } else { | ||
241 | m_preview->hide(); | 243 | m_preview->hide(); | ||
242 | m_phononWidget->hide(); | 244 | m_phononWidget->hide(); | ||
243 | } | 245 | } | ||
244 | } | 246 | } | ||
245 | 247 | | |||
▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines |