[gnome-shell] location: Adapt geolocation dialog to new design
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] location: Adapt geolocation dialog to new design
- Date: Mon, 27 Jan 2020 22:45:12 +0000 (UTC)
commit 2996d9d9777637ed20b5878dee1828ec6b44c0ba
Author: Jonas Dreßler <verdre v0yd nl>
Date: Mon Jan 27 22:38:49 2020 +0100
location: Adapt geolocation dialog to new design
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/962
data/theme/gnome-shell-sass/widgets/_dialogs.scss | 5 -----
js/ui/status/location.js | 20 ++++++++++++++------
2 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/widgets/_dialogs.scss
b/data/theme/gnome-shell-sass/widgets/_dialogs.scss
index aeb0e46b74..bdc19feb8b 100644
--- a/data/theme/gnome-shell-sass/widgets/_dialogs.scss
+++ b/data/theme/gnome-shell-sass/widgets/_dialogs.scss
@@ -240,11 +240,6 @@
spacing: 30px;
}
-/* Geolocation Dialog */
-.geolocation-dialog {
- spacing: 30px;
-}
-
/* Inhibit-Shortcuts Dialog */
.inhibit-shortcuts-dialog {
spacing: 30px;
diff --git a/js/ui/status/location.js b/js/ui/status/location.js
index 5829fa9ae2..13eefd72c7 100644
--- a/js/ui/status/location.js
+++ b/js/ui/status/location.js
@@ -347,22 +347,30 @@ var AppAuthorizer = class {
var GeolocationDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_UINT] } },
}, class GeolocationDialog extends ModalDialog.ModalDialog {
- _init(name, description, reqAccuracyLevel) {
+ _init(name, reason, reqAccuracyLevel) {
super._init({ styleClass: 'geolocation-dialog' });
this.reqAccuracyLevel = reqAccuracyLevel;
- /* Translators: %s is an application name */
- let title = _("Give %s access to your location?").format(name);
+ let content = new Dialog.MessageDialogContent({
+ title: _('Allow location access'),
+ /* Translators: %s is an application name */
+ description: _('The app %s wants to access your location').format(name),
+ });
- let content = new Dialog.MessageDialogContent({ title, description });
- this.contentLayout.add_actor(content);
+ let reasonLabel = new St.Label({
+ text: reason,
+ style_class: 'message-dialog-description',
+ });
+ content.add_child(reasonLabel);
let infoLabel = new St.Label({
text: _('Location access can be changed at any time from the privacy settings.'),
- x_align: Clutter.ActorAlign.CENTER,
+ style_class: 'message-dialog-description',
});
content.add_child(infoLabel);
+ this.contentLayout.add_child(content);
+
let button = this.addButton({ label: _("Deny Access"),
action: this._onDenyClicked.bind(this),
key: Clutter.KEY_Escape });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]