Fix: Window Control - Linux's control width

This commit is contained in:
alstjr7375 2022-08-27 19:25:24 +09:00
parent 925804a3a3
commit 05f493bf16
2 changed files with 41 additions and 3 deletions

View file

@ -4412,8 +4412,6 @@
}
:root:is([tabsintitlebar], [sizemode="fullscreen"]) {
--uc-window-control-width: 84px;
/* 84px is default value of linux */
--uc-window-drag-space-pre: var(--uc-title-pre-spacer, 40px);
--uc-window-drag-space-post: var(--uc-title-post-spacer, 40px);
}
@ -4430,6 +4428,28 @@
--uc-window-control-width: 138px;
}
}
@media (-moz-gtk-csd-available) {
:root:is([tabsintitlebar], [sizemode="fullscreen"]) {
/* 84px is default value of linux */
}
@media (-moz-gtk-csd-minimize-button), (-moz-gtk-csd-maximize-button), (-moz-gtk-csd-close-button) {
:root:is([tabsintitlebar], [sizemode="fullscreen"]) {
--uc-window-control-width: 28px;
}
}
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button),
(-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-close-button),
(-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
:root:is([tabsintitlebar], [sizemode="fullscreen"]) {
--uc-window-control-width: 56px;
}
}
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
:root:is([tabsintitlebar], [sizemode="fullscreen"]) {
--uc-window-control-width: 84px;
}
}
}
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") {
:root[tabsintitlebar] {

View file

@ -7,7 +7,6 @@
}
:root:is([tabsintitlebar], [sizemode="fullscreen"]) {
--uc-window-control-width: 84px; /* 84px is default value of linux */
--uc-window-drag-space-pre: var(--uc-title-pre-spacer, 40px); // 30px
--uc-window-drag-space-post: var(--uc-title-post-spacer, 40px); // 25px
@ -17,6 +16,25 @@
@include OS($win10) {
--uc-window-control-width: 138px;
}
@include OS($linux) {
$linuxWindowControlWidth: 84px / 3; /* 84px is default value of linux */
@media (-moz-gtk-csd-minimize-button),
(-moz-gtk-csd-maximize-button),
(-moz-gtk-csd-close-button) {
--uc-window-control-width: #{ $linuxWindowControlWidth };
}
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button),
(-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-close-button),
(-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
--uc-window-control-width: #{ $linuxWindowControlWidth * 2 };
}
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
--uc-window-control-width: #{ $linuxWindowControlWidth * 3 };
}
}
}
@include OS($mac) {
:root[tabsintitlebar] {