Hide end time together with title when stopped

This commit is contained in:
Rafał Dzięgiel
2021-04-09 17:54:48 +02:00
parent fa1455556b
commit ebe72f20b5
2 changed files with 4 additions and 3 deletions

View File

@@ -128,6 +128,9 @@ class ClapperRevealerTop extends CustomRevealer
this.set_child(revealerBox);
this.mediaTitle.bind_property('visible', this.endTime, 'visible',
GObject.BindingFlags.DEFAULT
);
this.connect('notify::child-revealed', this._onTopRevealed.bind(this));
}

View File

@@ -449,6 +449,7 @@ class ClapperWidget extends Gtk.Grid
debug('player state changed to: STOPPED');
this.controls.currentPosition = 0;
this.controls.positionScale.set_value(0);
this.revealerTop.showTitle = false;
this.controls.togglePlayButton.setPrimaryIcon();
break;
case GstClapper.ClapperState.PAUSED:
@@ -462,9 +463,6 @@ class ClapperWidget extends Gtk.Grid
default:
break;
}
const isNotStopped = (state !== GstClapper.ClapperState.STOPPED);
this.revealerTop.endTime.visible = isNotStopped;
}
_onPlayerDurationChanged(player, duration)