From fc967120bf9bbc701b3da82640126800d421a632 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Mon, 6 Jul 2020 20:29:51 +0300 Subject: [PATCH] Use longer delay before autohide --- chrome/autohide_bookmarks_and_main_toolbars.css | 9 +++++++-- chrome/autohide_bookmarks_toolbar.css | 4 +++- chrome/autohide_sidebar.css | 5 +++-- chrome/autohide_toolbox.css | 8 +++++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/chrome/autohide_bookmarks_and_main_toolbars.css b/chrome/autohide_bookmarks_and_main_toolbars.css index 0b52cda..8e514cf 100644 --- a/chrome/autohide_bookmarks_and_main_toolbars.css +++ b/chrome/autohide_bookmarks_and_main_toolbars.css @@ -5,6 +5,7 @@ See the above repository for updates as well as full license text. */ --uc-bm-height: 22px; /* Might need to adjust if the toolbar has other buttons */ --uc-bm-padding: 2px; /* Vertical padding to be applied to bookmarks */ --uc-navbar-height: -40px; /* navbar is main toolbar. Use negative value */ + --uc-autohide-toolbar-delay: 600ms; /* The toolbar is hidden after 0.6s */ } :root[uidensity=compact] #navigator-toolbox{ --uc-bm-padding: 1px; --uc-navbar-height: -32px } @@ -14,10 +15,14 @@ See the above repository for updates as well as full license text. */ #PersonalToolbar:not([customizing]){ transform: rotateX(90deg); transform-origin: top; - transition: transform 135ms linear 600ms !important; + transition: transform 135ms linear var(--uc-autohide-toolbar-delay) !important; z-index: 2; } -#navigator-toolbox > #PersonalToolbar{ transform-origin: 0px var(--uc-navbar-height); z-index: 1 } +#navigator-toolbox > #PersonalToolbar{ + transform-origin: 0px var(--uc-navbar-height); + z-index: 1; + position: relative; +} :root[sessionrestored] #navigator-toolbox:not([customizing]){ margin-bottom: calc(2px - var(--uc-bm-height) - 2 * var(--uc-bm-padding) + var(--uc-navbar-height)); } diff --git a/chrome/autohide_bookmarks_toolbar.css b/chrome/autohide_bookmarks_toolbar.css index 08b3463..e00efd7 100644 --- a/chrome/autohide_bookmarks_toolbar.css +++ b/chrome/autohide_bookmarks_toolbar.css @@ -4,16 +4,18 @@ See the above repository for updates as well as full license text. */ #PersonalToolbar{ --uc-bm-height: 20px; /* Might need to adjust if the toolbar has other buttons */ --uc-bm-padding: 2px; /* Vertical padding to be applied to bookmarks */ + --uc-autohide-toolbar-delay: 600ms; /* The toolbar is hidden after 0.6s */ } :root[uidensity="compact"] #PersonalToolbar{ --uc-bm-padding: 1px } :root[uidensity="touch"] #PersonalToolbar{ --uc-bm-padding: 6px } #PersonalToolbar:not([customizing]){ + position: relative; margin-bottom: calc(0px - var(--uc-bm-height) - 2 * var(--uc-bm-padding)); transform: rotateX(90deg); transform-origin: top; - transition: transform 135ms linear 600ms !important; + transition: transform 135ms linear var(--uc-autohide-toolbar-delay) !important; z-index: 1; } diff --git a/chrome/autohide_sidebar.css b/chrome/autohide_sidebar.css index 0d17285..1168aeb 100644 --- a/chrome/autohide_sidebar.css +++ b/chrome/autohide_sidebar.css @@ -7,6 +7,7 @@ See the above repository for updates as well as full license text. */ #sidebar-box{ --uc-sidebar-width: 40px; --uc-sidebar-hover-width: 210px; + --uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */ position: relative; min-width: var(--uc-sidebar-width) !important; width: var(--uc-sidebar-width) !important; @@ -27,12 +28,12 @@ See the above repository for updates as well as full license text. */ #sidebar-header{ overflow: hidden; color: var(--chrome-color, inherit) !important} #sidebar{ - transition: min-width 115ms linear !important; + transition: min-width 115ms linear var(--uc-autohide-sidebar-delay) !important; min-width: var(--uc-sidebar-width) !important; will-change: min-width; } -#sidebar-box:hover > #sidebar{ min-width: var(--uc-sidebar-hover-width) !important; } +#sidebar-box:hover > #sidebar{ min-width: var(--uc-sidebar-hover-width) !important; transition-delay: 0ms !important } .sidebar-panel{ background-color: transparent !important; diff --git a/chrome/autohide_toolbox.css b/chrome/autohide_toolbox.css index 65e379f..22c46b8 100644 --- a/chrome/autohide_toolbox.css +++ b/chrome/autohide_toolbox.css @@ -6,6 +6,9 @@ See the above repository for updates as well as full license text. */ /* Compatibility options for hide_tabs_toolbar.css and tabs_on_bottom.css at the end of this file */ +:root{ + --uc-autohide-toolbox-delay: 200ms; /* Wait 0.1s before hiding toolbars */ +} @media (-moz-os-version: windows-win10){ @@ -30,13 +33,16 @@ See the above repository for updates as well as full license text. */ position: fixed !important; display: block; background-color: var(--lwt-accent-color,black) !important; - transition: transform 82ms 33ms linear, opacity 82ms 33ms linear !important; + transition: transform 82ms linear, opacity 82ms linear !important; + transition-delay: var(--uc-autohide-toolbox-delay) !important; transform-origin: top; line-height: 0; z-index: 1; pointer-events: none; } +#navigator-toolbox:hover{ transition-delay: 33ms !important } + #navigator-toolbox > *{ line-height: normal; pointer-events: auto } #navigator-toolbox,