Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
- Window control for windows
  • Loading branch information
black7375 committed Aug 25, 2022
2 parents 7e6f6ba + 925804a commit 02fa9bd
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 16 deletions.
146 changes: 133 additions & 13 deletions css/leptonChrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -4466,17 +4466,37 @@
: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;
}

#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") {
:root {
Expand Down Expand Up @@ -4614,17 +4634,37 @@
: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;
}

#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") {
:root {
Expand Down Expand Up @@ -4759,17 +4799,37 @@
: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;
}

#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") {
:root {
Expand Down Expand Up @@ -4907,17 +4967,37 @@
: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;
}

#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") {
:root {
Expand Down Expand Up @@ -5065,17 +5145,37 @@
: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;
}

#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") {
:root {
Expand Down Expand Up @@ -5210,17 +5310,37 @@
: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;
}

#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") {
:root {
Expand Down Expand Up @@ -7233,7 +7353,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));
Expand Down
2 changes: 1 addition & 1 deletion src/autohide/_common.scss
Original file line number Diff line number Diff line change
@@ -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));
Expand Down
25 changes: 23 additions & 2 deletions src/tabbar/layout/_window_control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,39 @@ 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;
}
}

#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;
}
#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 */
@include OS($mac) {
Expand Down

0 comments on commit 02fa9bd

Please sign in to comment.