modalDialog: Remove the fade in buttons code
Due to a typo, it never worked correctly. After a fix-up to the appropriate method, the behavior is suboptimal, as the buttons only fade in the first time the modal dialog is constructed. Just remove the fade-in behavior, rather than keeping this non-working code around. https://bugzilla.gnome.org/show_bug.cgi?id=677426
This commit is contained in:
parent
671a813135
commit
360d94dd67
@ -20,7 +20,6 @@ const Main = imports.ui.main;
|
|||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const OPEN_AND_CLOSE_TIME = 0.1;
|
const OPEN_AND_CLOSE_TIME = 0.1;
|
||||||
const FADE_IN_BUTTONS_TIME = 0.33;
|
|
||||||
const FADE_OUT_DIALOG_TIME = 1.0;
|
const FADE_OUT_DIALOG_TIME = 1.0;
|
||||||
|
|
||||||
const State = {
|
const State = {
|
||||||
@ -117,8 +116,6 @@ const ModalDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
setButtons: function(buttons) {
|
setButtons: function(buttons) {
|
||||||
let hadChildren = this._buttonLayout.get_children() > 0;
|
|
||||||
|
|
||||||
this._buttonLayout.destroy_all_children();
|
this._buttonLayout.destroy_all_children();
|
||||||
this._actionKeys = {};
|
this._actionKeys = {};
|
||||||
|
|
||||||
@ -169,21 +166,7 @@ const ModalDialog = new Lang.Class({
|
|||||||
this._actionKeys[key] = action;
|
this._actionKeys[key] = action;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fade in buttons if there weren't any before
|
this.emit('buttons-set');
|
||||||
if (!hadChildren && buttons.length > 0) {
|
|
||||||
this._buttonLayout.opacity = 0;
|
|
||||||
Tweener.addTween(this._buttonLayout,
|
|
||||||
{ opacity: 255,
|
|
||||||
time: FADE_IN_BUTTONS_TIME,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
onComplete: Lang.bind(this, function() {
|
|
||||||
this.emit('buttons-set');
|
|
||||||
})
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.emit('buttons-set');
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeyReleaseEvent: function(object, event) {
|
_onKeyReleaseEvent: function(object, event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user