Restore scrolling on player

This commit is contained in:
Rafostar
2020-10-13 22:07:22 +02:00
parent 80b9eb7c97
commit b1ca9c15bc
2 changed files with 9 additions and 4 deletions

View File

@@ -51,11 +51,10 @@ class ClapperInterface extends Gtk.Grid
this._player.connect('volume-changed', this._onPlayerVolumeChanged.bind(this));
this._player.connect('duration-changed', this._onPlayerDurationChanged.bind(this));
this._player.connect('position-updated', this._onPlayerPositionUpdated.bind(this));
/*
this._player.connectWidget(
'scroll-event', (self, event) => this.controls._onScrollEvent(event)
this._player.scrollController.connect(
'scroll', (ctl, dx, dy) => this.controls._onScroll(ctl, dx, dy)
);
*/
this.controls.togglePlayButton.connect(
'clicked', this._onControlsTogglePlayClicked.bind(this)
);

View File

@@ -82,10 +82,16 @@ class ClapperPlayer extends GstPlayer.Player
this.keyController = new Gtk.EventControllerKey();
this.motionController = new Gtk.EventControllerMotion();
this.scrollController = new Gtk.EventControllerScroll();
this.dragGesture = new Gtk.GestureDrag();
this.scrollController.set_flags(
Gtk.EventControllerScrollFlags.BOTH_AXES
);
this.widget.add_controller(this.keyController);
this.widget.add_controller(this.motionController);
this.widget.add_controller(this.scrollController);
this.widget.add_controller(this.dragGesture);
this.connect('state-changed', this._onStateChanged.bind(this));