Commit 86cbed56 authored by Edward Wang's avatar Edward Wang Committed by Jean-Baptiste Kempf

Save display remaining time setting

Close #5914
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 502db837
...@@ -555,6 +555,8 @@ TimeLabel::TimeLabel( intf_thread_t *_p_intf, TimeLabel::Display _displayType ) ...@@ -555,6 +555,8 @@ TimeLabel::TimeLabel( intf_thread_t *_p_intf, TimeLabel::Display _displayType )
buffering( false ), showBuffering(false), bufVal( -1 ), displayType( _displayType ) buffering( false ), showBuffering(false), bufVal( -1 ), displayType( _displayType )
{ {
b_remainingTime = false; b_remainingTime = false;
if( _displayType != TimeLabel::Elapsed )
b_remainingTime = getSettings()->value( "MainWindow/ShowRemainingTime", false ).toBool();
switch( _displayType ) { switch( _displayType ) {
case TimeLabel::Elapsed: case TimeLabel::Elapsed:
setText( " --:-- " ); setText( " --:-- " );
...@@ -680,6 +682,7 @@ void TimeLabel::setDisplayPosition( float pos ) ...@@ -680,6 +682,7 @@ void TimeLabel::setDisplayPosition( float pos )
void TimeLabel::toggleTimeDisplay() void TimeLabel::toggleTimeDisplay()
{ {
b_remainingTime = !b_remainingTime; b_remainingTime = !b_remainingTime;
getSettings()->setValue( "MainWindow/ShowRemainingTime", b_remainingTime );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment