mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 08:21:59 +02:00
Do not show "Ends at" text when player is stopped
This commit is contained in:
@@ -127,7 +127,9 @@ class ClapperRevealerTop extends CustomRevealer
|
|||||||
this.currentTime = new Gtk.Label(timeLabelOpts);
|
this.currentTime = new Gtk.Label(timeLabelOpts);
|
||||||
this.currentTime.add_css_class('osdtime');
|
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.endTime.add_css_class('osdendtime');
|
||||||
|
|
||||||
this.revealerGrid.attach(this.mediaTitle, 0, 0, 1, 1);
|
this.revealerGrid.attach(this.mediaTitle, 0, 0, 1, 1);
|
||||||
|
@@ -310,6 +310,9 @@ var Widget = GObject.registerClass({
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let isNotStopped = (state !== GstPlayer.PlayerState.STOPPED)
|
||||||
|
this.revealerTop.endTime.set_visible(isNotStopped);
|
||||||
|
|
||||||
if(state === GstPlayer.PlayerState.BUFFERING)
|
if(state === GstPlayer.PlayerState.BUFFERING)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user