app-display: Slight cleanup and style update
Being no longer an independent menu pane, both the toggle() and close() functions are no longer needed, and the view's structure can be simplified a bit. Also update the style to fit into the view selector. https://bugzilla.gnome.org/show_bug.cgi?id=634948
This commit is contained in:
parent
1a77acfda6
commit
1eb6dfe1b8
@ -508,10 +508,7 @@ StTooltip StLabel {
|
||||
}
|
||||
|
||||
.all-app {
|
||||
border-radius: 10px;
|
||||
background-color: #111111;
|
||||
border: 2px solid #868686;
|
||||
color: #ffffff;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.app-section-divider-container {
|
||||
@ -524,16 +521,6 @@ StTooltip StLabel {
|
||||
background-image: url("separator-white.png");
|
||||
}
|
||||
|
||||
.all-app-controls-panel {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.all-app-scroll-view {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#dash > .app-well-app {
|
||||
padding: 6px 12px;
|
||||
}
|
||||
|
@ -148,22 +148,14 @@ AllAppDisplay.prototype = {
|
||||
Main.queueDeferredWork(this._workId);
|
||||
}));
|
||||
|
||||
let bin = new St.BoxLayout({ style_class: 'all-app-controls-panel',
|
||||
reactive: true });
|
||||
this.actor = new St.BoxLayout({ style_class: 'all-app', vertical: true });
|
||||
this.actor.hide();
|
||||
|
||||
let view = new St.ScrollView({ x_fill: true,
|
||||
y_fill: false,
|
||||
style_class: 'all-app-scroll-view',
|
||||
vshadows: true });
|
||||
this._scrollView = view;
|
||||
this.actor.add(bin);
|
||||
this.actor.add(view, { expand: true, y_fill: false, y_align: St.Align.START });
|
||||
this._scrollView = new St.ScrollView({ x_fill: true,
|
||||
y_fill: false,
|
||||
vshadows: true });
|
||||
this.actor = new St.Bin({ style_class: 'all-app',
|
||||
y_align: St.Align.START,
|
||||
child: this._scrollView });
|
||||
|
||||
this._appView = new ViewByCategories();
|
||||
this._appView.connect('launching', Lang.bind(this, this.close));
|
||||
this._appView.connect('drag-begin', Lang.bind(this, this.close));
|
||||
this._scrollView.add_actor(this._appView.actor);
|
||||
|
||||
this._scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
||||
@ -177,37 +169,6 @@ AllAppDisplay.prototype = {
|
||||
});
|
||||
|
||||
this._appView.refresh(apps);
|
||||
},
|
||||
|
||||
toggle: function() {
|
||||
if (this.actor.visible) {
|
||||
Tweener.addTween(this.actor,
|
||||
{ opacity: 0,
|
||||
time: Overview.PANE_FADE_TIME,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: Lang.bind(this,
|
||||
function() {
|
||||
this.actor.hide();
|
||||
this.emit('open-state-changed',
|
||||
this.actor.visible);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.actor.show();
|
||||
this.emit('open-state-changed', this.actor.visible);
|
||||
this.actor.opacity = 0;
|
||||
Tweener.addTween(this.actor,
|
||||
{ opacity: 255,
|
||||
time: Overview.PANE_FADE_TIME,
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
close: function() {
|
||||
if (!this.actor.visible)
|
||||
return;
|
||||
this.toggle();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user