2014-06-13 14:32:44 +00:00
|
|
|
// Drawing mixins
|
|
|
|
|
|
|
|
// generic drawing of more complex things
|
|
|
|
|
2014-09-03 12:27:07 +00:00
|
|
|
@function _widget_edge($c:$borders_edge) {
|
2014-09-03 17:41:50 +00:00
|
|
|
// outer highlight "used" on most widgets
|
2014-09-02 18:35:28 +00:00
|
|
|
@return 0 1px $c;
|
|
|
|
}
|
2014-06-13 14:32:44 +00:00
|
|
|
|
|
|
|
@mixin _shadows($shadow1, $shadow2:none, $shadow3:none, $shadow4:none) {
|
|
|
|
//
|
|
|
|
// Helper function to stack up to 4 box-shadows;
|
|
|
|
//
|
|
|
|
@if $shadow4!=none { box-shadow: $shadow1, $shadow2, $shadow3, $shadow4; }
|
|
|
|
@else if $shadow3!=none { box-shadow: $shadow1, $shadow2, $shadow3; }
|
|
|
|
@else if $shadow2!=none { box-shadow: $shadow1, $shadow2; }
|
|
|
|
@else { box-shadow: $shadow1; }
|
|
|
|
}
|
|
|
|
|
|
|
|
// entries
|
|
|
|
|
2014-10-04 18:23:10 +00:00
|
|
|
@function entry_focus_border($fc) {
|
|
|
|
@if $variant == 'light' { @return $fc; }
|
|
|
|
@else { @return if($fc==$selected_bg_color, $selected_borders_color, darken($fc,35%)); }
|
|
|
|
}
|
|
|
|
|
|
|
|
@function entry_focus_glow($fc) {
|
|
|
|
$_focus_glow_color: if($variant=='light', transparentize($fc,0.85),
|
|
|
|
transparentize($fc,0.3));
|
|
|
|
@return inset 0 0 0 1px $_focus_glow_color;
|
|
|
|
}
|
|
|
|
|
2014-09-02 13:21:42 +00:00
|
|
|
@function entry_gradient($c) {
|
|
|
|
@return linear-gradient(to bottom, darken($c,3%), $c 90%);
|
|
|
|
}
|
|
|
|
|
2014-09-03 11:18:39 +00:00
|
|
|
@mixin entry($t, $fc:$selected_bg_color, $edge: $borders_edge) {
|
2014-06-13 14:32:44 +00:00
|
|
|
//
|
|
|
|
// Entries drawing function
|
|
|
|
//
|
|
|
|
// $t: entry type
|
2014-07-03 10:29:25 +00:00
|
|
|
// $fc: focus color
|
2014-09-03 11:18:39 +00:00
|
|
|
// $edge: set to none to not draw the bottom edge or specify a color to not
|
|
|
|
// use the default one
|
2014-06-13 14:32:44 +00:00
|
|
|
//
|
|
|
|
// possible $t values:
|
|
|
|
// normal, focus, insensitive, backdrop, backdrop-insensitive;
|
|
|
|
//
|
|
|
|
background-color: transparent;
|
2014-09-02 13:21:42 +00:00
|
|
|
background-image: entry_gradient($base_color);
|
2014-09-03 11:18:39 +00:00
|
|
|
$_blank_edge: if($edge == none, none, 0 1px transparentize($edge,1));
|
2014-09-03 12:27:07 +00:00
|
|
|
$_entry_edge: if($edge == none, none, _widget_edge($edge));
|
2014-09-05 13:05:25 +00:00
|
|
|
$_inner_shadows: inset 0 3px transparentize(black, 0.98),
|
|
|
|
inset 0 2px transparentize(black, 0.97),
|
|
|
|
inset 0 1px transparentize(black, 0.92);
|
2014-08-21 12:41:29 +00:00
|
|
|
|
|
|
|
// we need to match the same shadow types (inset/outset) in various states
|
|
|
|
// hence transparent shadows istead of resetting them when not needed
|
2014-09-05 13:05:25 +00:00
|
|
|
$_blank_inner_shadows: inset 0 3px transparentize(black, 1),
|
|
|
|
inset 0 2px transparentize(black, 1),
|
|
|
|
inset 0 1px transparentize(black, 1);
|
2014-06-13 14:32:44 +00:00
|
|
|
@if $t==normal {
|
|
|
|
border-color: $borders_color;
|
2014-08-21 12:41:29 +00:00
|
|
|
@include _shadows($_inner_shadows,
|
2014-10-04 18:23:10 +00:00
|
|
|
entry_focus_glow(transparentize($fc,1)),
|
2014-06-13 14:32:44 +00:00
|
|
|
$_entry_edge);
|
2014-07-07 15:21:52 +00:00
|
|
|
// the second transparent shadow is needed for the transition to work
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@if $t==focus {
|
2014-08-21 12:41:29 +00:00
|
|
|
@include _shadows($_inner_shadows,
|
2014-10-04 18:23:10 +00:00
|
|
|
entry_focus_glow($fc),
|
2014-08-21 12:41:29 +00:00
|
|
|
$_entry_edge);
|
2014-10-04 18:23:10 +00:00
|
|
|
border-color: entry_focus_border($fc);
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@if $t==insensitive {
|
|
|
|
color: $insensitive_fg_color;
|
|
|
|
border-color: $borders_color;
|
|
|
|
background-image: linear-gradient(to bottom, $insensitive_bg_color);
|
2014-07-07 15:21:52 +00:00
|
|
|
@include _shadows($_blank_inner_shadows, $_entry_edge);
|
|
|
|
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@if $t==backdrop {
|
|
|
|
color: $backdrop_fg_color;
|
2014-07-19 09:11:44 +00:00
|
|
|
border-color: $backdrop_borders_color;
|
2014-06-13 14:32:44 +00:00
|
|
|
background-image: linear-gradient(to bottom, $backdrop_base_color);
|
2014-07-07 15:21:52 +00:00
|
|
|
@include _shadows($_blank_inner_shadows, $_blank_edge);
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@if $t==backdrop-insensitive {
|
|
|
|
color: $backdrop_insensitive_color;
|
2014-07-19 09:11:44 +00:00
|
|
|
border-color: $backdrop_borders_color;
|
|
|
|
background-image: linear-gradient(to bottom, $insensitive_bg_color);
|
2014-07-07 15:21:52 +00:00
|
|
|
@include _shadows($_blank_inner_shadows, $_blank_edge);
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// buttons
|
|
|
|
|
2014-09-03 17:41:50 +00:00
|
|
|
@function _border_color ($c) { @return darken($c,25%); } // colored buttons want
|
|
|
|
// the border form the
|
|
|
|
// base color
|
2014-06-13 14:32:44 +00:00
|
|
|
|
2014-07-22 17:50:15 +00:00
|
|
|
@function _text_shadow_color ($tc:$fg_color, $bg:$bg_color) {
|
|
|
|
//
|
|
|
|
// calculate the color of text shadows
|
|
|
|
//
|
|
|
|
// $tc is the text color
|
|
|
|
// $bg is the background color
|
|
|
|
//
|
|
|
|
$_lbg: lightness($bg)/100%;
|
|
|
|
@if lightness($tc)<50% { @return transparentize(white,1-$_lbg/($_lbg*1.3)); }
|
|
|
|
@else { @return transparentize(black,$_lbg*0.8); }
|
|
|
|
}
|
|
|
|
|
2014-09-03 18:40:43 +00:00
|
|
|
@function _button_hilight_color($c) {
|
|
|
|
//
|
|
|
|
// calculate the right top hilight color for buttons
|
|
|
|
//
|
|
|
|
// $c: base color;
|
|
|
|
//
|
|
|
|
@if lightness($c)>90% { @return white; }
|
|
|
|
@else if lightness($c)>80% { @return transparentize(white, 0.3); }
|
|
|
|
@else if lightness($c)>50% { @return transparentize(white, 0.5); }
|
|
|
|
@else if lightness($c)>40% { @return transparentize(white, 0.7); }
|
|
|
|
@else { @return transparentize(white, 0.9); }
|
|
|
|
}
|
|
|
|
|
2014-06-13 14:32:44 +00:00
|
|
|
@mixin _button_text_shadow ($tc:$fg_color, $bg:$bg_color) {
|
|
|
|
//
|
|
|
|
// helper function for the text emboss effect
|
|
|
|
//
|
|
|
|
// $tc is the optional text color, not the shadow color
|
|
|
|
//
|
|
|
|
// TODO: this functions needs a way to deal with special cases
|
|
|
|
//
|
|
|
|
|
2014-07-22 17:50:15 +00:00
|
|
|
$_shadow: _text_shadow_color($tc, $bg);
|
2014-06-13 14:32:44 +00:00
|
|
|
|
2014-07-22 17:50:15 +00:00
|
|
|
@if lightness($tc)<50% {
|
|
|
|
text-shadow: 0 1px $_shadow;
|
|
|
|
icon-shadow: 0 1px $_shadow;
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@else {
|
2014-07-22 17:50:15 +00:00
|
|
|
text-shadow: 0 -1px $_shadow;
|
|
|
|
icon-shadow: 0 -1px $_shadow;
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-09-03 12:22:10 +00:00
|
|
|
@mixin button($t, $c:$bg_color, $tc:$fg_color, $edge: $borders_edge) {
|
2014-06-13 14:32:44 +00:00
|
|
|
//
|
|
|
|
// Button drawing function
|
|
|
|
//
|
2014-09-03 12:22:10 +00:00
|
|
|
// $t: button type,
|
|
|
|
// $c: base button color for colored* types
|
|
|
|
// $tc: optional text color for colored* types
|
|
|
|
// $edge: set to none to not draw the bottom edge or specify a color to not
|
|
|
|
// use the default one
|
2014-06-13 14:32:44 +00:00
|
|
|
//
|
|
|
|
// possible $t values:
|
|
|
|
// normal, hover, active, insensitive, insensitive-active,
|
2014-07-08 16:24:28 +00:00
|
|
|
// backdrop, backdrop-active, backdrop-insensitive, backdrop-insensitive-active,
|
2014-08-22 10:55:30 +00:00
|
|
|
// osd, osd-hover, osd-active, osd-insensitive, osd-backdrop, undecorated
|
2014-06-13 14:32:44 +00:00
|
|
|
//
|
|
|
|
|
2014-09-03 18:40:43 +00:00
|
|
|
$_hilight_color: _button_hilight_color($c);
|
2014-09-03 12:27:07 +00:00
|
|
|
$_button_edge: if($edge == none, none, _widget_edge($edge));
|
|
|
|
$_blank_edge: if($edge == none, none, _widget_edge(transparentize($edge,1)));
|
2014-09-03 12:22:10 +00:00
|
|
|
|
2014-06-13 14:32:44 +00:00
|
|
|
@if $t==normal {
|
|
|
|
//
|
|
|
|
// normal button
|
|
|
|
//
|
|
|
|
color: $tc;
|
2014-09-04 13:03:09 +00:00
|
|
|
outline-color: transparentize($tc, 0.7);
|
|
|
|
border-color: if($c!=$bg_color, _border_color($c), $borders_color);
|
2014-06-18 14:36:00 +00:00
|
|
|
background-image: linear-gradient(to bottom,
|
2014-06-13 14:32:44 +00:00
|
|
|
lighten($c,5%),
|
|
|
|
$c 40%,
|
|
|
|
darken($c,5%)
|
|
|
|
);
|
|
|
|
@include _button_text_shadow($tc,$c);
|
2014-09-03 18:40:43 +00:00
|
|
|
@include _shadows(inset 0 1px $_hilight_color, $_button_edge);
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@else if $t==hover {
|
|
|
|
//
|
|
|
|
// hovered button
|
|
|
|
//
|
|
|
|
color: $tc;
|
2014-09-04 13:03:09 +00:00
|
|
|
outline-color: transparentize($tc, 0.7);
|
|
|
|
border-color: if($c!=$bg_color, _border_color($c), $borders_color);
|
2014-06-13 14:32:44 +00:00
|
|
|
background-image: linear-gradient(to bottom,
|
|
|
|
lighten($c,14%),
|
|
|
|
lighten($c,4%) 40%,
|
|
|
|
$c);
|
|
|
|
|
|
|
|
@include _button_text_shadow($tc,lighten($c,4%));
|
2014-09-03 18:40:43 +00:00
|
|
|
@include _shadows(inset 0 1px $_hilight_color, $_button_edge);
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@else if $t==active {
|
|
|
|
//
|
|
|
|
// pushed button
|
|
|
|
//
|
|
|
|
color: $tc;
|
2014-09-04 13:03:09 +00:00
|
|
|
outline-color: transparentize($tc, 0.7);
|
|
|
|
border-color: if($c!=$bg_color, _border_color($c), $borders_color);
|
2014-07-15 15:52:11 +00:00
|
|
|
background-image: linear-gradient(to bottom,
|
|
|
|
darken($c,9%),
|
|
|
|
darken($c,5%));
|
2014-06-13 14:32:44 +00:00
|
|
|
@include _button_text_shadow($tc,darken($c,10%));
|
2014-08-08 08:11:11 +00:00
|
|
|
@include _shadows(inset 0 1px transparentize(black, 0.93),
|
|
|
|
inset 0 2px 1px -2px transparentize(black,0.4),
|
2014-09-03 12:22:10 +00:00
|
|
|
$_button_edge);
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@else if $t==insensitive {
|
|
|
|
//
|
|
|
|
// insensitive button
|
|
|
|
//
|
2014-07-28 10:42:23 +00:00
|
|
|
$_bg: if($c!=$bg_color, mix($c,$base_color,85%), $insensitive_bg_color);
|
2014-09-04 13:03:09 +00:00
|
|
|
|
|
|
|
color: if($tc!=$fg_color, mix($tc,$_bg,50%), $insensitive_fg_color);
|
2014-07-28 10:42:23 +00:00
|
|
|
border-color: if($c!=$bg_color, _border_color($c),
|
|
|
|
$insensitive_borders_color);
|
|
|
|
background-image: linear-gradient(to bottom, $_bg);
|
2014-06-13 14:32:44 +00:00
|
|
|
text-shadow: none;
|
|
|
|
icon-shadow: none;
|
2014-07-10 09:55:51 +00:00
|
|
|
// white with 0 alpha to avoid an ugly transition, since no color means
|
|
|
|
// black with 0 alpha
|
2014-09-03 12:22:10 +00:00
|
|
|
@include _shadows(inset 0 1px transparentize(white,1), $_button_edge);
|
2014-10-05 01:40:45 +00:00
|
|
|
> .label { color: inherit; }
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@else if $t==insensitive-active {
|
|
|
|
//
|
|
|
|
// insensitive pushed button
|
|
|
|
//
|
2014-09-04 13:03:09 +00:00
|
|
|
$_bg: if($c!=$bg_color, darken(mix($c,$base_color,85%),5%),
|
|
|
|
$insensitive_bg_color);
|
2014-07-28 10:42:23 +00:00
|
|
|
$_bc: if($c!=$bg_color, _border_color($c), $insensitive_borders_color);
|
2014-09-04 13:03:09 +00:00
|
|
|
|
|
|
|
color: if($c!=$bg_color, mix($tc,$_bg,60%), $insensitive_fg_color);
|
2014-07-28 10:42:23 +00:00
|
|
|
border-color: $_bc;
|
|
|
|
background-image: linear-gradient(to bottom, mix($_bc, $_bg, 10%), $_bg);
|
2014-07-10 09:55:51 +00:00
|
|
|
// white with 0 alpha to avoid an ugly transition, since no color means
|
|
|
|
// black with 0 alpha
|
2014-09-03 12:22:10 +00:00
|
|
|
@include _shadows(inset 0 1px transparentize(white,1), $_button_edge);
|
2014-10-05 01:40:45 +00:00
|
|
|
> .label { color: inherit; }
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@else if $t==backdrop {
|
|
|
|
//
|
|
|
|
// backdrop button
|
|
|
|
//
|
2014-09-04 13:03:09 +00:00
|
|
|
$_bg: if($c!=$bg_color,$c,$backdrop_bg_color);
|
|
|
|
$_bc: if($variant=='light',$c,_border_color($c));
|
2014-07-28 10:42:23 +00:00
|
|
|
|
2014-09-04 13:03:09 +00:00
|
|
|
color: if($tc!=$fg_color,mix($tc, $_bg, 80%), $backdrop_fg_color);
|
|
|
|
border-color: if($c!=$bg_color, $_bc, $backdrop_borders_color);
|
|
|
|
background-image: linear-gradient(to bottom, $_bg);
|
2014-06-13 14:32:44 +00:00
|
|
|
text-shadow: none;
|
|
|
|
icon-shadow: none;
|
|
|
|
@include _shadows(inset 0 1px transparentize(white,1),
|
2014-09-03 12:22:10 +00:00
|
|
|
$_blank_edge);
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@else if $t==backdrop-active {
|
|
|
|
//
|
2014-07-28 10:42:23 +00:00
|
|
|
// backdrop pushed button FIXME no colors here!
|
2014-06-13 14:32:44 +00:00
|
|
|
//
|
2014-09-04 13:03:09 +00:00
|
|
|
$_bg: if($c!=$bg_color, darken($c,10%), $backdrop_dark_fill);
|
|
|
|
$_bc: if($variant=='light',$_bg,_border_color($c));
|
|
|
|
|
|
|
|
color: if($tc!=$fg_color, mix($tc,$_bg,80%), $backdrop_fg_color);
|
|
|
|
border-color: if($c!=$bg_color, $_bc, $backdrop_borders_color);
|
|
|
|
background-image: linear-gradient(to bottom, $_bg);
|
2014-09-03 12:22:10 +00:00
|
|
|
@include _shadows(inset 0 1px transparentize(white,1),
|
|
|
|
$_blank_edge);
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@else if $t==backdrop-insensitive {
|
|
|
|
//
|
|
|
|
// backdrop insensitive button
|
|
|
|
//
|
2014-07-28 10:42:23 +00:00
|
|
|
|
|
|
|
$_bg: if($c!=$bg_color, mix($c,$base_color,85%), $insensitive_bg_color);
|
2014-09-04 13:03:09 +00:00
|
|
|
$_bc: if($variant=='light',$_bg,_border_color($c));
|
|
|
|
|
2014-07-28 10:42:23 +00:00
|
|
|
color: if($c!=$bg_color, mix($tc,$_bg,35%), $backdrop_insensitive_color);
|
2014-09-04 13:03:09 +00:00
|
|
|
border-color: if($c!=$bg_color, $_bc, $backdrop_borders_color);
|
2014-07-28 10:42:23 +00:00
|
|
|
background-image: linear-gradient(to bottom, $_bg);
|
|
|
|
text-shadow: none;
|
|
|
|
icon-shadow: none;
|
|
|
|
// white with 0 alpha to avoid an ugly transition, since no color means
|
|
|
|
// black with 0 alpha
|
|
|
|
@include _shadows(inset 0 1px transparentize(white,1),
|
2014-09-03 12:22:10 +00:00
|
|
|
$_blank_edge);
|
2014-10-05 01:40:45 +00:00
|
|
|
> .label { color: inherit; }
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@else if $t==backdrop-insensitive-active {
|
|
|
|
//
|
|
|
|
// backdrop insensitive pushed button
|
|
|
|
//
|
2014-10-04 18:23:10 +00:00
|
|
|
|
2014-09-04 13:03:09 +00:00
|
|
|
$_bg: if($c!=$bg_color, darken(mix($c,$base_color,85%),5%),
|
|
|
|
darken($insensitive_bg_color,5%));
|
|
|
|
$_bc: if($variant=='light',$_bg,_border_color($c));
|
|
|
|
|
|
|
|
color: if($c!=$bg_color, mix($tc,$_bg,35%), $backdrop_insensitive_color);
|
|
|
|
border-color: if($c!=$bg_color, $_bc, $backdrop_borders_color);
|
|
|
|
background-image: linear-gradient(to bottom, $_bg);
|
2014-09-03 12:22:10 +00:00
|
|
|
@include _shadows(inset 0 1px transparentize(white,1),
|
|
|
|
$_blank_edge);
|
2014-10-05 01:40:45 +00:00
|
|
|
> .label { color: inherit; }
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
2014-07-19 08:50:01 +00:00
|
|
|
|
2014-06-13 14:32:44 +00:00
|
|
|
@else if $t==osd {
|
|
|
|
//
|
|
|
|
// normal osd button
|
|
|
|
//
|
2014-08-22 10:55:30 +00:00
|
|
|
$_bg: if($c!=$bg_color, transparentize($c, 0.5),
|
|
|
|
transparentize($osd_bg_color, 0.3));
|
2014-09-04 13:03:09 +00:00
|
|
|
|
|
|
|
color: $osd_fg_color;
|
|
|
|
outline-color: transparentize($osd_fg_color, 0.8);
|
2014-08-22 10:55:30 +00:00
|
|
|
background-color: transparent;
|
|
|
|
background-clip: padding-box;
|
|
|
|
background-image: linear-gradient(to bottom, $_bg);
|
2014-06-13 14:32:44 +00:00
|
|
|
border-color: $osd_borders_color;
|
2014-08-22 10:55:30 +00:00
|
|
|
box-shadow: inset 0 -1px transparentize(black, 0.7),
|
|
|
|
inset 0 1px transparentize(white, 0.9);
|
|
|
|
text-shadow: 0 1px black;
|
|
|
|
icon-shadow: 0 1px black;
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@else if $t==osd-hover {
|
|
|
|
//
|
|
|
|
// active osd button
|
|
|
|
//
|
2014-08-22 10:55:30 +00:00
|
|
|
$_bg: if($c!=$bg_color, transparentize($c, 0.3),
|
2014-08-26 14:54:19 +00:00
|
|
|
transparentize(lighten($osd_bg_color, 12%), 0.3));
|
2014-09-04 13:03:09 +00:00
|
|
|
|
2014-08-22 10:55:30 +00:00
|
|
|
color: white;
|
2014-06-13 14:32:44 +00:00
|
|
|
border-color: $osd_borders_color;
|
2014-08-22 10:55:30 +00:00
|
|
|
background-image: linear-gradient(to bottom, $_bg);
|
2014-08-26 14:54:19 +00:00
|
|
|
box-shadow: inset 0 -1px transparentize(black, 0.7),
|
|
|
|
inset 0 1px transparentize(white, 0.9);
|
|
|
|
text-shadow: 0 1px black;
|
|
|
|
icon-shadow: 0 1px black;
|
|
|
|
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@else if $t==osd-active {
|
|
|
|
//
|
|
|
|
// active osd button
|
|
|
|
//
|
2014-08-22 14:55:23 +00:00
|
|
|
$_bg: if($c!=$bg_color, $c, $osd_borders_color);
|
2014-09-04 16:59:43 +00:00
|
|
|
|
2014-08-22 10:55:30 +00:00
|
|
|
color: white;
|
2014-06-13 14:32:44 +00:00
|
|
|
border-color: $osd_borders_color;
|
2014-08-22 10:55:30 +00:00
|
|
|
background-image: linear-gradient(to bottom, $_bg);
|
2014-06-13 14:32:44 +00:00
|
|
|
box-shadow: none;
|
2014-08-22 10:55:30 +00:00
|
|
|
text-shadow: none;
|
|
|
|
icon-shadow: none;
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@else if $t==osd-insensitive {
|
|
|
|
//
|
|
|
|
// insensitive osd button
|
|
|
|
//
|
2014-08-22 10:55:30 +00:00
|
|
|
$_bg: transparentize(mix($insensitive_fg_color,$osd_bg_color,20%),0.3);
|
2014-09-04 16:59:43 +00:00
|
|
|
|
2014-06-13 14:32:44 +00:00
|
|
|
color: $insensitive_fg_color;
|
2014-08-22 10:55:30 +00:00
|
|
|
border-color: $osd_borders_color;
|
|
|
|
background-image: linear-gradient(to bottom, $_bg);
|
|
|
|
box-shadow: none;
|
|
|
|
text-shadow: none;
|
|
|
|
icon-shadow: none;
|
|
|
|
}
|
|
|
|
@else if $t==osd-backdrop {
|
|
|
|
//
|
|
|
|
// backdrop osd button
|
|
|
|
//
|
|
|
|
$_bg: if($c!=$bg_color, transparentize($c, 0.5),
|
|
|
|
transparentize($osd_bg_color, 0.3));
|
2014-09-04 16:59:43 +00:00
|
|
|
|
|
|
|
color: $osd_fg_color;
|
2014-08-22 10:55:30 +00:00
|
|
|
background-image: linear-gradient(to bottom, $_bg);
|
|
|
|
background-clip: padding-box;
|
|
|
|
box-shadow: none;
|
|
|
|
text-shadow: none;
|
|
|
|
icon-shadow: none;
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
2014-07-08 16:24:28 +00:00
|
|
|
@else if $t==undecorated {
|
2014-07-10 10:22:41 +00:00
|
|
|
//
|
|
|
|
// reset
|
|
|
|
//
|
2014-07-08 16:24:28 +00:00
|
|
|
border-color: transparent;
|
|
|
|
background-color: transparent;
|
|
|
|
background-image: none;
|
2014-09-04 13:03:09 +00:00
|
|
|
|
|
|
|
@include _shadows(inset 0 1px transparentize(white,1),
|
|
|
|
$_blank_edge);
|
|
|
|
|
2014-07-08 16:24:28 +00:00
|
|
|
text-shadow: none;
|
|
|
|
icon-shadow: none;
|
2014-07-19 08:50:01 +00:00
|
|
|
}
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin trough($flat:false, $c:$bg_color, $tc:$fg_color, $noedge:false) {
|
|
|
|
color: mix($tc,$bg_color,80%);
|
|
|
|
@if $flat { background-image: linear-gradient(to bottom,$c); }
|
|
|
|
@else {
|
|
|
|
background-image: linear-gradient(to bottom,
|
2014-07-10 10:22:41 +00:00
|
|
|
mix(black,$c,15%) 5%,
|
|
|
|
mix(black,$c,10%) 20%,
|
|
|
|
mix(black,$c,10%) 90%,
|
|
|
|
$c);
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
|
2014-07-10 10:22:41 +00:00
|
|
|
border-color: if($c!=$bg_color, _border_color($c), $border_color);
|
2014-07-19 08:50:01 +00:00
|
|
|
|
|
|
|
@if not($noedge) {
|
2014-06-13 14:32:44 +00:00
|
|
|
@if lightness($c) > 60% {
|
2014-07-10 10:22:41 +00:00
|
|
|
box-shadow: inset 0 -1px $borders_edge,
|
|
|
|
0 1px $borders_edge;
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
@else {
|
2014-07-10 10:22:41 +00:00
|
|
|
box-shadow: inset 0 -1px transparentize($borders_edge,0.5),
|
|
|
|
0 1px transparentize($borders_edge,0.5);
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
|
|
|
}
|
2014-07-10 10:22:41 +00:00
|
|
|
@else { box-shadow: none; }
|
2014-06-13 14:32:44 +00:00
|
|
|
}
|
2014-08-07 12:17:50 +00:00
|
|
|
|
|
|
|
@mixin progressbar_fill($d:horizontal) {
|
|
|
|
$dir: if($d==vertical,right,bottom);
|
|
|
|
background-image: linear-gradient(to $dir, $selected_bg_color 2px,
|
|
|
|
lighten($selected_bg_color,6%));
|
|
|
|
}
|
2014-09-01 15:31:36 +00:00
|
|
|
|
2014-09-03 17:41:50 +00:00
|
|
|
@function headerbar_gradient($c, $tc:lighten($c,4%)) {
|
|
|
|
//
|
|
|
|
// headerbar gradient helper function
|
|
|
|
//
|
|
|
|
// $c: base color
|
|
|
|
// $tc: top color
|
|
|
|
//
|
|
|
|
@return linear-gradient(to bottom, $tc, $c);
|
2014-09-02 13:21:42 +00:00
|
|
|
}
|
|
|
|
|
2014-09-03 17:41:50 +00:00
|
|
|
@mixin headerbar_fill($c:$bg_color, $tc:lighten($c,4%), $hc:$top_hilight) {
|
|
|
|
//
|
|
|
|
// headerbar fill
|
|
|
|
//
|
|
|
|
// $c: base color
|
|
|
|
// $tc: top color
|
|
|
|
// $hc: top highlight color
|
2014-10-04 18:23:10 +00:00
|
|
|
//
|
2014-09-03 17:41:50 +00:00
|
|
|
background-image: headerbar_gradient($c, $tc);
|
|
|
|
box-shadow: inset 0 -1px mix(_border_color($c), $c, 30%), // bottom shade
|
2014-09-02 18:39:25 +00:00
|
|
|
inset 0 1px $hc; // top highlight
|
2014-09-02 13:21:42 +00:00
|
|
|
|
2014-09-01 15:31:36 +00:00
|
|
|
}
|