Fix frame borders

pull/224/head
Satyajit Sahoo 2014-12-14 17:17:14 +05:30
parent da340ddb79
commit 63b89ba1f0
5 changed files with 71 additions and 68 deletions

View File

@ -43,8 +43,8 @@
outline-color: alpha($selected_bg_color, 0.5); outline-color: alpha($selected_bg_color, 0.5);
outline-style: dashed; outline-style: dashed;
outline-width: 1px; outline-width: 1px;
outline-offset: -2px; outline-offset: -1px;
outline-radius: 2px; outline-radius: $roundness;
} }

View File

@ -6,12 +6,14 @@
! Buttons ! Buttons
**********/ **********/
@include exports("button_extends") {
%button { %button {
padding: ($spacing - 1px) ($spacing + 1px); padding: ($spacing - 1px) ($spacing + 1px);
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
border-radius: $roundness; border-radius: $roundness;
transition: 100ms ease; transition: 100ms ease;
outline-color: transparent;
-GtkWidget-focus-padding: 1; -GtkWidget-focus-padding: 1;
-GtkWidget-focus-line-width: 0; -GtkWidget-focus-line-width: 0;
@ -58,6 +60,7 @@
border-radius: $roundness; border-radius: $roundness;
} }
} }
}
@mixin linked_button($bg) { @mixin linked_button($bg) {
@extend %linked_button; @extend %linked_button;
@ -184,7 +187,7 @@
&.default { @include button($selected_bg_color, $selected_fg_color); } &.default { @include button($selected_bg_color, $selected_fg_color); }
.linked & { @include linked_button($bg_color); } &.linked, .linked & { @include linked_button($bg_color); }
.spinbutton & { .spinbutton & {
color: mix($text_color, $base_color, 0.4); color: mix($text_color, $base_color, 0.4);
@ -198,7 +201,7 @@
&:insensitive { &:insensitive {
color: mix($text_color, $base_color, 0.7); color: mix($text_color, $base_color, 0.7);
box-shadow: inset 1px 0 shade($base_color, 0.95); box-shadow: inset 1px 0 shade($base_color, 0.85);
} }
&:active, &:checked, &:hover { color: $text_color; } &:active, &:checked, &:hover { color: $text_color; }
@ -248,7 +251,6 @@
&:first-child { &:first-child {
border-width: 1px; border-width: 1px;
border-bottom-width: 0; border-bottom-width: 0;
border-radius: $roundness;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
@ -256,7 +258,6 @@
&:last-child { &:last-child {
border-width: 1px; border-width: 1px;
border-top-width: 0; border-top-width: 0;
border-radius: $roundness;
border-top-left-radius: 0; border-top-left-radius: 0;
border-top-right-radius: 0; border-top-right-radius: 0;
} }

View File

@ -65,9 +65,11 @@ $modules: () !default;
&:focus, &:hover { border-color: border_focus($color); } &:focus, &:hover { border-color: border_focus($color); }
&:active, &:active:hover, &:active, &:active:hover,
&:active:focus, &:active:hover:focus { border-color: border_active($color); } &:active:focus, &:active:hover:focus,
&:checked, &:checked:hover,
&:checked:focus, &:checked:hover:focus { border-color: border_active($color); }
&:insensitive { border-color: border_insensitive($color); } &:insensitive { border-color: border_insensitive($color); }
&:active *:insensitive { border-color: border_normal($color); } &:active:insensitive, &:checked:insensitive { border-color: border_normal($color); }
} }

View File

@ -31,7 +31,7 @@
.button { @include button($bg, $fg); } .button { @include button($bg, $fg); }
.linked .button { @include linked_button($bg); } .button.linked, .linked .button { @include linked_button($bg); }
GtkComboBox, .button { GtkComboBox, .button {
padding: $spacing - 1px; padding: $spacing - 1px;

View File

@ -181,13 +181,13 @@
***********/ ***********/
@include exports("frame") { @include exports("frame") {
.frame { border: none; } .frame {
border: 1px solid border_normal($bg_color);
GtkScrolledWindow { &.flat { border: none; }
&.frame { border: 1px solid border_normal($bg_color); } }
/* avoid double borders when a viewport is packed into a GtkScrolledWindow */ /* avoid double borders when a viewport is packed into a GtkScrolledWindow */
GtkViewport.frame { border: none; } GtkScrolledWindow GtkViewport.frame { border: none; }
}
} }