Skip to content

Commit

Permalink
Use correct colors for GtkNotebook (fixes #227)
Browse files Browse the repository at this point in the history
Original patch by Simon Ochsenreither <[email protected]>
  • Loading branch information
ochosi committed Sep 11, 2018
1 parent 0650bfe commit 8e74c38
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 54 deletions.
47 changes: 25 additions & 22 deletions gtk-3.0/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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; }
}
}


Expand Down
32 changes: 16 additions & 16 deletions gtk-3.0/gtk-contained-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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; }

/**************
Expand Down
32 changes: 16 additions & 16 deletions gtk-3.0/gtk-contained.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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; }

/**************
Expand Down

0 comments on commit 8e74c38

Please sign in to comment.