[gtk/wip/baedert/for-master: 3/14] adwaita: Use border-spacing to style checkbuttons



commit c9569f51183a2645b6ef4f162ed68a5645036c07
Author: Timm Bäder <mail baedert org>
Date:   Sat Sep 28 08:45:11 2019 +0200

    adwaita: Use border-spacing to style checkbuttons

 gtk/theme/Adwaita/_common.scss           | 6 +-----
 gtk/theme/Adwaita/gtk-contained-dark.css | 6 +-----
 gtk/theme/Adwaita/gtk-contained.css      | 6 +-----
 3 files changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index d164d154c6..3130a5024a 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2839,11 +2839,7 @@ checkbutton.text-button, radiobutton.text-button {
   // this is for a nice focus on check and radios text
   padding: 2px 0;
   outline-offset: 0;
-
-  label:not(:only-child) {
-    &:first-child { margin-left: 4px; }
-    &:last-child { margin-right: 4px; }
-  }
+  border-spacing: 4px;
 }
 
 check,
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 194dafa7c4..584ea9e158 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -1161,11 +1161,7 @@ switch:backdrop:disabled slider label, switch:backdrop:disabled slider { color:
 
 .view.content-view.check:backdrop:checked:not(list), iconview.content-view.check:backdrop:checked:not(list), 
.content-view .tile check:backdrop:checked:not(list) { margin: 4px; min-width: 32px; min-height: 32px; color: 
rgba(238, 238, 236, 0.8); background-color: rgba(89, 89, 90, 0.95); border-radius: 5px; background-image: 
none; transition: 200ms; box-shadow: none; border-width: 0; -gtk-icon-source: 
-gtk-icontheme('object-select-symbolic'); -gtk-icon-shadow: none; }
 
-checkbutton.text-button, radiobutton.text-button { padding: 2px 0; outline-offset: 0; }
-
-checkbutton.text-button label:not(:only-child):first-child, radiobutton.text-button 
label:not(:only-child):first-child { margin-left: 4px; }
-
-checkbutton.text-button label:not(:only-child):last-child, radiobutton.text-button 
label:not(:only-child):last-child { margin-right: 4px; }
+checkbutton.text-button, radiobutton.text-button { padding: 2px 0; outline-offset: 0; border-spacing: 4px; }
 
 check, radio { margin: 0 4px; min-height: 14px; min-width: 14px; border: 1px solid; -gtk-icon-source: none; 
color: #eeeeec; outline-color: rgba(238, 238, 236, 0.3); border-color: #070707; text-shadow: 0 -1px rgba(0, 
0, 0, 0.834353); -gtk-icon-shadow: 0 -1px rgba(0, 0, 0, 0.834353); background-image: linear-gradient(to 
bottom, #2d2d2d 20%, #252526 90%); box-shadow: inset 0 1px rgba(255, 255, 255, 0.02), 0 1px rgba(0, 0, 0, 
0.1), 0 1px 2px rgba(0, 0, 0, 0.07); }
 
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 19222d8420..68dfecff4f 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -1175,11 +1175,7 @@ row:selected switch slider:checked, row:selected switch slider { border-color: #
 
 .view.content-view.check:backdrop:checked:not(list), iconview.content-view.check:backdrop:checked:not(list), 
.content-view .tile check:backdrop:checked:not(list) { margin: 4px; min-width: 32px; min-height: 32px; color: 
rgba(238, 238, 236, 0.8); background-color: rgba(140, 140, 141, 0.95); border-radius: 5px; background-image: 
none; transition: 200ms; box-shadow: none; border-width: 0; -gtk-icon-source: 
-gtk-icontheme('object-select-symbolic'); -gtk-icon-shadow: none; }
 
-checkbutton.text-button, radiobutton.text-button { padding: 2px 0; outline-offset: 0; }
-
-checkbutton.text-button label:not(:only-child):first-child, radiobutton.text-button 
label:not(:only-child):first-child { margin-left: 4px; }
-
-checkbutton.text-button label:not(:only-child):last-child, radiobutton.text-button 
label:not(:only-child):last-child { margin-right: 4px; }
+checkbutton.text-button, radiobutton.text-button { padding: 2px 0; outline-offset: 0; border-spacing: 4px; }
 
 check, radio { margin: 0 4px; min-height: 14px; min-width: 14px; border: 1px solid; -gtk-icon-source: none; 
color: #2e3436; outline-color: rgba(46, 52, 54, 0.3); border-color: #bfb8b1; text-shadow: 0 1px rgba(255, 
255, 255, 0.769231); -gtk-icon-shadow: 0 1px rgba(255, 255, 255, 0.769231); background-image: 
linear-gradient(to bottom, white 20%, #f6f5f4 90%); box-shadow: inset 0 1px white, 0 1px rgba(0, 0, 0, 0.1), 
0 1px 2px rgba(0, 0, 0, 0.07); }
 


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