[gtk+] shortcuts: Fix the circular stack switcher



commit 9b408d911a51875b9c75641f84a739dfe3e1cccf
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Dec 15 19:39:57 2015 -0500

    shortcuts: Fix the circular stack switcher
    
    The buttons need to set min-width now, to make this work.

 gtk/gtkshortcutssection.c                |    6 ------
 gtk/theme/Adwaita/_common.scss           |    4 ++++
 gtk/theme/Adwaita/gtk-contained-dark.css |    5 +++++
 gtk/theme/Adwaita/gtk-contained.css      |    5 +++++
 4 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c
index 0ca0386..3295ebb 100644
--- a/gtk/gtkshortcutssection.c
+++ b/gtk/gtkshortcutssection.c
@@ -586,12 +586,6 @@ adjust_page_buttons (GtkWidget *widget,
 {
   GtkWidget *label;
 
-  /*
-   * TODO: This is a hack to get the GtkStackSwitcher radio
-   *       buttons to look how we want. However, it's very
-   *       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));
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 2ed068d..e8b1e84 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -3379,3 +3379,7 @@ frame.keycap {
 stackswitcher button.text-button {
   min-width: 100px;
 }
+
+stackswitcher button.circular {
+  min-width: 0px;
+}
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 6d8c89d..4a056fa 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -4556,6 +4556,11 @@ stackswitcher .titlebar button.text-button.titlebutton,
 .titlebar stackswitcher button.text-button.titlebutton {
   min-width: 100px; }
 
+stackswitcher button.circular,
+stackswitcher .titlebar button.circular.titlebutton,
+.titlebar stackswitcher button.circular.titlebutton {
+  min-width: 0px; }
+
 /* GTK NAMED COLORS
    ----------------
    use responsibly! */
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 1b4c6bc..493aeb7 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -4729,6 +4729,11 @@ stackswitcher .titlebar button.text-button.titlebutton,
 .titlebar stackswitcher button.text-button.titlebutton {
   min-width: 100px; }
 
+stackswitcher button.circular,
+stackswitcher .titlebar button.circular.titlebutton,
+.titlebar stackswitcher button.circular.titlebutton {
+  min-width: 0px; }
+
 /* GTK NAMED COLORS
    ----------------
    use responsibly! */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]