[gtk+] stackswitcher: Stop hardcoding 100px width



commit f7466b236a92dd7eb536f80a08e833971cb4566f
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 7 22:11:52 2015 -0500

    stackswitcher: Stop hardcoding 100px width
    
    We can now set a min-width in the theme, so we don't have to
    hardcode the size request here anymore.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726371

 gtk/gtkstackswitcher.c                   |    5 -----
 gtk/theme/Adwaita/_common.scss           |    5 +++++
 gtk/theme/Adwaita/gtk-contained-dark.css |    8 ++++++++
 gtk/theme/Adwaita/gtk-contained.css      |    8 ++++++++
 4 files changed, 21 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkstackswitcher.c b/gtk/gtkstackswitcher.c
index e8f3b9b..3d1a5ec 100644
--- a/gtk/gtkstackswitcher.c
+++ b/gtk/gtkstackswitcher.c
@@ -187,11 +187,6 @@ update_button (GtkStackSwitcher *self,
 
   gtk_widget_set_visible (button, gtk_widget_get_visible (widget) && (title != NULL || icon_name != NULL));
 
-  if (icon_name != NULL)
-    gtk_widget_set_size_request (button, -1, -1);
-  else
-    gtk_widget_set_size_request (button, 100, -1);
-
   g_free (title);
   g_free (icon_name);
 
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index df9207f..75dbe25 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2681,6 +2681,7 @@ row {
  *************/
 
 expander {
+  & title:hover { background: red; }
   & arrow {
     -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
     &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
@@ -3376,3 +3377,7 @@ frame.keycap {
 *:dnd {
   border: 1px solid black;
 }
+
+stackswitcher button.text-button {
+  min-width: 100px;
+}
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index dceb9f6..5d561b0 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -3804,6 +3804,8 @@ row {
 /*************
  * Expanders *
  *************/
+expander title:hover {
+  background: red; }
 expander arrow {
   -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
   expander arrow:dir(rtl) {
@@ -4551,6 +4553,12 @@ frame.keycap {
 *:dnd {
   border: 1px solid black; }
 
+stackswitcher button.text-button, stackswitcher GtkScaleButton.button.text-button,
+stackswitcher GtkVolumeButton.button.text-button,
+stackswitcher .titlebar button.text-button.titlebutton,
+.titlebar stackswitcher button.text-button.titlebutton {
+  min-width: 100px; }
+
 /* GTK NAMED COLORS
    ----------------
    use responsibly! */
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index aac8f20..eb616e1 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -3974,6 +3974,8 @@ row {
 /*************
  * Expanders *
  *************/
+expander title:hover {
+  background: red; }
 expander arrow {
   -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
   expander arrow:dir(rtl) {
@@ -4724,6 +4726,12 @@ frame.keycap {
 *:dnd {
   border: 1px solid black; }
 
+stackswitcher button.text-button, stackswitcher GtkScaleButton.button.text-button,
+stackswitcher GtkVolumeButton.button.text-button,
+stackswitcher .titlebar button.text-button.titlebutton,
+.titlebar stackswitcher button.text-button.titlebutton {
+  min-width: 100px; }
+
 /* GTK NAMED COLORS
    ----------------
    use responsibly! */


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