[gtk+] Adwaita: GtkSwitch size reduction and tweaks
- From: Lapo Calamandrei <lapo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Adwaita: GtkSwitch size reduction and tweaks
- Date: Fri, 8 Aug 2014 21:37:07 +0000 (UTC)
commit 9c7e31fc1cdb18a92fe2c48b148c09e859c7d1a7
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Fri Aug 8 23:31:33 2014 +0200
Adwaita: GtkSwitch size reduction and tweaks
See https://bugzilla.gnome.org/show_bug.cgi?id=734485
gtk/resources/theme/Adwaita/_common.scss | 10 +++++++---
gtk/resources/theme/Adwaita/gtk-contained-dark.css | 8 +++++---
gtk/resources/theme/Adwaita/gtk-contained.css | 8 +++++---
3 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index 829a1f0..c2ca089 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -1515,7 +1515,7 @@ GtkTreeView.view.progressbar { //Progressbar in treeview cells
GtkSwitch {
// FIXME: backdrop insensinsitive slider on the dark variant
- -GtkSwitch-slider-width: 47px; // 57px is the right value to make it as tall
+ -GtkSwitch-slider-width: 45px; // 55px is the right value to make it as tall
// as buttons, not doing that for now
font: bold condensed 9;
outline-offset: -4px;
@@ -1531,15 +1531,18 @@ GtkSwitch {
background-color: mix($bg_color,$borders_color,60%);
text-shadow: 0 1px transparentize(black, 0.9);
&:active {
+ @include progressbar_fill;
color: white;
border-color: $selected_borders_color;
- background-color: $selected_bg_color;
box-shadow: $widget_edge;
- text-shadow: 0 0 2px white;
+ //text-shadow: 0 1px transparentize($selected_borders_color,0.5);
+ text-shadow: 0 1px transparentize($selected_borders_color,0.5),
+ 0 0 2px transparentize(white,0.4);
}
&:insensitive {
color: $insensitive_fg_color;
border-color: $borders_color;
+ background-image: none;
background-color: $insensitive_bg_color;
box-shadow: $widget_edge;
text-shadow: none;
@@ -1547,6 +1550,7 @@ GtkSwitch {
&:backdrop {
color: $backdrop_fg_color;
border-color: $backdrop_borders_color;
+ background-image: none;
background-color: $backdrop_dark_fill;
box-shadow: none;
text-shadow: none;
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index 69ae7d8..d90e5b1 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -1594,7 +1594,7 @@ GtkTreeView.view.progressbar {
* Switch *
**********/
GtkSwitch {
- -GtkSwitch-slider-width: 47px;
+ -GtkSwitch-slider-width: 45px;
font: bold condensed 9;
outline-offset: -4px;
box-shadow: inset 0 1px rgba(0, 0, 0, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
@@ -1606,20 +1606,22 @@ GtkSwitch {
background-color: #2d3232;
text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
GtkSwitch.trough:active {
+ background-image: linear-gradient(to bottom, #215d9c 2px, #266cb5);
color: white;
border-color: #0f2b48;
- background-color: #215d9c;
box-shadow: 0 1px rgba(238, 238, 236, 0.1);
- text-shadow: 0 0 2px white; }
+ text-shadow: 0 1px rgba(15, 43, 72, 0.5), 0 0 2px rgba(255, 255, 255, 0.6); }
GtkSwitch.trough:insensitive {
color: #939695;
border-color: #1c1f1f;
+ background-image: none;
background-color: #323636;
box-shadow: 0 1px rgba(238, 238, 236, 0.1);
text-shadow: none; }
GtkSwitch.trough:backdrop {
color: #c9cbc9;
border-color: #1e2222;
+ background-image: none;
background-color: #2f3434;
box-shadow: none;
text-shadow: none; }
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index 73287cc..e8b05cc 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -1588,7 +1588,7 @@ GtkTreeView.view.progressbar {
* Switch *
**********/
GtkSwitch {
- -GtkSwitch-slider-width: 47px;
+ -GtkSwitch-slider-width: 45px;
font: bold condensed 9;
outline-offset: -4px;
box-shadow: inset 0 1px rgba(0, 0, 0, 0.1), 0 1px white; }
@@ -1600,20 +1600,22 @@ GtkSwitch {
background-color: #cecece;
text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
GtkSwitch.trough:active {
+ background-image: linear-gradient(to bottom, #4a90d9 2px, #63a0de);
color: white;
border-color: #184472;
- background-color: #4a90d9;
box-shadow: 0 1px white;
- text-shadow: 0 0 2px white; }
+ text-shadow: 0 1px rgba(24, 68, 114, 0.5), 0 0 2px rgba(255, 255, 255, 0.6); }
GtkSwitch.trough:insensitive {
color: #8d9091;
border-color: #a1a1a1;
+ background-image: none;
background-color: #f4f4f4;
box-shadow: 0 1px white;
text-shadow: none; }
GtkSwitch.trough:backdrop {
color: #54595a;
border-color: #a8a8a8;
+ background-image: none;
background-color: #d4d4d4;
box-shadow: none;
text-shadow: none; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]