Skip to content

Commit 88d7ef6

Browse files
committed
r3dfox settings
1 parent 5f276d1 commit 88d7ef6

File tree

9 files changed

+215
-20
lines changed

9 files changed

+215
-20
lines changed

browser/components/preferences/main.inc.xhtml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,88 @@
1212

1313
<script src="chrome://mozapps/content/preferences/fontbuilder.js"/>
1414

15+
<!-- r3dfox -->
16+
<hbox id="r3dfoxcategory"
17+
class="subcategory"
18+
hidden="true"
19+
data-category="paneGeneral">
20+
<html:h1 data-l10n-id="r3dfox-title"/>
21+
</hbox>
22+
23+
<!-- r3dfox -->
24+
<groupbox id="r3dfoxGroup" data-category="paneGeneral" hidden="true">
25+
<label class="search-header" hidden="true"><html:h2 data-l10n-id="r3dfox-title"/></label>
26+
27+
<hbox align="center">
28+
<checkbox id="r3dfoxUseNativeStyles"
29+
data-l10n-id="r3dfox-native-checkbox"
30+
preference="widget.non-native-theme.enabled"/>
31+
</hbox>
32+
<description class="indent tip-caption" data-l10n-id="r3dfox-native-checkbox-desc"/>
33+
34+
<hbox align="center">
35+
<label id="r3dfoxNativeScroll" data-l10n-id="r3dfox-native-scroll" control="r3dfoxNativeScrollType"/>
36+
<menulist id="r3dfoxNativeScrollType" preference="widget.ev-native-controls-patch.scrollbar-style">
37+
<menupopup>
38+
<menuitem label="Native scrollbars always" value="0"/>
39+
<menuitem label="Custom scrollbars always" value="1"/>
40+
<menuitem label="Native scrollbars unless the website has a dark color scheme" value="2"/>
41+
</menupopup>
42+
</menulist>
43+
</hbox>
44+
<description id="r3dfoxNativeScrollDescription" class="tip-caption" data-l10n-id="r3dfox-native-scroll-desc"/>
45+
46+
<hbox align="center">
47+
<label id="r3dfoxFakeScroll" data-l10n-id="r3dfox-fake-scroll-type" control="r3dfoxFakeScrollType"/>
48+
<menulist id="r3dfoxFakeScrollType" preference="widget.non-native-theme.scrollbar.style">
49+
<menupopup>
50+
<menuitem label="Default platform scrollbar style (normal)" value="0"/>
51+
<menuitem label="macOS scrollbar (small)" value="1"/>
52+
<menuitem label="GTK scrollbar (smaller)" value="2"/>
53+
<menuitem label="Android scrollbar (smallest)" value="3"/>
54+
<menuitem label="Windows 10 scrollbar (normal)" value="4"/>
55+
<menuitem label="Windows 11 scrollbar (smaller)" value="5"/>
56+
</menupopup>
57+
</menulist>
58+
</hbox>
59+
<description id="r3dfoxFakeScrollDescription" class="tip-caption" data-l10n-id="r3dfox-fake-scroll-type-desc"/>
60+
61+
<hbox align="center">
62+
<checkbox id="r3dfoxTheme"
63+
data-l10n-id="r3dfox-theme"
64+
preference="r3dfox.customizations.enabled"/>
65+
</hbox>
66+
<description class="indent tip-caption" data-l10n-id="r3dfox-theme-desc"/>
67+
68+
<hbox align="center">
69+
<checkbox id="r3dfoxlessfog"
70+
data-l10n-id="r3dfox-less-fog"
71+
preference="r3dfox.less.aero.fog"/>
72+
</hbox>
73+
<description class="indent tip-caption" data-l10n-id="r3dfox-less-fog-desc"/>
74+
75+
<hbox align="center">
76+
<checkbox id="r3dfoxfog"
77+
data-l10n-id="r3dfox-fog"
78+
preference="r3dfox.aero.fog"/>
79+
</hbox>
80+
<description class="indent tip-caption" data-l10n-id="r3dfox-fog-desc"/>
81+
82+
<hbox align="center">
83+
<checkbox id="r3dfoxtransparency"
84+
data-l10n-id="r3dfox-transparency"
85+
preference="r3dfox.force.transparency"/>
86+
</hbox>
87+
<description class="indent tip-caption" data-l10n-id="r3dfox-transparency-desc"/>
88+
89+
<hbox align="center">
90+
<checkbox id="r3dfoxe10s"
91+
data-l10n-id="r3dfox-e10s"
92+
preference="browser.e10s.disabled"/>
93+
</hbox>
94+
<description class="indent tip-caption" data-l10n-id="r3dfox-e10s-desc"/>
95+
</groupbox>
96+
1597
<html:template id="template-paneGeneral">
1698
<hbox id="generalCategory"
1799
class="subcategory"

browser/components/preferences/main.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ Preferences.addAll([
5959
{ id: "browser.download.folderList", type: "int" },
6060
{ id: "browser.download.dir", type: "file" },
6161

62+
/* r3dfox preferences */
63+
64+
{ id: "widget.non-native-theme.enabled", type: "bool", inverted: true },
65+
{ id: "widget.ev-native-controls-patch.scrollbar-style", type: "int" },
66+
{ id: "widget.non-native-theme.scrollbar.style", type: "int" },
67+
{ id: "r3dfox.customizations.enabled", type: "bool" },
68+
{ id: "r3dfox.less.aero.fog", type: "bool" },
69+
{ id: "r3dfox.aero.fog", type: "bool" },
70+
{ id: "r3dfox.force.transparency", type: "bool" },
71+
{ id: "browser.e10s.disabled", type: "bool" },
72+
6273
/* Tab preferences
6374
Preferences:
6475

browser/locales/en-US/browser/preferences/preferences.ftl

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,49 @@ search-results-empty-message2 =
140140
141141
search-results-help-link = Need help? Visit <a data-l10n-name="url">{ -brand-short-name } Support</a>
142142
143-
## General Section
143+
## General Section - r3dfox
144+
145+
r3dfox-title = r3dfox configurations
146+
147+
r3dfox-native-checkbox =
148+
.label = Use native styles
149+
150+
r3dfox-native-checkbox-desc = This controls whether the scrollbar, checkboxes, and other elements use their native system counterparts or their non-native browser themed style. May requre browser restart.
151+
152+
r3dfox-native-scroll = Scrollbar style
153+
154+
r3dfox-native-scroll-desc = This controls the style of the scrollbar.
155+
156+
r3dfox-fake-scroll-type = Non-native scrollbar theme
157+
158+
r3dfox-fake-scroll-type-desc = This controls the theme of the scrollbar.
159+
160+
r3dfox-theme =
161+
.label = Use r3dfox theme styles
162+
163+
r3dfox-theme-desc = Currently this just enables or disables the red colors in private mode.
164+
165+
r3dfox-less-fog =
166+
.label = Less intense caption bar fog
167+
168+
r3dfox-less-fog-desc = This reduces the amount of fog drawn on the caption bar, letting you better see the Aero effects.
169+
170+
r3dfox-fog =
171+
.label = Enable caption bar fog
172+
173+
r3dfox-fog-desc = This enables or disables caption bar fog completely.
174+
175+
r3dfox-transparency =
176+
.label = Force enable caption bar transparency
177+
178+
r3dfox-transparency-desc = Force enables caption bar transparency, may have varying results.
179+
180+
r3dfox-e10s =
181+
.label = (BETA) Disable e10s (multiprocess)
182+
183+
r3dfox-e10s-desc = Disables e10s/electrolysis. There are still multiple processes from other browser components with this enabled. Not recommended unless you know what you are doing.
184+
185+
## General Section - Startup
144186

145187
startup-header = Startup
146188

browser/themes/shared/light-dark-overrides.css

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,34 @@
3232
}
3333

3434
/* Add a fog for background tabs to be visible on Windows 7 glass window background */
35-
@media (-moz-platform: windows-win7) {
35+
@media (-moz-platform: windows-win7),
36+
(-moz-platform: windows-win8) {
3637
@media (-moz-windows-default-theme) {
3738
#TabsToolbar {
38-
background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 40%, transparent);
39+
@media (-moz-bool-pref: "r3dfox.aero.fog") {
40+
@media (-moz-bool-pref: "r3dfox.less.aero.fog") {
41+
background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 40%, transparent) !important;
42+
}
43+
@media not (-moz-bool-pref: "r3dfox.less.aero.fog") {
44+
background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 80%, transparent) !important;
45+
}
46+
}
3947
color: black;
4048
--toolbarbutton-icon-fill: currentColor;
4149
}
4250
}
4351
}
4452

45-
@media (-moz-windows-classic) {
46-
:root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar {
47-
background-image: linear-gradient(transparent, ActiveCaption);
48-
background-size: auto 200%;
49-
}
50-
51-
:root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar:-moz-window-inactive {
52-
background-image: linear-gradient(transparent, InactiveCaption);
53+
@media (-moz-bool-pref: "r3dfox.aero.fog") {
54+
@media (-moz-windows-classic) {
55+
:root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar {
56+
background-image: linear-gradient(transparent, ActiveCaption) !important;
57+
background-size: auto 200% !important;
58+
}
59+
60+
:root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar:-moz-window-inactive {
61+
background-image: linear-gradient(transparent, InactiveCaption) !important;
62+
}
5363
}
5464
}
5565

browser/themes/shared/privatebrowsing/aboutPrivateBrowsing.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ html.private {
99
--in-content-page-color: white;
1010
--in-content-text-color: white;
1111
--in-content-page-background: #25003e;
12+
@media (-moz-bool-pref: "r3dfox.customizations.enabled") {
13+
--in-content-page-background: linear-gradient(to bottom, #480808 0%,#240103 93%,#200000 97%,#1E0000 100%);
14+
}
1215
--link-color: white;
1316
--link-color-hover: white;
1417
--link-color-active: white;

browser/themes/shared/tabbrowser/content-area.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
ThemeVariableMap.sys.mjs when the user has a theme that defines
1818
ntp_background. */
1919
--tabpanel-background-color: #25003e !important;
20+
@media (-moz-bool-pref: "r3dfox.customizations.enabled") {
21+
--tabpanel-background-color: linear-gradient(to bottom, #480808 0%,#240103 93%,#200000 97%,#1E0000 100%) !important;
22+
}
2023

2124
/* stylelint-disable-next-line media-query-no-invalid */
2225
@media (-moz-bool-pref: "browser.privatebrowsing.felt-privacy-v1") {

browser/themes/windows/browser.css

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,18 @@
9292
}
9393

9494
/* Add a fog for background tabs to be visible on Windows 7 glass window background */
95-
@media (-moz-platform: windows-win7) {
95+
@media (-moz-platform: windows-win7),
96+
(-moz-platform: windows-win8) {
9697
@media (-moz-windows-default-theme) {
9798
#TabsToolbar:not([lwtheme]) {
98-
background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 40%, transparent);
99+
@media (-moz-bool-pref: "r3dfox.aero.fog") {
100+
@media (-moz-bool-pref: "r3dfox.less.aero.fog") {
101+
background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 40%, transparent) !important;
102+
}
103+
@media not (-moz-bool-pref: "r3dfox.less.aero.fog") {
104+
background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 80%, transparent) !important;
105+
}
106+
}
99107
}
100108
}
101109
}
@@ -122,13 +130,15 @@
122130
* titlebar. We side-step this issue by layering our own background underneath
123131
* the tabs.
124132
*/
125-
:root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar:not([lwtheme]) {
126-
background-image: linear-gradient(transparent, ActiveCaption);
127-
background-size: auto 200%;
128-
}
133+
@media (-moz-bool-pref: "r3dfox.aero.fog") {
134+
:root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar:not([lwtheme]) {
135+
background-image: linear-gradient(transparent, ActiveCaption) !important;
136+
background-size: auto 200% !important;
137+
}
129138

130-
:root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar:not([lwtheme]):-moz-window-inactive {
131-
background-image: linear-gradient(transparent, InactiveCaption);
139+
:root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar:not([lwtheme]):-moz-window-inactive {
140+
background-image: linear-gradient(transparent, InactiveCaption) !important;
141+
}
132142
}
133143

134144
/* Add a window top border for webextension themes */
@@ -467,3 +477,27 @@ menupopup[touchmode] :is(menu, menuitem, menucaption) {
467477
padding-inline: 0;
468478
}
469479
}
480+
481+
@media (-moz-bool-pref: "r3dfox.customizations.enabled") {
482+
#main-window[privatebrowsingmode="temporary"] #TabsToolbar {
483+
background-color: #CC190032 !important;
484+
/* background-image: radial-gradient(ellipse at bottom, rgba(255,165,165,0.8), rgba(255,165,165,0.5) 40%, transparent); */
485+
}
486+
}
487+
488+
@media (-moz-bool-pref: "r3dfox.force.transparency") {
489+
:root {
490+
--lwt-additional-images: none !important;
491+
--lwt-header-image: none !important;
492+
}
493+
494+
#navigator-toolbox {
495+
background-color: transparent !important;
496+
@media (-moz-bool-pref: "r3dfox.less.aero.fog") {
497+
background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 40%, transparent) !important;
498+
}
499+
@media not (-moz-bool-pref: "r3dfox.less.aero.fog") {
500+
background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 80%, transparent) !important;
501+
}
502+
}
503+
}

modules/libpref/init/all.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,16 @@ pref("toolkit.telemetry.user_characteristics_ping.logLevel", "Warn");
646646
// Extra logging for AsyncShutdown barriers and phases
647647
pref("toolkit.asyncshutdown.log", false);
648648

649+
// r3dfox preferences.
650+
// Red tint on private window.
651+
pref("r3dfox.customizations.enabled", true);
652+
// Less Aero fog than stock 115 by default.
653+
pref("r3dfox.less.aero.fog", true);
654+
// Ability to enable/disable Aero fog.
655+
pref("r3dfox.aero.fog", true);
656+
// Force (kinda) transparency.
657+
pref("r3dfox.force.transparency", false);
658+
649659
// Enable JS dump() function.
650660
// IMPORTANT: These prefs must be here even though they're also defined in
651661
// StaticPrefList.yaml. They are required because MOZILLA_OFFICIAL is false in

toolkit/themes/shared/in-content/common-shared.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217

218218
:root {
219219
appearance: none;
220-
background-color: var(--in-content-page-background);
220+
background: var(--in-content-page-background);
221221
color: var(--in-content-page-color);
222222
}
223223

0 commit comments

Comments
 (0)