Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ diff --git a/browser/base/content/browser-fullScreenAndPointerLock.js b/browser/
index c61a424d3871d94e7086418c72ce22d5aef0a047..b6e3939b1ce67185acc3b9a66385869bd5490a39 100644
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -431,10 +431,10 @@ var FullScreen = {
@@ -426,10 +426,10 @@ var FullScreen = {
shiftSize = shiftSize.toFixed(2);
gNavToolbox.classList.toggle("fullscreen-with-menubar", shiftSize > 0);

let transform = shiftSize > 0 ? `translateY(${shiftSize}px)` : "";
- let transform = shiftSize > 0 ? `translateY(${shiftSize}px)` : "";
- gNavToolbox.style.transform = transform;
- gURLBar.textbox.style.transform = gURLBar.textbox.hasAttribute("breakout")
- ? transform
- : "";
+ //gNavToolbox.style.transform = transform;
+ //gURLBar.textbox.style.transform = gURLBar.textbox.hasAttribute("breakout")
+ // ? transform
+ // : "";
+ const padding = shiftSize > 0 ? `${shiftSize}px` : "";
+ const appContentNavbarWrapper = document.getElementById('zen-appcontent-navbar-wrapper');
+ appContentNavbarWrapper.style.paddingTop = gURLBar.textbox.hasAttribute("breakout")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoudnt we check if it's double toolbar as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I didn't consider that case, I'll do some tests and try to add it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if instead of this fullscreen we can just not hide it at all, like what chromium browsers do.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean like not showing the macOS title bar that shifts down at all? That could work, the window minimize, maximize and close buttons would be lost and should be moved to the toolbar though.
As it is, this fix takes the same solution that firefox did, but I agree the chromium way is more simple. I'll try experimenting to see if I can replicate it.

+ ? padding
: "";
if (shiftSize > 0) {
// If the mouse tracking missed our fullScreenToggler, then the toolbox
// might not have been shown before the menubar is animated down. Make
29 changes: 23 additions & 6 deletions src/zen/compact-mode/ZenCompactMode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,15 @@ var gZenCompactModeManager = {
if (event.target.matches(':hover')) {
return;
}
if (AppConstants.platform == 'macosx' && FullScreen._currentToolbarShift > 0) {
this.flashElement(
target,
this.hideAfterHoverDuration,
'has-hover' + target.id,
'zen-has-hover'
);
return;
}

if (
event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') ||
Expand Down Expand Up @@ -624,12 +633,20 @@ var gZenCompactModeManager = {
}
window.cancelAnimationFrame(this._removeHoverFrames[target.id]);

this.flashElement(
target,
this.hideAfterHoverDuration,
'has-hover' + target.id,
'zen-has-hover'
);
if (
AppConstants.platform == 'macosx' &&
window.fullScreen &&
entry.screenEdge === 'top'
) {
target.setAttribute('zen-has-hover', 'true');
} else {
this.flashElement(
target,
this.hideAfterHoverDuration,
'has-hover' + target.id,
'zen-has-hover'
);
}
document.addEventListener(
'mousemove',
() => {
Expand Down
2 changes: 1 addition & 1 deletion src/zen/compact-mode/zen-compact-mode.css
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
top: calc(-1 * var(--zen-toolbar-height) + 1px);
left: 0;
z-index: 20;
transition: all 0.15s ease;
transition: all 0.15s ease, padding 0s;
width: 100%;

max-height: var(--zen-toolbar-height);
Expand Down