mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1384541 - Add a UI migration from compact themes to compact mode. r=dao
MozReview-Commit-ID: A6kr1QM5Nxu --HG-- extra : rebase_source : c7065dc43723a3e086238ebaaa5b2413f75f9b53
This commit is contained in:
parent
fd46c8db90
commit
f2d83992cd
@ -1735,7 +1735,7 @@ BrowserGlue.prototype = {
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
_migrateUI: function BG__migrateUI() {
|
||||
const UI_VERSION = 50;
|
||||
const UI_VERSION = 51;
|
||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
|
||||
|
||||
let currentUIVersion;
|
||||
@ -2095,6 +2095,16 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 51) {
|
||||
// Switch to compact UI density if the user is using a formerly compact
|
||||
// dark or light theme.
|
||||
let currentTheme = Services.prefs.getCharPref("lightweightThemes.selectedThemeID", "");
|
||||
if (currentTheme == "firefox-compact-dark@mozilla.org" ||
|
||||
currentTheme == "firefox-compact-light@mozilla.org") {
|
||||
Services.prefs.setIntPref("browser.uidensity", 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Update the migration version.
|
||||
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user