Do not show "Ends at" text when player is stopped

This commit is contained in:
Rafostar
2020-11-02 09:11:55 +01:00
parent 2dfeb160ac
commit 866e8325e6
2 changed files with 6 additions and 1 deletions

View File

@@ -127,7 +127,9 @@ class ClapperRevealerTop extends CustomRevealer
this.currentTime = new Gtk.Label(timeLabelOpts);
this.currentTime.add_css_class('osdtime');
this.endTime = new Gtk.Label(timeLabelOpts);
this.endTime = new Gtk.Label(
Object.assign(timeLabelOpts, { visible: false })
);
this.endTime.add_css_class('osdendtime');
this.revealerGrid.attach(this.mediaTitle, 0, 0, 1, 1);

View File

@@ -310,6 +310,9 @@ var Widget = GObject.registerClass({
break;
}
let isNotStopped = (state !== GstPlayer.PlayerState.STOPPED)
this.revealerTop.endTime.set_visible(isNotStopped);
if(state === GstPlayer.PlayerState.BUFFERING)
return;