Add: Auto Hide - Tab Bar

This commit is contained in:
alstjr7375 2022-07-18 02:59:27 +09:00
parent bf6f69ceae
commit d7e56da00d
4 changed files with 114 additions and 1 deletions

View file

@ -5455,6 +5455,54 @@
z-index: 2; z-index: 2;
} }
} }
@supports -moz-bool-pref("userChrome.autohide.tabbar") {
:root:not([customizing]) #navigator-toolbox {
position: relative;
z-index: 1;
}
#navigator-toolbox:not(:hover) > #titlebar {
-moz-window-dragging: no-drag !important;
pointer-events: none;
}
:root:not([customizing]) #navigator-toolbox:hover,
:root:not([customizing]) #titlebar {
margin-bottom: calc(0px - 2 * var(--tab-block-margin) - var(--tab-min-height));
}
#TabsToolbar:not([customizing]) {
opacity: 0;
}
#navigator-toolbox:hover > #titlebar {
margin-bottom: 0px;
}
#navigator-toolbox:hover #TabsToolbar {
opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
#navigator-toolbox,
#titlebar {
transition: margin-bottom 0.25s var(--animation-easing-function) 600ms;
}
#TabsToolbar:not([customizing]) {
transition: opacity 0.25s var(--animation-easing-function) 600ms;
}
#navigator-toolbox:hover {
transition-delay: 0s;
}
#navigator-toolbox:hover > #titlebar {
transition-delay: 0s;
}
#navigator-toolbox:hover #TabsToolbar {
transition-delay: 0s;
}
}
}
@supports -moz-bool-pref("userChrome.autohide.navbar") { @supports -moz-bool-pref("userChrome.autohide.navbar") {
:root[sessionrestored] :where(#nav-bar, #PersonalToolbar, #tab-notification-deck, .global-notificationbox) { :root[sessionrestored] :where(#nav-bar, #PersonalToolbar, #tab-notification-deck, .global-notificationbox) {
transform: translateY(var(--uc-navbar-hide-height)); transform: translateY(var(--uc-navbar-hide-height));

View file

@ -3,6 +3,9 @@
} }
@import "common"; @import "common";
@include Option("userChrome.autohide.tabbar") {
@import "tabbar";
}
@include Option("userChrome.autohide.navbar") { @include Option("userChrome.autohide.navbar") {
@import "navbar"; @import "navbar";
} }

61
src/autohide/_tabbar.scss Normal file
View file

@ -0,0 +1,61 @@
:root:not([customizing]) #navigator-toolbox {
position: relative;
z-index: 1;
}
#navigator-toolbox:not(:hover) > #titlebar {
-moz-window-dragging: no-drag !important;
pointer-events: none
}
:root:not([customizing]) #navigator-toolbox:hover,
:root:not([customizing]) #titlebar {
margin-bottom: calc(0px - 2 * var(--tab-block-margin) - var(--tab-min-height));
}
#TabsToolbar:not([customizing]) {
opacity: 0;
}
#navigator-toolbox:hover {
> #titlebar {
margin-bottom: 0px;
}
#TabsToolbar {
opacity: 1;
}
}
@include Animate {
#navigator-toolbox,
#titlebar {
transition: margin-bottom 0.25s var(--animation-easing-function) 600ms;
}
#TabsToolbar:not([customizing]) {
transition: opacity 0.25s var(--animation-easing-function) 600ms;
}
#navigator-toolbox:hover {
transition-delay: 0s;
> #titlebar {
transition-delay: 0s;
}
#TabsToolbar {
transition-delay: 0s;
}
}
}
// /* These rules make sure that height of tabs toolbar doesn't exceed tab-min-height */
// #tabbrowser-tabs:not([secondarytext-unsupported]) .tab-label-container{
// max-height: var(--tab-min-height);
// }
// .tab-label {
// line-height: 20px !important;
// }
// :root[uidensity="compact"] .tab-label {
// line-height: 18px !important;
// }

View file

@ -70,8 +70,9 @@ user_pref("userChrome.tab.bottom_rounded_corner", true);
// user_pref("userChrome.theme.proton_color.dark_blue_accent", true); // user_pref("userChrome.theme.proton_color.dark_blue_accent", true);
// user_pref("userChrome.autohide.bookmarkbar", true); // user_pref("userChrome.autohide.tabbar", true);
// user_pref("userChrome.autohide.navbar", true); // user_pref("userChrome.autohide.navbar", true);
// user_pref("userChrome.autohide.bookmarkbar", true);
// user_pref("userChrome.autohide.sidebar", true); // user_pref("userChrome.autohide.sidebar", true);
// user_pref("userChrome.autohide.forward_button", true); // user_pref("userChrome.autohide.forward_button", true);