123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- /***************
- * Header bars *
- ***************/
- %titlebar,
- headerbar {
- padding: 0 6px;
- min-height: 34px;
- background-color: $headerbar_color;
- color: $headerbar_fg_color;
- border-radius: 0;
- &:backdrop {
- border-color: $backdrop_borders_color;
- background-image: none;
- transition: $backdrop_transition;
- }
- .title {
- font-weight: bold;
- padding-left: 12px;
- padding-right: 12px;
- }
- .subtitle {
- font-size: smaller;
- padding-left: 12px;
- padding-right: 12px;
- @extend .dim-label;
- }
- %linked-header {
- border: none;
- border-radius: 7px;
- border-right-style: none;
- box-shadow: none;
- // &:first-child {
- // border-top-left-radius: 7px;
- // border-bottom-left-radius: 0px;
- // }
- // &:last-child {
- // border-top-right-radius: 0px;
- // border-bottom-right-radius: 0px;
- // border-right-style: solid;
- // }
- // &:only-child {
- // border-radius: 0px;
- // border-style: solid;
- // }
- }
- entry { min-height: 24px; }
- button {
- @include button(normal-header);
- min-height: 30px;
- margin-top: 5px;
- margin-bottom: 5px;
- &:hover {
- @include button(hover-header, transparent, $purple);
- }
- &:active,
- &:checked {
- @include button(active-header, red, $purple);
- }
- &:backdrop,
- &:disabled,
- &:backdrop:disabled {
- @include button(backdrop-header,transparent,transparentize(white,0.7));
- }
- &:backdrop {
- &:hover,
- &:active,
- &:checked {
- background-color: transparent;
- color: $selected_bg_color;
- box-shadow: none;
- // @include button(hover-header,transparent,transparentize(white,0.7));
- }
- }
- @each $b_type, $b_color in (suggested-action, $cyan),
- (destructive-action, $destructive_color) {
- &.#{$b_type} {
- font-weight: bold;
- min-height: 24px;
- margin-top: 4px;
- margin-bottom: 4px;
- border-radius: 3px;
- @include button(normal, $b_color, white);
- &:hover { @include button(hover, $b_color, white); }
- &:active { @include button(active, $b_color, white); }
- &:disabled {
- @include button(insensitive, $b_color, white);
- label {color: transparentize(white,0.5);}
- }
- &:backdrop {
- @include button(backdrop, $b_color, white);
- border-radius: 3px;
- }
- &:backdrop:disabled { @include button(backdrop-insensitive, $b_color, white); }
- }
- }
- //Reset style
- &.titlebutton {
- color: transparent;
- box-shadow: none;
- &:hover,
- &:active,
- &:checked,
- &:backdrop,
- &:backdrop:hover,* {
- color: transparent;
- box-shadow: none;
- }
- }
- }
- .linked > button,
- .linked > button:hover,
- .linked > button:active,
- .linked > button:checked,
- .linked > button:backdrop { @extend %linked-header; }
- .linked > button:active,
- .linked > button:checked{
- &:backdrop{
- color: $backdrop_selected_bg_color;
- label{
- color: $backdrop_selected_bg_color;
- }
- }
- }
- // End reset style
- &.selection-mode {
- $_hc: mix($top_highlight,$selected_bg_color, 50%); // highlight color
- color: $selected_fg_color;
- text-shadow: 0 -1px transparentize(black, 0.5);
- border-color: $selected_borders_color;
- @include headerbar_fill($selected_bg_color, $_hc);
- &:backdrop {
- background-color: $selected_bg_color;
- background-image: none;
- box-shadow: inset 0 1px mix($top_highlight, $selected_bg_color, 60%);
- }
- .subtitle:link { @extend *:link:selected; }
- button {
- @include button(normal, $selected_bg_color, $selected_fg_color);
- &.flat { @include button(undecorated); }
- &:hover { @include button(hover, $selected_bg_color, $selected_fg_color); }
- &:active,
- &:checked { @include button(active, $selected_bg_color, $selected_fg_color); }
- &:backdrop {
- &.flat, & {
- @include button(backdrop, $selected_bg_color, $selected_fg_color);
- -gtk-icon-effect: none;
- border-color: $selected_borders_color;
- &:active,
- &:checked {
- @include button(backdrop-active, $selected_bg_color, $selected_fg_color);
- border-color: $selected_borders_color;
- }
- &:disabled {
- @include button(backdrop-insensitive, $selected_bg_color, $selected_fg_color);
- border-color: $selected_borders_color;
- &:active, &:checked {
- @include button(backdrop-insensitive-active, $selected_bg_color, $selected_fg_color);
- border-color: $selected_borders_color;
- }
- }
- }
- }
- &.flat { &:backdrop, &:disabled, &:backdrop:disabled { @include button(undecorated); }}
- &:disabled {
- @include button(insensitive, $selected_bg_color, $selected_fg_color);
- &:active,
- &:checked { @include button(insensitive-active, $selected_bg_color, $selected_fg_color); }
- }
- &.suggested-action {
- @include button(normal, $cyan, white);
- &:hover { @include button(hover, $cyan, white); }
- &:active { @include button(active, $cyan, white); }
- &:disabled { @include button(insensitive, $cyan, white); }
- &:backdrop { @include button(backdrop, $cyan, white); }
- &:backdrop:disabled { @include button(backdrop-insensitive, $cyan, white); }
- }
- }
- .selection-menu {
- &:backdrop, & {
- border-color: transparentize($selected_bg_color, 1);
- background-image: linear-gradient(to bottom, transparentize($selected_bg_color, 1), transparentize($selected_bg_color, 1));
- box-shadow: none;
- padding-left: 10px;
- padding-right: 10px;
- GtkArrow { -GtkArrow-arrow-scaling: 1; }
- .arrow {
- -gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
- color: transparentize($selected_fg_color,0.5);
- -gtk-icon-shadow: none;
- }
- }
- }
- }
- .tiled &,
- .maximized & {
- &.titlebar {
- @if $variant == 'light' { box-shadow: none; }
- @else { box-shadow: inset 0 -1px $bottom_highlight; }
- }
- &:backdrop, & { border-radius: 0; }
- } // squared corners when the window is maximized or tiled
- &.default-decoration {
- padding: 4px;
- min-height: 28px;
- button.titlebutton {
- min-height: 26px;
- min-width: 26px;
- margin: 0;
- padding: 0;
- }
- }
- }
- headerbar {
- // add vertical margins to common widget on the headerbar to avoid them spanning the whole height
- entry,
- spinbutton,
- separator {
- margin-top: 5px;
- margin-bottom: 5px;
- }
- switch {
- margin-top: 10px;
- margin-bottom: 10px;
- }
- separator { background: transparent; }
- viewswitcher, switcher {
- > box.horizontal {
- > button.radio {
- image { margin-left: 7px; }
- label { margin-right: 7px; }
- margin: 0;
- padding: 0;
- border-radius: 0;
- }
- }
- }
- }
- .background:not(.tiled):not(.maximized) .titlebar {
- @if $variant == 'light' { box-shadow: inset 0 1px lighten($headerbar_color, 5%); }
- @else { box-shadow: inset 0 1px $top_highlight,inset 0 -1px $bottom_highlight; }
- &:backdrop, & {
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- }
- }
- headerbar {
- window:not(.tiled):not(.maximized) separator:first-child + &, // tackles the paned container case
- window:not(.tiled):not(.maximized) &:first-child { &:backdrop, & { border-top-left-radius: 4px; }}
- window:not(.tiled):not(.maximized) &:last-child { &:backdrop, & { border-top-right-radius: 4px; }}
- }
- window { border-radius: 6px; }
- .titlebar:not(headerbar) {
- window.csd > & {
- // in csd we assume every titlebar is a headerbar so reset anything, this is needed for split toolbars cases
- padding: 0;
- background-color: transparent;
- background-image: none;
- border-style: none;
- border-color: transparent;
- box-shadow: none;
- }
- > separator {
- &, &:backdrop {
- background: $headerbar_color;
- }
- }
- @extend %titlebar;
- }
|