Enhance ZenWelcome styling and functionality

- Add nowrap to welcome text for better layout
- Change button attribute to class for primary styling
- Update window centering logic to improve user experience
This commit is contained in:
mr. M
2025-02-17 13:19:54 +01:00
parent c857541666
commit 68a3096683
2 changed files with 14 additions and 8 deletions

View File

@@ -36,6 +36,7 @@
line-height: 1.1;
max-width: 50%;
font-weight: 500;
white-space: nowrap;
& > span {
display: block;

View File

@@ -225,7 +225,7 @@
});
document.querySelector('#zen-welcome-page-sidebar-buttons button').remove();
const newButton = document.querySelector('#zen-welcome-page-sidebar-buttons button');
newButton.setAttribute('primary', 'true');
newButton.classList.add('primary');
document.l10n.setAttributes(newButton, 'zen-welcome-next-action');
return false;
},
@@ -380,17 +380,22 @@
}
function centerWindowOnScreen() {
var xOffset = screen.availWidth / 2 - window.outerWidth / 2;
var yOffset = screen.availHeight / 2 - window.outerHeight / 2;
xOffset = xOffset > 0 ? xOffset : 0;
yOffset = yOffset > 0 ? yOffset : 0;
window.moveTo(xOffset, yOffset);
window.addEventListener(
'MozAfterPaint',
function () {
window.resizeTo(875, 560);
window.focus();
appWin.center(null, true, false);
const appWin = window.docShell.treeOwner.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIAppWindow);
appWin.rollupAllPopups();
},
{ once: true }
);
}
function startZenWelcome() {
centerWindowOnScreen();
clearBrowserElements();
centerWindowOnScreen();
initializeZenWelcome();
animateInitialStage();
}