diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 8c68f0b..56d0e63 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -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] { diff --git a/src/tabbar/layout/_window_control_size.scss b/src/tabbar/layout/_window_control_size.scss index a7f5b59..10148b8 100644 --- a/src/tabbar/layout/_window_control_size.scss +++ b/src/tabbar/layout/_window_control_size.scss @@ -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] {