[gtk+/wip/baedert/drawing: 262/262] adwaita: Refine checkbutton styling some more
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 262/262] adwaita: Refine checkbutton styling some more
- Date: Tue, 6 Jun 2017 09:41:44 +0000 (UTC)
commit adeca628fcc26b9a4c370fce048f09e78114ea47
Author: Timm Bäder <mail baedert org>
Date: Tue Jun 6 11:24:36 2017 +0200
adwaita: Refine checkbutton styling some more
gtk/gtkcheckbutton.c | 6 ++++++
gtk/theme/Adwaita/_common.scss | 5 +++--
gtk/theme/Adwaita/gtk-contained-dark.css | 4 +---
gtk/theme/Adwaita/gtk-contained.css | 4 +---
4 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index babcd67..6fa891d 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -645,6 +645,9 @@ gtk_check_button_set_label (GtkCheckButton *check_button,
child = gtk_label_new (label);
gtk_container_add (GTK_CONTAINER (check_button), child);
}
+
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (check_button)),
+ "text-button");
}
const char *
@@ -684,6 +687,9 @@ gtk_check_button_set_icon_name (GtkCheckButton *check_button,
child = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (check_button), child);
}
+
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (check_button)),
+ "image-button");
}
const char *
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 3d10979..09cf6f6 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2667,13 +2667,14 @@ switch {
checkbutton button.toggle, radiobutton:not(.radio) button.toggle {
background: none;
border: none;
-}
+ box-shadow: none;
-checkbutton.text-button, radiobutton.text-button {
// this is for a nice focus on check and radios text
padding: 2px 0;
outline-offset: 0;
+}
+checkbutton.text-button, radiobutton.text-button {
label:not(:only-child) {
&:first-child { margin-left: 4px; }
&:last-child { margin-right: 4px; }
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 1c556e8..4a61c11 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -1092,9 +1092,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) { -gtk-icon-shadow: none; -gtk-icon-source:
-gtk-scaled(url("assets/checkbox-checked-backdrop-selectionmode.png"),
url("assets/checkbox-checked-backdrop-selectionmode 2 png")); background-color: transparent; min-width: 40px;
min-height: 40px; background-image: none; transition: none; box-shadow: none; border-width: 0; }
-checkbutton button.toggle, radiobutton:not(.radio) button.toggle { background: none; border: none; }
-
-checkbutton.text-button, radiobutton.text-button { padding: 2px 0; outline-offset: 0; }
+checkbutton button.toggle, radiobutton:not(.radio) button.toggle { background: none; border: none;
box-shadow: none; 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; }
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 99113b5..2213516 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -1110,9 +1110,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) { -gtk-icon-shadow: none; -gtk-icon-source:
-gtk-scaled(url("assets/checkbox-checked-backdrop-selectionmode.png"),
url("assets/checkbox-checked-backdrop-selectionmode 2 png")); background-color: transparent; min-width: 40px;
min-height: 40px; background-image: none; transition: none; box-shadow: none; border-width: 0; }
-checkbutton button.toggle, radiobutton:not(.radio) button.toggle { background: none; border: none; }
-
-checkbutton.text-button, radiobutton.text-button { padding: 2px 0; outline-offset: 0; }
+checkbutton button.toggle, radiobutton:not(.radio) button.toggle { background: none; border: none;
box-shadow: none; 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; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]