Do not show hours when duration is shorter #14

This commit is contained in:
Rafostar
2020-11-20 22:41:33 +01:00
parent 7ccd6ad424
commit c221f7cdb6
3 changed files with 17 additions and 9 deletions

View File

@@ -27,8 +27,9 @@ class ClapperControls extends Gtk.Box
this.currentDuration = 0;
this.isPositionDragging = false;
this.durationFormated = '00:00:00';
this.elapsedInitial = '00:00:00/00:00:00';
this.showHours = false;
this.durationFormatted = '00:00';
this.elapsedInitial = '00:00/00:00';
this.buttonsArr = [];
this._addTogglePlayButton();
@@ -98,8 +99,8 @@ class ClapperControls extends Gtk.Box
{
value = value || 0;
let elapsed = Misc.getFormatedTime(value)
+ '/' + this.durationFormated;
let elapsed = Misc.getFormattedTime(value, this.showHours)
+ '/' + this.durationFormatted;
this.elapsedButton.set_label(elapsed);
}