Fix video controls volume slider not vertically centered sometimes

Authored by muhlenpfordt on Aug 3 2018, 12:54 PM.

Description

Fix video controls volume slider not vertically centered sometimes

Summary:
The volume slider of the video controls overlay is sometimes not
centered vertically. This happens mostly on KDE Neon or if Gwenview
is started to show a video by commandline argument.
This is caused by calculating the slider and handle positions before
initializing the widget and therefore using wrong values. After the
first slider change this is correctly updated.
This patch delays the initialization of the slider to give the
overlay widget time to setup.

BUG: 390929
FIXED-IN: 18.08.0

Before:

After:

Test Plan:

  • Start Gwenview with video file as commandline argument
  • Check that all sliders are vertically centered in controls overlay
  • Check in current KDE Neon system

Reviewers: Gwenview, rkflx

Reviewed By: Gwenview, rkflx

Subscribers: rkflx

Differential Revision: https://phabricator.kde.org/D14578