From 536cb66c25770f072da3767232d6bf6eb85c5771 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 24 Aug 2022 16:34:03 +0900 Subject: [PATCH] Fix: Window Control - Oneliner Tarbar first at Mac --- css/leptonChrome.css | 34 +++++++++++++++++++------- src/tabbar/layout/_navbar_padding.scss | 9 +++++-- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 384c286..7b25a5b 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -5358,6 +5358,12 @@ --uc-window-drag-space-pre: 0px; } } + @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { + :root:is([tabsintitlebar], [sizemode="fullscreen"]) { + /* Don't need window control */ + --uc-window-control-space: 0px; + } + } @supports -moz-bool-pref("userChrome.tabbar.as_titlebar") { :root:is([tabsintitlebar], [sizemode="fullscreen"]) #tabbrowser-tabs { /* Don't need window control */ @@ -5407,6 +5413,12 @@ --uc-window-drag-space-pre: 0px; } } + @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { + :root:is([tabsintitlebar], [sizemode="fullscreen"]) { + /* Don't need window control */ + --uc-window-control-space: 0px; + } + } @supports -moz-bool-pref("userChrome.tabbar.as_titlebar") { :root:is([tabsintitlebar], [sizemode="fullscreen"]) #tabbrowser-tabs { /* Don't need window control */ @@ -5566,11 +5578,6 @@ margin-inline-end: var(--uc-window-drag-space-pre, 0px) !important; } } - @supports -moz-bool-pref("userChrome.tabbar.one_liner.tabbar_first") { - :root[tabsintitlebar="true"]:not([inFullscreen]) #TabsToolbar { - margin-inline-start: var(--uc-window-control-space, 0px) !important; - } - } } @supports -moz-bool-pref("userChrome.tabbar.one_liner.responsive") { @media screen and (min-width: 1100px) { @@ -5579,10 +5586,19 @@ margin-inline-end: var(--uc-window-drag-space-pre, 0px) !important; } } - @supports -moz-bool-pref("userChrome.tabbar.one_liner.tabbar_first") { - :root[tabsintitlebar="true"]:not([inFullscreen]) #TabsToolbar { - margin-inline-start: var(--uc-window-control-space, 0px) !important; - } + } + } + } + @supports -moz-bool-pref("userChrome.tabbar.one_liner.tabbar_first") { + @supports not -moz-bool-pref("userChrome.tabbar.one_liner.responsive") { + :root[tabsintitlebar="true"]:not([inFullscreen]) #TabsToolbar { + margin-inline-start: var(--uc-window-control-width, 0px) !important; + } + } + @supports -moz-bool-pref("userChrome.tabbar.one_liner.responsive") { + @media screen and (min-width: 1100px) { + :root[tabsintitlebar="true"]:not([inFullscreen]) #TabsToolbar { + margin-inline-start: var(--uc-window-control-width, 0px) !important; } } } diff --git a/src/tabbar/layout/_navbar_padding.scss b/src/tabbar/layout/_navbar_padding.scss index 23fb498..d5b5d03 100644 --- a/src/tabbar/layout/_navbar_padding.scss +++ b/src/tabbar/layout/_navbar_padding.scss @@ -17,6 +17,9 @@ @include OS($win, $linux) { @include _remove_spacer_pre; } + @include OS($mac) { + @include _remove_spacer_post; + } @include Option("userChrome.tabbar.as_titlebar") { #tabbrowser-tabs { @include _remove_spacer_post; @@ -133,8 +136,10 @@ @include NotOption("userChrome.tabbar.one_liner.tabbar_first") { margin-inline-end: var(--uc-window-drag-space-pre, 0px) !important; } - @include Option("userChrome.tabbar.one_liner.tabbar_first") { - margin-inline-start: var(--uc-window-control-space, 0px) !important; + } + @include Option("userChrome.tabbar.one_liner.tabbar_first") { + @include OneLinerContent { + margin-inline-start: var(--uc-window-control-width, 0px) !important; } } }