[libhandy] themes: Give margins to title view switchers



commit 5b393e37372cfea6979f6072f4a7e612dd838722
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Aug 5 14:52:21 2020 +0200

    themes: Give margins to title view switchers
    
    This gives margin to the view switcher within the HdyTitleViewSwitcher
    itself but not the whole widget, so that the window title can still take
    all the available space.
    
    Fixes https://gitlab.gnome.org/GNOME/libhandy/-/issues/149

 src/hdy-css.c                      | 4 ++--
 src/themes/Adwaita-dark.css        | 2 ++
 src/themes/Adwaita.css             | 2 ++
 src/themes/HighContrast.css        | 2 ++
 src/themes/HighContrastInverse.css | 2 ++
 src/themes/_fallback-base.scss     | 7 +++++++
 src/themes/fallback.css            | 2 ++
 7 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/src/hdy-css.c b/src/hdy-css.c
index daae8edc..7a056e29 100644
--- a/src/hdy-css.c
+++ b/src/hdy-css.c
@@ -68,6 +68,6 @@ hdy_css_size_allocate (GtkWidget     *widget,
   allocation->height -= border.top + border.bottom +
                         margin.top + margin.bottom +
                         padding.top + padding.bottom;
-  allocation->x = border.left + margin.left + padding.left;
-  allocation->y = border.top + margin.top + padding.top;
+  allocation->x += border.left + margin.left + padding.left;
+  allocation->y += border.top + margin.top + padding.top;
 }
diff --git a/src/themes/Adwaita-dark.css b/src/themes/Adwaita-dark.css
index 772ba5aa..81ab68a6 100644
--- a/src/themes/Adwaita-dark.css
+++ b/src/themes/Adwaita-dark.css
@@ -59,6 +59,8 @@ avatar.color8 { background-image: linear-gradient(#cdab8f, #865d3c); color: #e5d
 
 avatar.contrasted { color: #fff; }
 
+viewswitchertitle viewswitcher { margin-left: 12px; margin-right: 12px; }
+
 /*************************** Check and Radio buttons * */
 popover.combo list { min-width: 200px; }
 
diff --git a/src/themes/Adwaita.css b/src/themes/Adwaita.css
index 476b451b..e8cd0286 100644
--- a/src/themes/Adwaita.css
+++ b/src/themes/Adwaita.css
@@ -59,6 +59,8 @@ avatar.color8 { background-image: linear-gradient(#cdab8f, #865d3c); color: #e5d
 
 avatar.contrasted { color: #fff; }
 
+viewswitchertitle viewswitcher { margin-left: 12px; margin-right: 12px; }
+
 /*************************** Check and Radio buttons * */
 popover.combo list { min-width: 200px; }
 
diff --git a/src/themes/HighContrast.css b/src/themes/HighContrast.css
index 8a967d4b..1706336a 100644
--- a/src/themes/HighContrast.css
+++ b/src/themes/HighContrast.css
@@ -59,6 +59,8 @@ avatar.color8 { background-image: linear-gradient(#cdab8f, #865d3c); color: #e5d
 
 avatar.contrasted { color: #fff; }
 
+viewswitchertitle viewswitcher { margin-left: 12px; margin-right: 12px; }
+
 /*************************** Check and Radio buttons * */
 popover.combo list { min-width: 200px; }
 
diff --git a/src/themes/HighContrastInverse.css b/src/themes/HighContrastInverse.css
index 74d7b423..ced512c4 100644
--- a/src/themes/HighContrastInverse.css
+++ b/src/themes/HighContrastInverse.css
@@ -59,6 +59,8 @@ avatar.color8 { background-image: linear-gradient(#cdab8f, #865d3c); color: #e5d
 
 avatar.contrasted { color: #fff; }
 
+viewswitchertitle viewswitcher { margin-left: 12px; margin-right: 12px; }
+
 /*************************** Check and Radio buttons * */
 popover.combo list { min-width: 200px; }
 
diff --git a/src/themes/_fallback-base.scss b/src/themes/_fallback-base.scss
index f6831bcf..a7c64b83 100644
--- a/src/themes/_fallback-base.scss
+++ b/src/themes/_fallback-base.scss
@@ -131,3 +131,10 @@ avatar {
 
   &.contrasted { color: #fff; }
 }
+
+// HdyViewSwitcherTitle
+
+viewswitchertitle viewswitcher {
+  margin-left: 12px;
+  margin-right: 12px;
+}
diff --git a/src/themes/fallback.css b/src/themes/fallback.css
index 2231a6f4..e111c5e1 100644
--- a/src/themes/fallback.css
+++ b/src/themes/fallback.css
@@ -58,3 +58,5 @@ avatar.color7 { background-image: linear-gradient(#f67365, #d91a23); color: #f6c
 avatar.color8 { background-image: linear-gradient(#cdab8f, #865d3c); color: #e5d6ca; }
 
 avatar.contrasted { color: #fff; }
+
+viewswitchertitle viewswitcher { margin-left: 12px; margin-right: 12px; }


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