From 5d18237e62ec3407df89ab5ba811c79dee084db2 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Fri, 11 Dec 2020 09:55:00 +0200 Subject: [PATCH] Add off-by-default way to show toolbars if mainpopupset is hovered --- .../autohide_bookmarks_and_main_toolbars.css | 13 ++++++++--- chrome/autohide_toolbox.css | 23 ++++++++++++------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/chrome/autohide_bookmarks_and_main_toolbars.css b/chrome/autohide_bookmarks_and_main_toolbars.css index 144581f..0c8c8b4 100644 --- a/chrome/autohide_bookmarks_and_main_toolbars.css +++ b/chrome/autohide_bookmarks_and_main_toolbars.css @@ -41,7 +41,7 @@ See the above repository for updates as well as full license text. */ #navigator-toolbox > *{ pointer-events: auto } /* SELECT TOOLBAR BEHAVIOR */ -/* Comment out or delete either one of these to disable that behavior */ +/* Comment out or delete one of these to disable that behavior */ /* Show when urlbar is focused */ #nav-bar:focus-within + #PersonalToolbar, @@ -51,12 +51,19 @@ See the above repository for updates as well as full license text. */ } /* Show when cursor is over the toolbar area */ -#navigator-toolbox:hover > #PersonalToolbar, -#navigator-toolbox:hover > #nav-bar{ +#navigator-toolbox:hover > .browser-toolbar{ transition-delay: 100ms !important; transform: rotateX(0); } +/* Show when cursor is over popups/context-menus - cannot control which ones */ +/* +#mainPopupSet:hover ~ box > toolbox > .browser-toolbar{ + transition-delay: 100ms !important; + transform: rotateX(0); +} +*/ + /* Uncomment to enable compatibility for multi-row_bookmarks.css */ /* This would break buttons placed in the toolbar but that is likely not happening if you are using multi-row setup */ /* diff --git a/chrome/autohide_toolbox.css b/chrome/autohide_toolbox.css index 36a5c34..0d95883 100644 --- a/chrome/autohide_toolbox.css +++ b/chrome/autohide_toolbox.css @@ -8,6 +8,11 @@ See the above repository for updates as well as full license text. */ :root{ --uc-autohide-toolbox-delay: 200ms; /* Wait 0.1s before hiding toolbars */ + --uc-toolbox-rotation: 82deg; /* This may need to be lower on mac - like 75 or so */ +} + +:root[sizemode="maximized"]{ + --uc-toolbox-rotation: 89deg; } @media (-moz-os-version: windows-win10){ @@ -36,12 +41,21 @@ See the above repository for updates as well as full license text. */ transition: transform 82ms linear, opacity 82ms linear !important; transition-delay: var(--uc-autohide-toolbox-delay) !important; transform-origin: top; + transform: rotateX(var(--uc-toolbox-rotation)); + opacity: 0; line-height: 0; z-index: 1; pointer-events: none; } -#navigator-toolbox:-moz-any(:hover,:focus-within){ transition-delay: 33ms !important } +/* #mainPopupSet:hover ~ box > toolbox, */ +/* Uncomment the above line to make toolbar visible if some popup is hovered */ +#navigator-toolbox:hover, +#navigator-toolbox:focus-within{ + transition-delay: 33ms !important; + transform: rotateX(0); + opacity: 1; +} #navigator-toolbox > *{ line-height: normal; pointer-events: auto } @@ -55,13 +69,6 @@ See the above repository for updates as well as full license text. */ #nav-bar{ width: var(--uc-navigationbar-width,100vw) } #TabsToolbar{ width: calc(100vw - var(--uc-navigationbar-width,0px)) } -#navigator-toolbox:not(:focus-within):not(:hover){ - transform: rotateX(82deg); /* This may need to be lower in osx - like 75 or so */ - opacity: 0; -} - -:root[sizemode="maximized"] #navigator-toolbox:not(:focus-within):not(:hover){ transform: rotateX(89deg) } - /* Don't apply transform before window has been fully created */ :root:not([sessionrestored]) #navigator-toolbox{ transform:none !important }