diff --git a/assets/patches.txt b/assets/patches.txt index 51e73ad..0ebadad 100644 --- a/assets/patches.txt +++ b/assets/patches.txt @@ -9,7 +9,6 @@ patches/disable-data-reporting-at-compile-time.patch patches/flatpak-autoconf.patch patches/fullpage-translations.patch patches/hide-passwordmgr.patch -patches/librewolf-pref-pane.patch patches/librewolf-prefs.patch patches/mozilla_dirs.patch patches/msix.patch diff --git a/patches/pref-pane/README.md b/patches/pref-pane/README.md new file mode 100644 index 0000000..021d130 --- /dev/null +++ b/patches/pref-pane/README.md @@ -0,0 +1,22 @@ +### overview: +* This folder replaces the original big pref-pane.patch, the original patch is moved into the `patches/removed-patches` folder. +* This new solution should make it much easier for everyone to edit the librewolf preferences. + +#### librewolf.inc.xhtml +Contains the html elements that make up the preferences UI. for example, a checkmark to 'enable firefox sync'. In this example there is a html snippet that uses only the `identity.fxaccounts.enabled` setting, so no JavaScript needed. +#### librewolf.js +Other code called by the ui elements. +#### preferences.ftl +In our running xhtml example, we have a string id `data-l10n-id="librewolf-sync-checkbox"` that we can find in our`.ftl` file. + + +#### note: new files, these contain all the logic for the pref-pane: + +* category-librewolf.svg -> browser/themes/shared/preferences/category-librewolf.svg +* librewolf.css -> browser/themes/shared/preferences/librewolf.css +* librewolf.inc.xhtml -> browser/components/preferences/librewolf.inc.xhtml +* librewolf.js -> browser/components/preferences/librewolf.js + +#### note: appending these string values to the original preferences.ftl: + +* preferences.ftl -- append to --> browser/locales/en-US/browser/preferences/preferences.ftl diff --git a/patches/pref-pane/category-librewolf.svg b/patches/pref-pane/category-librewolf.svg new file mode 100644 index 0000000..10c9c2f --- /dev/null +++ b/patches/pref-pane/category-librewolf.svg @@ -0,0 +1,96 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/patches/pref-pane/librewolf.css b/patches/pref-pane/librewolf.css new file mode 100644 index 0000000..12f926a --- /dev/null +++ b/patches/pref-pane/librewolf.css @@ -0,0 +1,23 @@ +.librewolf-collapse > input { + display: none; +} +.librewolf-collapse > input ~ .librewolf-collapsed { + display: none; + /* max-height: 0; */ + transition: max-height 0.25s ease-in-out; +} +.librewolf-collapse > input:checked ~ .librewolf-collapsed { + display: block; + /* max-height: 20rem; */ +} +.librewolf-warning { + display: inline; + font-size: 0.8em; +} +.librewolf-button-icon { + width: 16px; + height: 16px; + margin-right: 8px; + -moz-context-properties: fill, fill-opacity; + fill: currentColor; +} diff --git a/patches/pref-pane/librewolf.inc.xhtml b/patches/pref-pane/librewolf.inc.xhtml new file mode 100644 index 0000000..c2dfea6 --- /dev/null +++ b/patches/pref-pane/librewolf.inc.xhtml @@ -0,0 +1,254 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +