[gtk+/wip/matthiasc/gadget: 18/34] stackswitcher: Stop hardcoding 100px width



commit a073dc3d527a47f64b9df7df2201d28f85df93f7
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 76d3fd0..f47fad2 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2677,6 +2677,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'); }
@@ -3372,3 +3373,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 9668508..6d3f35c 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -3800,6 +3800,8 @@ row {
 /*************
  * Expanders *
  *************/
+expander title:hover {
+  background: red; }
 expander arrow {
   -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
   expander arrow:dir(rtl) {
@@ -4547,6 +4549,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 089c2d3..9da52d1 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -3970,6 +3970,8 @@ row {
 /*************
  * Expanders *
  *************/
+expander title:hover {
+  background: red; }
 expander arrow {
   -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
   expander arrow:dir(rtl) {
@@ -4720,6 +4722,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]