dialog: Remove icons from dialogs
According to the new mockups, remove the icon from MessageDialogContent See https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343 https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
This commit is contained in:

committed by
Florian Müllner

parent
929c2c3921
commit
5d99bdbe5e
@ -1,7 +1,7 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported Dialog, MessageDialogContent */
|
||||
|
||||
const { Clutter, Gio, GObject, Pango, St } = imports.gi;
|
||||
const { Clutter, GObject, Pango, St } = imports.gi;
|
||||
|
||||
var Dialog = GObject.registerClass(
|
||||
class Dialog extends St.Widget {
|
||||
@ -146,11 +146,6 @@ 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 |
|
||||
@ -169,12 +164,11 @@ var MessageDialogContent = GObject.registerClass({
|
||||
},
|
||||
}, class MessageDialogContent extends St.BoxLayout {
|
||||
_init(params) {
|
||||
this._icon = new St.Icon({ y_align: Clutter.ActorAlign.START });
|
||||
this._title = new St.Label({ style_class: 'headline' });
|
||||
this._title = new St.Label();
|
||||
this._subtitle = new St.Label();
|
||||
this._body = new St.Label();
|
||||
|
||||
['icon', 'title', 'subtitle', 'body'].forEach(prop => {
|
||||
['title', 'subtitle', 'body'].forEach(prop => {
|
||||
this[`_${prop}`].add_style_class_name(`message-dialog-${prop}`);
|
||||
});
|
||||
|
||||
@ -196,15 +190,9 @@ var MessageDialogContent = GObject.registerClass({
|
||||
this.messageBox.add_actor(this._title);
|
||||
this.messageBox.add_actor(this._subtitle);
|
||||
this.messageBox.add_actor(this._body);
|
||||
|
||||
this.add_actor(this._icon);
|
||||
this.add_actor(this.messageBox);
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return this._icon.gicon;
|
||||
}
|
||||
|
||||
get title() {
|
||||
return this._title.text;
|
||||
}
|
||||
@ -217,14 +205,6 @@ var MessageDialogContent = GObject.registerClass({
|
||||
return this._body.text;
|
||||
}
|
||||
|
||||
set icon(icon) {
|
||||
this._icon.set({
|
||||
gicon: icon,
|
||||
visible: icon != null,
|
||||
});
|
||||
this.notify('icon');
|
||||
}
|
||||
|
||||
set title(title) {
|
||||
this._setLabel(this._title, 'title', title);
|
||||
}
|
||||
|
Reference in New Issue
Block a user