AppFolderPopup: fix the position of close buttons
We need to adjust the offset of close buttons, in case the box pointer has the arrow at the top. To do so, extend close buttons to hook into a boxpointer (since that's the common use for them) and automatically adjust their position. https://bugzilla.gnome.org/show_bug.cgi?id=707842
This commit is contained in:
@ -3,8 +3,9 @@
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const Lang = imports.lang;
|
||||
const Meta = imports.gi.Meta;
|
||||
const St = imports.gi.St;
|
||||
const Shell = imports.gi.Shell;
|
||||
const Signals = imports.signals;
|
||||
const St = imports.gi.St;
|
||||
|
||||
const Main = imports.ui.main;
|
||||
const Tweener = imports.ui.tweener;
|
||||
@ -61,6 +62,10 @@ const BoxPointer = new Lang.Class({
|
||||
this._muteInput();
|
||||
},
|
||||
|
||||
get arrowSide() {
|
||||
return this._arrowSide;
|
||||
},
|
||||
|
||||
_muteInput: function() {
|
||||
if (this._capturedEventId == 0)
|
||||
this._capturedEventId = this.actor.connect('captured-event',
|
||||
@ -612,6 +617,8 @@ const BoxPointer = new Lang.Class({
|
||||
this._container.queue_relayout();
|
||||
return false;
|
||||
}));
|
||||
|
||||
this.emit('arrow-side-changed');
|
||||
}
|
||||
},
|
||||
|
||||
@ -644,6 +651,8 @@ const BoxPointer = new Lang.Class({
|
||||
updateArrowSide: function(side) {
|
||||
this._arrowSide = side;
|
||||
this._border.queue_repaint();
|
||||
|
||||
this.emit('arrow-side-changed');
|
||||
},
|
||||
|
||||
getPadding: function(side) {
|
||||
@ -654,3 +663,4 @@ const BoxPointer = new Lang.Class({
|
||||
return this.actor.get_theme_node().get_length('-arrow-rise');
|
||||
}
|
||||
});
|
||||
Signals.addSignalMethods(BoxPointer.prototype);
|
||||
|
Reference in New Issue
Block a user