Adwaita: minor code refactoring

This commit is contained in:
Lapo Calamandrei 2014-06-28 15:22:23 +02:00
parent 0fd3ec80db
commit 4287e44a9a
3 changed files with 67 additions and 55 deletions

View File

@ -1187,8 +1187,7 @@ GtkSwitch {
border-radius: 3px;
border-color: $borders_color;
background-color: mix($bg_color,$borders_color,60%);
box-shadow: inset 0 1px transparentize(black, 0.9),
$widget_edge;
box-shadow: inset 0 1px transparentize(black, 0.9); /*outset not working*/
text-shadow: 0 1px transparentize(black, 0.9);
&:active {
color: white;
@ -1210,16 +1209,16 @@ GtkSwitch {
background-color: $backdrop_bg_color;
box-shadow: none;
text-shadow: none;
}
&:backdrop:active {
color: $backdrop_bg_color;
border-color: $selected_bg_color;
background-color: $selected_bg_color;
box-shadow: none;
}
&:backdrop:insensitive {
color: $backdrop_insensitive_color;
border-color: $backdrop_insensitive_color;
&:active {
color: $backdrop_bg_color;
border-color: $selected_bg_color;
background-color: $selected_bg_color;
box-shadow: none;
}
&:insensitive {
color: $backdrop_insensitive_color;
border-color: $backdrop_insensitive_color;
}
}
}
&.slider {
@ -1238,12 +1237,13 @@ GtkSwitch {
}
&:active { border: 1px solid $selected_borders_color; }
&:insensitive { @include button(insensitive, $noedge: true); }
&:backdrop { @include button(backdrop); }
&:backdrop:active{ border-color: $selected_bg_color; }
&:backdrop:insensitive {
@include button(backdrop-insensitive);
@if $variant=='dark' {
border-color: $backdrop_insensitive_color;
&:backdrop { @include button(backdrop);
&:active{ border-color: $selected_bg_color; }
&:insensitive {
@include button(backdrop-insensitive);
@if $variant=='dark' {
border-color: $backdrop_insensitive_color;
}
}
}
}
@ -1687,6 +1687,10 @@ GtkScrolledWindow {
}
}
.list-row {
padding: 2px;
}
.list-row:selected {
background-color: $selected_bg_color;
color: $selected_fg_color;

View File

@ -1398,7 +1398,8 @@ GtkSwitch {
border-radius: 3px;
border-color: #1c1f1f;
background-color: #2d3232;
box-shadow: inset 0 1px rgba(0, 0, 0, 0.1), 0 1px rgba(238, 238, 236, 0.1);
box-shadow: inset 0 1px rgba(0, 0, 0, 0.1);
/*outset not working*/
text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
GtkSwitch.trough:active {
color: white;
@ -1418,14 +1419,14 @@ GtkSwitch {
background-color: #393f3f;
box-shadow: none;
text-shadow: none; }
GtkSwitch.trough:backdrop:active {
color: #393f3f;
border-color: #215d9c;
background-color: #215d9c;
box-shadow: none; }
GtkSwitch.trough:backdrop:insensitive {
color: #454c4c;
border-color: #454c4c; }
GtkSwitch.trough:backdrop:active {
color: #393f3f;
border-color: #215d9c;
background-color: #215d9c;
box-shadow: none; }
GtkSwitch.trough:backdrop:insensitive {
color: #454c4c;
border-color: #454c4c; }
GtkSwitch.slider {
border-radius: 3px;
border-width: 1px;
@ -1467,16 +1468,16 @@ GtkSwitch {
text-shadow: none;
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
GtkSwitch.slider:backdrop:active {
border-color: #215d9c; }
GtkSwitch.slider:backdrop:insensitive {
border-width: 1px;
border-style: solid;
color: #454c4c;
border-color: #1e2222;
background-image: linear-gradient(to bottom, #393f3f);
box-shadow: inset 0 1px rgba(255, 255, 255, 0);
border-color: #454c4c; }
GtkSwitch.slider:backdrop:active {
border-color: #215d9c; }
GtkSwitch.slider:backdrop:insensitive {
border-width: 1px;
border-style: solid;
color: #454c4c;
border-color: #1e2222;
background-image: linear-gradient(to bottom, #393f3f);
box-shadow: inset 0 1px rgba(255, 255, 255, 0);
border-color: #454c4c; }
/*************************
* Check and Radio items *
@ -2287,6 +2288,9 @@ GtkScrolledWindow GtkViewport.frame {
background-color: #2c2c2c;
border-color: #1e2222; }
.list-row {
padding: 2px; }
.list-row:selected {
background-color: #215d9c;
color: white; }

View File

@ -1398,7 +1398,8 @@ GtkSwitch {
border-radius: 3px;
border-color: #a1a1a1;
background-color: #cecece;
box-shadow: inset 0 1px rgba(0, 0, 0, 0.1), 0 1px white;
box-shadow: inset 0 1px rgba(0, 0, 0, 0.1);
/*outset not working*/
text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
GtkSwitch.trough:active {
color: white;
@ -1418,14 +1419,14 @@ GtkSwitch {
background-color: #ededed;
box-shadow: none;
text-shadow: none; }
GtkSwitch.trough:backdrop:active {
color: #ededed;
border-color: #4a90d9;
background-color: #4a90d9;
box-shadow: none; }
GtkSwitch.trough:backdrop:insensitive {
color: #c7c7c7;
border-color: #c7c7c7; }
GtkSwitch.trough:backdrop:active {
color: #ededed;
border-color: #4a90d9;
background-color: #4a90d9;
box-shadow: none; }
GtkSwitch.trough:backdrop:insensitive {
color: #c7c7c7;
border-color: #c7c7c7; }
GtkSwitch.slider {
border-radius: 3px;
border-width: 1px;
@ -1467,15 +1468,15 @@ GtkSwitch {
text-shadow: none;
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
GtkSwitch.slider:backdrop:active {
border-color: #4a90d9; }
GtkSwitch.slider:backdrop:insensitive {
border-width: 1px;
border-style: solid;
color: #c7c7c7;
border-color: #a8a8a8;
background-image: linear-gradient(to bottom, #ededed);
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
GtkSwitch.slider:backdrop:active {
border-color: #4a90d9; }
GtkSwitch.slider:backdrop:insensitive {
border-width: 1px;
border-style: solid;
color: #c7c7c7;
border-color: #a8a8a8;
background-image: linear-gradient(to bottom, #ededed);
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
/*************************
* Check and Radio items *
@ -2285,6 +2286,9 @@ GtkScrolledWindow GtkViewport.frame {
background-color: #fcfcfc;
border-color: #a8a8a8; }
.list-row {
padding: 2px; }
.list-row:selected {
background-color: #4a90d9;
color: white; }