Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 71cb446

Browse files
authored
πŸ”€ UI cleanup part 1 (#161)
Make it match figma more
2 parents 3b982ed + b93b6d8 commit 71cb446

File tree

49 files changed

+1013
-207
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1013
-207
lines changed

β€Ž.github/workflows/alpha.ymlβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ jobs:
330330
name: Release
331331
needs: [build-data, linux, source, mac, windows]
332332
runs-on: ubuntu-latest
333+
if: ${{ github.ref == 'refs/heads/alpha' }}
334+
333335
steps:
334336
- uses: actions/download-artifact@v2
335337

@@ -377,6 +379,7 @@ jobs:
377379
name: Build flatpak repos
378380
needs: [build-data, release]
379381
runs-on: ubuntu-latest
382+
if: ${{ github.ref == 'refs/heads/alpha' }}
380383

381384
steps:
382385
- uses: actions/checkout@v3

β€Ž.vscode/settings.jsonβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"moz.configure": "python",
66
"app.mozbuild": "python",
77
"Makefile.in": "makefile",
8-
"mozconfig": "shellscript"
8+
"mozconfig": "shellscript",
9+
"src/browser/themes/**.json": "jsonc"
910
},
1011
"files.watcherExclude": {
1112
"**/.git/objects/**": true,
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/browser/base/content/aboutRobots.xhtml b/browser/base/content/aboutRobots.xhtml
2+
index 767b31067d6d82c1ddfdbf633ececc459c6480ae..21d09dfb758477930096b6c1b070642464a09e69 100644
3+
--- a/browser/base/content/aboutRobots.xhtml
4+
+++ b/browser/base/content/aboutRobots.xhtml
5+
@@ -14,6 +14,7 @@
6+
<linkset>
7+
<link rel="localization" href="browser/aboutRobots.ftl"/>
8+
</linkset>
9+
+ <script src="chrome://browser/content/contentTheme.js"></script>
10+
</head>
11+
12+
<body>

β€Žsrc/browser/base/content/browser-sidebar-js.patchβ€Ž

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/browser/base/content/browser-sidebar.js b/browser/base/content/browser-sidebar.js
2-
index f09e37fc42f7754f7f3687884ead25124c1b2076..e1833bbfd8a8ed7da767349f886d554f3dd795f3 100644
2+
index c5ac301416d2d820ba95e21c0ce1fe305e63b554..ef82cb7bf931d7601c2116ee0d1828d6aa593cae 100644
33
--- a/browser/base/content/browser-sidebar.js
44
+++ b/browser/base/content/browser-sidebar.js
55
@@ -11,6 +11,10 @@ var SidebarUI = {
@@ -165,18 +165,21 @@ index f09e37fc42f7754f7f3687884ead25124c1b2076..e1833bbfd8a8ed7da767349f886d554f
165165
}
166166
}
167167
},
168-
@@ -573,6 +652,10 @@ var SidebarUI = {
168+
@@ -570,6 +649,13 @@ var SidebarUI = {
169169
this._box.setAttribute("sidebarcommand", commandID);
170170
this.lastOpenedId = commandID;
171171

172172
+ // Pulse: Reset sidebar margin to zero to allow for correct animations to
173173
+ // take place (adapted from dot browser, se below)
174174
+ this._box.style.marginLeft = "0px";
175+
+
176+
+ // Pulse: Add checked to the sidebar-icons class to enable more css latter
177+
+ this._sidebarIcons.setAttribute("checked", "true");
175178
+
176179
let { url, title, sourceL10nEl } = this.sidebars.get(commandID);
177180
this.title = title;
178181
// Keep the title element in sync with any l10n changes.
179-
@@ -618,6 +701,26 @@ var SidebarUI = {
182+
@@ -615,6 +701,27 @@ var SidebarUI = {
180183

181184
this.selectMenuItem("");
182185

@@ -198,12 +201,21 @@ index f09e37fc42f7754f7f3687884ead25124c1b2076..e1833bbfd8a8ed7da767349f886d554f
198201
+ this._splitter.hidden = true;
199202
+
200203
+ this._box.removeAttribute("checked");
204+
+ this._sidebarIcons.removeAttribute("checked");
201205
+ }, 170);
202206
+
203207
// Replace the document currently displayed in the sidebar with about:blank
204208
// so that we can free memory by unloading the page. We need to explicitly
205209
// create a new content viewer because the old one doesn't get destroyed
206-
@@ -641,25 +744,112 @@ var SidebarUI = {
210+
@@ -625,6 +732,7 @@ var SidebarUI = {
211+
212+
this._box.removeAttribute("checked");
213+
this._box.hidden = this._splitter.hidden = true;
214+
+ this._sidebarIcons.removeAttribute("checked");
215+
216+
let selBrowser = gBrowser.selectedBrowser;
217+
selBrowser.focus();
218+
@@ -638,25 +746,112 @@ var SidebarUI = {
207219
* none if the argument is an empty string.
208220
*/
209221
selectMenuItem(commandID) {
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
diff --git a/browser/base/content/contentTheme.js b/browser/base/content/contentTheme.js
2+
index d634a17c2633dc2ead40082c71622fe1b7a491a2..042c8120729f6c35ad0b49b91443a88ec6ed4fe8 100644
3+
--- a/browser/base/content/contentTheme.js
4+
+++ b/browser/base/content/contentTheme.js
5+
@@ -135,6 +135,105 @@
6+
lwtProperty: "sidebar_highlight_text",
7+
},
8+
],
9+
+
10+
+ // Pulse: Force content styles to use the current css theme!
11+
+ // Remember to add your keys to browser/themes/ThemeVariableMap.sys.mjs
12+
+ [
13+
+ "--in-content-primary-button-background",
14+
+ {
15+
+ lwtProperty: "button_primary",
16+
+ }
17+
+ ],
18+
+ [
19+
+ "--primary-button-background-color",
20+
+ {
21+
+ lwtProperty: "button_primary",
22+
+ }
23+
+ ],
24+
+
25+
+ [
26+
+ "--in-content-primary-button-background-hover",
27+
+ {
28+
+ lwtProperty: "button_primary_hover",
29+
+ }
30+
+ ],
31+
+ [
32+
+ "--primary-button-hover-background-color",
33+
+ {
34+
+ lwtProperty: "button_primary_hover",
35+
+ }
36+
+ ],
37+
+
38+
+ [
39+
+ "--in-content-primary-button-background-active",
40+
+ {
41+
+ lwtProperty: "button_primary_active",
42+
+ }
43+
+ ],
44+
+ [
45+
+ "--primary-button-active-background-color",
46+
+ {
47+
+ lwtProperty: "button_primary_active",
48+
+ }
49+
+ ],
50+
+
51+
+ [
52+
+ "--in-content-primary-button-text-color",
53+
+ {
54+
+ lwtProperty: "button_primary_color",
55+
+ }
56+
+ ],
57+
+ [
58+
+ "--primary-button-color",
59+
+ {
60+
+ lwtProperty: "button_primary_color",
61+
+ }
62+
+ ],
63+
+
64+
+ [
65+
+ "--in-content-primary-button-text-color-hover",
66+
+ {
67+
+ lwtProperty: "button_primary_color",
68+
+ }
69+
+ ],
70+
+ [
71+
+ "--newtab-primary-action-background",
72+
+ {
73+
+ lwtProperty: "button_primary",
74+
+ }
75+
+ ],
76+
+ [
77+
+ "--newtab-primary-element-text-color",
78+
+ {
79+
+ lwtProperty: "button_primary_color",
80+
+ }
81+
+ ],
82+
+
83+
+ [
84+
+ "--in-content-page-background",
85+
+ {
86+
+ lwtProperty: "ntp_background",
87+
+ }
88+
+ ],
89+
+ [
90+
+ "--bg-color",
91+
+ {
92+
+ lwtProperty: "ntp_background",
93+
+ }
94+
+ ],
95+
+
96+
+ [
97+
+ "--card-background-color",
98+
+ {
99+
+ lwtProperty: "ntp_card_background",
100+
+ }
101+
+ ],
102+
+ [
103+
+ "--in-content-box-background",
104+
+ {
105+
+ lwtProperty: "ntp_card_background",
106+
+ }
107+
+ ],
108+
];
109+
110+
/**

β€Žsrc/browser/components/BrowserGlue-jsm.patchβ€Ž

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm
2-
index cee46e6341f98441df743f4f5abccc380a67f74b..1102e374a8a93f2ae6142ff0bffaea71fdceb59c 100644
2+
index 43fbae6024d491379965937246c4900179d924eb..cbf5c219feeab92a3ecfcc991c605394ef29b8de 100644
33
--- a/browser/components/BrowserGlue.jsm
44
+++ b/browser/components/BrowserGlue.jsm
5-
@@ -4343,6 +4343,24 @@ BrowserGlue.prototype = {
5+
@@ -562,13 +562,8 @@ let JSWINDOWACTORS = {
6+
includeChrome: true,
7+
allFrames: true,
8+
matches: [
9+
- "about:home",
10+
- "about:newtab",
11+
- "about:welcome",
12+
- "chrome://browser/content/syncedtabs/sidebar.xhtml",
13+
- "chrome://browser/content/places/historySidebar.xhtml",
14+
- "chrome://browser/content/places/bookmarksSidebar.xhtml",
15+
- "about:firefoxview",
16+
+ "about:*",
17+
+ "chrome://*"
18+
],
19+
},
20+
21+
@@ -4361,6 +4356,24 @@ BrowserGlue.prototype = {
622
},
723

824
async _maybeShowDefaultBrowserPrompt() {
@@ -27,7 +43,7 @@ index cee46e6341f98441df743f4f5abccc380a67f74b..1102e374a8a93f2ae6142ff0bffaea71
2743
// Highest priority is the upgrade dialog, which can include a "primary
2844
// browser" request and is limited in various ways, e.g., major upgrades.
2945
const dialogVersion = 106;
30-
@@ -4809,6 +4827,17 @@ BrowserGlue.prototype = {
46+
@@ -4827,6 +4840,17 @@ BrowserGlue.prototype = {
3147
"nsIObserver",
3248
"nsISupportsWeakReference",
3349
]),
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/browser/components/aboutlogins/content/aboutLogins.html b/browser/components/aboutlogins/content/aboutLogins.html
2+
index d53bc804177d414928dae9a2cb8e42a0a0dae9ac..b5190e9d556ab8b40840214fac15eed17a5fae25 100644
3+
--- a/browser/components/aboutlogins/content/aboutLogins.html
4+
+++ b/browser/components/aboutlogins/content/aboutLogins.html
5+
@@ -31,6 +31,7 @@
6+
<link rel="stylesheet" href="chrome://browser/content/aboutlogins/aboutLogins.css">
7+
<link rel="stylesheet" href="chrome://browser/content/aboutlogins/common.css">
8+
<link rel="icon" href="chrome://branding/content/icon32.png">
9+
+ <script src="chrome://browser/content/contentTheme.js"></script>
10+
</head>
11+
<body>
12+
<header>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/browser/components/aboutlogins/content/aboutLoginsImportReport.html b/browser/components/aboutlogins/content/aboutLoginsImportReport.html
2+
index c8a768c7d867464771b2a37e3fb7361e17370a59..2d770c8ad36febd9fc02dadca4ba88caa31c77db 100644
3+
--- a/browser/components/aboutlogins/content/aboutLoginsImportReport.html
4+
+++ b/browser/components/aboutlogins/content/aboutLoginsImportReport.html
5+
@@ -19,6 +19,7 @@
6+
<link rel="stylesheet" href="chrome://browser/content/aboutlogins/aboutLoginsImportReport.css">
7+
<link rel="stylesheet" href="chrome://browser/content/aboutlogins/common.css">
8+
<link rel="icon" href="chrome://branding/content/icon32.png">
9+
+ <script src="chrome://browser/content/contentTheme.js"></script>
10+
</head>
11+
<body class="importreport">
12+
<section id="report-body">
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/browser/components/enterprisepolicies/content/aboutPolicies.html b/browser/components/enterprisepolicies/content/aboutPolicies.html
2+
index 83ae157605f1009588b1d6c87e5eff26a2e5d594..d470b3ab00d87bb43e088290693b7d74d4c354ef 100644
3+
--- a/browser/components/enterprisepolicies/content/aboutPolicies.html
4+
+++ b/browser/components/enterprisepolicies/content/aboutPolicies.html
5+
@@ -18,6 +18,7 @@
6+
<link rel="localization" href="browser/aboutPolicies.ftl">
7+
<link rel="localization" href="browser/policies/policies-descriptions.ftl">
8+
<script src="chrome://browser/content/policies/aboutPolicies.js"></script>
9+
+ <script src="chrome://browser/content/contentTheme.js"></script>
10+
</head>
11+
<body id="body">
12+
<div id="categories">
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
2+
index 9921e0307b4af54bbb6fa4d85e1a5d1d0fbf07a7..2c5db086f1320d2e334ed2c1988f515dc5cace3c 100644
3+
--- a/browser/components/preferences/preferences.xhtml
4+
+++ b/browser/components/preferences/preferences.xhtml
5+
@@ -63,6 +63,7 @@
6+
<script src="chrome://browser/content/preferences/preferences.js"/>
7+
<script src="chrome://browser/content/preferences/extensionControlled.js"/>
8+
<script src="chrome://browser/content/preferences/findInPage.js"/>
9+
+ <script src="chrome://browser/content/contentTheme.js"></script>
10+
</head>
11+
12+
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"

0 commit comments

Comments
Β (0)