From d196ea13d6ec32685f9e6541add74c3ecbe10cb9 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 24 Aug 2022 20:47:37 +0900 Subject: [PATCH 1/3] Fix: Window Control - Windows --- css/leptonChrome.css | 84 ++++++++++++++++++++++++-- src/tabbar/layout/_window_control.scss | 13 +++- 2 files changed, 90 insertions(+), 7 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 7b25a5b..4b544b7 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -4466,12 +4466,24 @@ :root[sizemode="maximized"][tabsintitlebar] { --uc-titlebar-padding: 8px; } + :root[sizemode="maximized"][tabsintitlebar] #navigator-toolbox { + margin-top: calc(-1 * var(--uc-titlebar-padding)); + } + + :root[sizemode="normal"][tabsintitlebar] #titlebar, + :root[sizemode="maximized"][tabsintitlebar] #titlebar { + appearance: none !important; + } + + .browser-toolbar:not(.titlebar-color) { + background-clip: border-box !important; + } } #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container, #TabsToolbar > .titlebar-buttonbox-container { position: fixed; display: block; - top: var(--uc-titlebar-padding); + top: 0; right: 0; height: 40px; z-index: 1; @@ -4614,12 +4626,24 @@ :root[sizemode="maximized"][tabsintitlebar] { --uc-titlebar-padding: 8px; } + :root[sizemode="maximized"][tabsintitlebar] #navigator-toolbox { + margin-top: calc(-1 * var(--uc-titlebar-padding)); + } + + :root[sizemode="normal"][tabsintitlebar] #titlebar, + :root[sizemode="maximized"][tabsintitlebar] #titlebar { + appearance: none !important; + } + + .browser-toolbar:not(.titlebar-color) { + background-clip: border-box !important; + } } #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container, #TabsToolbar > .titlebar-buttonbox-container { position: fixed; display: block; - top: var(--uc-titlebar-padding); + top: 0; right: 0; height: 40px; z-index: 1; @@ -4759,12 +4783,24 @@ :root[sizemode="maximized"][tabsintitlebar] { --uc-titlebar-padding: 8px; } + :root[sizemode="maximized"][tabsintitlebar] #navigator-toolbox { + margin-top: calc(-1 * var(--uc-titlebar-padding)); + } + + :root[sizemode="normal"][tabsintitlebar] #titlebar, + :root[sizemode="maximized"][tabsintitlebar] #titlebar { + appearance: none !important; + } + + .browser-toolbar:not(.titlebar-color) { + background-clip: border-box !important; + } } #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container, #TabsToolbar > .titlebar-buttonbox-container { position: fixed; display: block; - top: var(--uc-titlebar-padding); + top: 0; right: 0; height: 40px; z-index: 1; @@ -4907,12 +4943,24 @@ :root[sizemode="maximized"][tabsintitlebar] { --uc-titlebar-padding: 8px; } + :root[sizemode="maximized"][tabsintitlebar] #navigator-toolbox { + margin-top: calc(-1 * var(--uc-titlebar-padding)); + } + + :root[sizemode="normal"][tabsintitlebar] #titlebar, + :root[sizemode="maximized"][tabsintitlebar] #titlebar { + appearance: none !important; + } + + .browser-toolbar:not(.titlebar-color) { + background-clip: border-box !important; + } } #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container, #TabsToolbar > .titlebar-buttonbox-container { position: fixed; display: block; - top: var(--uc-titlebar-padding); + top: 0; right: 0; height: 40px; z-index: 1; @@ -5065,12 +5113,24 @@ :root[sizemode="maximized"][tabsintitlebar] { --uc-titlebar-padding: 8px; } + :root[sizemode="maximized"][tabsintitlebar] #navigator-toolbox { + margin-top: calc(-1 * var(--uc-titlebar-padding)); + } + + :root[sizemode="normal"][tabsintitlebar] #titlebar, + :root[sizemode="maximized"][tabsintitlebar] #titlebar { + appearance: none !important; + } + + .browser-toolbar:not(.titlebar-color) { + background-clip: border-box !important; + } } #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container, #TabsToolbar > .titlebar-buttonbox-container { position: fixed; display: block; - top: var(--uc-titlebar-padding); + top: 0; right: 0; height: 40px; z-index: 1; @@ -5210,12 +5270,24 @@ :root[sizemode="maximized"][tabsintitlebar] { --uc-titlebar-padding: 8px; } + :root[sizemode="maximized"][tabsintitlebar] #navigator-toolbox { + margin-top: calc(-1 * var(--uc-titlebar-padding)); + } + + :root[sizemode="normal"][tabsintitlebar] #titlebar, + :root[sizemode="maximized"][tabsintitlebar] #titlebar { + appearance: none !important; + } + + .browser-toolbar:not(.titlebar-color) { + background-clip: border-box !important; + } } #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container, #TabsToolbar > .titlebar-buttonbox-container { position: fixed; display: block; - top: var(--uc-titlebar-padding); + top: 0; right: 0; height: 40px; z-index: 1; diff --git a/src/tabbar/layout/_window_control.scss b/src/tabbar/layout/_window_control.scss index ca11c3d..5e16b16 100644 --- a/src/tabbar/layout/_window_control.scss +++ b/src/tabbar/layout/_window_control.scss @@ -8,6 +8,17 @@ See the above repository for updates as well as full license text. */ @include OS($win) { :root[sizemode="maximized"][tabsintitlebar] { --uc-titlebar-padding: 8px; + + #navigator-toolbox { + margin-top: calc(-1 * var(--uc-titlebar-padding)); + } + } + :root[sizemode="normal"][tabsintitlebar] #titlebar, + :root[sizemode="maximized"][tabsintitlebar] #titlebar { + appearance: none !important; + } + .browser-toolbar:not(.titlebar-color) { + background-clip: border-box !important; } } @@ -15,7 +26,7 @@ See the above repository for updates as well as full license text. */ #TabsToolbar > .titlebar-buttonbox-container { position: fixed; display: block; - top: var(--uc-titlebar-padding); + top: 0; right:0; height: 40px; z-index: 1; From c8839e984d3b259cd2f89331710e5bf64e429a5a Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 25 Aug 2022 15:45:38 +0900 Subject: [PATCH 2/3] Fix: Window Control - Size --- css/leptonChrome.css | 32 ++++++++++++++++++++------ src/autohide/_common.scss | 2 +- src/tabbar/layout/_window_control.scss | 4 +++- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 4b544b7..81221c9 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -4485,10 +4485,13 @@ display: block; top: 0; right: 0; - height: 40px; z-index: 1; } + #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { + height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); + } + /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { :root { @@ -4645,10 +4648,13 @@ display: block; top: 0; right: 0; - height: 40px; z-index: 1; } + #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { + height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); + } + /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { :root { @@ -4802,10 +4808,13 @@ display: block; top: 0; right: 0; - height: 40px; z-index: 1; } + #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { + height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); + } + /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { :root { @@ -4962,10 +4971,13 @@ display: block; top: 0; right: 0; - height: 40px; z-index: 1; } + #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { + height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); + } + /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { :root { @@ -5132,10 +5144,13 @@ display: block; top: 0; right: 0; - height: 40px; z-index: 1; } + #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { + height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); + } + /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { :root { @@ -5289,10 +5304,13 @@ display: block; top: 0; right: 0; - height: 40px; z-index: 1; } + #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { + height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); + } + /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { :root { @@ -7305,7 +7323,7 @@ @supports -moz-bool-pref("userChrome.autohide.tabbar") or -moz-bool-pref("userChrome.autohide.navbar") or -moz-bool-pref( "userChrome.autohide.bookmarkbar" ) - or -moz-bool-pref("userChrome.tabbar.one_liner") { + or -moz-bool-pref("userChrome.tabbar.one_liner") or -moz-bool-pref("userChrome.hidden.tabbar") { :root { --uc-tabbar-height: var(--tab-min-height); --uc-tabbar-hide-height: calc(-1 * var(--uc-tabbar-height)); diff --git a/src/autohide/_common.scss b/src/autohide/_common.scss index 8347e8a..02fc759 100644 --- a/src/autohide/_common.scss +++ b/src/autohide/_common.scss @@ -1,4 +1,4 @@ -@include Option("userChrome.autohide.tabbar", "userChrome.autohide.navbar", "userChrome.autohide.bookmarkbar", "userChrome.tabbar.one_liner") { +@include Option("userChrome.autohide.tabbar", "userChrome.autohide.navbar", "userChrome.autohide.bookmarkbar", "userChrome.tabbar.one_liner", "userChrome.hidden.tabbar") { :root { --uc-tabbar-height: var(--tab-min-height); // calc((var(--tab-block-margin) * 2) + var(--tab-min-height)); --uc-tabbar-hide-height: calc(-1 * var(--uc-tabbar-height)); diff --git a/src/tabbar/layout/_window_control.scss b/src/tabbar/layout/_window_control.scss index 5e16b16..4a969d2 100644 --- a/src/tabbar/layout/_window_control.scss +++ b/src/tabbar/layout/_window_control.scss @@ -28,9 +28,11 @@ See the above repository for updates as well as full license text. */ display: block; top: 0; right:0; - height: 40px; z-index: 1; } +#toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { + height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); +} /* where window controls are on left */ @include OS($mac) { From 925804a3a3b5857ece1736de6b546fe2c1256959 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 25 Aug 2022 16:19:17 +0900 Subject: [PATCH 3/3] Fix: Window Control - Win10 color --- css/leptonChrome.css | 30 ++++++++++++++++++++++++++ src/tabbar/layout/_window_control.scss | 12 +++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 81221c9..8c68f0b 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -4491,6 +4491,11 @@ #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); } + @media (-moz-os-version: windows-win10), (-moz-platform: windows-win10) { + #toolbar-menubar[autohide="true"][inactive="true"] > .titlebar-buttonbox-container .titlebar-button { + stroke: var(--toolbar-color, currentColor) !important; + } + } /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { @@ -4654,6 +4659,11 @@ #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); } + @media (-moz-os-version: windows-win10), (-moz-platform: windows-win10) { + #toolbar-menubar[autohide="true"][inactive="true"] > .titlebar-buttonbox-container .titlebar-button { + stroke: var(--toolbar-color, currentColor) !important; + } + } /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { @@ -4814,6 +4824,11 @@ #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); } + @media (-moz-os-version: windows-win10), (-moz-platform: windows-win10) { + #toolbar-menubar[autohide="true"][inactive="true"] > .titlebar-buttonbox-container .titlebar-button { + stroke: var(--toolbar-color, currentColor) !important; + } + } /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { @@ -4977,6 +4992,11 @@ #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); } + @media (-moz-os-version: windows-win10), (-moz-platform: windows-win10) { + #toolbar-menubar[autohide="true"][inactive="true"] > .titlebar-buttonbox-container .titlebar-button { + stroke: var(--toolbar-color, currentColor) !important; + } + } /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { @@ -5150,6 +5170,11 @@ #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); } + @media (-moz-os-version: windows-win10), (-moz-platform: windows-win10) { + #toolbar-menubar[autohide="true"][inactive="true"] > .titlebar-buttonbox-container .titlebar-button { + stroke: var(--toolbar-color, currentColor) !important; + } + } /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { @@ -5310,6 +5335,11 @@ #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); } + @media (-moz-os-version: windows-win10), (-moz-platform: windows-win10) { + #toolbar-menubar[autohide="true"][inactive="true"] > .titlebar-buttonbox-container .titlebar-button { + stroke: var(--toolbar-color, currentColor) !important; + } + } /* where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { diff --git a/src/tabbar/layout/_window_control.scss b/src/tabbar/layout/_window_control.scss index 4a969d2..fa32056 100644 --- a/src/tabbar/layout/_window_control.scss +++ b/src/tabbar/layout/_window_control.scss @@ -30,8 +30,16 @@ See the above repository for updates as well as full license text. */ right:0; z-index: 1; } -#toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container { - height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); +#toolbar-menubar[autohide="true"] { + > .titlebar-buttonbox-container { + height: var(--uc-titlebar-buttonbox-height, var(--uc-navbar-height, 36px)); + } + + @include OS($win10) { + &[inactive="true"] > > .titlebar-buttonbox-container .titlebar-button { + stroke: var(--toolbar-color, currentColor) !important; + } + } } /* where window controls are on left */