[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,9 +96,11 @@
&:focus, &:hover, &:active { transition: none; }
&:selected, &:selected:focus {
background-color: $selected_bg_color;
color: $selected_fg_color;
&: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,30 +8,33 @@
@include exports("infobar") {
infobar {
border: 0;
}
$types: (
info: ($info_fg_color, $info_bg_color),
warning: ($warning_fg_color, $warning_bg_color),
question: ($question_fg_color, $question_bg_color),
error: ($error_fg_color, $error_bg_color),
);
$types: (
info: ($info_fg_color, $info_bg_color),
warning: ($warning_fg_color, $warning_bg_color),
question: ($question_fg_color, $question_bg_color),
error: ($error_fg_color, $error_bg_color),
);
@each $type, $colors in $types {
$fg_color: nth($colors, 1);
$bg_color: nth($colors, 2);
@each $type, $colors in $types {
$fg_color: nth($colors, 1);
$bg_color: nth($colors, 2);
&.#{$type} {
&, &:backdrop { // Backdrop button fix: https://github.com/numixproject/numix-gtk-theme/issues/544
@include linear-gradient($bg_color);
.#{$type} {
@include linear-gradient($bg_color);
border: 1px solid shade($bg_color, .8);
caret-color: currentColor;
border: 1px solid shade($bg_color, .8);
color: $fg_color;
label, & { color: $fg_color; }
}
button {
@include button($bg_color, $fg_color);
button {
@include button($bg_color, $fg_color);
&.close { @extend %close_button; }
&.close { @extend %close_button; }
}
}
}
}