forked from AuroraMiddleware/gtk
Adwaita: notebook style rewrite
This commit is contained in:
parent
01626e0f4b
commit
31cc642288
@ -1757,232 +1757,173 @@ popover.background {
|
||||
*************/
|
||||
|
||||
notebook {
|
||||
// Through me you go to the grief wracked city;
|
||||
// Through me you go to everlasting pain;
|
||||
// Through me you go a pass among lost souls.
|
||||
// ...
|
||||
// Abandon all hope — Ye Who Enter Here
|
||||
padding: 0;
|
||||
background-color: $base_color;
|
||||
transition: all 200ms $ease-out-quad;
|
||||
|
||||
&:backdrop { background-color: $backdrop_base_color; }
|
||||
|
||||
&.frame {
|
||||
border: 1px solid $borders_color;
|
||||
&:backdrop { border-color: $backdrop_borders_color; }
|
||||
}
|
||||
|
||||
header {
|
||||
//vertical tab sizing
|
||||
$vt_vpadding: 8px;
|
||||
$vt_hpadding: 20px;
|
||||
// horizontal tab sizing
|
||||
$ht_vpadding: 5px;
|
||||
$ht_hpadding: 20px;
|
||||
$tab_indicator_size: 3px;
|
||||
$_header_shade: inset 0 2px 3px -1px transparentize(black, 0.85);
|
||||
|
||||
// FIXME: double borders in some case, can't fix it w/o a class tho
|
||||
// FIXME: doesn't work on dark var
|
||||
background-color: mix($bg_color, $borders_color, 70%);
|
||||
|
||||
// this is the shading of the header behind the tabs
|
||||
.frame & {
|
||||
border: 1px solid $borders_color;
|
||||
&.top { border-bottom-width: 0; }
|
||||
&.bottom { border-top-width: 0; }
|
||||
&.right { border-left-width: 0; }
|
||||
&.left { border-right-width: 0; }
|
||||
&:backdrop { border-color: $backdrop_borders_color; }
|
||||
> header {
|
||||
border-color: $borders_color;
|
||||
border-width: 1px;
|
||||
background-color: $dark_fill;
|
||||
&:backdrop {
|
||||
border-color: $backdrop_borders_color;
|
||||
background-color: $backdrop_dark_fill;
|
||||
}
|
||||
|
||||
&.top {
|
||||
box-shadow: $_header_shade,
|
||||
inset 0 -1px $borders_color; // border
|
||||
&:backdrop { box-shadow: inset 0 -1px $backdrop_borders_color; }
|
||||
& tab {
|
||||
padding: $vt_vpadding $vt_hpadding;
|
||||
border-bottom-width: $tab_indicator_size;
|
||||
&.reorderable-page {
|
||||
padding-left: 12px; // for a nicer close button
|
||||
padding-right: 12px; // placement
|
||||
border-left-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
> tabs {
|
||||
margin-bottom: -1px;
|
||||
> tab {
|
||||
&:hover { box-shadow: inset 0 -3px $borders_color; }
|
||||
&:backdrop { box-shadow: none; }
|
||||
&:active { box-shadow: inset 0 -3px $selected_bg_color; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.bottom {
|
||||
box-shadow: $_header_shade,
|
||||
inset 0 1px $borders_color;
|
||||
&:backdrop { box-shadow: inset 0 1px $backdrop_borders_color; }
|
||||
tab {
|
||||
padding: $vt_vpadding $vt_hpadding;
|
||||
border-top-width: $tab_indicator_size;
|
||||
&.reorderable-page {
|
||||
padding-left: 12px; // for a nicer close button
|
||||
padding-right: 12px; // placement
|
||||
border-left-width: 1px;
|
||||
border-right-width: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.right {
|
||||
box-shadow: $_header_shade,
|
||||
inset 1px 0 $borders_color;
|
||||
&:backdrop { box-shadow: inset 1px 0 $backdrop_borders_color; }
|
||||
tab {
|
||||
padding: $ht_vpadding $ht_hpadding;
|
||||
border-left-width: $tab_indicator_size;
|
||||
&.reorderable-page {
|
||||
border-bottom-width: 1px;
|
||||
border-top-width: 1px;
|
||||
border-top-style: solid;
|
||||
> tabs {
|
||||
margin-top: -1px;
|
||||
> tab {
|
||||
&:hover { box-shadow: inset 0 3px $borders_color; }
|
||||
&:backdrop { box-shadow: none; }
|
||||
&:active { box-shadow: inset 0 3px $selected_bg_color; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.left {
|
||||
box-shadow: $_header_shade,
|
||||
inset -1px 0 $borders_color;
|
||||
&:backdrop { box-shadow: inset -1px 0 $backdrop_borders_color; }
|
||||
tab {
|
||||
padding: $ht_vpadding $ht_hpadding;
|
||||
border-right-width: $tab_indicator_size;
|
||||
&.reorderable-page {
|
||||
border-bottom-width: 1px;
|
||||
border-top-width: 1px;
|
||||
border-right-style: solid;
|
||||
> tabs {
|
||||
margin-right: -1px;
|
||||
> tab {
|
||||
&:hover { box-shadow: inset -3px 0 $borders_color; }
|
||||
&:backdrop { box-shadow: none; }
|
||||
&:active { box-shadow: inset -3px 0 $selected_bg_color; }
|
||||
}
|
||||
}
|
||||
}
|
||||
&:backdrop {
|
||||
// same color as backdrop pushed button
|
||||
background-color: $backdrop_dark_fill;
|
||||
box-shadow: none;
|
||||
|
||||
&.right {
|
||||
border-left-style: solid;
|
||||
> tabs {
|
||||
margin-left: -1px;
|
||||
> tab {
|
||||
&:hover { box-shadow: inset 3px 0 $borders_color; }
|
||||
&:backdrop { box-shadow: none; }
|
||||
&:active { box-shadow: inset 3px 0 $selected_bg_color; }
|
||||
}
|
||||
}
|
||||
}
|
||||
&.top, &.bottom {
|
||||
tabs arrow.up { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
|
||||
tabs arrow.down { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); }
|
||||
}
|
||||
&.left, &.right {
|
||||
tabs arrow.up { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
|
||||
tabs arrow.down { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
|
||||
}
|
||||
& tabs arrow {
|
||||
|
||||
tab {
|
||||
font-weight: bold;
|
||||
min-height: 36px;
|
||||
min-width: 36px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
color: $insensitive_fg_color;
|
||||
border-width: 1px; // for reorderable tabs
|
||||
border-color: transparent; //
|
||||
|
||||
&:hover { color: mix($fg_color, $insensitive_fg_color, 50%); }
|
||||
&:hover {
|
||||
color: mix($insensitive_fg_color, $fg_color, 50%);
|
||||
|
||||
&:active { color: $fg_color; }
|
||||
|
||||
&:disabled { color: transparentize($insensitive_fg_color,0.7); }
|
||||
|
||||
&:backdrop { color: transparentize($backdrop_fg_color,0.6); }
|
||||
|
||||
&:backdrop:disabled { color: $backdrop_insensitive_color; }
|
||||
}
|
||||
}
|
||||
|
||||
tab {
|
||||
border-width: 0;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
|
||||
outline-offset: 0;
|
||||
|
||||
//here's the interesting stuff
|
||||
&:hover { border-color: $borders_color; }
|
||||
|
||||
&:active,
|
||||
&:backdrop:active { border-color: $selected_bg_color; }
|
||||
|
||||
&:backdrop {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
@each $_tab, $_border in (top, bottom),
|
||||
(bottom, top),
|
||||
(left, right),
|
||||
(right, left) {
|
||||
.#{$_tab} &.reorderable-page {
|
||||
|
||||
border-color: transparent;
|
||||
|
||||
&:hover {
|
||||
border-color: transparentize($borders_color,0.7);
|
||||
border-#{$_border}-color: $borders_color;
|
||||
background-color: transparentize($bg_color,0.8);
|
||||
&.reorderable-page {
|
||||
border-color: transparentize($borders_color, 0.7);
|
||||
background-color: transparentize($bg_color, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: transparentize($bg_color,0.5);
|
||||
border-color: transparentize($borders_color,0.5);
|
||||
border-#{$_border}-color: $selected_bg_color;
|
||||
&:hover { background-color: transparentize($bg_color,0.3); }
|
||||
&:backdrop {
|
||||
color: mix($backdrop_fg_color, $backdrop_bg_color, 60%);
|
||||
|
||||
&:backdrop {
|
||||
border-color: $backdrop_borders_color;
|
||||
background-color: $backdrop_bg_color;
|
||||
border-#{$_border}-color: $selected_bg_color;
|
||||
}
|
||||
}
|
||||
|
||||
&:backdrop {
|
||||
&.reorderable-page {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
label { //tab text
|
||||
padding: 0 2px; // needed for a nicer focus ring
|
||||
font-weight: bold;
|
||||
color: $insensitive_fg_color;
|
||||
&:active {
|
||||
color: $fg_color;
|
||||
&.reorderable-page {
|
||||
border-color: transparentize($borders_color, 0.5);
|
||||
background-color: transparentize($bg_color, 0.5);
|
||||
|
||||
&:backdrop { color: mix($backdrop_fg_color, $backdrop_insensitive_color, 50%); }
|
||||
}
|
||||
|
||||
&:hover label {
|
||||
// prelight tab text
|
||||
color: mix($fg_color, $insensitive_fg_color, 50%);
|
||||
|
||||
&:backdrop { color: mix($backdrop_fg_color, $backdrop_insensitive_color, 50%); }
|
||||
}
|
||||
|
||||
&:active label {
|
||||
// active tab text
|
||||
color: $fg_color;
|
||||
|
||||
&:backdrop { color: $backdrop_fg_color; }
|
||||
}
|
||||
|
||||
button.flat { //tab close button
|
||||
min-height: 18px;
|
||||
min-width: 18px;
|
||||
padding: 0;
|
||||
border: 1px solid transparent;
|
||||
@extend %undecorated_button;
|
||||
-gtk-icon-shadow: none;
|
||||
transition: none;
|
||||
color: transparentize($fg_color,0.7);
|
||||
|
||||
&:hover {
|
||||
color: $fg_color;
|
||||
@include button(hover, $edge:none);
|
||||
background-image: none;
|
||||
box-shadow: none;
|
||||
&:hover { background-color: transparentize($bg_color, 0.3); }
|
||||
}
|
||||
}
|
||||
|
||||
&:active { @include button(active, $edge:none); }
|
||||
&:backdrop:active {
|
||||
color: $backdrop_fg_color;
|
||||
|
||||
&:backdrop {
|
||||
color: transparentize($backdrop_fg_color,0.7);
|
||||
border-color: transparent;
|
||||
&.reorderable-page {
|
||||
border-color: $backdrop_borders_color;
|
||||
background-color: $backdrop_bg_color;
|
||||
}
|
||||
}
|
||||
|
||||
// colors the button like the label, overridden otherwise
|
||||
button.flat {
|
||||
&:hover { color: currentColor; }
|
||||
|
||||
&, &:backdrop { color: gtkalpha(currentColor, 0.3); }
|
||||
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
// FIXME: generalize .small-button?
|
||||
min-width: 18px;
|
||||
min-height: 18px;
|
||||
|
||||
&:last-child {
|
||||
margin-left: 4px;
|
||||
margin-right: -4px;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-left: -4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.top,
|
||||
&.bottom {
|
||||
tabs {
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
|
||||
tab {
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
|
||||
&.reorderable-page { border-style: none solid; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.left,
|
||||
&.right {
|
||||
tabs {
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
|
||||
tab {
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
|
||||
&.reorderable-page { border-style: solid none; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> stack {
|
||||
background-color: $base_color;
|
||||
|
||||
&:backdrop { background-color: $backdrop_base_color; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**************
|
||||
* Scrollbars *
|
||||
**************/
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user