shellMountOperation: Share a style class

Two of the dialogs use virtually identical styles, so it makes sense
to reuse the actual style classes.

https://bugzilla.gnome.org/show_bug.cgi?id=784985
This commit is contained in:
Florian Müllner 2017-07-15 08:53:34 +02:00
parent 1c7a3ee61b
commit fbf5f98eea
4 changed files with 45 additions and 59 deletions

View File

@ -221,8 +221,7 @@ StScrollBar {
color: #d6d6d1; color: #d6d6d1;
padding-bottom: .4em; } padding-bottom: .4em; }
.show-processes-dialog-subject, .mount-dialog-subject,
.mount-question-dialog-subject,
.end-session-dialog-subject { .end-session-dialog-subject {
font-size: 14pt; } font-size: 14pt; }
@ -294,59 +293,53 @@ StScrollBar {
.shell-mount-operation-icon { .shell-mount-operation-icon {
icon-size: 48px; } icon-size: 48px; }
.show-processes-dialog, .mount-dialog {
.mount-question-dialog {
spacing: 24px; } spacing: 24px; }
.show-processes-dialog-subject, .mount-dialog-subject {
.mount-question-dialog-subject {
padding-top: 10px; padding-top: 10px;
padding-left: 17px; padding-left: 17px;
padding-bottom: 6px; } padding-bottom: 6px;
.mount-question-dialog-subject {
max-width: 34em; } max-width: 34em; }
.show-processes-dialog-subject:rtl, .mount-dialog-subject:rtl {
.mount-question-dialog-subject:rtl {
padding-left: 0px; padding-left: 0px;
padding-right: 17px; } padding-right: 17px; }
.show-processes-dialog-description, .mount-dialog-description {
.mount-question-dialog-description {
padding-left: 17px; padding-left: 17px;
width: 28em; } width: 28em; }
.show-processes-dialog-description:rtl, .mount-dialog-description:rtl {
.mount-question-dialog-description:rtl { padding-left: 0px;
padding-right: 17px; } padding-right: 17px; }
.show-processes-dialog-app-list { .mount-dialog-app-list {
max-height: 200px; max-height: 200px;
padding-top: 24px; padding-top: 24px;
padding-left: 49px; padding-left: 49px;
padding-right: 32px; } padding-right: 32px; }
.show-processes-dialog-app-list:rtl { .mount-dialog-app-list:rtl {
padding-right: 49px; padding-right: 49px;
padding-left: 32px; } padding-left: 32px; }
.show-processes-dialog-app-list-item { .mount-dialog-app-list-item {
color: #e6e6e6; } color: #e6e6e6; }
.show-processes-dialog-app-list-item:hover { .mount-dialog-app-list-item:hover {
color: #fff; } color: #fff; }
.show-processes-dialog-app-list-item:ltr { .mount-dialog-app-list-item:ltr {
padding-right: 1em; } padding-right: 1em; }
.show-processes-dialog-app-list-item:rtl { .mount-dialog-app-list-item:rtl {
padding-left: 1em; } padding-left: 1em; }
.show-processes-dialog-app-list-item-icon:ltr { .mount-dialog-app-list-item-icon:ltr {
padding-right: 17px; } padding-right: 17px; }
.show-processes-dialog-app-list-item-icon:rtl { .mount-dialog-app-list-item-icon:rtl {
padding-left: 17px; } padding-left: 17px; }
.show-processes-dialog-app-list-item-name { .mount-dialog-app-list-item-name {
font-size: 10pt; } font-size: 10pt; }
/* Password or Authentication Dialog */ /* Password or Authentication Dialog */

@ -1 +1 @@
Subproject commit df8e38874068f8b2ff4ef1c604775e41870a612f Subproject commit 718b45a9c1d9490334a0230f27b1631a1706f818

View File

@ -221,8 +221,7 @@ StScrollBar {
color: #d6d6d1; color: #d6d6d1;
padding-bottom: .4em; } padding-bottom: .4em; }
.show-processes-dialog-subject, .mount-dialog-subject,
.mount-question-dialog-subject,
.end-session-dialog-subject { .end-session-dialog-subject {
font-size: 14pt; } font-size: 14pt; }
@ -294,59 +293,53 @@ StScrollBar {
.shell-mount-operation-icon { .shell-mount-operation-icon {
icon-size: 48px; } icon-size: 48px; }
.show-processes-dialog, .mount-dialog {
.mount-question-dialog {
spacing: 24px; } spacing: 24px; }
.show-processes-dialog-subject, .mount-dialog-subject {
.mount-question-dialog-subject {
padding-top: 10px; padding-top: 10px;
padding-left: 17px; padding-left: 17px;
padding-bottom: 6px; } padding-bottom: 6px;
.mount-question-dialog-subject {
max-width: 34em; } max-width: 34em; }
.show-processes-dialog-subject:rtl, .mount-dialog-subject:rtl {
.mount-question-dialog-subject:rtl {
padding-left: 0px; padding-left: 0px;
padding-right: 17px; } padding-right: 17px; }
.show-processes-dialog-description, .mount-dialog-description {
.mount-question-dialog-description {
padding-left: 17px; padding-left: 17px;
width: 28em; } width: 28em; }
.show-processes-dialog-description:rtl, .mount-dialog-description:rtl {
.mount-question-dialog-description:rtl { padding-left: 0px;
padding-right: 17px; } padding-right: 17px; }
.show-processes-dialog-app-list { .mount-dialog-app-list {
max-height: 200px; max-height: 200px;
padding-top: 24px; padding-top: 24px;
padding-left: 49px; padding-left: 49px;
padding-right: 32px; } padding-right: 32px; }
.show-processes-dialog-app-list:rtl { .mount-dialog-app-list:rtl {
padding-right: 49px; padding-right: 49px;
padding-left: 32px; } padding-left: 32px; }
.show-processes-dialog-app-list-item { .mount-dialog-app-list-item {
color: #d6d6d1; } color: #d6d6d1; }
.show-processes-dialog-app-list-item:hover { .mount-dialog-app-list-item:hover {
color: #eeeeec; } color: #eeeeec; }
.show-processes-dialog-app-list-item:ltr { .mount-dialog-app-list-item:ltr {
padding-right: 1em; } padding-right: 1em; }
.show-processes-dialog-app-list-item:rtl { .mount-dialog-app-list-item:rtl {
padding-left: 1em; } padding-left: 1em; }
.show-processes-dialog-app-list-item-icon:ltr { .mount-dialog-app-list-item-icon:ltr {
padding-right: 17px; } padding-right: 17px; }
.show-processes-dialog-app-list-item-icon:rtl { .mount-dialog-app-list-item-icon:rtl {
padding-left: 17px; } padding-left: 17px; }
.show-processes-dialog-app-list-item-name { .mount-dialog-app-list-item-name {
font-size: 10pt; } font-size: 10pt; }
/* Password or Authentication Dialog */ /* Password or Authentication Dialog */

View File

@ -69,7 +69,7 @@ const ListItem = new Lang.Class({
let layout = new St.BoxLayout({ vertical: false}); let layout = new St.BoxLayout({ vertical: false});
this.actor = new St.Button({ style_class: 'show-processes-dialog-app-list-item', this.actor = new St.Button({ style_class: 'mount-dialog-app-list-item',
can_focus: true, can_focus: true,
child: layout, child: layout,
reactive: true, reactive: true,
@ -78,12 +78,12 @@ const ListItem = new Lang.Class({
this._icon = this._app.create_icon_texture(LIST_ITEM_ICON_SIZE); this._icon = this._app.create_icon_texture(LIST_ITEM_ICON_SIZE);
let iconBin = new St.Bin({ style_class: 'show-processes-dialog-app-list-item-icon', let iconBin = new St.Bin({ style_class: 'mount-dialog-app-list-item-icon',
child: this._icon }); child: this._icon });
layout.add(iconBin); layout.add(iconBin);
this._nameLabel = new St.Label({ text: this._app.get_name(), this._nameLabel = new St.Label({ text: this._app.get_name(),
style_class: 'show-processes-dialog-app-list-item-name' }); style_class: 'mount-dialog-app-list-item-name' });
let labelBin = new St.Bin({ y_align: St.Align.MIDDLE, let labelBin = new St.Bin({ y_align: St.Align.MIDDLE,
child: this._nameLabel }); child: this._nameLabel });
layout.add(labelBin); layout.add(labelBin);
@ -282,7 +282,7 @@ const ShellMountQuestionDialog = new Lang.Class({
Extends: ModalDialog.ModalDialog, Extends: ModalDialog.ModalDialog,
_init: function(gicon) { _init: function(gicon) {
this.parent({ styleClass: 'mount-question-dialog' }); this.parent({ styleClass: 'mount-dialog' });
let mainContentLayout = new St.BoxLayout(); let mainContentLayout = new St.BoxLayout();
this.contentLayout.add(mainContentLayout, { x_fill: true, this.contentLayout.add(mainContentLayout, { x_fill: true,
@ -299,7 +299,7 @@ const ShellMountQuestionDialog = new Lang.Class({
mainContentLayout.add(messageLayout, mainContentLayout.add(messageLayout,
{ y_align: St.Align.START }); { y_align: St.Align.START });
this.subjectLabel = new St.Label({ style_class: 'mount-question-dialog-subject' }); this.subjectLabel = new St.Label({ style_class: 'mount-dialog-subject' });
this.subjectLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; this.subjectLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this.subjectLabel.clutter_text.line_wrap = true; this.subjectLabel.clutter_text.line_wrap = true;
@ -307,7 +307,7 @@ const ShellMountQuestionDialog = new Lang.Class({
{ y_fill: false, { y_fill: false,
y_align: St.Align.START }); y_align: St.Align.START });
this.descriptionLabel = new St.Label({ style_class: 'mount-question-dialog-description' }); this.descriptionLabel = new St.Label({ style_class: 'mount-dialog-description' });
this.descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; this.descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this.descriptionLabel.clutter_text.line_wrap = true; this.descriptionLabel.clutter_text.line_wrap = true;
@ -436,7 +436,7 @@ const ShellProcessesDialog = new Lang.Class({
Extends: ModalDialog.ModalDialog, Extends: ModalDialog.ModalDialog,
_init: function(gicon) { _init: function(gicon) {
this.parent({ styleClass: 'show-processes-dialog' }); this.parent({ styleClass: 'mount-dialog' });
let mainContentLayout = new St.BoxLayout(); let mainContentLayout = new St.BoxLayout();
this.contentLayout.add(mainContentLayout, { x_fill: true, this.contentLayout.add(mainContentLayout, { x_fill: true,
@ -453,13 +453,13 @@ const ShellProcessesDialog = new Lang.Class({
mainContentLayout.add(messageLayout, mainContentLayout.add(messageLayout,
{ y_align: St.Align.START }); { y_align: St.Align.START });
this.subjectLabel = new St.Label({ style_class: 'show-processes-dialog-subject' }); this.subjectLabel = new St.Label({ style_class: 'mount-dialog-subject' });
messageLayout.add(this.subjectLabel, messageLayout.add(this.subjectLabel,
{ y_fill: false, { y_fill: false,
y_align: St.Align.START }); y_align: St.Align.START });
this.descriptionLabel = new St.Label({ style_class: 'show-processes-dialog-description' }); this.descriptionLabel = new St.Label({ style_class: 'mount-dialog-description' });
this.descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; this.descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this.descriptionLabel.clutter_text.line_wrap = true; this.descriptionLabel.clutter_text.line_wrap = true;
@ -467,7 +467,7 @@ const ShellProcessesDialog = new Lang.Class({
{ y_fill: true, { y_fill: true,
y_align: St.Align.START }); y_align: St.Align.START });
let scrollView = new St.ScrollView({ style_class: 'show-processes-dialog-app-list'}); let scrollView = new St.ScrollView({ style_class: 'mount-dialog-app-list'});
scrollView.set_policy(Gtk.PolicyType.NEVER, scrollView.set_policy(Gtk.PolicyType.NEVER,
Gtk.PolicyType.AUTOMATIC); Gtk.PolicyType.AUTOMATIC);
this.contentLayout.add(scrollView, this.contentLayout.add(scrollView,