From 8b4d97c09f2cf76332249be590bd840d0fa7b0dc Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 9 Feb 2019 12:45:52 +0200 Subject: [PATCH] Combine window placeholder support sheets --- chrome/Fx65_tabs_on_bottom.css | 10 ++-------- chrome/hide_tabs_toolbar.css | 7 +------ chrome/hide_tabs_with_one_tab.css | 3 ++- .../hide_tabs_with_one_tab_w_window_controls.css | 7 +------ chrome/navbar_tabs_oneliner.css | 7 +++++++ .../navbar_tabs_oneliner_menu_buttons_on_right.css | 9 ++------- chrome/navbar_tabs_oneliner_tabs_on_left.css | 11 +++-------- chrome/tabs_below_content.css | 8 ++------ chrome/window_control_placeholder_support.css | 14 ++++++++++++-- chrome/window_control_placeholder_support_mac.css | 13 ------------- 10 files changed, 32 insertions(+), 57 deletions(-) delete mode 100644 chrome/window_control_placeholder_support_mac.css diff --git a/chrome/Fx65_tabs_on_bottom.css b/chrome/Fx65_tabs_on_bottom.css index e52f6a1..86b146a 100644 --- a/chrome/Fx65_tabs_on_bottom.css +++ b/chrome/Fx65_tabs_on_bottom.css @@ -1,24 +1,18 @@ /* Modify to change window drag space width */ /* -Use Fx65_tabs_on_bottom_menubar_on_top_patch if you +Use Fx65_tabs_on_bottom_menubar_on_top_patch.css if you have menubar permanently enabled and want it on top */ /* IMPORTANT */ /* -Get EITHER -window_control_placeholder_support.css -OR -window_control_placeholder_support_mac.css - +Get window_control_placeholder_support.css Window controls will be all wrong without it - */ :root{ --uc-titlebar-padding: 0px; } :root[sizemode="maximized"][tabsintitlebar]{ --uc-titlebar-padding: 8px } -:root[tabsintitlebar="true"] #nav-bar{ --window-drag-space-width: 24px; } .titlebar-buttonbox-container{ position: fixed; diff --git a/chrome/hide_tabs_toolbar.css b/chrome/hide_tabs_toolbar.css index fd01d9f..43aac46 100644 --- a/chrome/hide_tabs_toolbar.css +++ b/chrome/hide_tabs_toolbar.css @@ -2,13 +2,8 @@ /* IMPORTANT */ /* -Get EITHER -window_control_placeholder_support.css -OR -window_control_placeholder_support_mac.css - +Get window_control_placeholder_support.css Window controls will be all wrong without it - */ :root{ --uc-toolbar-height: 32px; } diff --git a/chrome/hide_tabs_with_one_tab.css b/chrome/hide_tabs_with_one_tab.css index ed7dd89..2e3f574 100644 --- a/chrome/hide_tabs_with_one_tab.css +++ b/chrome/hide_tabs_with_one_tab.css @@ -1,6 +1,7 @@ /* Makes tabs toolbar items zero-height initially and sets enlarge them to fill up space equal to tab-min-height set on tabs */ /* Firefox 65+ only */ -/* !!USER!! - REMOVE ALL BUTTONS you can from the tabs toolbar */ + +/* REMOVE ALL BUTTONS you can from the tabs toolbar or this won't work properly */ :root[sizemode="normal"] #nav-bar{ --uc-window-drag-space-width: 20px } diff --git a/chrome/hide_tabs_with_one_tab_w_window_controls.css b/chrome/hide_tabs_with_one_tab_w_window_controls.css index d8ea174..210ec36 100644 --- a/chrome/hide_tabs_with_one_tab_w_window_controls.css +++ b/chrome/hide_tabs_with_one_tab_w_window_controls.css @@ -4,13 +4,8 @@ /* IMPORTANT */ /* -Get EITHER -window_control_placeholder_support.css -OR -window_control_placeholder_support_mac.css - +Get window_control_placeholder_support.css Window controls will be all wrong without it - */ #titlebar{ -moz-appearance: none !important; } diff --git a/chrome/navbar_tabs_oneliner.css b/chrome/navbar_tabs_oneliner.css index c7432e4..93323a0 100644 --- a/chrome/navbar_tabs_oneliner.css +++ b/chrome/navbar_tabs_oneliner.css @@ -1,5 +1,12 @@ /*Make tabs and navbar appear side-by-side tabs on right */ +/* IMPORTANT */ +/* +Get window_control_placeholder_support.css +Window controls will be all wrong without it +*/ + + /* Modify these to change relative widths or default height */ #navigator-toolbox{ --uc-navigationbar-width: 40vw; diff --git a/chrome/navbar_tabs_oneliner_menu_buttons_on_right.css b/chrome/navbar_tabs_oneliner_menu_buttons_on_right.css index 02cf489..c21450f 100644 --- a/chrome/navbar_tabs_oneliner_menu_buttons_on_right.css +++ b/chrome/navbar_tabs_oneliner_menu_buttons_on_right.css @@ -2,13 +2,8 @@ /* IMPORTANT */ /* -Get EITHER -window_control_placeholder_support.css -OR -window_control_placeholder_support_mac.css - +Get window_control_placeholder_support.css Window controls will be all wrong without it - */ /* Modify these to change relative widths or default height */ @@ -45,7 +40,7 @@ Window controls will be all wrong without it #nav-bar-customization-target{ margin-right: calc(100vw - (var(--uc-navigationbar-width)) - var(--uc-buttons-width) - var(--uc-window-drag-space-width)) } } -#TabsToolbar > :not(hbox){ position: relative !important; z-index: 2 } +#TabsToolbar > .toolbar-items{ position: relative !important; z-index: 2 } .titlebar-placeholder[type="post-tabs"], .titlebar-spacer[type="post-tabs"]{ width: calc(var(--uc-buttons-width) + var(--uc-window-drag-space-width)) !important; diff --git a/chrome/navbar_tabs_oneliner_tabs_on_left.css b/chrome/navbar_tabs_oneliner_tabs_on_left.css index 4fcab57..2790841 100644 --- a/chrome/navbar_tabs_oneliner_tabs_on_left.css +++ b/chrome/navbar_tabs_oneliner_tabs_on_left.css @@ -2,13 +2,8 @@ /* IMPORTANT */ /* -Get EITHER -window_control_placeholder_support.css -OR -window_control_placeholder_support_mac.css - +Get window_control_placeholder_support.css Window controls will be all wrong without it - */ /* Modify these to change relative widths or default height */ @@ -17,7 +12,7 @@ Window controls will be all wrong without it --uc-toolbar-height: 40px; } /* Override for other densities */ -:root[uidensity="compact"] > #navigator-toolbox{ --uc-toolbar-height: 31px;} +:root[uidensity="compact"] > #navigator-toolbox{ --uc-toolbar-height: 32px;} :root[uidensity="touch"] > #navigator-toolbox{ --uc-toolbar-height: 40px; } /* prevent urlbar overflow on narrow windows */ @@ -27,7 +22,7 @@ Window controls will be all wrong without it } #toolbar-menubar{ height: initial !important; } -#toolbar-menubar[inactive] > #menubar-items{ opacity: 0; pointer-events: none; } +#toolbar-menubar[inactive] > :not(.titlebar-buttonbox-container){ opacity: 0; pointer-events: none; } #toolbar-menubar[inactive]{ margin-bottom: calc(0px - var(--uc-toolbar-height)) } #TabsToolbar > .titlebar-buttonbox-container, diff --git a/chrome/tabs_below_content.css b/chrome/tabs_below_content.css index 5b57b12..9f161c5 100644 --- a/chrome/tabs_below_content.css +++ b/chrome/tabs_below_content.css @@ -1,12 +1,8 @@ + /* IMPORTANT */ /* -Get EITHER -window_control_placeholder_support.css -OR -window_control_placeholder_support_mac.css - +Get window_control_placeholder_support.css Window controls will be all wrong without it - */ .titlebar-buttonbox-container{ diff --git a/chrome/window_control_placeholder_support.css b/chrome/window_control_placeholder_support.css index 3ec0b62..2ac2856 100644 --- a/chrome/window_control_placeholder_support.css +++ b/chrome/window_control_placeholder_support.css @@ -1,7 +1,7 @@ /* Creates placeholders for window controls */ -/* For window controls on RIGHT side of the window */ /* This is a supporting file used by other stylesheets */ +/* Defaults for window controls on RIGHT side of the window */ :root{ --uc-window-control-width: 138px; --uc-window-drag-space-width: 24px; @@ -9,5 +9,15 @@ :root[tabsintitlebar="true"]:not([inFullscreen]) #nav-bar{ padding-right: calc(var(--uc-window-control-width) + var(--uc-window-drag-space-width,0px)); - padding-left: var(--window-drag-space-width); + padding-left: var(--uc-window-drag-space-width); +} + +/* Use this pref to check Mac OS where window controls are on left */ +/* This pref defaults to true on Mac and doesn't actually do anything on other platforms. So if your system has window controls on LEFT side you can set the pref to true */ +@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){ + :root{ --uc-window-control-width: 72px; } + :root[tabsintitlebar="true"]:not([inFullscreen]) #nav-bar{ + padding-left: calc(var(--uc-window-control-width) + var(--uc-window-drag-space-width,0px)); + padding-right: var(--uc-window-drag-space-width); + } } \ No newline at end of file diff --git a/chrome/window_control_placeholder_support_mac.css b/chrome/window_control_placeholder_support_mac.css deleted file mode 100644 index ccc0221..0000000 --- a/chrome/window_control_placeholder_support_mac.css +++ /dev/null @@ -1,13 +0,0 @@ -/* Creates placeholders for window controls */ -/* For window controls on LEFT side of the window */ -/* This is a supporting file used by other stylesheets */ - -:root{ - --uc-window-control-width: 72px; - --uc-window-drag-space-width: 24px; -} - -:root[tabsintitlebar="true"]:not([inFullscreen]) #nav-bar{ - padding-left: calc(var(--uc-window-control-width) + var(--uc-window-drag-space-width,0px)); - padding-right: var(--window-drag-space-width); -} \ No newline at end of file