From 8e74c381b0fdc281a36e2cdcae0b3d1c693070bc Mon Sep 17 00:00:00 2001 From: Simon Steinbeiss Date: Tue, 11 Sep 2018 23:38:49 +0200 Subject: [PATCH] Use correct colors for GtkNotebook (fixes #227) Original patch by Simon Ochsenreither --- gtk-3.0/_common.scss | 47 ++++++++++++++++++---------------- gtk-3.0/gtk-contained-dark.css | 32 +++++++++++------------ gtk-3.0/gtk-contained.css | 32 +++++++++++------------ 3 files changed, 57 insertions(+), 54 deletions(-) diff --git a/gtk-3.0/_common.scss b/gtk-3.0/_common.scss index 44c63584..36ade907 100644 --- a/gtk-3.0/_common.scss +++ b/gtk-3.0/_common.scss @@ -2036,7 +2036,13 @@ popover.background { * Notebooks * *************/ notebook { - &.frame { border-style: none; } + &.frame { + border-style: none; + + > stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks + border: 1px solid shade($bg_color, 0.9); + } + } > header { padding: 1px; @@ -2280,34 +2286,31 @@ notebook { &.top tab { padding-bottom: 4px; } &.bottom tab { padding-top: 4px; } - } - - &.frame { - > header { - &.top > tabs { - margin-bottom: -2px; - } - &.bottom > tabs { - margin-top: -2px; - } - - &.left > tabs { - margin-right: -2px; - } + &.top > tabs { + margin-bottom: -2px; + } - &.right > tabs { - margin-left: -2px; - } + &.bottom > tabs { + margin-top: -2px; } - > stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks - background-color: shade($bg_color, 1.05); - border: 1px solid shade($bg_color, 0.9); + &.left > tabs { + margin-right: -2px; + } - &:backdrop { background-color: $backdrop_bg_color; } + &.right > tabs { + margin-left: -2px; } } + + > stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks + background-color: shade($bg_color, 1.05); + border-width: 1px; + border-color: shade($bg_color, 0.9); + border-style: solid; + &:backdrop { background-color: $backdrop_bg_color; } + } } diff --git a/gtk-3.0/gtk-contained-dark.css b/gtk-3.0/gtk-contained-dark.css index a15bff51..93744434 100644 --- a/gtk-3.0/gtk-contained-dark.css +++ b/gtk-3.0/gtk-contained-dark.css @@ -2357,6 +2357,8 @@ popover.background { *************/ notebook.frame { border-style: none; } + notebook.frame > stack:not(:only-child) { + border: 1px solid shade(#393f3f, 0.9); } notebook > header { padding: 1px; @@ -2521,23 +2523,21 @@ notebook > header { padding-bottom: 4px; } notebook > header.bottom tab { padding-top: 4px; } - -notebook.frame > header.top > tabs { - margin-bottom: -2px; } - -notebook.frame > header.bottom > tabs { - margin-top: -2px; } - -notebook.frame > header.left > tabs { - margin-right: -2px; } - -notebook.frame > header.right > tabs { - margin-left: -2px; } - -notebook.frame > stack:not(:only-child) { + notebook > header.top > tabs { + margin-bottom: -2px; } + notebook > header.bottom > tabs { + margin-top: -2px; } + notebook > header.left > tabs { + margin-right: -2px; } + notebook > header.right > tabs { + margin-left: -2px; } + +notebook > stack:not(:only-child) { background-color: shade(#393f3f, 1.05); - border: 1px solid shade(#393f3f, 0.9); } - notebook.frame > stack:not(:only-child):backdrop { + border-width: 1px; + border-color: shade(#393f3f, 0.9); + border-style: solid; } + notebook > stack:not(:only-child):backdrop { background-color: #393f3f; } /************** diff --git a/gtk-3.0/gtk-contained.css b/gtk-3.0/gtk-contained.css index 21bf3daf..19991a9c 100644 --- a/gtk-3.0/gtk-contained.css +++ b/gtk-3.0/gtk-contained.css @@ -2371,6 +2371,8 @@ popover.background { *************/ notebook.frame { border-style: none; } + notebook.frame > stack:not(:only-child) { + border: 1px solid shade(#cecece, 0.9); } notebook > header { padding: 1px; @@ -2535,23 +2537,21 @@ notebook > header { padding-bottom: 4px; } notebook > header.bottom tab { padding-top: 4px; } - -notebook.frame > header.top > tabs { - margin-bottom: -2px; } - -notebook.frame > header.bottom > tabs { - margin-top: -2px; } - -notebook.frame > header.left > tabs { - margin-right: -2px; } - -notebook.frame > header.right > tabs { - margin-left: -2px; } - -notebook.frame > stack:not(:only-child) { + notebook > header.top > tabs { + margin-bottom: -2px; } + notebook > header.bottom > tabs { + margin-top: -2px; } + notebook > header.left > tabs { + margin-right: -2px; } + notebook > header.right > tabs { + margin-left: -2px; } + +notebook > stack:not(:only-child) { background-color: shade(#cecece, 1.05); - border: 1px solid shade(#cecece, 0.9); } - notebook.frame > stack:not(:only-child):backdrop { + border-width: 1px; + border-color: shade(#cecece, 0.9); + border-style: solid; } + notebook > stack:not(:only-child):backdrop { background-color: #cecece; } /**************