mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Restore scrolling on player
This commit is contained in:
@@ -51,11 +51,10 @@ class ClapperInterface extends Gtk.Grid
|
|||||||
this._player.connect('volume-changed', this._onPlayerVolumeChanged.bind(this));
|
this._player.connect('volume-changed', this._onPlayerVolumeChanged.bind(this));
|
||||||
this._player.connect('duration-changed', this._onPlayerDurationChanged.bind(this));
|
this._player.connect('duration-changed', this._onPlayerDurationChanged.bind(this));
|
||||||
this._player.connect('position-updated', this._onPlayerPositionUpdated.bind(this));
|
this._player.connect('position-updated', this._onPlayerPositionUpdated.bind(this));
|
||||||
/*
|
|
||||||
this._player.connectWidget(
|
this._player.scrollController.connect(
|
||||||
'scroll-event', (self, event) => this.controls._onScrollEvent(event)
|
'scroll', (ctl, dx, dy) => this.controls._onScroll(ctl, dx, dy)
|
||||||
);
|
);
|
||||||
*/
|
|
||||||
this.controls.togglePlayButton.connect(
|
this.controls.togglePlayButton.connect(
|
||||||
'clicked', this._onControlsTogglePlayClicked.bind(this)
|
'clicked', this._onControlsTogglePlayClicked.bind(this)
|
||||||
);
|
);
|
||||||
|
@@ -82,10 +82,16 @@ class ClapperPlayer extends GstPlayer.Player
|
|||||||
|
|
||||||
this.keyController = new Gtk.EventControllerKey();
|
this.keyController = new Gtk.EventControllerKey();
|
||||||
this.motionController = new Gtk.EventControllerMotion();
|
this.motionController = new Gtk.EventControllerMotion();
|
||||||
|
this.scrollController = new Gtk.EventControllerScroll();
|
||||||
this.dragGesture = new Gtk.GestureDrag();
|
this.dragGesture = new Gtk.GestureDrag();
|
||||||
|
|
||||||
|
this.scrollController.set_flags(
|
||||||
|
Gtk.EventControllerScrollFlags.BOTH_AXES
|
||||||
|
);
|
||||||
|
|
||||||
this.widget.add_controller(this.keyController);
|
this.widget.add_controller(this.keyController);
|
||||||
this.widget.add_controller(this.motionController);
|
this.widget.add_controller(this.motionController);
|
||||||
|
this.widget.add_controller(this.scrollController);
|
||||||
this.widget.add_controller(this.dragGesture);
|
this.widget.add_controller(this.dragGesture);
|
||||||
|
|
||||||
this.connect('state-changed', this._onStateChanged.bind(this));
|
this.connect('state-changed', this._onStateChanged.bind(this));
|
||||||
|
Reference in New Issue
Block a user