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 bef746dc594ad974c91075cf3657c199f8f8830f..bb671341b6715c42df76f7298ba55e1fac73f33b 100644
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -424,10 +424,10 @@ var FullScreen = {
@@ -423,10 +423,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.

Copy link
Member

Choose a reason for hiding this comment

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

Has this check been done? Im not sure where that is

+ ? 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 @@ -709,6 +709,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 @@ -758,12 +767,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