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

View File

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

View File

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