0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 13:43:04 -05:00

new about menu

This commit is contained in:
Malte Jürgens 2021-12-22 15:54:21 +01:00
parent a9ee1bf016
commit b60935b586
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3
12 changed files with 326 additions and 96 deletions

View file

@ -1,4 +1,3 @@
patches/about-dialog.patch
patches/allow-ubo-private-mode.patch patches/allow-ubo-private-mode.patch
patches/context-menu.patch patches/context-menu.patch
patches/megabar.patch patches/megabar.patch

View file

@ -1,12 +0,0 @@
diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml
--- a/browser/base/content/aboutDialog.xhtml
+++ b/browser/base/content/aboutDialog.xhtml
@@ -147,7 +147,7 @@
</description>
</vbox>
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
- <label is="text-link" href="https://www.mozilla.org/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="community-mozillaLink"/>
+ <label is="text-link" href="https://librewolf.net/" data-l10n-name="community-mozillaLink"/>
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
</description>
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">

View file

@ -0,0 +1,55 @@
/* 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/. */
#aboutDialog {
border-bottom: #00acff 2px solid;
}
#grid {
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
height: 250px;
min-width: 400px;
transform: translateY(calc(50vh - 50%));
}
#left {
width: 150px;
flex-shrink: 0.5;
height: 150px;
margin: 25px;
background-image: url("chrome://branding/content/logo.svg");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
#right {
width: 300px;
flex-shrink: 1;
display: flex;
flex-direction: column;
align-items: flex-start;
}
#wordmark {
color: #00acff;
font-size: 30px;
font-weight: bold;
line-height: 1em;
}
#version {
font-weight: bold;
margin-bottom: 4px;
user-select: text;
-moz-user-focus: normal;
cursor: text;
}
#aboutText {
margin-top: 4px;
}

View file

@ -0,0 +1,124 @@
/* 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/. */
"use strict";
/* import-globals-from aboutDialog-appUpdater.js */
// Services = object with smart getters for common XPCOM services
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
var { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
if (AppConstants.MOZ_UPDATER) {
Services.scriptloader.loadSubScript(
"chrome://browser/content/aboutDialog-appUpdater.js",
this
);
}
async function init(aEvent) {
if (aEvent.target != document) {
return;
}
var distroId = Services.prefs.getCharPref("distribution.id", "");
if (distroId) {
var distroAbout = Services.prefs.getStringPref("distribution.about", "");
// If there is about text, we always show it.
if (distroAbout) {
var distroField = document.getElementById("distribution");
distroField.value = distroAbout;
distroField.style.display = "block";
}
// If it's not a mozilla distribution, show the rest,
// unless about text exists, then we always show.
if (!distroId.startsWith("mozilla-") || distroAbout) {
var distroVersion = Services.prefs.getCharPref(
"distribution.version",
""
);
if (distroVersion) {
distroId += " - " + distroVersion;
}
var distroIdField = document.getElementById("distributionId");
distroIdField.value = distroId;
distroIdField.style.display = "block";
}
}
// Include the build ID and display warning if this is an "a#" (nightly or aurora) build
let versionId = "aboutDialog-version";
let versionAttributes = {
version: AppConstants.MOZ_APP_VERSION_DISPLAY,
bits: Services.appinfo.is64Bit ? 64 : 32,
};
let version = Services.appinfo.version;
if (/a\d+$/.test(version)) {
versionId = "aboutDialog-version-nightly";
let buildID = Services.appinfo.appBuildID;
let year = buildID.slice(0, 4);
let month = buildID.slice(4, 6);
let day = buildID.slice(6, 8);
versionAttributes.isodate = `${year}-${month}-${day}`;
document.getElementById("experimental").hidden = false;
document.getElementById("communityDesc").hidden = true;
}
// Use Fluent arguments for append version and the architecture of the build
let versionField = document.getElementById("version");
document.l10n.setAttributes(versionField, versionId, versionAttributes);
await document.l10n.translateElements([versionField]);
// Show a release notes link if we have a URL.
let relNotesLink = document.getElementById("releasenotes");
let relNotesPrefType = Services.prefs.getPrefType(
"app.releaseNotesURL.aboutDialog"
);
if (relNotesPrefType != Services.prefs.PREF_INVALID) {
let relNotesURL = Services.urlFormatter.formatURLPref(
"app.releaseNotesURL.aboutDialog"
);
if (relNotesURL != "about:blank") {
relNotesLink.href = relNotesURL;
relNotesLink.hidden = false;
}
}
if (AppConstants.MOZ_UPDATER) {
gAppUpdater = new appUpdater({ buttonAutoFocus: true });
let channelLabel = document.getElementById("currentChannel");
let currentChannelText = document.getElementById("currentChannelText");
channelLabel.value = UpdateUtils.UpdateChannel;
let hasWinPackageId = false;
try {
hasWinPackageId = Services.sysinfo.getProperty("hasWinPackageId");
} catch (_ex) {
// The hasWinPackageId property doesn't exist; assume it should be false.
}
if (/^release($|\-)/.test(channelLabel.value) || hasWinPackageId) {
currentChannelText.hidden = true;
}
}
if (AppConstants.IS_ESR) {
document.getElementById("release").hidden = false;
}
window.sizeToContent();
if (AppConstants.platform == "macosx") {
window.moveTo(
screen.availWidth / 2 - window.outerWidth / 2,
screen.availHeight / 5
);
}
}

View file

@ -0,0 +1,56 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
# 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/.
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="aboutDialog"
windowtype="Browser:About"
onload="init(event);"
#ifdef XP_MACOSX
inwindowmenu="false"
#else
data-l10n-id="aboutDialog-title"
#endif
role="dialog"
aria-describedby="version distribution distributionId communityDesc contributeDesc trademark"
>
#ifdef XP_MACOSX
#include macWindow.inc.xhtml
#else
<script src="chrome://browser/content/utilityOverlay.js"/>
#endif
<linkset>
<html:link rel="localization" href="branding/brand.ftl"/>
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
</linkset>
<script src="chrome://browser/content/aboutDialog.js"/>
<div id="grid">
<div id="left" />
<div id="right">
<label id="wordmark">LibreWolf</label>
<label id="version" />
<label id="distribution" />
<label id="distributionId" />
<label id="aboutText">
LibreWolf is an independent fork of Firefox, with the primary
goals of privacy, security and user freedom.
</label>
<label id="websiteLink" is="text-link" href="https://librewolf.net/">https://librewolf.net/</label>
</div>
</div>
<keyset>
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
</keyset>
</window>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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/. -->
<svg xmlns="http://www.w3.org/2000/svg" width="132px" height="48px" viewBox="0 0 132 48">
<path fill="#fff" d="M60.6,14.3l-2.4-2.4C57,12.7,56,13,54.7,13c-3,0-3.8-1.4-7.6-1.4c-5.4,0-9.2,3.4-9.2,8.4
c0,3.3,2.2,6.1,5.6,7.2c-3.4,1-4.5,2.2-4.5,4.3c0,2.2,1.8,3.6,4.7,3.6h3.8c2.5,0,3.9,0.2,4.9,0.9c0.9,0.6,1.4,1.6,1.4,3
c0,3.1-2.2,4.4-6,4.4c-2,0-3.8-0.5-5.1-1.2c-0.9-0.6-1.5-1.6-1.5-2.9c0-0.8,0.3-1.7,0.7-2.2l-4.1,0.4c-0.3,1-0.5,1.7-0.5,2.6
c0,3.5,3,6.4,10.8,6.4c6.1,0,9.9-2.5,9.9-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3.3,0.5-7.2,0.5-7.2l-4.1,0.9
c0,0-0.4,3.9-0.4,6.3h-3.2V15h3.2v17.1c0,2.5,0.7,4.1,2.4,5c0.9,0.4,1.9,0.7,3.3,0.7c1.8,0,3.1-0.4,4.4-1l-0.6-2.5
c-0.7,0.3-1.3,0.5-2.4,0.5c-2.4,0-3.2-0.9-3.2-3.7V15H96.9z M28.6,37h4.1V11.5l-4.1,0.6V37z M18.9,21.3c0,5,0.4,10.5,0.4,10.5
s-1.4-3.8-3.2-7.2L4.8,2.7H0V37h4.2L4,17.1c0-4.5-0.4-9.3-0.4-9.3s1.7,4.1,3.9,8.2l11,21h4.3V2.7h-4L18.9,21.3z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

View file

@ -1,56 +0,0 @@
/* 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/. */
#aboutDialogContainer {
background-image: url("chrome://branding/content/about-background.png");
background-repeat: no-repeat;
background-color: #00acff;
color: #090909;
}
/*
firefox-85.0/browser/base/content/aboutDialog.css
firefox-85.0/browser/base/content/aboutDialog.js
firefox-85.0/browser/base/content/aboutDialog.xhtml
*/
/* enable this below for ESR version */
/* #release { display: inline; } */
.text-link {
color: #101010 !important;
text-decoration: underline;
}
#rightBox {
/* border: 1px solid red; */
/* this margin prevents text from overlapping the planet image */
background-image: none; /* getting rid of the 'Nightly' text */
margin-left: 275px;
margin-top: 50px;
margin-right: 20px;
min-height: 260px;
}
#bottomBox {
background-color: rgba(0,0,0,.7);
display: none;
}
#leftBox {
/* border: 1px solid red; */
/* display: none; */
/* background-image: url("chrome://branding/content/about-logo.png"); */
/* background-repeat: no-repeat; */
/* background-size: 192px auto; */
/* background-position: center 20%; */
/* min-width and min-height create room for the logo */
min-width: 1px;
min-height: 220px;
margin-top: 20px;
margin-inline-start: 30px;
}

View file

@ -4,15 +4,11 @@
browser.jar: browser.jar:
% content branding %content/branding/ contentaccessible=yes % content branding %content/branding/ contentaccessible=yes
content/branding/about.png
content/branding/about-background.png
content/branding/about-logo.png
content/branding/about-wordmark.svg
content/branding/icon16.png (../default16.png) content/branding/icon16.png (../default16.png)
content/branding/icon32.png (../default32.png) content/branding/icon32.png (../default32.png)
content/branding/icon48.png (../default48.png) content/branding/icon48.png (../default48.png)
content/branding/icon64.png (../default64.png) content/branding/icon64.png (../default64.png)
content/branding/icon128.png (../default128.png) content/branding/icon128.png (../default128.png)
content/branding/logo.svg
content/branding/identity-icons-brand.svg content/branding/identity-icons-brand.svg
content/branding/aboutDialog.css
content/branding/horizontal-lockup.svg content/branding/horizontal-lockup.svg

View file

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="67.733337mm"
height="67.733337mm"
viewBox="0 0 67.733337 67.733337"
version="1.1"
id="svg8"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="LibreWolf.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.9899495"
inkscape:cx="-15.106575"
inkscape:cy="110.91343"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1366"
inkscape:window-height="711"
inkscape:window-x="0"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:showpageshadow="false"
units="px"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-42.106554,-153.8982)">
<circle
style="fill:#00acff;fill-opacity:1;stroke:none;stroke-width:0.53545821;stroke-miterlimit:4;stroke-dasharray:none"
id="path875"
cx="75.973221"
cy="187.76486"
r="33.866669" />
<path
style="fill:#ffffff;stroke-width:0.13229167"
d="m 72.543594,214.67719 c -4.744093,-0.60875 -9.281981,-2.49991 -13.241953,-5.51858 -1.29157,-0.98455 -3.714943,-3.42363 -4.772834,-4.80375 -2.96241,-3.86476 -4.804479,-8.2508 -5.41218,-12.88661 -0.260164,-1.98464 -0.258719,-5.63349 0.0029,-7.44738 1.308078,-9.0677 7.01463,-16.8454 15.20915,-20.72918 3.811512,-1.80647 7.300266,-2.57114 11.730683,-2.57114 7.165903,0 13.5265,2.56749 18.680882,7.54063 2.483054,2.39575 4.148141,4.66808 5.573968,7.60677 1.92868,3.9751 2.70979,7.43276 2.70979,11.99526 0,6.00619 -1.7345,11.24407 -5.336957,16.11672 -1.070527,1.44797 -3.161747,3.64749 -4.549468,4.78507 -3.806562,3.12041 -8.658642,5.23183 -13.473174,5.86296 -1.663528,0.21807 -5.593318,0.24524 -7.120854,0.0492 z m 10.041381,-4.86547 c 2.898391,-0.91366 5.260364,-2.14146 7.540624,-3.91979 1.212494,-0.9456 3.308223,-3.06144 4.186916,-4.22711 2.38328,-3.16162 4.004927,-7.12196 4.482067,-10.94597 0.229814,-1.84182 0.09634,-5.73827 -0.2545,-7.4296 -0.9294,-4.48046 -2.931647,-8.26499 -6.086007,-11.50342 -1.966575,-2.01898 -3.756882,-3.34972 -6.060203,-4.50458 -3.495001,-1.75236 -6.489835,-2.46043 -10.423481,-2.46442 -4.164073,-0.004 -7.815325,0.95024 -11.429055,2.98766 -3.289753,1.85476 -6.690628,5.25952 -8.553227,8.563 -1.371786,2.43299 -2.37583,5.32029 -2.767595,7.95869 -0.256867,1.72991 -0.261933,5.16508 -0.01006,6.82145 0.504067,3.31489 1.761474,6.59111 3.584314,9.33904 0.995409,1.50058 0.964154,1.48393 1.842248,0.98153 1.570774,-0.8987 1.980396,-1.33342 2.836087,-3.00984 1.000624,-1.96036 2.070459,-3.6735 3.037094,-4.86332 1.115822,-1.37347 1.269228,-1.61793 1.828988,-2.9147 0.281654,-0.65249 0.786977,-1.61074 1.122938,-2.12943 l 0.61084,-0.94309 -0.79023,-0.77671 c -1.049647,-1.03168 -1.922751,-2.2016 -2.087012,-2.79651 -0.167761,-0.60758 0.03021,-0.9466 0.818744,-1.40207 0.797354,-0.46057 1.367585,-0.5929 3.498657,-0.81193 1.037629,-0.10665 2.164153,-0.30199 2.518962,-0.43681 0.353024,-0.13414 1.407825,-0.70824 2.344001,-1.27579 2.702947,-1.63863 2.931619,-1.72344 4.552111,-1.68831 1.368686,0.0297 1.371262,0.0291 2.182813,-0.46143 1.700674,-1.02802 4.14305,-2.88289 7.357044,-5.58733 0.61632,-0.5186 1.21002,-0.92569 1.31934,-0.90464 0.45462,0.0876 1.289567,2.13636 1.416407,3.47562 0.07693,0.81225 -0.08023,1.6155 -0.562014,2.87261 -0.13146,0.34301 -0.19208,0.67043 -0.134706,0.7276 0.13774,0.13726 0.610706,-0.4535 0.610706,-0.76279 0,-0.39435 0.261127,-0.43936 0.616327,-0.10623 0.258235,0.24218 0.480842,0.31151 1.000202,0.31151 0.567073,0 0.707447,0.0526 0.928773,0.3479 0.375574,0.50112 0.463647,1.86688 0.176201,2.73231 -0.279641,0.84191 -1.124801,1.81287 -1.891829,2.17341 -0.686334,0.32262 -2.075841,1.67928 -2.726081,2.66164 -0.248906,0.37604 -0.715586,1.15995 -1.037066,1.74204 -0.321487,0.58208 -0.86074,1.46154 -1.19834,1.95436 -0.664294,0.96972 -1.233147,2.3224 -1.782214,4.23798 -0.322553,1.1253 -0.34962,1.41826 -0.362953,3.92797 -0.01613,3.0317 -0.172894,3.77561 -0.9925,4.7091 -0.931805,1.06126 -1.861937,3.39186 -1.940127,4.8613 -0.04935,0.92751 -0.192246,1.83164 -0.395304,2.50122 -0.08942,0.29484 0.07752,0.2914 1.072102,-0.0221 z"
id="path847"
inkscape:connector-curvature="0" />
<path
sodipodi:type="star"
style="fill:#00acff;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
id="path814"
sodipodi:sides="4"
sodipodi:cx="18.854025"
sodipodi:cy="172.98837"
sodipodi:r1="1.6036172"
sodipodi:r2="1.1339285"
sodipodi:arg1="1.5707963"
sodipodi:arg2="2.3561945"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 18.854025,174.59199 -1.603617,-1.60362 1.603617,-1.60361 1.603617,1.60361 z"
transform="matrix(0.23203125,0.40188991,-0.99392962,0.57384553,246.21921,73.888081)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB