Do not set position adjustment twice

This commit is contained in:
Rafostar
2020-09-01 17:45:36 +02:00
parent b401bc15ff
commit 18a7d34d95

View File

@@ -18,9 +18,9 @@ class ClapperInterface extends Gtk.Grid
{ {
this._player = player; this._player = player;
this._player.widget.expand = true; this._player.widget.expand = true;
this._connectControlsToPlayer();
this.attach(this._player.widget, 0, 0, 1, 1); this.attach(this._player.widget, 0, 0, 1, 1);
this._connectControlsToPlayer();
} }
_connectControlsToPlayer() _connectControlsToPlayer()
@@ -68,11 +68,9 @@ class ClapperInterface extends Gtk.Grid
? 1 ? 1
: duration / 100; : duration / 100;
let adjustment = this.controls.positionScale.get_adjustment(); this.controls.positionAdjustment.set_upper(duration);
adjustment.set_upper(duration); this.controls.positionAdjustment.set_step_increment(increment);
adjustment.set_step_increment(increment); this.controls.positionAdjustment.set_page_increment(increment);
adjustment.set_page_increment(increment);
this.controls.positionScale.set_adjustment(adjustment);
} }
_onPlayerPositionUpdated(player, position) _onPlayerPositionUpdated(player, position)