From 1616dac147a75bc7c05f256d1408df29ba3ccf96 Mon Sep 17 00:00:00 2001 From: Csaba Jakosa Date: Sat, 23 Apr 2016 04:06:26 +0200 Subject: [PATCH] gtk3.20: Fix gtk warning (#367) * * Fix gtk warning. * * Fix gtk warning (border-inner). * * Fixed _text_shadow_color gtk warning. * * Code style fix. * * Code style fix 2... --- gtk-3.20/scss/_functions.scss | 16 ++++++++++++++++ gtk-3.20/scss/widgets/_menu.scss | 2 +- gtk-3.20/scss/widgets/_misc.scss | 3 --- gtk-3.20/scss/widgets/_view.scss | 12 ++---------- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/gtk-3.20/scss/_functions.scss b/gtk-3.20/scss/_functions.scss index d0ea685..74dc76a 100755 --- a/gtk-3.20/scss/_functions.scss +++ b/gtk-3.20/scss/_functions.scss @@ -77,3 +77,19 @@ $modules: () !default; &:active:disabled, &:checked:disabled { border-color: border_normal($color); } } + +@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 * .8); + } +} diff --git a/gtk-3.20/scss/widgets/_menu.scss b/gtk-3.20/scss/widgets/_menu.scss index f0432d7..b23e3eb 100755 --- a/gtk-3.20/scss/widgets/_menu.scss +++ b/gtk-3.20/scss/widgets/_menu.scss @@ -114,7 +114,7 @@ } calendar { - &:inconsistent { color: mix($menu_fg_color, $menu_bg_color, .5); } + &:indeterminate { color: mix($menu_fg_color, $menu_bg_color, .5); } .button { border-style: none; diff --git a/gtk-3.20/scss/widgets/_misc.scss b/gtk-3.20/scss/widgets/_misc.scss index 94e97ee..9c45759 100644 --- a/gtk-3.20/scss/widgets/_misc.scss +++ b/gtk-3.20/scss/widgets/_misc.scss @@ -143,9 +143,6 @@ } .button { - - -GtkButton-inner-border: 0; - border: 0; background-color: transparent; background-image: none; diff --git a/gtk-3.20/scss/widgets/_view.scss b/gtk-3.20/scss/widgets/_view.scss index ba0cc9c..74bb88d 100644 --- a/gtk-3.20/scss/widgets/_view.scss +++ b/gtk-3.20/scss/widgets/_view.scss @@ -182,7 +182,7 @@ box-shadow: inset 0 1px transparentize(white, .95); } - background-color: linear-gradient(to bottom, $base_color, darken($base_color, .1)); + @include linear-gradient($selected_bg_color); &:backdrop { @if $variant == 'light' { @@ -197,17 +197,9 @@ } } - /* transmission fix. */ - &:insensitive { - &:insensitive { - @include linear-gradient($bg_color); - border-color: border_insensitive($bg_color); - } - } - &:disabled { @include linear-gradient($bg_color); - border-color: border_disabled($bg_color); + border-color: border_insensitive($bg_color); } &:backdrop {