From 7ac68f6712fb409d6661e7b8d1b500c3074fb661 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Sun, 23 Oct 2016 16:33:14 -0500 Subject: [PATCH] fix notebook tab padding issues for some applications. Fixes #588 --- src/gtk-3.20/scss/widgets/_button.scss | 6 +- src/gtk-3.20/scss/widgets/_notebook.scss | 77 +++++++++++------------- 2 files changed, 37 insertions(+), 46 deletions(-) diff --git a/src/gtk-3.20/scss/widgets/_button.scss b/src/gtk-3.20/scss/widgets/_button.scss index c67a247..429b3c2 100644 --- a/src/gtk-3.20/scss/widgets/_button.scss +++ b/src/gtk-3.20/scss/widgets/_button.scss @@ -364,15 +364,15 @@ box-shadow: none; &:focus, &:hover { - border: 1px solid alpha($black, .3); + border: 1px solid alpha($bg_color, .1); background-color: alpha($white, .2); background-image: none; box-shadow: none; } &:active, &:checked, &:active:hover, &:checked:hover { - border: 1px solid alpha($black, .3); - background-color: alpha($black, .1); + border: 1px solid alpha($selected_bg_color, .2); + background-color: alpha($white, .2); background-image: none; box-shadow: none; } diff --git a/src/gtk-3.20/scss/widgets/_notebook.scss b/src/gtk-3.20/scss/widgets/_notebook.scss index ccbea6c..1cb8e83 100644 --- a/src/gtk-3.20/scss/widgets/_notebook.scss +++ b/src/gtk-3.20/scss/widgets/_notebook.scss @@ -144,7 +144,7 @@ } tab { - padding: ($spacing + 1) 0 0; // top | left/right | bottom + padding: 0; border-style: solid; border-width: 1px; // for reorderable tabs border-color: transparent; // @@ -152,18 +152,35 @@ box-shadow: none; outline: none; - button, button:hover { - margin-left: 15px; - opacity: 0; - transition: opacity .3s ease-in; - } - - > box, > label { - padding: 0 ($spacing * 3) ($spacing + 1); // top | left/right | bottom + > box, + > label, + > widget > box { + padding: ($spacing + 2) ($spacing * 3); // top/bottom | left/right border-width: 2px; border-style: solid; border-color: transparent; - transition: border-color .3s ease-out; + transition: border-color .2s linear; + } + + &.reorderable-page { + > box, + > label, + > widget > box { + padding: ($spacing + 2) ($spacing * 2) ($spacing + 2) ($spacing * 3); // top | right | bottom | left + } + } + + /* close button styling */ + button, + button.flat { + @extend %close_button; + + min-height: 16px; + min-width: 16px; + padding: 0; + margin-left: $spacing * 3; + border: 1px solid transparent; + transition: all .1s linear; } &:hover { @@ -171,8 +188,9 @@ border-color: transparent; outline: none; - button, button:hover { - opacity: 1; + button, + button.flat { + border: 1px solid alpha($bg_color, .1); } } @@ -193,15 +211,6 @@ label { color: mix($text_color, $base_color, .3); } - - /* close button styling */ - button.flat { - min-height: 16px; - min-width: 16px; - padding: 0; - - @extend %close_button; - } } &.top tab, @@ -267,16 +276,11 @@ } &.top tab { - padding: ($spacing + 1) 0 0; // top | left/right | bottom border-style: solid; border-color: $borders_color; border-width: 0; border-bottom-width: 1px; - transition: border-bottom-color .3s ease-out; - - > box, > label { - padding: 0 ($spacing * 3) ($spacing + 1); // top | left/right | bottom - } + transition: border-bottom-color .2s linear; &:hover { outline: none; @@ -286,7 +290,9 @@ border-bottom-color: $selected_bg_color; outline: none; - > box, > label { + > box, + > label, + > widget > box { border-bottom-color: $selected_bg_color; } @@ -302,17 +308,12 @@ } &.right tab { - padding: 0 ($spacing + 1) 0 0; // top | right | bottom | left border-style: solid; border-color: $borders_color; border-width: 0; border-left-width: 1px; transition: border-left-color .3s ease-out; - > box, > label { - padding: ($spacing + 1) ($spacing * 3); // top | right | bottom | left - } - &:hover { outline: none; } @@ -337,17 +338,12 @@ } &.bottom tab { - padding: 0 0 ($spacing + 1); // top | left/right | bottom border-style: solid; border-color: $borders_color; border-width: 0; border-top-width: 1px; transition: border-top-color .3s ease-out; - > box, > label { - padding: ($spacing + 1) ($spacing * 3) 0; // top/bottom | left/right - } - &:hover { outline: none; } @@ -372,17 +368,12 @@ } &.left tab { - padding: 0 0 0 ($spacing + 1); // top | right | bottom | left border-style: solid; border-color: $borders_color; border-width: 0; border-right-width: 1px; transition: border-right-color .3s ease-out; - > box, > label { - padding: ($spacing + 1) ($spacing * 3); // top/bottom | left/right - } - &:hover { outline: none; }