Adwaita: turn $widget_edge into a function
This commit is contained in:
@@ -681,7 +681,7 @@ GtkColorButton.button {
|
|||||||
GtkColorSwatch {
|
GtkColorSwatch {
|
||||||
border-radius: 1.5px;
|
border-radius: 1.5px;
|
||||||
box-shadow: inset 0 1px 1px transparentize(black, 0.8),
|
box-shadow: inset 0 1px 1px transparentize(black, 0.8),
|
||||||
$widget_edge;
|
widget_edge();
|
||||||
&:backdrop { box-shadow: none; }
|
&:backdrop { box-shadow: none; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -926,7 +926,7 @@ GtkComboBox {
|
|||||||
$_bg: mix($bg_color, $borders_color, 70%);
|
$_bg: mix($bg_color, $borders_color, 70%);
|
||||||
background-color: $_bg;
|
background-color: $_bg;
|
||||||
box-shadow: inset 0 2px 3px -1px mix($borders_color, $_bg, 60%),
|
box-shadow: inset 0 2px 3px -1px mix($borders_color, $_bg, 60%),
|
||||||
$widget_edge;
|
widget_edge();
|
||||||
//FIXME edge would be nice, but doesn't work
|
//FIXME edge would be nice, but doesn't work
|
||||||
&:backdrop {
|
&:backdrop {
|
||||||
border-color: $backdrop_borders_color;
|
border-color: $backdrop_borders_color;
|
||||||
@@ -1636,7 +1636,7 @@ GtkSwitch {
|
|||||||
font-size: 82%;
|
font-size: 82%;
|
||||||
outline-offset: -4px;
|
outline-offset: -4px;
|
||||||
box-shadow: inset 0 1px transparentize(black, 0.9), // needs to be set here
|
box-shadow: inset 0 1px transparentize(black, 0.9), // needs to be set here
|
||||||
$widget_edge; // otherwise it gets
|
widget_edge(); // otherwise it gets
|
||||||
// clipped
|
// clipped
|
||||||
&.trough {
|
&.trough {
|
||||||
// similar to the .scale
|
// similar to the .scale
|
||||||
@@ -1649,7 +1649,7 @@ GtkSwitch {
|
|||||||
@include progressbar_fill;
|
@include progressbar_fill;
|
||||||
color: white;
|
color: white;
|
||||||
border-color: $selected_borders_color;
|
border-color: $selected_borders_color;
|
||||||
box-shadow: $widget_edge;
|
box-shadow: widget_edge();
|
||||||
//text-shadow: 0 1px transparentize($selected_borders_color,0.5);
|
//text-shadow: 0 1px transparentize($selected_borders_color,0.5);
|
||||||
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);
|
0 0 2px transparentize(white,0.4);
|
||||||
@@ -1659,7 +1659,7 @@ GtkSwitch {
|
|||||||
border-color: $borders_color;
|
border-color: $borders_color;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
background-color: $insensitive_bg_color;
|
background-color: $insensitive_bg_color;
|
||||||
box-shadow: $widget_edge;
|
box-shadow: widget_edge();
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
&:backdrop {
|
&:backdrop {
|
||||||
@@ -1890,11 +1890,11 @@ GtkCheckButton.text-button, GtkRadioButton.text-button {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background-color: mix($bg_color,$borders_color,60%);
|
background-color: mix($bg_color,$borders_color,60%);
|
||||||
box-shadow: inset 1px 1px transparentize(black, 0.9),
|
box-shadow: inset 1px 1px transparentize(black, 0.9),
|
||||||
$widget_edge;
|
widget_edge();
|
||||||
&.highlight {
|
&.highlight {
|
||||||
@include progressbar_fill;
|
@include progressbar_fill;
|
||||||
border-color: $selected_borders_color;
|
border-color: $selected_borders_color;
|
||||||
box-shadow: $widget_edge;
|
box-shadow: widget_edge();
|
||||||
&.vertical { @include progressbar_fill(vertical); }
|
&.vertical { @include progressbar_fill(vertical); }
|
||||||
&:backdrop {
|
&:backdrop {
|
||||||
border-color: if($variant=='light', $selected_bg_color,
|
border-color: if($variant=='light', $selected_bg_color,
|
||||||
@@ -1907,7 +1907,7 @@ GtkCheckButton.text-button, GtkRadioButton.text-button {
|
|||||||
border-color: $insensitive_borders_color;
|
border-color: $insensitive_borders_color;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
background-color: $insensitive_bg_color;
|
background-color: $insensitive_bg_color;
|
||||||
box-shadow: $widget_edge;
|
box-shadow: widget_edge();
|
||||||
}
|
}
|
||||||
&:backdrop {
|
&:backdrop {
|
||||||
border-color: $backdrop_borders_color;
|
border-color: $backdrop_borders_color;
|
||||||
@@ -2005,7 +2005,7 @@ GtkProgressBar {
|
|||||||
font-size: 82%;
|
font-size: 82%;
|
||||||
color: transparentize($fg_color, 0.6);
|
color: transparentize($fg_color, 0.6);
|
||||||
box-shadow: inset 1px 1px transparentize(black, 0.9), // needs to be set
|
box-shadow: inset 1px 1px transparentize(black, 0.9), // needs to be set
|
||||||
$widget_edge; // here ot it gets
|
widget_edge(); // here ot it gets
|
||||||
// clipped
|
// clipped
|
||||||
&:backdrop {
|
&:backdrop {
|
||||||
color: $backdrop_insensitive_color;
|
color: $backdrop_insensitive_color;
|
||||||
@@ -2082,7 +2082,7 @@ GtkProgressBar.trough {
|
|||||||
GtkLevelBar {
|
GtkLevelBar {
|
||||||
-GtkLevelBar-min-block-width: 34;
|
-GtkLevelBar-min-block-width: 34;
|
||||||
-GtkLevelBar-min-block-height: 3;
|
-GtkLevelBar-min-block-height: 3;
|
||||||
box-shadow: $widget_edge; // needs to be set here to avoid clipping
|
box-shadow: widget_edge(); // needs to be set here to avoid clipping
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkLevelBar.vertical {
|
GtkLevelBar.vertical {
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
// generic drawing of more complex things
|
// generic drawing of more complex things
|
||||||
|
|
||||||
$widget_edge: 0 1px $borders_edge; //outer hilight "used" on
|
@function widget_edge($c:$borders_edge) {
|
||||||
//most widgets
|
// outer highlight "used" on most widgets
|
||||||
|
@return 0 1px $c;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin _shadows($shadow1, $shadow2:none, $shadow3:none, $shadow4:none) {
|
@mixin _shadows($shadow1, $shadow2:none, $shadow3:none, $shadow4:none) {
|
||||||
//
|
//
|
||||||
@@ -35,7 +37,7 @@ $widget_edge: 0 1px $borders_edge; //outer hilight "used" on
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
background-image: entry_gradient($base_color);
|
background-image: entry_gradient($base_color);
|
||||||
$_blank_edge: if($noedge, none, 0 1px transparentize(white,1));
|
$_blank_edge: if($noedge, none, 0 1px transparentize(white,1));
|
||||||
$_entry_edge: if($noedge, none, $widget_edge);
|
$_entry_edge: if($noedge, none, widget_edge());
|
||||||
$_inner_shadows: inset 0 3px mix(black, $base_color, 3%),
|
$_inner_shadows: inset 0 3px mix(black, $base_color, 3%),
|
||||||
inset 0 1px mix(black, $base_color, 18%);
|
inset 0 1px mix(black, $base_color, 18%);
|
||||||
@if $variant == 'dark' {
|
@if $variant == 'dark' {
|
||||||
@@ -159,7 +161,7 @@ $widget_edge: 0 1px $borders_edge; //outer hilight "used" on
|
|||||||
@else { border-color: $borders_color; }
|
@else { border-color: $borders_color; }
|
||||||
|
|
||||||
@include _button_text_shadow($tc,$c);
|
@include _button_text_shadow($tc,$c);
|
||||||
$_outsets: if($noedge, none, $widget_edge);
|
$_outsets: if($noedge, none, widget_edge());
|
||||||
@include _shadows(inset 0 1px $_top_hilight, $_outsets);
|
@include _shadows(inset 0 1px $_top_hilight, $_outsets);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,7 +178,7 @@ $widget_edge: 0 1px $borders_edge; //outer hilight "used" on
|
|||||||
$c);
|
$c);
|
||||||
|
|
||||||
@include _button_text_shadow($tc,lighten($c,4%));
|
@include _button_text_shadow($tc,lighten($c,4%));
|
||||||
$_outsets: if($noedge, none, $widget_edge);
|
$_outsets: if($noedge, none, widget_edge());
|
||||||
@include _shadows(inset 0 1px $_top_hilight, $_outsets);
|
@include _shadows(inset 0 1px $_top_hilight, $_outsets);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,7 +193,7 @@ $widget_edge: 0 1px $borders_edge; //outer hilight "used" on
|
|||||||
darken($c,9%),
|
darken($c,9%),
|
||||||
darken($c,5%));
|
darken($c,5%));
|
||||||
@include _button_text_shadow($tc,darken($c,10%));
|
@include _button_text_shadow($tc,darken($c,10%));
|
||||||
$_outsets: if($noedge, none, $widget_edge);
|
$_outsets: if($noedge, none, widget_edge());
|
||||||
@include _shadows(inset 0 1px transparentize(black, 0.93),
|
@include _shadows(inset 0 1px transparentize(black, 0.93),
|
||||||
inset 0 2px 1px -2px transparentize(black,0.4),
|
inset 0 2px 1px -2px transparentize(black,0.4),
|
||||||
$_outsets);
|
$_outsets);
|
||||||
@@ -207,7 +209,7 @@ $widget_edge: 0 1px $borders_edge; //outer hilight "used" on
|
|||||||
background-image: linear-gradient(to bottom, $_bg);
|
background-image: linear-gradient(to bottom, $_bg);
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
icon-shadow: none;
|
icon-shadow: none;
|
||||||
$_outsets: if($noedge, none, $widget_edge);
|
$_outsets: if($noedge, none, widget_edge());
|
||||||
// white with 0 alpha to avoid an ugly transition, since no color means
|
// white with 0 alpha to avoid an ugly transition, since no color means
|
||||||
// black with 0 alpha
|
// black with 0 alpha
|
||||||
@include _shadows(inset 0 1px transparentize(white,1), $_outsets);
|
@include _shadows(inset 0 1px transparentize(white,1), $_outsets);
|
||||||
@@ -224,7 +226,7 @@ $widget_edge: 0 1px $borders_edge; //outer hilight "used" on
|
|||||||
color: $insensitive_fg_color;
|
color: $insensitive_fg_color;
|
||||||
border-color: $insensitive_borders_color;
|
border-color: $insensitive_borders_color;
|
||||||
background-image: linear-gradient(to bottom, mix($_bc, $_bg, 10%), $_bg);
|
background-image: linear-gradient(to bottom, mix($_bc, $_bg, 10%), $_bg);
|
||||||
$_outsets: if($noedge, none, $widget_edge);
|
$_outsets: if($noedge, none, widget_edge());
|
||||||
// white with 0 alpha to avoid an ugly transition, since no color means
|
// white with 0 alpha to avoid an ugly transition, since no color means
|
||||||
// black with 0 alpha
|
// black with 0 alpha
|
||||||
@include _shadows(inset 0 1px transparentize(white,1), $_outsets);
|
@include _shadows(inset 0 1px transparentize(white,1), $_outsets);
|
||||||
|
|||||||
Reference in New Issue
Block a user