GTK4: Add gtk4 theme with custom kali colors

This commit is contained in:
Daniel Ruiz de Alegría
2021-01-19 14:40:57 +01:00
committed by Daniel Ruiz de Alegría
parent 0347bf3da8
commit 5ad8a68fe9
12 changed files with 18029 additions and 0 deletions
+5
View File
@@ -7,12 +7,17 @@ THEMES_DIR=../../../../share/themes/
build: $(patsubst %.scss, %.css, $(wildcard *.scss))
mkdir -p $(THEMES_DIR)Kali-Light/gtk-3.0/
mkdir -p $(THEMES_DIR)Kali-Dark/gtk-3.0/
mkdir -p $(THEMES_DIR)Kali-Light/gtk-4.0/
mkdir -p $(THEMES_DIR)Kali-Dark/gtk-4.0/
mkdir -p $(THEMES_DIR)Kali-Light/gnome-shell/
mkdir -p $(THEMES_DIR)Kali-Dark/gnome-shell/
cp gtk.css $(THEMES_DIR)Kali-Light/gtk-3.0/gtk.css
cp gtk-dark.css $(THEMES_DIR)Kali-Light/gtk-3.0/gtk-dark.css
cp gtk-dark.css $(THEMES_DIR)Kali-Dark/gtk-3.0/gtk.css
cp gtk-4.css $(THEMES_DIR)Kali-Light/gtk-4.0/gtk.css
cp gtk-4-dark.css $(THEMES_DIR)Kali-Light/gtk-4.0/gtk-dark.css
cp gtk-4-dark.css $(THEMES_DIR)Kali-Dark/gtk-4.0/gtk.css
cp gnome-shell.css $(THEMES_DIR)Kali-Light/gnome-shell/gnome-shell.css
cp gnome-shell-dark.css $(THEMES_DIR)Kali-Dark/gnome-shell/gnome-shell.css
+15
View File
@@ -0,0 +1,15 @@
// General guidelines:
// - very unlikely you want to edit something else than _common.scss
// - keep the number of defined colors to a minimum, use the color blending functions if
// you need a subtle shade
// - if you need to inverse a color function use the @if directive to match for dark $variant
$variant: 'dark';
$high-contrast:'false';
@import 'gtk-sass/_colors';
@import 'gtk-sass/upstream-gtk-4/_drawing';
@import 'gtk-sass/upstream-gtk-4/_common';
//@import 'gtk-sass/_common-tweaks';
@import 'gtk-sass/_applications';
@import 'gtk-sass/upstream-gtk-4/_colors-public';
+15
View File
@@ -0,0 +1,15 @@
// General guidelines:
// - very unlikely you want to edit something else than _common.scss
// - keep the number of defined colors to a minimum, use the color blending functions if
// you need a subtle shade
// - if you need to inverse a color function use the @if directive to match for dark $variant
$variant: 'light';
$high-contrast:'false';
@import 'gtk-sass/_colors';
@import 'gtk-sass/upstream-gtk-4/_drawing';
@import 'gtk-sass/upstream-gtk-4/_common';
//@import 'gtk-sass/_common-tweaks';
@import 'gtk-sass/_applications';
@import 'gtk-sass/upstream-gtk-4/_colors-public';
@@ -19,7 +19,9 @@ $link_visited_color: if($variant == 'light', darken($selected_bg_color, 20%), li
$top_hilight: $borders_edge;
$dark_fill: mix($borders_color, $bg_color, 35%);
$headerbar_color: if($variant == 'light', lighten($bg_color, 5%), darken($bg_color, 3%));
$headerbar_bg_color: $headerbar_color;
$menu_color: if($variant == 'light', $base_color, mix($borders_color, $bg_color, 15%));
$menu_selected_color: mix($fg_color, $base_color, 10%);
$popover_bg_color: $menu_color;
$popover_hover_color: lighten($menu_color, 5%);
@@ -78,3 +80,8 @@ $progress_border_color: $selected_borders_color;
$checkradio_bg_color: $selected_bg_color;
$checkradio_fg_color: $selected_fg_color;
$checkradio_borders_color: if($variant == 'light', darken($checkradio_bg_color,20%), darken($checkradio_bg_color,40%));
$switch_bg_color: $selected_bg_color;
$switch_borders_color: if($variant == 'light',darken($switch_bg_color,15%),darken($switch_bg_color,30%));
$focus_border_color: if($variant == 'light', transparentize($selected_bg_color, 0.5), transparentize($selected_bg_color, 0.3));
$alt_focus_border_color: if($variant == 'light', transparentize(white, 0.2), transparentize(white,0.7));
$dim_label_opacity: 0.55;
@@ -0,0 +1,119 @@
//apps rely on some named colors to be exported
/* GTK NAMED COLORS
----------------
use responsibly! */
// Sass thinks we're using the colors in the variables as strings and may shoot
// warning, it's innocuous and can be defeated by using "" + $var
/*
widget text/foreground color */
@define-color theme_fg_color #{"" +$fg_color};
/*
text color for entries, views and content in general */
@define-color theme_text_color #{"" +$text_color};
/*
widget base background color */
@define-color theme_bg_color #{"" +$bg_color};
/*
text widgets and the like base background color */
@define-color theme_base_color #{"" +$base_color};
/*
base background color of selections */
@define-color theme_selected_bg_color #{"" +$selected_bg_color};
/*
text/foreground color of selections */
@define-color theme_selected_fg_color #{"" +$selected_fg_color};
/*
base background color of insensitive widgets */
@define-color insensitive_bg_color #{"" +$insensitive_bg_color};
/*
text foreground color of insensitive widgets */
@define-color insensitive_fg_color #{"" +$insensitive_fg_color};
/*
insensitive text widgets and the like base background color */
@define-color insensitive_base_color #{"" +$base_color};
/*
widget text/foreground color on backdrop windows */
@define-color theme_unfocused_fg_color #{"" +$backdrop_fg_color};
/*
text color for entries, views and content in general on backdrop windows */
@define-color theme_unfocused_text_color #{"" +$text_color};
/*
widget base background color on backdrop windows */
@define-color theme_unfocused_bg_color #{"" +$backdrop_bg_color};
/*
text widgets and the like base background color on backdrop windows */
@define-color theme_unfocused_base_color #{"" +$backdrop_base_color};
/*
base background color of selections on backdrop windows */
@define-color theme_unfocused_selected_bg_color #{"" +$selected_bg_color};
/*
text/foreground color of selections on backdrop windows */
@define-color theme_unfocused_selected_fg_color #{"" + $selected_fg_color};
/*
insensitive color on backdrop windows*/
@define-color unfocused_insensitive_color #{"" + $backdrop_insensitive_color};
/*
widgets main borders color */
@define-color borders #{"" +$borders_color};
/*
widgets main borders color on backdrop windows */
@define-color unfocused_borders #{"" +$backdrop_borders_color};
/*
these are pretty self explicative */
@define-color warning_color #{"" +$warning_color};
@define-color error_color #{"" +$error_color};
@define-color success_color #{"" +$success_color};
//@define-color destructive_color #{$destructive_color}
//WM
$_wm_highlight: if($variant=='light', $top_hilight, // Sass gets mad if this is
transparentize(black,1)); // done directly in the
// color definition
/*
these colors are exported for the window manager and shouldn't be used in applications,
read if you used those and something break with a version upgrade you're on your own... */
@define-color wm_title shade(#{$fg_color}, 1.8);
@define-color wm_unfocused_title #{$backdrop_fg_color};
@define-color wm_highlight #{"" + $_wm_highlight};
@define-color wm_borders_edge #{"" + $borders_edge};
@define-color wm_bg_a shade(#{$bg_color}, 1.2);
@define-color wm_bg_b #{$bg_color};
@define-color wm_shadow alpha(black, 0.35);
@define-color wm_border alpha(black, 0.18);
@define-color wm_button_hover_color_a shade(#{$bg_color}, 1.3);
@define-color wm_button_hover_color_b #{$bg_color};
@define-color wm_button_active_color_a shade(#{$bg_color}, 0.85);
@define-color wm_button_active_color_b shade(#{$bg_color}, 0.89);
@define-color wm_button_active_color_c shade(#{$bg_color}, 0.9);
//FIXME this is really an API
/* content view background such as thumbnails view in Photos or Boxes */
@define-color content_view_bg #{"" + $base_color};
/* Very contrasty background for text views (@theme_text_color foreground) */
@define-color text_view_bg #{"" + if($variant == 'light', $base_color, darken($base_color,6%))};
@@ -0,0 +1,74 @@
// When color definition differs for dark and light variant
// it gets @if ed depending on $variant
$base_color: if($variant == 'light', #ffffff, lighten(desaturate(#241f31, 100%), 2%));
$text_color: if($variant == 'light', black, white);
$bg_color: if($variant == 'light', #f6f5f4, darken(desaturate(#3d3846, 100%), 4%));
$fg_color: if($variant == 'light', #2e3436, #eeeeec);
$selected_fg_color: #ffffff;
$selected_bg_color: if($variant == 'light', #3584e4, darken(#3584e4, 20%));
$selected_borders_color: if($variant== 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 30%));
$borders_color: if($variant == 'light', darken($bg_color, 18%), darken($bg_color, 10%));
$alt_borders_color: if($variant == 'light', darken($bg_color, 24%), darken($bg_color, 18%));
$borders_edge: if($variant == 'light', transparentize(white, 0.2), transparentize($fg_color, 0.93));
$link_color: if($variant == 'light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 20%));
$link_visited_color: if($variant == 'light', darken($selected_bg_color, 20%), lighten($selected_bg_color, 10%));
$top_hilight: $borders_edge;
$dark_fill: mix($borders_color, $bg_color, 50%);
$headerbar_bg_color: if($variant == 'light', lighten($bg_color, 5%), darken($bg_color, 3%));
$menu_color: $base_color;
$menu_selected_color: if($variant == 'light', darken($bg_color, 6%), darken($bg_color, 8%));
$scrollbar_bg_color: if($variant == 'light', mix($bg_color, $fg_color, 80%), mix($base_color, $bg_color, 50%));
$scrollbar_slider_color: mix($fg_color, $bg_color, 60%);
$scrollbar_slider_hover_color: mix($fg_color, $bg_color, 80%);
$scrollbar_slider_active_color: if($variant=='light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 10%));
$warning_color: #f57900;
$error_color: #cc0000;
$success_color: if($variant == 'light', #33d17a, darken(#33d17a, 10%));
$destructive_color: if($variant == 'light', #e01b24, darken(#e01b24, 10%));
$osd_fg_color: #eeeeec;
$osd_text_color: white;
$osd_bg_color: if($variant == 'light', transparentize(darken(desaturate(#3d3846, 100%), 4%),0.3), transparentize(darken(desaturate(#3d3846, 100%), 10%),0.3));
$osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);
$osd_borders_color: transparentize(black, 0.3);
$sidebar_bg_color: mix($bg_color, $base_color, 50%);
$tooltip_borders_color: transparentize(white, 0.9);
$shadow_color: transparentize(black, 0.9);
$drop_target_color: if($variant == 'light', #2ec27e, #26a269);
//insensitive state derived colors
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);
$insensitive_bg_color: mix($bg_color, $base_color, 60%);
$insensitive_borders_color: mix($borders_color, $bg_color, 80%);
//colors for the backdrop state, derived from the main colors.
$backdrop_base_color: if($variant == 'light', darken($base_color, 1%), lighten($base_color, 1%));
$backdrop_text_color: mix($text_color, $backdrop_base_color, 80%);
$backdrop_bg_color: $bg_color;
$backdrop_fg_color: mix($fg_color, $backdrop_bg_color, 50%);
$backdrop_insensitive_color: if($variant == 'light', darken($backdrop_bg_color, 15%), lighten($backdrop_bg_color, 15%));
$backdrop_selected_fg_color: if($variant == 'light', $backdrop_base_color, $backdrop_text_color);
$backdrop_borders_color: mix($borders_color, $bg_color, 80%);
$backdrop_dark_fill: mix($backdrop_borders_color, $backdrop_bg_color, 35%);
//special cased widget colors
$suggested_bg_color: $selected_bg_color;
$suggested_border_color: $selected_borders_color;
$progress_bg_color: $selected_bg_color;
$progress_border_color: $selected_borders_color;
$checkradio_bg_color: $selected_bg_color;
$checkradio_fg_color: $selected_fg_color;
$checkradio_borders_color: if($variant == 'light',darken($selected_bg_color,10%),darken($selected_bg_color,20%));
$switch_bg_color: $selected_bg_color;
$switch_borders_color: if($variant == 'light',darken($switch_bg_color,15%),darken($switch_bg_color,30%));
$focus_border_color: if($variant == 'light', transparentize($selected_bg_color, 0.5), transparentize($selected_bg_color, 0.3));
$alt_focus_border_color: if($variant == 'light', transparentize(white, 0.2), transparentize(white,0.7));
$dim_label_opacity: 0.55;
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,505 @@
// Drawing mixins
// generic drawing of more complex things
//
// Helper mixin for drawing visible focus rings
//
// If $target is specified, the focus ring is applied to the specified child element.
// If $outer is true, the focus ring extends outward. Otherwise, it extends inward.
// If $within is true, use focus-within instead of focus:focus-visible
//
@mixin focus-ring($target: null, $width: 2px, $offset: -$width, $outer: false, $focus-state: 'focus:focus-visible', $fc: $focus_border_color) {
& #{$target} {
outline: 0 solid transparent;
outline-offset: if($outer, $offset + 4px, $offset + $width + 4px);
}
&:#{$focus-state} #{$target} {
outline-color: $fc;
outline-width: $width;
outline-offset: $offset;
}
}
@mixin _shadows($list...) {
//
// Helper mixin to stack up to box-shadows;
//
$shadows: null;
@each $shadow in $list {
@if $shadow!=none { $shadows: $shadows, $shadow; }
}
box-shadow: $shadows;
}
// entries
@mixin entry($t, $fc:$focus_border_color) {
//
// Entries drawing function
//
// $t: entry type
// $fc: focus color
//
// possible $t values:
// normal, focus, insensitive, backdrop, backdrop-insensitive, osd, osd-focus, osd-backdrop, block_cursor;
//
@if $t==normal {
color: $text_color;
border-color: $borders_color;
background-color: $base_color;
// for the transition to work the number of shadows in different states needs to match, hence the transparent shadow here.
}
@if $t==insensitive {
color: $insensitive_fg_color;
border-color: $borders_color;
background-color: $insensitive_bg_color;
}
@if $t==backdrop {
color: $backdrop_text_color;
border-color: $backdrop_borders_color;
background-color: $backdrop_base_color;
}
@if $t==backdrop-insensitive {
color: $backdrop_insensitive_color;
border-color: $backdrop_borders_color;
background-color: $insensitive_bg_color;
}
@if $t==osd {
color: $osd_text_color;
border-color: $osd_borders_color;
background-color: transparentize(opacify($osd_borders_color, 1), 0.5);
background-clip: padding-box;
box-shadow: none;
-gtk-icon-shadow: 0 1px black;
}
@if $t==osd-focus {
color: $osd_text_color;
border-color: $selected_bg_color;
background-color: transparentize(opacify($osd_borders_color, 1), 0.5);
background-clip: padding-box;
}
@if $t==osd-insensitive {
color: $osd_insensitive_fg_color;
border-color: $osd_borders_color;
background-color: $osd_insensitive_bg_color;
background-clip: padding-box;
}
@if $t==osd-backdrop {
color: $osd_text_color;
border-color: $osd_borders_color;
background-color: transparentize(opacify($osd_borders_color, 1), 0.5);
background-clip: padding-box;
}
@if $t==block_cursor {
color: $base_color;
background-color: $text_color;
}
}
// buttons
@function _border_color($c, $darker: false) {
@if $darker == true { @return darken($c, 20%); }
@else { @return darken($c, 15%); }
}
$_default_button_c: lighten($bg_color,2%);
@mixin button($t, $c:$_default_button_c, $tc:$fg_color) {
//
// Button drawing function
//
// $t: button type,
// $c: base button color for colored* types
// $tc: optional text color for colored* types
//
// possible $t values:
// normal, hover, active, checked-hover, checked-active, insensitive, insensitive-active,
// backdrop, backdrop-active, backdrop-insensitive, backdrop-insensitive-active,
// osd, osd-hover, osd-active, osd-insensitive, osd-backdrop, undecorated
//
$_button_shadow: 0 1px 2px transparentize($shadow_color, 0.03);
@if $t==normal {
//
// normal button
//
color: $tc;
outline-color: if($c != $_default_button_c, $alt_focus_border_color, $focus_border_color);
border-color: if($c!=$_default_button_c, _border_color($c, true), $borders_color); //tint if not default button color
background-image: if($variant == 'light', linear-gradient(to top, darken($c, 2%) 2px, $c),
linear-gradient(to top, darken($c,1%) 2px, $c));
@include _shadows($_button_shadow);
}
@else if $t==hover {
//
// hovered button
//
color: $tc;
border-color: if($c != $_default_button_c, _border_color($c), $borders_color);
@if $variant == 'light' {
background-image: linear-gradient(to top, darken($c,16%), darken($c,8%) 1px);
@include _shadows($_button_shadow);
}
@else {
background-image: linear-gradient(to top, darken($c,4%) 20%, darken($c, 3%) 90%);
@include _shadows($_button_shadow);
}
}
@else if $t==active {
//
// pushed button
//
color: $tc;
border-color: if($c != $_default_button_c, _border_color($c), $borders_color);
background-image: if($variant == 'light', image(darken($c, 14%)), image(darken($c, 9%)));
box-shadow: none;
}
@else if $t==checked-hover {
//
// pushed togglebutton hover
//
color: $tc;
border-color: if($c != $_default_button_c, _border_color($c), $borders_color);
background-image: if($variant == 'light', image(darken($c, 18%)), image(darken($c, 12%)));
box-shadow: none;
}
@else if $t==checked-active {
//
// pushed togglebutton pushed further :)
//
color: $tc;
border-color: if($c != $_default_button_c, _border_color($c), $borders_color);
background-image: if($variant == 'light', image(darken($c, 22%)), image(darken($c, 14%)));
box-shadow: none;
}
@else if $t==insensitive {
//
// insensitive button
//
$_bg: if($c != $_default_button_c, mix($c, $base_color, 85%), $insensitive_bg_color);
color: if($tc != $fg_color, mix($tc, $_bg, 50%), $insensitive_fg_color);
border-color: if($c != $_default_button_c, _border_color($c), $insensitive_borders_color);
background-image: image($_bg);
}
@else if $t==insensitive-active {
//
// insensitive pushed button
//
$_bg: if($variant == 'light', darken(mix($c, $base_color, 85%), 8%), darken(mix($c, $base_color, 85%), 6%));
$_bc: if($c != $_default_button_c, _border_color($c), $insensitive_borders_color);
color: if($c != $_default_button_c, mix($tc, $_bg, 60%), $insensitive_fg_color);
border-color: $_bc;
background-image: image($_bg);
box-shadow: none;
}
@else if $t==backdrop {
//
// backdrop button
//
$_bg: if($c != $_default_button_c, $c, $backdrop_bg_color);
$_bc: if($variant == 'light', $c, _border_color($c));
color: if($tc != $fg_color, mix($tc, $_bg, 80%), $backdrop_fg_color);
border-color: if($c != $_default_button_c, $_bc, $backdrop_borders_color);
background-image: image($_bg);
box-shadow: none;
}
@else if $t==backdrop-active {
//
// backdrop pushed button
//
$_bg: if($variant == 'light', darken(mix($c, $base_color, 85%), 8%), darken(mix($c, $base_color, 85%), 4%));
$_bc: if($variant == 'light', $_bg ,_border_color($c));
color: if($tc != $fg_color, mix($tc, $_bg, 80%), $backdrop_fg_color);
border-color: if($c != $_default_button_c, $_bc, $backdrop_borders_color);
background-image: image($_bg);
box-shadow: none;
}
@else if $t==backdrop-insensitive {
//
// backdrop insensitive button
//
$_bg: if($c != $_default_button_c, mix($c, $base_color, 85%), $insensitive_bg_color);
$_bc: if($variant == 'light', $_bg,_border_color($c));
color: if($c != $_default_button_c, mix($tc, $_bg, 35%), $backdrop_insensitive_color);
border-color: if($c != $_default_button_c, $_bc, $backdrop_borders_color);
background-image: image($_bg);
box-shadow: none;
}
@else if $t==backdrop-insensitive-active {
//
// backdrop insensitive pushed button
//
$_bg: if($variant == 'light', darken(mix($c, $base_color, 85%), 8%), darken(mix($c, $base_color, 85%), 4%));
$_bc: if($variant == 'light', $_bg, _border_color($c));
color: if($c != $_default_button_c, mix($tc, $_bg, 35%), $backdrop_insensitive_color);
border-color: if($c != $_default_button_c, $_bc, $backdrop_borders_color);
background-image: image($_bg);
box-shadow: none;
}
@else if $t==osd {
//
// normal osd button
//
$_bg: if($c != $_default_button_c, transparentize($c, 0.5), $osd_bg_color);
color: $osd_fg_color;
outline-color: if($c != $_default_button_c, $alt_focus_border_color, $focus_border_color);
border-color: $osd_borders_color;
background-color: transparent;
background-image: image($_bg);
background-clip: padding-box;
}
@else if $t==osd-hover {
//
// active osd button
//
$_bg: if($c != $_default_button_c, transparentize($c, 0.3), darken($osd_bg_color, 10%));
color: white;
border-color: $osd_borders_color;
background-color: transparent;
background-image: image($_bg);
background-clip: padding-box;
}
@else if $t==osd-active {
//
// active osd button
//
$_bg: if($c != $_default_button_c, $c, darken($osd_bg_color, 20%));
color: white;
border-color: $osd_borders_color;
background-color: transparent;
background-image: image($_bg);
background-clip: padding-box;
box-shadow: none;
}
@else if $t==osd-insensitive {
//
// insensitive osd button
//
color: $osd_insensitive_fg_color;
border-color: $osd_borders_color;
background-color: transparent;
background-image: image($osd_insensitive_bg_color);
background-clip: padding-box;
}
@else if $t==osd-backdrop {
//
// backdrop osd button
//
$_bg: if($c != $_default_button_c, transparentize($c, 0.5), $osd_bg_color);
color: $osd_fg_color;
border-color: $osd_borders_color;
background-color: transparent;
background-image: image($_bg);
background-clip: padding-box;
}
@else if $t==undecorated {
//
// reset
//
border-color: transparent;
background-color: transparent;
background-image: none;
box-shadow: none;
}
@else if $t==undecorated-hover {
border-color: transparent;
background-image: none;
box-shadow: none;
@if $variant == 'light' {
background-color: darken($c,14%);
} @else {
background-color: darken($c,1%);
}
}
@else if $t==undecorated-active {
border-color: transparent;
background-image: none;
box-shadow: none;
@if $variant == 'light' {
background-color: darken($c,20%);
}
@else {
background-color: darken($c,5%);
}
}
}
@mixin headerbar_fill($c:$headerbar_bg_color, $ov: none) {
//
// headerbar fill
//
// $c: base color
// $ov: a background layer for background shorthand (hence no commas!)
//
$gradient: linear-gradient(to top, darken($c, 2%), lighten($c, 1%));
@if $variant == 'dark' { $gradient: linear-gradient(to top, lighten($c, 4%), lighten($c, 6%)); }
@if $ov != none { background: $c $ov, $gradient; }
@else { background: $c $gradient; }
}
@mixin overshoot($p, $t:normal, $c:$fg_color) {
//
// overshoot
//
// $p: position
// $t: type
// $c: base color
//
// possible $p values:
// top, bottom, right, left
//
// possible $t values:
// normal, backdrop
//
$_small_gradient_length: 3%;
$_big_gradient_length: 50%;
$_small_gradient_size: 100% $_small_gradient_length;
$_big_gradient_size: 100% $_big_gradient_length;
@if $p==right or $p==left {
$_small_gradient_size: $_small_gradient_length 100%;
$_big_gradient_size: $_big_gradient_length 100%;
}
$_small_gradient_color: $c;
$_big_gradient_color: transparentize($c, 0.93);
@if $c==$fg_color {
$_small_gradient_color: darken($borders_color, 10%);
$_big_gradient_color: transparentize($fg_color, 0.93);
@if $t==backdrop { $_small_gradient_color: $backdrop_borders_color; }
}
$_small_gradient: radial-gradient(farthest-side at $p,
$_small_gradient_color 85%,
transparentize($_small_gradient_color, 1));
$_big_gradient: radial-gradient(farthest-side at $p,
$_big_gradient_color,
transparentize($_big_gradient_color, 1));
@if $t==normal {
background-image: $_small_gradient, $_big_gradient;
background-size: $_small_gradient_size, $_big_gradient_size;
}
@else if $t==backdrop {
background-image: $_small_gradient;
background-size: $_small_gradient_size;
}
background-repeat: no-repeat;
background-position: $p;
background-color: transparent; // reset some properties to be sure to not inherit them somehow
border: none; //
box-shadow: none; //
}
/***************************
* Check and Radio buttons *
***************************/
@mixin check($t, $c:$checkradio_bg_color, $tc:$checkradio_fg_color, $checked: false) {
// Check/Radio drawing function
//
// $t: check/radio type,
// $c: base button color for colored* types
// $tc: optional text color for colored* types
// $checked: bool to chose between checked/unchecked
//
// possible $t values:
// normal, hover, active, insensitive, backdrop, backdrop-insensitive, menu
$_border_color: if($c==$checkradio_bg_color, $checkradio_borders_color, $alt_borders_color);
$_dim_border_color: transparentize($_border_color, if($variant == 'light', 0.3, 0.7));
@if $t==normal {
background-clip: if($checked, border-box, padding-box);
background-image: linear-gradient(to bottom, lighten($c, 5%) 20%, $c 90%);
border-color: $_border_color;
box-shadow: 0 1px transparentize(black, 0.95);
color: $tc;
}
@if $t==hover {
background-image: if($c == white, image(darken($c, 5%)), linear-gradient(to bottom, lighten($c, 9%) 10%, lighten($c, 4%) 90%));
}
@if $t==active {
box-shadow: inset 0 1px if($variant == 'light', rgba(0, 0, 0, 0.2), black);
background-image: if($c == white, image(darken($c, 15%)), image(darken($c, 5%)));
}
@if $t==insensitive {
box-shadow: none;
color: transparentize($tc, 0.3);
}
@if $t==backdrop {
background-image: image($c);
box-shadow: none;
color: $tc;
}
@if $t==backdrop-insensitive {
box-shadow: none;
color: transparentize($tc, 0.3);
}
@if $t==menu {
transform: scale(0.8);
border-width: 1.2px;
border-color: transparent;
box-shadow: none;
background-image: image(transparent);
color: $tc;
}
@if $t==menu-active {
transform: scale(0.8);
border-width: 1.2px;
color: $tc;
box-shadow: none;
background-image: image(transparent);
}
}
+30
View File
@@ -0,0 +1,30 @@
#!/bin/sh
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RESET='\033[0m'
VERSION=4.0.2
echo
printf " $YELLOW[ i ]$RESET Upstream version $VERSION\n"
echo
while read file;
do
echo
printf " $GREEN[ * ]$RESET Downloading file $file\n"
wget https://gitlab.gnome.org/GNOME/gtk/raw/$VERSION/gtk/theme/Adwaita/$file --timestamping --quiet
if [ -f $file.patch ]
then
printf " $YELLOW[ ~ ]$RESET Apply patch\n"
patch $file $file.patch --quiet
fi
done <<- EOF
_colors.scss
_common.scss
_drawing.scss
_colors-public.scss
EOF