[gtk+] shortcuts: Redo the stack switcher theming
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] shortcuts: Redo the stack switcher theming
- Date: Wed, 28 Oct 2015 14:21:46 +0000 (UTC)
commit 20e46ce8aeef856efe020118cce8794249485f65
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 28 10:14:54 2015 -0400
shortcuts: Redo the stack switcher theming
Use style classes on the button instead of the stack switcher,
this makes it easier to reuse elsewhere.
gtk/gtkshortcutssection.c | 3 ++-
gtk/theme/Adwaita/_common.scss | 4 ++--
gtk/theme/Adwaita/gtk-contained-dark.css | 10 ++++------
gtk/theme/Adwaita/gtk-contained.css | 10 ++++------
4 files changed, 12 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c
index 538ddae..9d8de02 100644
--- a/gtk/gtkshortcutssection.c
+++ b/gtk/gtkshortcutssection.c
@@ -354,7 +354,7 @@ gtk_shortcuts_section_init (GtkShortcutsSection *self)
"spacing", 12,
"no-show-all", TRUE,
NULL);
- gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self->switcher)), "round");
+
gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (self->switcher)),
GTK_STYLE_CLASS_LINKED);
self->show_all = gtk_button_new_with_mnemonic (_("_Show All"));
@@ -501,6 +501,7 @@ adjust_page_buttons (GtkWidget *widget,
* much font size specific.
*/
gtk_widget_set_size_request (widget, 34, 34);
+ gtk_style_context_add_class (gtk_widget_get_style_context (widget), "circular");
label = gtk_bin_get_child (GTK_BIN (widget));
gtk_label_set_use_underline (GTK_LABEL (label), TRUE);
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 45916e6..edd303e 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -3438,12 +3438,12 @@ decoration {
}
}
-shortcutswindow .round .button {
+.button.circular {
border-radius: 20px;
outline-radius: 20px;
}
-shortcutswindow .round .button label {
+.button.circular label {
padding: 0;
}
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 89e913d..5a7e15d 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -4649,15 +4649,13 @@ decoration {
background-origin: content-box;
background-position: right center; }
-shortcutswindow .round .button, shortcutswindow .round .header-bar .button.titlebutton, .header-bar
shortcutswindow .round .button.titlebutton,
-shortcutswindow .round .titlebar .button.titlebutton,
-.titlebar shortcutswindow .round .button.titlebutton {
+.button.circular, .header-bar .circular.button.titlebutton,
+.titlebar .circular.button.titlebutton {
border-radius: 20px;
outline-radius: 20px; }
-shortcutswindow .round .button label, shortcutswindow .round .header-bar .button.titlebutton label,
.header-bar shortcutswindow .round .button.titlebutton label,
-shortcutswindow .round .titlebar .button.titlebutton label,
-.titlebar shortcutswindow .round .button.titlebutton label {
+.button.circular label, .header-bar .circular.button.titlebutton label,
+.titlebar .circular.button.titlebutton label {
padding: 0; }
.frame.keycap {
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index c478007..1540153 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -4822,15 +4822,13 @@ decoration {
background-origin: content-box;
background-position: right center; }
-shortcutswindow .round .button, shortcutswindow .round .header-bar .button.titlebutton, .header-bar
shortcutswindow .round .button.titlebutton,
-shortcutswindow .round .titlebar .button.titlebutton,
-.titlebar shortcutswindow .round .button.titlebutton {
+.button.circular, .header-bar .circular.button.titlebutton,
+.titlebar .circular.button.titlebutton {
border-radius: 20px;
outline-radius: 20px; }
-shortcutswindow .round .button label, shortcutswindow .round .header-bar .button.titlebutton label,
.header-bar shortcutswindow .round .button.titlebutton label,
-shortcutswindow .round .titlebar .button.titlebutton label,
-.titlebar shortcutswindow .round .button.titlebutton label {
+.button.circular label, .header-bar .circular.button.titlebutton label,
+.titlebar .circular.button.titlebutton label {
padding: 0; }
.frame.keycap {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]