Fixed gtk4 issues

This commit is contained in:
Vince 2021-11-28 11:53:51 +08:00
parent aa3ded3480
commit 1a1020052d

View file

@ -46,6 +46,8 @@ $list_shadow: if($variant == 'light',
} }
%circular_row { %circular_row {
border: none;
&:first-child { &:first-child {
border-top-left-radius: $wm_radius; border-top-left-radius: $wm_radius;
border-top-right-radius: $wm_radius; border-top-right-radius: $wm_radius;
@ -1574,17 +1576,19 @@ actionbar > revealer > box {
} }
headerbar { headerbar {
min-height: $headerbar_size; min-height: $headerbar_size + 4px;
padding: 0 $container_padding + 10px; padding: 0 $container_padding + 10px;
color: $header_fg; color: $header_fg;
background-color: $header_bg; background-color: $header_bg;
border-bottom: 1px solid $header_border; border-bottom: 1px solid $header_border;
box-shadow: none;
&:backdrop { &:backdrop {
transition: $backdrop_transition; transition: $backdrop_transition;
color: transparentize($header_fg, 0.3); color: transparentize($header_fg, 0.3);
background-color: $header_bg_backdrop; background-color: $header_bg_backdrop;
border-color: if($variant=='light', lighten($header_border, 5%), darken($header_border, 3%)); border-color: if($variant=='light', lighten($header_border, 5%), darken($header_border, 3%));
box-shadow: none;
} }
.title { .title {
@ -1609,7 +1613,10 @@ headerbar {
margin-bottom: 8px; margin-bottom: 8px;
} }
// button.toggle.popup { margin-right: 3px; } // Nautilus 3.30 popup button menubutton.popup, {
margin-top: 0;
margin-bottom: 0;
}
// Reset linked buttons // Reset linked buttons
.linked.raised > & { .linked.raised > & {
@ -1690,24 +1697,19 @@ headerbar {
box-shadow: none; box-shadow: none;
} }
&.windowhandle { windowhandle {
viewswitcher button:not(.titlebutton):not(.suggested-action):not(.destructive-action) { viewswitcher {
border-radius: 0; button {
margin-top: 0; margin-top: 2px;
margin-bottom: 0; margin-bottom: 1px;
} min-height: 0;
> button.popup { > stack > box {
&:hover { &.wide {
@include button(header-hover); padding: 0 12px;
} border-spacing: 0;
}
&:active { }
@include button(header-active);
}
&:checked {
@include button(header-checked);
} }
} }
} }
@ -1802,120 +1804,15 @@ headerbar {
} }
separator.titlebutton { @extend %header_separator; } separator.titlebutton { @extend %header_separator; }
// Fixes split headerbars
separator:first-child + &,
&:first-child {
&, &:backdrop {
border-top-left-radius: $wm_radius;
.maximized &,
.tiled & { border-top-left-radius: $maximized_radius; }
}
}
&:last-child {
&, &:backdrop {
border-top-right-radius: $wm_radius;
.maximized &,
.tiled & { border-top-right-radius: $maximized_radius; }
}
}
stack & { // tackles the stacked headerbars case
&:first-child, &:last-child {
border-top-left-radius: $wm_radius;
border-top-right-radius: $wm_radius;
}
}
window separator:first-child + &,
window &:first-child { &:backdrop, & { border-top-left-radius: $wm_radius; }}
window &:last-child { &:backdrop, & { border-top-right-radius: $wm_radius; }}
window stack & { // tackles the stacked headerbars case
&:first-child, &:last-child {
&:backdrop, & {
border-top-left-radius: $wm_radius;
border-top-right-radius: $wm_radius;
}
}
}
window.tiled &,
window.tiled-top &,
window.tiled-right &,
window.tiled-bottom &,
window.tiled-left &,
window.maximized & {
&,
&:first-child,
&:last-child,
&:only-child {
border-top-left-radius: $maximized_radius;
border-top-right-radius: $maximized_radius;
}
}
window.fullscreen &,
.solid-csd & {
&,
&:first-child,
&:last-child,
&:only-child {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
} }
.titlebar { .titlebar {
&, &.background {
border-top-left-radius: $wm_radius;
border-top-right-radius: $wm_radius;
}
&, & headerbar {
box-shadow: inset 0 1px $highlight_color;
.tiled &,
.maximized &,
.fullscreen & {
box-shadow: none;
&, &.background {
border-top-left-radius: $maximized_radius;
border-top-right-radius: $maximized_radius;
}
}
}
> box.left.horizontal, > box.left.horizontal,
> box.right.horizontal { > box.right.horizontal {
padding: 0 $container_padding; padding: 0 $container_padding;
} }
} }
window.background > box.vertical > headerbar:not(.titlebar) { // reset headerbar style for not CSD window
border-radius: 0 0 0 0;
box-shadow: none;
// Fixes split headerbars
separator:first-child + &,
&:first-child {
&, &:backdrop {
border-top-left-radius: 0;
}
}
&:last-child {
&, &:backdrop {
border-top-right-radius: 0;
}
}
}
// Fixes split headerbars too // Fixes split headerbars too
.titlebar:not(headerbar) { .titlebar:not(headerbar) {
window > &, window > &,
@ -2196,6 +2093,7 @@ popover.background {
> arrow, > arrow,
> contents { > contents {
padding: 0; padding: 0;
color: $fg_color;
background-clip: border-box; background-clip: border-box;
background-color: $menu_bg; background-color: $menu_bg;
box-shadow: 0 3px 6px 0 if($variant=='light', transparentize(black, 0.85), transparentize(black, 0.85)), box-shadow: 0 3px 6px 0 if($variant=='light', transparentize(black, 0.85), transparentize(black, 0.85)),
@ -2329,6 +2227,7 @@ popover.menu {
&.background > contents { &.background > contents {
background-color: $menu_bg; background-color: $menu_bg;
padding: $container_padding; padding: $container_padding;
color: $fg_color;
} }
&.background separator { &.background separator {
@ -2362,6 +2261,7 @@ popover.menu {
padding: $container_padding / 3 $container_padding; padding: $container_padding / 3 $container_padding;
border-radius: $mn_radius - $container_padding / 2; border-radius: $mn_radius - $container_padding / 2;
transition: none; transition: none;
color: $text_color;
&:focus { &:focus {
background-color: transparent; background-color: transparent;
@ -2598,6 +2498,62 @@ notebook {
} }
} }
tabbox {
@if $monterey == 'false' {
background-color: darken($header_bg, 10%);
box-shadow: inset 0 -1px $borders_color;
} @else {
background-color: $header_bg;
border-bottom: 1px solid $borders_color;
padding: 0 $container_padding / 2 $container_padding / 2;
}
> tab {
@if $monterey == 'false' {
@extend %tabs_tab;
border-top: none;
border-top: 1px solid $borders_color;
&:checked { border-top-color: $header_bg; }
} @else {
@extend %monterey_tab;
+ tab {
margin-left: $container_padding / 2;
}
}
button.tab-close-button {
border-radius: 3px;
border: none;
padding: 0;
@extend %flat_button;
@if $monterey == 'false' {
min-height: $small_size;
min-width: $small_size;
margin-top: 2px;
margin-bottom: 2px;
} @else {
min-height: 16px;
min-width: 16px;
margin-top: 4px;
margin-bottom: 4px;
margin-right: -$container_padding;
}
&:hover {
color: $fg_color;
background-color: rgba($borders_color, 0.1);
}
&:active, &:active:hover {
color: if($variant == 'light', darken($fg_color, 10%), lighten($fg_color, 10%));
background-color: rgba($borders_color, 0.2);
}
}
}
}
// //
// Scrollbars // Scrollbars
// //
@ -3404,17 +3360,13 @@ separator {
// //
// Lists // Lists
// //
listview,
list { list {
background-color: $base_color; background-color: $base_color;
border-color: $borders_color; border-color: $borders_color;
// border-radius: $wm_radius; color: $fg_color;
> row { > row {
padding: 2px; padding: 2px;
// &:first-child { border-radius: $bt_radius $bt_radius 0 0; }
// &:last-child { border-radius: 0 0 $bt_radius $bt_radius; }
} }
&.content:not(.conversation-listbox) { &.content:not(.conversation-listbox) {
@ -3425,10 +3377,37 @@ list {
} }
} }
&.boxed-list {
@extend %circular_list;
> row {
@extend %circular_row;
&.expander {
list {
background-color: transparent;
box-shadow: none;
border: none;
> row {
@extend %circular_row;
}
}
}
}
}
> row.expander { padding: 0px; } > row.expander { padding: 0px; }
> row.expander .row-header { padding: 2px; } > row.expander .row-header { padding: 2px; }
} }
listview.view {
color: $fg_color;
background-color: transparent;
popover.menu & { padding: 0; }
}
%row_activatable { %row_activatable {
&.has-open-popup, &.has-open-popup,
&:hover { background-color: if($variant == 'light', rgba(black, 0.05), rgba(white, 0.05)); } &:hover { background-color: if($variant == 'light', rgba(black, 0.05), rgba(white, 0.05)); }
@ -4335,6 +4314,10 @@ stackswitcher {
window { window {
border-width: 0; border-width: 0;
outline-color: $highlight_color;
outline-offset: -1px;
outline-style: solid;
outline-width: 1px;
&.csd { &.csd {
transition: $shadow_transition; transition: $shadow_transition;
@ -4374,12 +4357,8 @@ window {
&.maximized, &.maximized,
&.fullscreen, &.fullscreen,
&.tiled, &:backdrop {
&.tiled-top, outline-width: 0;
&.tiled-left,
&.tiled-right,
&.tiled-bottom {
border-radius: 0;
} }
&.popup { box-shadow: none; } &.popup { box-shadow: none; }