theme: a button is a button is a button

https://bugzilla.gnome.org/show_bug.cgi?id=737785
This commit is contained in:
Jakub Steiner 2015-01-16 15:33:56 +01:00 committed by Florian Müllner
parent ce38ae64cc
commit 48cfd35b65
9 changed files with 20 additions and 88 deletions

View File

@ -39,15 +39,7 @@ stage {
/* WIDGETS */
/* Buttons */
// one would think we may want a generic button class:
// bug #737785
.candidate-page-button,
.notification-button,
.notification-icon-button,
.hotplug-notification-item,
.hotplug-resident-eject-button,
.modal-dialog-button,
.app-view-control {
.button {
border-radius: 3px;
border-width: 1px;
padding: 4px 32px;

View File

@ -395,13 +395,7 @@ stage {
/* WIDGETS */
/* Buttons */
.candidate-page-button,
.notification-button,
.notification-icon-button,
.hotplug-notification-item,
.hotplug-resident-eject-button,
.modal-dialog-button,
.app-view-control {
.button {
border-radius: 3px;
border-width: 1px;
padding: 4px 32px;
@ -411,51 +405,27 @@ stage {
box-shadow: inset 0 1px #454f52;
text-shadow: 0 1px black;
icon-shadow: 0 1px black; }
.candidate-page-button:hover,
.notification-button:hover,
.notification-icon-button:hover,
.hotplug-notification-item:hover,
.hotplug-resident-eject-button:hover,
.modal-dialog-button:hover,
.app-view-control:hover {
.button:hover {
color: white;
border-color: rgba(0, 0, 0, 0.7);
background-color: #454f52;
box-shadow: inset 0 1px #5d696d;
text-shadow: 0 1px black;
icon-shadow: 0 1px black; }
.candidate-page-button:focus,
.notification-button:focus,
.notification-icon-button:focus,
.hotplug-notification-item:focus,
.hotplug-resident-eject-button:focus,
.modal-dialog-button:focus,
.app-view-control:focus {
.button:focus {
color: #eeeeec;
border-color: #215d9c;
box-shadow: inset 0 1px #454f52;
text-shadow: 0 1px black;
icon-shadow: 0 1px black; }
.candidate-page-button:insensitive,
.notification-button:insensitive,
.notification-icon-button:insensitive,
.hotplug-notification-item:insensitive,
.hotplug-resident-eject-button:insensitive,
.modal-dialog-button:insensitive,
.app-view-control:insensitive {
.button:insensitive {
color: #7f7f7f;
border-color: rgba(0, 0, 0, 0.7);
background-color: rgba(62, 67, 68, 0.7);
box-shadow: none;
text-shadow: none;
icon-shadow: none; }
.candidate-page-button:active,
.notification-button:active,
.notification-icon-button:active,
.hotplug-notification-item:active,
.hotplug-resident-eject-button:active,
.modal-dialog-button:active,
.app-view-control:active {
.button:active {
color: white;
border-color: rgba(0, 0, 0, 0.7);
background-color: #222728;

View File

@ -395,13 +395,7 @@ stage {
/* WIDGETS */
/* Buttons */
.candidate-page-button,
.notification-button,
.notification-icon-button,
.hotplug-notification-item,
.hotplug-resident-eject-button,
.modal-dialog-button,
.app-view-control {
.button {
border-radius: 3px;
border-width: 1px;
padding: 4px 32px;
@ -411,51 +405,27 @@ stage {
box-shadow: inset 0 1px #454f52;
text-shadow: 0 1px black;
icon-shadow: 0 1px black; }
.candidate-page-button:hover,
.notification-button:hover,
.notification-icon-button:hover,
.hotplug-notification-item:hover,
.hotplug-resident-eject-button:hover,
.modal-dialog-button:hover,
.app-view-control:hover {
.button:hover {
color: white;
border-color: rgba(0, 0, 0, 0.7);
background-color: #454f52;
box-shadow: inset 0 1px #5d696d;
text-shadow: 0 1px black;
icon-shadow: 0 1px black; }
.candidate-page-button:focus,
.notification-button:focus,
.notification-icon-button:focus,
.hotplug-notification-item:focus,
.hotplug-resident-eject-button:focus,
.modal-dialog-button:focus,
.app-view-control:focus {
.button:focus {
color: #eeeeec;
border-color: #215d9c;
box-shadow: inset 0 1px #454f52;
text-shadow: 0 1px black;
icon-shadow: 0 1px black; }
.candidate-page-button:insensitive,
.notification-button:insensitive,
.notification-icon-button:insensitive,
.hotplug-notification-item:insensitive,
.hotplug-resident-eject-button:insensitive,
.modal-dialog-button:insensitive,
.app-view-control:insensitive {
.button:insensitive {
color: #939695;
border-color: rgba(0, 0, 0, 0.7);
background-color: rgba(66, 71, 73, 0.7);
box-shadow: none;
text-shadow: none;
icon-shadow: none; }
.candidate-page-button:active,
.notification-button:active,
.notification-icon-button:active,
.hotplug-notification-item:active,
.hotplug-resident-eject-button:active,
.modal-dialog-button:active,
.app-view-control:active {
.button:active {
color: white;
border-color: rgba(0, 0, 0, 0.7);
background-color: #222728;

View File

@ -140,7 +140,7 @@ const AuthPrompt = new Lang.Class({
},
_initButtons: function() {
this.cancelButton = new St.Button({ style_class: 'modal-dialog-button',
this.cancelButton = new St.Button({ style_class: 'modal-dialog-button button',
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
reactive: true,
can_focus: true,
@ -162,7 +162,7 @@ const AuthPrompt = new Lang.Class({
y_fill: false,
x_align: St.Align.END,
y_align: St.Align.MIDDLE });
this.nextButton = new St.Button({ style_class: 'modal-dialog-button',
this.nextButton = new St.Button({ style_class: 'modal-dialog-button button',
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
reactive: true,
can_focus: true,

View File

@ -903,14 +903,14 @@ const AppDisplay = new Lang.Class({
let view, button;
view = new FrequentView();
button = new St.Button({ label: _("Frequent"),
style_class: 'app-view-control',
style_class: 'app-view-control button',
can_focus: true,
x_expand: true });
this._views[Views.FREQUENT] = { 'view': view, 'control': button };
view = new AllView();
button = new St.Button({ label: _("All"),
style_class: 'app-view-control',
style_class: 'app-view-control button',
can_focus: true,
x_expand: true });
this._views[Views.ALL] = { 'view': view, 'control': button };

View File

@ -353,7 +353,7 @@ const AutorunNotification = new Lang.Class({
x_fill: true,
x_align: St.Align.START,
button_mask: St.ButtonMask.ONE,
style_class: 'hotplug-notification-item' });
style_class: 'hotplug-notification-item button' });
button.connect('clicked', Lang.bind(this, function() {
startAppForMount(app, this._mount);

View File

@ -41,11 +41,11 @@ const CandidateArea = new Lang.Class({
this._buttonBox = new St.BoxLayout({ style_class: 'candidate-page-button-box' });
this._previousButton = new St.Button({ style_class: 'candidate-page-button candidate-page-button-previous' });
this._previousButton = new St.Button({ style_class: 'candidate-page-button candidate-page-button-previous button' });
this._previousButton.child = new St.Icon({ style_class: 'candidate-page-button-icon' });
this._buttonBox.add(this._previousButton, { expand: true });
this._nextButton = new St.Button({ style_class: 'candidate-page-button candidate-page-button-next' });
this._nextButton = new St.Button({ style_class: 'candidate-page-button candidate-page-button-next button' });
this._nextButton.child = new St.Icon({ style_class: 'candidate-page-button-icon' });
this._buttonBox.add(this._nextButton, { expand: true });

View File

@ -170,7 +170,7 @@ const ModalDialog = new Lang.Class({
else
keys = [];
let button = new St.Button({ style_class: 'modal-dialog-button',
let button = new St.Button({ style_class: 'modal-dialog-button button',
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
reactive: true,
can_focus: true,

View File

@ -892,7 +892,7 @@ const NMWirelessDialog = new Lang.Class({
this._airplaneText = new St.Label({ style_class: 'nm-dialog-airplane-text' });
let airplaneSubStack = new St.Widget({ layout_manager: new Clutter.BinLayout });
this._airplaneButton = new St.Button({ style_class: 'modal-dialog-button' });
this._airplaneButton = new St.Button({ style_class: 'modal-dialog-button button' });
this._airplaneButton.connect('clicked', Lang.bind(this, function() {
if (this._rfkill.airplaneMode)
this._rfkill.airplaneMode = false;