separate window-control-drag-space-width to -pre and -post

This way we can handle maximized windows not having the other drag space
like Firefox does normally. This patch additionally adds window control
width values for Win7 Win8 and linux
This commit is contained in:
MrOtherGuy 2021-09-19 20:31:30 +03:00
parent a73238a267
commit 6214f6e1e7
7 changed files with 37 additions and 13 deletions

View file

@ -13,7 +13,7 @@ See the above repository for updates as well as full license text. */
--uc-fx-button-sec-color: #ffdfbf85; --uc-fx-button-sec-color: #ffdfbf85;
} }
#PanelUI-button{ -moz-box-ordinal-group: 0; margin-inline: 2px var(--uc-window-drag-space-width,24px) !important; } #PanelUI-button{ -moz-box-ordinal-group: 0; margin-inline: 2px var(--uc-window-drag-space-pre,24px) !important; }
:root[tabsintitlebar] #nav-bar{ border-left-width: 0px; padding-left: 0px !important; } :root[tabsintitlebar] #nav-bar{ border-left-width: 0px; padding-left: 0px !important; }
#PanelUI-menu-button{ -moz-box-align: start !important; } #PanelUI-menu-button{ -moz-box-align: start !important; }
#PanelUI-menu-button > stack{ #PanelUI-menu-button > stack{

View file

@ -39,5 +39,5 @@ Window controls will be all wrong without it
#toolbar-menubar[inactive] > #menubar-items { #toolbar-menubar[inactive] > #menubar-items {
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
margin-left: var(--uc-window-drag-space-width,0px) margin-left: var(--uc-window-drag-space-pre,0px)
} }

View file

@ -22,7 +22,7 @@ Window controls will be all wrong without it
#tabbrowser-tabs > .tabbrowser-arrowscrollbox, #tabbrowser-tabs > .tabbrowser-arrowscrollbox,
#tabbrowser-arrowscrollbox{ min-height: 0 !important; } #tabbrowser-arrowscrollbox{ min-height: 0 !important; }
#TabsToolbar > .titlebar-spacer[type="post-tabs"]{ width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px)) !important; } #TabsToolbar > .titlebar-spacer[type="post-tabs"]{ width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px)) !important; }
#toolbar-menubar > spacer{ pointer-events: none } #toolbar-menubar > spacer{ pointer-events: none }
:root:not([customizing]) #tabs-newtab-button, :root:not([customizing]) #tabs-newtab-button,

View file

@ -67,11 +67,11 @@ Window controls will be all wrong without it
.titlebar-placeholder[type="pre-tabs"],.titlebar-spacer[type="pre-tabs"]{ width:8px !important} .titlebar-placeholder[type="pre-tabs"],.titlebar-spacer[type="pre-tabs"]{ width:8px !important}
#nav-bar{ margin-top: calc(0px - var(--uc-toolbar-height)); } #nav-bar{ margin-top: calc(0px - var(--uc-toolbar-height)); }
#nav-bar-customization-target{ margin-right: calc(100vw - (var(--uc-navigationbar-width)) - var(--uc-window-control-width) - var(--uc-buttons-width) - var(--uc-window-drag-space-width)) } #nav-bar-customization-target{ margin-right: calc(100vw - (var(--uc-navigationbar-width)) - var(--uc-window-control-width) - var(--uc-buttons-width) - var(--uc-window-drag-space-post)) }
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){
.titlebar-buttonbox-container{ position: fixed; display: blocK; left: 0px; z-index: 3; } .titlebar-buttonbox-container{ position: fixed; display: blocK; left: 0px; z-index: 3; }
#nav-bar-customization-target{ margin-right: calc(100vw - (var(--uc-navigationbar-width)) - var(--uc-buttons-width) - var(--uc-window-drag-space-width)) } #nav-bar-customization-target{ margin-right: calc(100vw - (var(--uc-navigationbar-width)) - var(--uc-buttons-width) - var(--uc-window-drag-space-pre)) }
} }
#TabsToolbar > .toolbar-items{ #TabsToolbar > .toolbar-items{
@ -80,7 +80,7 @@ Window controls will be all wrong without it
} }
.titlebar-placeholder[type="post-tabs"], .titlebar-placeholder[type="post-tabs"],
.titlebar-spacer[type="post-tabs"]{ .titlebar-spacer[type="post-tabs"]{
width: calc(var(--uc-buttons-width) + var(--uc-window-drag-space-width)) !important; width: calc(var(--uc-buttons-width) + var(--uc-window-drag-space-post)) !important;
} }
#PanelUI-button,#nav-bar-overflow-button{ #PanelUI-button,#nav-bar-overflow-button{
margin: 0px !important; margin: 0px !important;

View file

@ -77,7 +77,7 @@ Window controls will be all wrong without it
/* Rules specific to window controls on right layout */ /* Rules specific to window controls on right layout */
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){
:root:not([inFullscreen]) #TabsToolbar-customization-target > .titlebar-spacer[type="pre-tabs"]{ :root:not([inFullscreen]) #TabsToolbar-customization-target > .titlebar-spacer[type="pre-tabs"]{
width: var(--uc-window-drag-space-width) !important; width: var(--uc-window-drag-space-post) !important;
display: -moz-box !important; display: -moz-box !important;
} }
#TabsToolbar > .titlebar-buttonbox-container{ display: -moz-box; } #TabsToolbar > .titlebar-buttonbox-container{ display: -moz-box; }

View file

@ -15,6 +15,9 @@ See the above repository for updates as well as full license text. */
--uc-menubar-height: 29px; --uc-menubar-height: 29px;
} }
/* Since menubar is statically at top, remove fake drag-space that might be set by window_control_placeholder_support.css */
#nav-bar{ border-inline-width: 0 }
#navigator-toolbox{ padding-top: calc(var(--uc-menubar-height) + var(--uc-titlebar-padding,0px)) !important } #navigator-toolbox{ padding-top: calc(var(--uc-menubar-height) + var(--uc-titlebar-padding,0px)) !important }
:root[sizemode="fullscreen"] #navigator-toolbox{ padding-top: 0px !important; } :root[sizemode="fullscreen"] #navigator-toolbox{ padding-top: 0px !important; }
#toolbar-menubar{ #toolbar-menubar{
@ -32,7 +35,7 @@ See the above repository for updates as well as full license text. */
#toolbar-menubar > spacer[flex]{ #toolbar-menubar > spacer[flex]{
order: 99; order: 99;
flex-grow: 1; flex-grow: 1;
min-width: var(--uc-window-drag-space-width,20px); min-width: var(--uc-window-drag-space-post,20px);
} }
#toolbar-menubar .titlebar-button{ padding: 2px 17px !important; } #toolbar-menubar .titlebar-button{ padding: 2px 17px !important; }

View file

@ -11,9 +11,30 @@ See the above repository for updates as well as full license text. */
/* Defaults for window controls on RIGHT side of the window */ /* Defaults for window controls on RIGHT side of the window */
/* Modify these values to match your preferences */ /* Modify these values to match your preferences */
:root[tabsintitlebar]{ :root[tabsintitlebar]{
--uc-window-control-width: 138px; /* Space reserved for window controls */ --uc-window-control-width: 138px; /* Space reserved for window controls (Win10) */
--uc-window-drag-space-width: 24px; /* Extra space reserved on both sides of the nav-bar to be able to drag the window */ /* Extra space reserved on both sides of the nav-bar to be able to drag the window */
--uc-window-drag-space-pre: 30px; /* left side*/
--uc-window-drag-space-post: 30px; /* right side*/
} }
:root[tabsintitlebar][sizemode="maximized"] {
--uc-window-drag-space-pre: 0px; /* Remove pre space */
}
@media (-moz-os-version: windows-win7), (-moz-os-version: windows-win8) {
:root[tabsintitlebar] {
--uc-window-control-width: 105px;
}
}
@media (-moz-gtk-csd-available) {
:root[tabsintitlebar] {
--uc-window-control-width: 84px;
}
}
/* macOS settings are further below */
:root[sizemode="fullscreen"] .titlebar-buttonbox-container{ display: none !important } :root[sizemode="fullscreen"] .titlebar-buttonbox-container{ display: none !important }
:root[sizemode="fullscreen"] #navigator-toolbox { position: relative; } :root[sizemode="fullscreen"] #navigator-toolbox { position: relative; }
:root[sizemode="fullscreen"] #window-controls{ :root[sizemode="fullscreen"] #window-controls{
@ -25,9 +46,9 @@ See the above repository for updates as well as full license text. */
} }
:root[uidensity="compact"][sizemode="fullscreen"] #window-controls{ height: 32px } :root[uidensity="compact"][sizemode="fullscreen"] #window-controls{ height: 32px }
#nav-bar{ #nav-bar{
border-inline: var(--uc-window-drag-space-width,0px) solid var(--toolbar-bgcolor); border-inline: var(--uc-window-drag-space-pre,0px) solid var(--toolbar-bgcolor);
border-inline-style: solid !important; border-inline-style: solid !important;
border-right-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px)); border-right-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px));
} }
/* Use this pref to check Mac OS where window controls are on left */ /* Use this pref to check Mac OS where window controls are on left */
@ -35,6 +56,6 @@ See the above repository for updates as well as full license text. */
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){
:root{ --uc-window-control-width: 72px; } :root{ --uc-window-control-width: 72px; }
:root[tabsintitlebar="true"]:not([inFullscreen]) #nav-bar{ :root[tabsintitlebar="true"]:not([inFullscreen]) #nav-bar{
border-inline-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px)) var(--uc-window-drag-space-width,0px) border-inline-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px)) var(--uc-window-drag-space-pre,0px)
} }
} }