overviewControls: use Params for SlidingControl constructor
https://bugzilla.gnome.org/show_bug.cgi?id=686984
This commit is contained in:
parent
cb7778d433
commit
21403b19e0
@ -6,6 +6,7 @@ const St = imports.gi.St;
|
|||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const ViewSelector = imports.ui.viewSelector;
|
const ViewSelector = imports.ui.viewSelector;
|
||||||
|
|
||||||
@ -88,11 +89,14 @@ const SlideLayout = new Lang.Class({
|
|||||||
const SlidingControl = new Lang.Class({
|
const SlidingControl = new Lang.Class({
|
||||||
Name: 'SlidingControl',
|
Name: 'SlidingControl',
|
||||||
|
|
||||||
_init: function() {
|
_init: function(params) {
|
||||||
|
params = Params.parse(params, { slideDirection: SlideDirection.LEFT });
|
||||||
|
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.inDrag = false;
|
this.inDrag = false;
|
||||||
|
|
||||||
this.layout = new SlideLayout();
|
this.layout = new SlideLayout();
|
||||||
|
this.layout.slideDirection = params.slideDirection;
|
||||||
this.actor = new St.Widget({ layout_manager: this.layout,
|
this.actor = new St.Widget({ layout_manager: this.layout,
|
||||||
clip_to_allocation: true });
|
clip_to_allocation: true });
|
||||||
|
|
||||||
@ -222,9 +226,7 @@ const ThumbnailsSlider = new Lang.Class({
|
|||||||
Extends: SlidingControl,
|
Extends: SlidingControl,
|
||||||
|
|
||||||
_init: function(thumbnailsBox) {
|
_init: function(thumbnailsBox) {
|
||||||
this.parent();
|
this.parent({ slideDirection: SlideDirection.RIGHT });
|
||||||
|
|
||||||
this.layout.slideDirection = SlideDirection.RIGHT;
|
|
||||||
|
|
||||||
this._thumbnailsBox = thumbnailsBox;
|
this._thumbnailsBox = thumbnailsBox;
|
||||||
|
|
||||||
@ -296,9 +298,7 @@ const DashSlider = new Lang.Class({
|
|||||||
Extends: SlidingControl,
|
Extends: SlidingControl,
|
||||||
|
|
||||||
_init: function(dash) {
|
_init: function(dash) {
|
||||||
this.parent();
|
this.parent({ slideDirection: SlideDirection.LEFT });
|
||||||
|
|
||||||
this.layout.slideDirection = SlideDirection.LEFT;
|
|
||||||
|
|
||||||
this._dash = dash;
|
this._dash = dash;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user