Skip to content

Commit

Permalink
Fixed web aligment issues on certain occations and URL bar not showin…
Browse files Browse the repository at this point in the history
…g in compact mode right side
  • Loading branch information
mauro-balades committed Dec 17, 2024
1 parent 58b2ac9 commit 653875c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.git
.DS_Store
*.log
engine
4 changes: 2 additions & 2 deletions src/browser/base/content/ZenUIManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ var gZenVerticalTabsManager = {
let shouldHide = false;
if (((!isRightSide && this.isWindowsStyledButtons) || (isRightSide && !this.isWindowsStyledButtons)
|| (
isCompactMode && isSingleToolbar && this.isWindowsStyledButtons && !isRightSide
isCompactMode && isSingleToolbar && this.isWindowsStyledButtons
)) && isSingleToolbar) {
appContentNavbarContaienr.setAttribute('should-hide', 'true');
shouldHide = true;
Expand Down Expand Up @@ -415,7 +415,7 @@ var gZenVerticalTabsManager = {
}
}

if (shouldHide && !isCompactMode) {
if (shouldHide) {
appContentNavbarContaienr.append(windowButtons);
}

Expand Down
8 changes: 6 additions & 2 deletions src/browser/base/content/zen-styles/zen-compact-mode.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@

@media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') or (-moz-bool-pref: 'zen.view.use-single-toolbar') {
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
margin-left: calc(var(--zen-sidebar-web-panel-spacing) * 2) !important;
margin-left: var(--zen-sidebar-web-panel-spacing) !important;
}

#urlbar[open]

#zen-appcontent-wrapper {
margin-left: var(--zen-element-separation) !important;
}
Expand All @@ -34,7 +36,8 @@
&:not([animate='true']) {
position: absolute;
z-index: 10;
transition: transform 0.25s ease, opacity 0.1s ease-in-out;
transition: transform 0.25s ease, opacity 1s ease;
transform: translateX(0);
top: 0;
bottom: var(--zen-element-separation);
opacity: 0;
Expand Down Expand Up @@ -112,6 +115,7 @@
#mainPopupSet:has(> #appMenu-popup:hover) ~ toolbox,
#navigator-toolbox:has(.tabbrowser-tab:active),
#navigator-toolbox:has(*[open='true']:not(tab):not(.zen-compact-mode-ignore)) {
transition: transform 0.25s ease;
opacity: 1;

transform: translateX(calc(100% - var(--zen-element-separation) - 1px));
Expand Down
11 changes: 9 additions & 2 deletions src/browser/base/content/zen-styles/zen-sidebar-panels.css
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,18 @@
animation: better-sidebar-pinned-hide 0.15s ease-in-out forwards !important;
}

:root:not([zen-right-side='true']) {
#zen-sidebar-web-panel-wrapper:not(:has(#zen-sidebar-web-panel:is([hidden='true'], [pinned='true']))) {
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel:not(:is([hidden='true']))) {
:root:not([zen-right-side='true']) & {
margin-left: 0 !important;
margin-right: calc(var(--zen-element-separation) * 2 - 3px) !important;
}

@media (-moz-bool-pref: 'zen.view.compact') and (-moz-bool-pref: 'zen.view.compact.hide-tabbar') {
:root[zen-right-side='true'] & {
margin-left: 0 !important;
margin-right: calc(var(--zen-element-separation) * 2 - 3px) !important;
}
}
}

/** UNPINNED **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,13 @@

:root[zen-single-toolbar='true'] & {
margin-left: var(--zen-toolbox-padding);
width: calc(100% - var(--zen-toolbox-padding));
& #urlbar:not([breakout-extend='true']) .urlbar-input-container {
padding-left: 4px;
padding-right: 4px;
}

:root[zen-right-side='true'] & {
margin-left: 0;
margin-right: var(--zen-toolbox-padding);
}
}
}
Expand Down
12 changes: 8 additions & 4 deletions src/browser/base/content/zen-styles/zen-urlbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,17 @@ button.popup-notification-dropmarker {
margin-right: var(--urlbar-margin-inline);
}

:root[zen-right-side='true'] & {
right: 0;
}
position: absolute;

top: calc(var(--zen-toolbar-height) * 2) !important;
left: 28vw;

:root[zen-right-side='true'] & {
right: 28vw !important;
}

:root:not([zen-right-side='true']) & {
left: 28vw !important;
}

#urlbar-container:has(&) {
border-radius: 10px;
Expand Down

0 comments on commit 653875c

Please sign in to comment.