js: Do not set entries' ClutterText:editable property

The property influences the text's (and thus entry's) minimum width[0],
which is generally not what we want. And as we now prevent text from
being entered in non-reactive entries by other means, we can simply
drop it.

[0] https://gitlab.gnome.org/GNOME/mutter/-/blob/master/clutter/clutter/clutter-text.c#L2940

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423
This commit is contained in:
Florian Müllner 2020-03-18 22:20:33 +01:00
parent 6d3c740b37
commit 4f427f4e0d
4 changed files with 2 additions and 12 deletions

View File

@ -425,7 +425,6 @@ var AuthPrompt = GObject.registerClass({
updateSensitivity(sensitive) { updateSensitivity(sensitive) {
this._entry.reactive = sensitive; this._entry.reactive = sensitive;
this._entry.clutter_text.editable = sensitive;
} }
vfunc_hide() { vfunc_hide() {

View File

@ -691,7 +691,6 @@ var AllView = GObject.registerClass({
// Toggle search entry // Toggle search entry
Main.overview.searchEntry.reactive = !isOpen; Main.overview.searchEntry.reactive = !isOpen;
Main.overview.searchEntry.clutter_text.editable = !isOpen;
this._displayingPopup = isOpen; this._displayingPopup = isOpen;
}); });

View File

@ -111,15 +111,11 @@ class KeyringDialog extends ModalDialog.ModalDialog {
} }
_updateSensitivity(sensitive) { _updateSensitivity(sensitive) {
if (this._passwordEntry) { if (this._passwordEntry)
this._passwordEntry.reactive = sensitive; this._passwordEntry.reactive = sensitive;
this._passwordEntry.clutter_text.editable = sensitive;
}
if (this._confirmEntry) { if (this._confirmEntry)
this._confirmEntry.reactive = sensitive; this._confirmEntry.reactive = sensitive;
this._confirmEntry.clutter_text.editable = sensitive;
}
this._continueButton.can_focus = sensitive; this._continueButton.can_focus = sensitive;
this._continueButton.reactive = sensitive; this._continueButton.reactive = sensitive;

View File

@ -447,12 +447,8 @@ var ShellMountPasswordDialog = GObject.registerClass({
let useKeyfiles = this._keyfilesCheckbox.checked; let useKeyfiles = this._keyfilesCheckbox.checked;
this._passwordEntry.reactive = !useKeyfiles; this._passwordEntry.reactive = !useKeyfiles;
this._passwordEntry.can_focus = !useKeyfiles; this._passwordEntry.can_focus = !useKeyfiles;
this._passwordEntry.clutter_text.editable = !useKeyfiles;
this._passwordEntry.clutter_text.selectable = !useKeyfiles;
this._pimEntry.reactive = !useKeyfiles; this._pimEntry.reactive = !useKeyfiles;
this._pimEntry.can_focus = !useKeyfiles; this._pimEntry.can_focus = !useKeyfiles;
this._pimEntry.clutter_text.editable = !useKeyfiles;
this._pimEntry.clutter_text.selectable = !useKeyfiles;
this._rememberChoice.reactive = !useKeyfiles; this._rememberChoice.reactive = !useKeyfiles;
this._rememberChoice.can_focus = !useKeyfiles; this._rememberChoice.can_focus = !useKeyfiles;
this._keyfilesLabel.visible = useKeyfiles; this._keyfilesLabel.visible = useKeyfiles;