Changed default theme and fixed import settings panel

This commit is contained in:
mauro-balades
2024-04-07 18:48:23 +02:00
parent 574e88c6a4
commit 46f9822dd4
12 changed files with 166 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css
index 8a2a20280954eb9db144a723f477e7afc603fda3..35a3b6e9d8b7bab6bf6e6e3f6000b5c007163aa5 100644
index 8a2a20280954eb9db144a723f477e7afc603fda3..a3b93a2e49c28a12b9bdc00ff290d768bba9e88b 100644
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -2,6 +2,8 @@
@@ -11,7 +11,17 @@ index 8a2a20280954eb9db144a723f477e7afc603fda3..35a3b6e9d8b7bab6bf6e6e3f6000b5c0
@namespace html url("http://www.w3.org/1999/xhtml");
:root,
@@ -1319,13 +1321,13 @@ printpreview-pagination:focus-within,
@@ -156,8 +158,7 @@ panelview:not([visible]) {
flex: 100 100;
max-width: 225px;
min-width: var(--tab-min-width);
- transition: min-width 100ms ease-out,
- max-width 100ms ease-out;
+ transition: 100ms;
}
:root[uidensity=touch] .tabbrowser-tab:not([pinned]) {
@@ -1319,13 +1320,13 @@ printpreview-pagination:focus-within,
#sidebar-box {
@@ -28,7 +38,7 @@ index 8a2a20280954eb9db144a723f477e7afc603fda3..35a3b6e9d8b7bab6bf6e6e3f6000b5c0
list-style-image: var(--webextension-menuitem-image, inherit);
-moz-context-properties: fill;
fill: currentColor;
@@ -1526,3 +1528,42 @@ toolbar[keyNav=true]:not([collapsed=true], [customizing=true]) toolbartabstop {
@@ -1526,3 +1527,42 @@ toolbar[keyNav=true]:not([collapsed=true], [customizing=true]) toolbartabstop {
/**
* End Dialogs
*/
@@ -65,7 +75,7 @@ index 8a2a20280954eb9db144a723f477e7afc603fda3..35a3b6e9d8b7bab6bf6e6e3f6000b5c0
+}
+
+#window-modal-dialog[zen-dialog-welcome-element="true"] {
+ --zen-welcome-dialog-space: 8px;
+ --zen-welcome-dialog-space: 7px;
+ margin: 0 auto !important;
+ max-width: calc(100% - calc(var(--zen-welcome-dialog-space) * 2)) !important;
+ max-height: calc(100% - calc(var(--zen-welcome-dialog-space) * 2)) !important;

View File

@@ -60,7 +60,8 @@ var ZenProfileDialogUI = {
createProfileWizard() {
// This should be rewritten in HTML eventually.
window.browsingContext.topChromeWindow.gDialogBox.open(
// TODO: it could be `window.browsingContext.topChromeWindow.gDialogBox.open` but it does not work with the callback?
window.browsingContext.topChromeWindow.openDialog(
"chrome://mozapps/content/profile/createProfileWizard.xhtml",
"",
"centerscreen,chrome,modal,titlebar",

View File

@@ -1,7 +1,16 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index d748b93a92455f6349b8199d2f27381f53fee01d..922822260abcb9ab6344db91730de620c7320888 100644
index d748b93a92455f6349b8199d2f27381f53fee01d..10aea4cb79f77341c1a125bb1b3750a81794679c 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -25,7 +25,7 @@ ChromeUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () {
return Services.strings.createBundle(kUrl);
});
-const kDefaultThemeID = "default-theme@mozilla.org";
+const kDefaultThemeID = "firefox-alpenglow@mozilla.org";
const kSpecialWidgetPfx = "customizableui-special-";
@@ -249,14 +249,12 @@ var CustomizableUIInternal = {
Services.policies.isAllowed("removeHomeButtonByDefault")
? null

View File

@@ -0,0 +1,38 @@
diff --git a/browser/components/migration/MigrationUtils.sys.mjs b/browser/components/migration/MigrationUtils.sys.mjs
index 000b471ee6c93815dde61127b8974774d0abafb1..32ba8d40bab5e609fc76dfe97a952d5a7a300a71 100644
--- a/browser/components/migration/MigrationUtils.sys.mjs
+++ b/browser/components/migration/MigrationUtils.sys.mjs
@@ -576,12 +576,15 @@ class MigrationUtils {
* True if the source selection page of the wizard should be skipped.
* @param {string} [aOptions.profileId]
* An identifier for the profile to use when migrating.
+ * @param {boolean} [aOptions.zenBlocking=false]
+ * True if the migration wizard should block the main thread.
* @returns {Promise<undefined>}
* If an about:preferences tab can be opened, this will resolve when
* that tab has been switched to. Otherwise, this will resolve
* just after opening the top-level dialog window.
*/
showMigrationWizard(aOpener, aOptions) {
+ let zenShouldBlock = aOptions.zenBlocking || false;
// When migration is kicked off from about:welcome, there are
// a few different behaviors that we want to test, controlled
// by a preference that is instrumented for Nimbus. The pref
@@ -648,7 +651,7 @@ class MigrationUtils {
if (aboutWelcomeBehavior == "autoclose") {
return aOpener.openPreferences("general-migrate-autoclose");
} else if (aboutWelcomeBehavior == "standalone") {
- openStandaloneWindow(false /* blocking */);
+ openStandaloneWindow(zenShouldBlock /* blocking */);
return Promise.resolve();
}
}
@@ -657,7 +660,7 @@ class MigrationUtils {
// If somehow we failed to open about:preferences, fall back to opening
// the top-level window.
- openStandaloneWindow(false /* blocking */);
+ openStandaloneWindow(zenShouldBlock /* blocking */);
return Promise.resolve();
}

View File

@@ -88,10 +88,6 @@ p {
margin-bottom: 30px;
}
button {
transform: scale(1.3);
}
.icon {
-moz-context-properties: fill;
fill: currentColor;
@@ -123,7 +119,7 @@ input[type='checkbox'] {
}
#importNext {
margin-left: 30px;
margin-left: 40px;
color: var(--in-content-primary-button-background);
}
@@ -171,3 +167,6 @@ input[type='checkbox'] {
.page:not([hidden="true"]) > *:nth-child(4) { animation-delay: 0.3s; }
.page:not([hidden="true"]) > *:nth-child(5) { animation-delay: 0.4s; }
.card h3 {
margin-top: 10px;
}

View File

@@ -229,11 +229,10 @@ class Import extends Page {
super(id)
const importButton = document.getElementById('importBrowser')
importButton.addEventListener('click', () => {
MigrationUtils.showMigrationWizard(window, [
MigrationUtils.MIGRATION_ENTRYPOINT_NEWTAB,
null,
])
importButton.addEventListener('click', async () => {
MigrationUtils.showMigrationWizard(window, {
zenBlocking: true,
});
this.nextEl.click()
})
}

View File

@@ -1,7 +1,16 @@
diff --git a/browser/themes/BuiltInThemes.sys.mjs b/browser/themes/BuiltInThemes.sys.mjs
index c2d5dd7a18895ae8b4afbf386f122e7899c48cda..5d0f907acf0162735359747a1c6d529e52fa2590 100644
index c2d5dd7a18895ae8b4afbf386f122e7899c48cda..2cb61e00cea76049ae71d791bf78d958f0093b7c 100644
--- a/browser/themes/BuiltInThemes.sys.mjs
+++ b/browser/themes/BuiltInThemes.sys.mjs
@@ -74,7 +74,7 @@ class _BuiltInThemes {
maybeInstallActiveBuiltInTheme() {
const activeThemeID = Services.prefs.getStringPref(
kActiveThemePref,
- "default-theme@mozilla.org"
+ "firefox-alpenglow@mozilla.org"
);
let activeBuiltInTheme = this.builtInThemeMap.get(activeThemeID);
@@ -82,7 +82,7 @@ class _BuiltInThemes {
lazy.AddonManager.maybeInstallBuiltinAddon(
activeThemeID,
@@ -11,3 +20,12 @@ index c2d5dd7a18895ae8b4afbf386f122e7899c48cda..5d0f907acf0162735359747a1c6d529e
);
}
}
@@ -166,7 +166,7 @@ class _BuiltInThemes {
async _uninstallExpiredThemes() {
const activeThemeID = Services.prefs.getStringPref(
kActiveThemePref,
- "default-theme@mozilla.org"
+ "firefox-alpenglow@mozilla.org"
);
const now = new Date();
const expiredThemes = Array.from(this.builtInThemeMap.entries()).filter(

View File

@@ -183,18 +183,47 @@ toolbarbutton#scrollbutton-up {
border: 2px solid transparent;
padding: 0 !important;
align-items: center;
transition: .1s;
animation: zen-slide-in 0.2s ease-in-out;
}
.tab-stack {
width: 30px;
height: 30px;
width: 30px !important;
height: 30px !important;
min-width: 30px !important;
min-height: 30px !important;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
@keyframes zen-slide-in {
from {
transform: translateX(-10px);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
.tabbrowser-tab[collapsed="true"] {
display: block !important;
animation: zen-slide-out 0.2s ease-in-out;
}
@keyframes zen-slide-out {
from {
transform: translateX(0);
opacity: 1;
}
to {
transform: translateX(-10px);
opacity: 0;
}
}
.tabbrowser-tab:is([multiselected="true"], [selected]) {
border-color: var(--color-accent-primary);
}

View File

@@ -0,0 +1,13 @@
diff --git a/toolkit/mozapps/extensions/internal/AddonSettings.sys.mjs b/toolkit/mozapps/extensions/internal/AddonSettings.sys.mjs
index 09bb0adc97170edb414d8da91c61ec2232aa64c6..26a2d92ea0b8dbd4dccde5f341649df057029abe 100644
--- a/toolkit/mozapps/extensions/internal/AddonSettings.sys.mjs
+++ b/toolkit/mozapps/extensions/internal/AddonSettings.sys.mjs
@@ -119,7 +119,7 @@ if (
if (AppConstants.MOZ_DEV_EDITION) {
makeConstant("DEFAULT_THEME_ID", "firefox-compact-dark@mozilla.org");
} else {
- makeConstant("DEFAULT_THEME_ID", "default-theme@mozilla.org");
+ makeConstant("DEFAULT_THEME_ID", "firefox-alpenglow@mozilla.org");
}
// SCOPES_SIDELOAD is a bitflag for what scopes we will load new extensions from when we scan the directories.

View File

@@ -0,0 +1,13 @@
diff --git a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
index 5d1d2c19706b747b149271ea71fabb25f0eca5d1..d0b8a3c37a61a62287d2fa9dab6f90bdd33c786f 100644
--- a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
+++ b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
@@ -140,7 +140,7 @@ const KEY_APP_GLOBAL = "app-global";
const KEY_APP_PROFILE = "app-profile";
const KEY_APP_TEMPORARY = "app-temporary";
-const DEFAULT_THEME_ID = "default-theme@mozilla.org";
+const DEFAULT_THEME_ID = "firefox-alpenglow@mozilla.org";
// Properties to cache and reload when an addon installation is pending
const PENDING_INSTALL_METADATA = [

View File

@@ -0,0 +1,15 @@
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs b/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs
index d5ffd06d112726767c465815a28e85aac881fbdb..687646de83c6e13370e5e32495921a67a00a88ad 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs
@@ -2546,8 +2546,8 @@ export var XPIProvider = {
);
}
this.maybeInstallBuiltinAddon(
- "default-theme@mozilla.org",
- "1.3",
+ "firefox-alpenglow@mozilla.org",
+ "1.4",
"resource://default-theme/"
);

View File

@@ -4,11 +4,11 @@
:root {
--zen-dialog-background: Field;
--zen-dialog-border-color: rgba(0,0,0,.2);
--zen-panel-radius: 7px;
--zen-panel-radius: 15px;
--arrowpanel-background: var(--zen-dialog-background) !important;
--arrowpanel-border-color: var(--zen-dialog-border-color) !important;
--arrowpanel-border-radius: var(--zen-panel-radius) !important;
--arrowpanel-border-radius: 7px !important;
&:-moz-lwtheme {
color: var(--lwt-text-color);