Update _common-4.0.scss

This commit is contained in:
vinceliuice
2023-09-12 10:33:07 +08:00
parent cac59182b7
commit 282c0bc279

View File

@@ -4841,19 +4841,19 @@ window {
%mac_window_button { %mac_window_button {
min-height: 16px; min-height: 16px;
min-width: 16px; min-width: 16px;
padding: 0; padding: ($medium-size - 16px) / 2 0;
margin: 0 $space-size - 2px; margin-left: $space-size - 2px;
margin-right: $space-size - 2px;
&.minimize, &.maximize, &.close { &.minimize, &.maximize, &.close {
color: transparent; color: transparent;
background: none;
image { padding: 0; } &:hover, &:active {
&:hover {
box-shadow: none; box-shadow: none;
} }
&:active { &:active > image {
box-shadow: inset 0 0 0 9999px rgba(black, if($topbar == 'dark', 0.25, 0.12)); box-shadow: inset 0 0 0 9999px rgba(black, if($topbar == 'dark', 0.25, 0.12));
} }
@@ -4862,7 +4862,7 @@ window {
} }
&:backdrop { &:backdrop {
background-color: $titlebar-track; > image { background-color: $titlebar-track; }
&:hover, &:active { &:hover, &:active {
color: $titlebar-text-disabled; color: $titlebar-text-disabled;
@@ -4871,25 +4871,25 @@ window {
} }
&.minimize { // Window minimize button &.minimize { // Window minimize button
background-color: $titlebutton-min; > image { background-color: $titlebutton-min; }
&:active { &:active > image {
background-color: mix($titlebar-text, $titlebutton-min, 25%); background-color: mix($titlebar-text, $titlebutton-min, 25%);
} }
} }
&.maximize { // Window maximize button &.maximize { // Window maximize button
background-color: $titlebutton-max; > image { background-color: $titlebutton-max; }
&:active { &:active > image {
background-color: mix($titlebar-text, $titlebutton-max, 25%); background-color: mix($titlebar-text, $titlebutton-max, 25%);
} }
} }
&.close { // Window close button &.close { // Window close button
background-color: $titlebutton-close; > image { background-color: $titlebutton-close; }
&:active { &:active > image {
background-color: mix($titlebar-text, $titlebutton-close, 25%); background-color: mix($titlebar-text, $titlebutton-close, 25%);
} }
} }
@@ -4898,23 +4898,30 @@ window {
%normal_window_button { %normal_window_button {
min-height: 22px; min-height: 22px;
min-width: 22px; min-width: 22px;
padding: 0; padding: ($medium-size - 22px) / 2 0;
margin: 0 $space-size - 2px; margin-left: $space-size - 2px;
margin-right: $space-size - 2px;
&.minimize, &.maximize, &.close { &.minimize, &.maximize, &.close {
color: $titlebar-text-secondary; color: $titlebar-text-secondary;
background-color: gtkalpha(currentColor, 0.1);
image { padding: 0; } &, &:hover, &:active, &:backdrop {
background: none;
box-shadow: none;
}
> image { background-color: gtkalpha(currentColor, 0.1); }
&:hover { &:hover {
color: $titlebar-text; color: $titlebar-text;
background-color: gtkalpha(currentColor, 0.15);
> image { background-color: gtkalpha(currentColor, 0.15); }
} }
&:active { &:active {
color: $titlebar-text; color: $titlebar-text;
background-color: gtkalpha(currentColor, 0.2);
> image { background-color: gtkalpha(currentColor, 0.2); }
} }
&:backdrop { &:backdrop {
@@ -4931,18 +4938,18 @@ windowcontrols {
&:not(.empty) { &:not(.empty) {
&.start:dir(ltr), &.start:dir(ltr),
&.end:dir(rtl) { &.end:dir(rtl) {
margin-right: $window-space; margin-right: $space-size;
margin-left: $window-space; margin-left: $space-size;
} }
&.start:dir(rtl), &.start:dir(rtl),
&.end:dir(ltr) { &.end:dir(ltr) {
margin-left: $window-space; margin-left: $space-size;
margin-right: $window-space; margin-right: $space-size;
} }
} }
button:not(.suggested-action):not(.destructive-action) { > button:not(.suggested-action):not(.destructive-action) {
@extend %circular-button; @extend %circular-button;
@if $window_button == 'mac' { @if $window_button == 'mac' {
@@ -4950,6 +4957,11 @@ windowcontrols {
} @else { } @else {
@extend %normal_window_button; @extend %normal_window_button;
} }
> image {
border-radius: 100%;
padding: 0;
}
} }
} }