[Gtk-3.20] Fixed infobar structure and adding entry error and warning code.

pull/603/head
Csaba Jakosa 2016-10-18 16:57:12 +02:00 committed by Khurshid Alam
parent 9962ab9e9a
commit ed3e728551
2 changed files with 52 additions and 21 deletions

View File

@ -96,10 +96,12 @@
&:focus, &:hover, &:active { transition: none; }
&:selected, &:selected:focus {
&:selected {
&, &:selected:focus {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
}
&:disabled { box-shadow: none; }
@ -115,7 +117,33 @@
image.right { padding-left: $spacing; }
selection { &:focus, & { @extend %selected_items; } }
selection { @extend %selected_items; }
// entry error and warning style
@each $e_type, $e_color, $e_fg_color in (warning, $warning_bg_color, $warning_fg_color),
(error, $error_bg_color, $error_fg_color),
// entry.search-missing for Gnome-Builder
(search-missing, $error_bg_color, $error_fg_color) {
&.#{$e_type} {
color: $e_fg_color;
border-color: border_normal($e_color);
background-color: mix($base_color, $e_color, .6);
image { color: $e_fg_color; }
&:focus {
color: $e_fg_color;
border-color: border_focus($e_color);
background-color: $e_color;
box-shadow: none;
}
selection {
background-color: $e_fg_color;
color: $e_color;
}
}
}
}
@mixin entry($bg, $fg, $border: $borders_color) {

View File

@ -8,7 +8,6 @@
@include exports("infobar") {
infobar {
border: 0;
}
$types: (
info: ($info_fg_color, $info_bg_color),
@ -17,16 +16,19 @@
error: ($error_fg_color, $error_bg_color),
);
@each $type, $colors in $types {
$fg_color: nth($colors, 1);
$bg_color: nth($colors, 2);
.#{$type} {
&.#{$type} {
&, &:backdrop { // Backdrop button fix: https://github.com/numixproject/numix-gtk-theme/issues/544
@include linear-gradient($bg_color);
border: 1px solid shade($bg_color, .8);
color: $fg_color;
caret-color: currentColor;
label, & { color: $fg_color; }
}
button {
@include button($bg_color, $fg_color);
@ -36,3 +38,4 @@
}
}
}
}