Skip to content

Commit

Permalink
Fix: Autohide - Transition delay #871
Browse files Browse the repository at this point in the history
  • Loading branch information
black7375 committed Mar 2, 2024
1 parent ff92ab0 commit e0b9f19
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 28 deletions.
46 changes: 38 additions & 8 deletions css/leptonChrome.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 20 additions & 4 deletions css/leptonChromeESR.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 22 additions & 7 deletions src/autohide/_toolbar_overlap.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
@import "../decoration/animate_common";

#navigator-toolbox {
--uc-toolbar-hide-height: calc(-1 * var(--uc-toolbar-height, 0));
margin-bottom: var(--uc-toolbar-hide-height) !important;

@include Animate {
@include Option("userChrome.decoration.animate") {
transition: margin-top 1s ease,
margin-bottom var(--uc-autohide-toolbar-speed) var(--animation-easing-function) var(--uc-autohide-toolbar-delay);

will-change: margin-top, margin-bottom, background-color !important;
transition: $toolbox-transition-margin-top,
$toolbox-transition-margin-bottom,
$toolbox-transition-background-color !important;
&:-moz-window-inactive {
transition: $toolbox-transition-margin-top,
$toolbox-transition-margin-bottom,
$toolbox-transition-background-color-inactive !important;
}
&:is(:hover, :focus-within) {
transition-delay: 0s !important;
transition-delay: 0s, 0s, 0.2s !important;
}

&[inFullscreen="true"] {
transition: margin-top 1.3s var(--animation-easing-function) 50ms,
margin-bottom var(--uc-autohide-toolbar-speed) var(--animation-easing-function) var(--uc-autohide-toolbar-delay);
transition: $toolbox-transition-margin-top-fullscreen,
$toolbox-transition-margin-bottom,
$toolbox-transition-background-color !important;
&:-moz-window-inactive {
transition: $toolbox-transition-margin-top-fullscreen,
$toolbox-transition-margin-bottom,
$toolbox-transition-background-color-inactive !important;
}
}
}
@include NotOption("userChrome.decoration.animate") {
transition: margin-bottom var(--uc-autohide-toolbar-speed) var(--animation-easing-function) var(--uc-autohide-toolbar-delay);
transition: $toolbox-transition-margin-bottom,
$toolbox-transition-background-color !important;

&:is(:hover, :focus-within) {
transition-delay: 0s !important;
Expand Down
20 changes: 11 additions & 9 deletions src/decoration/_animate.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*- Background Color -------------------------------------------------------*/
@import "./animate_common";

//-- Mixin ---------------------------------------------------------------------
@mixin _animate_bgColor($duration, $presudo: "") {
button#{$presudo},
Expand Down Expand Up @@ -127,7 +129,7 @@ xul|search-textbox.tabsFilter,
/*- Titlebar & Full Screen -------------------------------------------------*/
#titlebar {
will-change: background-color !important;
transition: background-color 0.2s var(--animation-easing-function) !important;
transition: $toolbox-transition-background-color !important;

&:-moz-window-inactive {
transition: background-color 0.5s var(--animation-easing-function) !important;
Expand All @@ -136,13 +138,13 @@ xul|search-textbox.tabsFilter,
#navigator-toolbox {
/* Full screen out */
will-change: margin-top, background-color !important;
transition: margin-top 1s ease,
background-color 0.2s var(--animation-easing-function) !important;
transition: $toolbox-transition-margin-top,
$toolbox-transition-background-color !important;
transform-origin: top;

&:-moz-window-inactive {
transition: margin-top 1s ease,
background-color 0.5s var(--animation-easing-function) !important;
transition: $toolbox-transition-margin-top,
$toolbox-transition-background-color-inactive !important;
}

&[inFullscreen="true"] {
Expand All @@ -153,11 +155,11 @@ xul|search-textbox.tabsFilter,

/* Full screen navbar not hover */
// transition: margin-top 0.3s var(--animation-easing-function) 50ms;
transition: margin-top 1.3s var(--animation-easing-function) 50ms,
background-color 0.2s var(--animation-easing-function) !important;
transition: $toolbox-transition-margin-top-fullscreen,
$toolbox-transition-background-color !important;
&:-moz-window-inactive {
transition: margin-top 1.3s var(--animation-easing-function) 50ms,
background-color 0.5s var(--animation-easing-function) !important;
transition: $toolbox-transition-margin-top-fullscreen,
$toolbox-transition-background-color-inactive !important;
}

&:hover {
Expand Down
5 changes: 5 additions & 0 deletions src/decoration/_animate_common.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$toolbox-transition-margin-top: margin-top 1s ease;
$toolbox-transition-margin-top-fullscreen: margin-top 1.3s var(--animation-easing-function) 50ms;
$toolbox-transition-margin-bottom: margin-bottom var(--uc-autohide-toolbar-speed) var(--animation-easing-function) var(--uc-autohide-toolbar-delay);
$toolbox-transition-background-color: background-color 0.2s var(--animation-easing-function);
$toolbox-transition-background-color-inactive: background-color 0.5s var(--animation-easing-function);

0 comments on commit e0b9f19

Please sign in to comment.