[gnome-shell] dialog: Switch to new indentation style
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dialog: Switch to new indentation style
- Date: Tue, 14 Jan 2020 23:28:04 +0000 (UTC)
commit 259c44395f471ab3fdce706f7734094ee9f26aca
Author: Jonas Dreßler <verdre v0yd nl>
Date: Thu Dec 5 09:54:38 2019 +0100
dialog: Switch to new indentation style
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
js/ui/dialog.js | 81 +++++++++++++++++++++++++++++++++------------------------
1 file changed, 47 insertions(+), 34 deletions(-)
---
diff --git a/js/ui/dialog.js b/js/ui/dialog.js
index 3901e0629a..c2d2e04b61 100644
--- a/js/ui/dialog.js
+++ b/js/ui/dialog.js
@@ -25,10 +25,12 @@ class Dialog extends St.Widget {
}
_createDialog() {
- this._dialog = new St.BoxLayout({ style_class: 'modal-dialog',
- x_align: Clutter.ActorAlign.CENTER,
- y_align: Clutter.ActorAlign.CENTER,
- vertical: true });
+ this._dialog = new St.BoxLayout({
+ style_class: 'modal-dialog',
+ x_align: Clutter.ActorAlign.CENTER,
+ y_align: Clutter.ActorAlign.CENTER,
+ vertical: true,
+ });
// modal dialogs are fixed width and grow vertically; set the request
// mode accordingly so wrapped labels are handled correctly during
@@ -43,7 +45,9 @@ class Dialog extends St.Widget {
});
this._dialog.add_child(this.contentLayout);
- this.buttonLayout = new St.Widget({ layout_manager: new Clutter.BoxLayout({ homogeneous: true }) });
+ this.buttonLayout = new St.Widget({
+ layout_manager: new Clutter.BoxLayout({ homogeneous: true }),
+ });
this._dialog.add_child(this.buttonLayout);
}
@@ -111,13 +115,15 @@ class Dialog extends St.Widget {
else
keys = [];
- let button = new St.Button({ style_class: 'modal-dialog-linked-button',
- button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
- reactive: true,
- can_focus: true,
- x_expand: true,
- y_expand: true,
- label });
+ let button = new St.Button({
+ style_class: 'modal-dialog-linked-button',
+ button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
+ reactive: true,
+ can_focus: true,
+ x_expand: true,
+ y_expand: true,
+ label,
+ });
button.connect('clicked', action);
buttonInfo['button'] = button;
@@ -144,22 +150,26 @@ class Dialog extends St.Widget {
var MessageDialogContent = GObject.registerClass({
Properties: {
- 'icon': GObject.ParamSpec.object('icon', 'icon', 'icon',
- GObject.ParamFlags.READWRITE |
- GObject.ParamFlags.CONSTRUCT,
- Gio.Icon.$gtype),
- 'title': GObject.ParamSpec.string('title', 'title', 'title',
- GObject.ParamFlags.READWRITE |
- GObject.ParamFlags.CONSTRUCT,
- null),
- 'subtitle': GObject.ParamSpec.string('subtitle', 'subtitle', 'subtitle',
- GObject.ParamFlags.READWRITE |
- GObject.ParamFlags.CONSTRUCT,
- null),
- 'body': GObject.ParamSpec.string('body', 'body', 'body',
- GObject.ParamFlags.READWRITE |
- GObject.ParamFlags.CONSTRUCT,
- null),
+ 'icon': GObject.ParamSpec.object(
+ 'icon', 'icon', 'icon',
+ GObject.ParamFlags.READWRITE |
+ GObject.ParamFlags.CONSTRUCT,
+ Gio.Icon.$gtype),
+ 'title': GObject.ParamSpec.string(
+ 'title', 'title', 'title',
+ GObject.ParamFlags.READWRITE |
+ GObject.ParamFlags.CONSTRUCT,
+ null),
+ 'subtitle': GObject.ParamSpec.string(
+ 'subtitle', 'subtitle', 'subtitle',
+ GObject.ParamFlags.READWRITE |
+ GObject.ParamFlags.CONSTRUCT,
+ null),
+ 'body': GObject.ParamSpec.string(
+ 'body', 'body', 'body',
+ GObject.ParamFlags.READWRITE |
+ GObject.ParamFlags.CONSTRUCT,
+ null),
},
}, class MessageDialogContent extends St.BoxLayout {
_init(params) {
@@ -172,18 +182,21 @@ var MessageDialogContent = GObject.registerClass({
this[`_${prop}`].add_style_class_name(`message-dialog-${prop}`);
});
- let textProps = { ellipsize: Pango.EllipsizeMode.NONE,
- line_wrap: true };
+ let textProps = {
+ ellipsize: Pango.EllipsizeMode.NONE,
+ line_wrap: true,
+ };
this._subtitle.clutter_text.set(textProps);
this._body.clutter_text.set(textProps);
let defaultParams = { style_class: 'message-dialog-main-layout' };
super._init(Object.assign(defaultParams, params));
- this.messageBox = new St.BoxLayout({ style_class: 'message-dialog-content',
- x_expand: true,
- vertical: true });
-
+ this.messageBox = new St.BoxLayout({
+ style_class: 'message-dialog-content',
+ x_expand: true,
+ vertical: true,
+ });
this.messageBox.add_actor(this._title);
this.messageBox.add_actor(this._subtitle);
this.messageBox.add_actor(this._body);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]