diff --git a/data/theme/_common.scss b/data/theme/_common.scss index ec55a1066..589550bcb 100644 --- a/data/theme/_common.scss +++ b/data/theme/_common.scss @@ -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; diff --git a/data/theme/gnome-shell-high-contrast.css b/data/theme/gnome-shell-high-contrast.css index 9c9e08ceb..2151e5538 100644 --- a/data/theme/gnome-shell-high-contrast.css +++ b/data/theme/gnome-shell-high-contrast.css @@ -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; diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index 09fb273e6..804b6f677 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -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; diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 26a4e2c2d..b1233196a 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -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, diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 440266cad..9f505586e 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -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 }; diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js index 05635807c..66a00db3d 100644 --- a/js/ui/components/autorunManager.js +++ b/js/ui/components/autorunManager.js @@ -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); diff --git a/js/ui/ibusCandidatePopup.js b/js/ui/ibusCandidatePopup.js index 0f7c3b20c..7ce66a046 100644 --- a/js/ui/ibusCandidatePopup.js +++ b/js/ui/ibusCandidatePopup.js @@ -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 }); diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index b188e3907..d36bc9182 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -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, diff --git a/js/ui/status/network.js b/js/ui/status/network.js index dffd69d96..35b459b32 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -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;