Skip to content

Commit 1c5cb08

Browse files
committed
r3dfox theme and settings
1 parent 71d331b commit 1c5cb08

File tree

17 files changed

+780
-43
lines changed

17 files changed

+780
-43
lines changed

browser/base/content/browser-init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ var gBrowserInit = {
9393
const toolbarMenubar = document.getElementById("toolbar-menubar");
9494
// set a default value
9595
if (!toolbarMenubar.hasAttribute("autohide")) {
96-
toolbarMenubar.setAttribute("autohide", true);
96+
toolbarMenubar.setAttribute("autohide", false);
9797
}
9898
document.l10n.setAttributes(
9999
toolbarMenubar,

browser/components/BrowserGlue.sys.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,22 @@ let gThisInstanceIsLaunchOnLogin = false;
188188
// a taskbar tab shortcut will contain the "taskbar-tab" flag.
189189
let gThisInstanceIsTaskbarTab = false;
190190

191+
function applyCustomCSS() {
192+
let styleSheetService = Components.classes["@mozilla.org/content/style-sheet-service;1"]
193+
.getService(Components.interfaces.nsIStyleSheetService);
194+
let ioService = Components.classes["@mozilla.org/network/io-service;1"]
195+
.getService(Components.interfaces.nsIIOService);
196+
let uri = ioService.newURI("chrome://browser/skin/r3dfox.css", null, null);
197+
198+
if (!styleSheetService.sheetRegistered(uri, styleSheetService.AGENT_SHEET)) {
199+
styleSheetService.loadAndRegisterSheet(uri, styleSheetService.AGENT_SHEET);
200+
}
201+
}
202+
203+
applyCustomCSS();
204+
205+
applyCustomCSS();
206+
191207
/**
192208
* Fission-compatible JSProcess implementations.
193209
* Each actor options object takes the form of a ProcessActorOptions dictionary.

browser/components/preferences/main.inc.xhtml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,142 @@
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="r3dfoxdrag"
70+
data-l10n-id="r3dfox-drag"
71+
preference="r3dfox.drag-space.enabled"/>
72+
</hbox>
73+
<description class="indent tip-caption" data-l10n-id="r3dfox-drag-desc"/>
74+
75+
<hbox align="center">
76+
<checkbox id="r3dfoxColors"
77+
data-l10n-id="r3dfox-colors"
78+
preference="r3dfox.colors.enabled"/>
79+
</hbox>
80+
<description class="indent tip-caption" data-l10n-id="r3dfox-colors-desc"/>
81+
82+
<hbox align="center">
83+
<checkbox id="r3dfoxMenubar"
84+
data-l10n-id="r3dfox-menubar"
85+
preference="r3dfox.transparent.menubar"/>
86+
</hbox>
87+
<description class="indent tip-caption" data-l10n-id="r3dfox-menubar-desc"/>
88+
89+
<hbox align="center">
90+
<checkbox id="r3dfoxNavbar"
91+
data-l10n-id="r3dfox-navbar"
92+
preference="r3dfox.translucent.navbar"/>
93+
</hbox>
94+
<description class="indent tip-caption" data-l10n-id="r3dfox-navbar-desc"/>
95+
96+
<hbox align="center">
97+
<checkbox id="r3dfoxlessfog"
98+
data-l10n-id="r3dfox-less-fog"
99+
preference="r3dfox.less.aero.fog"/>
100+
</hbox>
101+
<description class="indent tip-caption" data-l10n-id="r3dfox-less-fog-desc"/>
102+
103+
<hbox align="center">
104+
<checkbox id="r3dfoxfog"
105+
data-l10n-id="r3dfox-fog"
106+
preference="r3dfox.aero.fog"/>
107+
</hbox>
108+
<description class="indent tip-caption" data-l10n-id="r3dfox-fog-desc"/>
109+
110+
<hbox align="center">
111+
<checkbox id="r3dfoxtransparency"
112+
data-l10n-id="r3dfox-transparency"
113+
preference="r3dfox.force.transparency"/>
114+
</hbox>
115+
<description class="indent tip-caption" data-l10n-id="r3dfox-transparency-desc"/>
116+
117+
<hbox align="center">
118+
<checkbox id="r3dfoxcaptiontext"
119+
data-l10n-id="r3dfox-caption-text"
120+
preference="r3dfox.caption.text.color"/>
121+
</hbox>
122+
<description class="indent tip-caption" data-l10n-id="r3dfox-caption-text-desc"/>
123+
124+
<hbox align="center">
125+
<checkbox id="r3dfoxoneoffs"
126+
data-l10n-id="r3dfox-one-offs"
127+
preference="browser.urlbar.oneOffsInstant"/>
128+
</hbox>
129+
<description class="indent tip-caption" data-l10n-id="r3dfox-one-offs-desc"/>
130+
131+
<hbox align="center">
132+
<checkbox id="r3dfoxe10s"
133+
data-l10n-id="r3dfox-e10s"
134+
preference="browser.e10s.disabled"/>
135+
</hbox>
136+
<description class="indent tip-caption" data-l10n-id="r3dfox-e10s-desc"/>
137+
138+
<hbox align="center">
139+
<label id="r3dfoxAccessibility" data-l10n-id="r3dfox-accessibility" control="r3dfoxAccessibilityType"/>
140+
<menulist id="r3dfoxAccessibilityType" preference="accessibility.force_disabled">
141+
<menupopup>
142+
<menuitem label="Always disabled (1)" value="1"/>
143+
<menuitem label="Default (0)" value="0"/>
144+
<menuitem label="Always enabled (-1)" value="-1"/>
145+
</menupopup>
146+
</menulist>
147+
</hbox>
148+
<description id="r3dfoxAccessibilityDescription" class="tip-caption" data-l10n-id="r3dfox-accessibility-desc"/>
149+
</groupbox>
150+
15151
<html:template id="template-paneGeneral">
16152
<hbox id="generalCategory"
17153
class="subcategory"

browser/components/preferences/main.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,24 @@ 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.colors.enabled", type: "bool" },
68+
{ id: "r3dfox.customizations.enabled", type: "bool" },
69+
{ id: "r3dfox.drag-space.enabled", type: "bool" },
70+
{ id: "r3dfox.transparent.menubar", type: "bool" },
71+
{ id: "r3dfox.translucent.navbar", type: "bool" },
72+
{ id: "r3dfox.less.aero.fog", type: "bool" },
73+
{ id: "r3dfox.aero.fog", type: "bool" },
74+
{ id: "r3dfox.force.transparency", type: "bool" },
75+
{ id: "r3dfox.caption.text.color", type: "bool" },
76+
{ id: "browser.urlbar.oneOffsInstant", type: "bool" },
77+
{ id: "browser.e10s.disabled", type: "bool" },
78+
{ id: "accessibility.force_disabled", type: "int" },
79+
6280
/* Tab preferences
6381
Preferences:
6482

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

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,83 @@ search-results-empty-message2 =
138138
139139
search-results-help-link = Need help? Visit <a data-l10n-name="url">{ -brand-short-name } Support</a>
140140
141-
## General Section
141+
## General Section - r3dfox
142+
143+
r3dfox-title = r3dfox configurations
144+
145+
r3dfox-native-checkbox =
146+
.label = Use native styles
147+
148+
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.
149+
150+
r3dfox-native-scroll = Scrollbar style
151+
152+
r3dfox-native-scroll-desc = This controls the style of the scrollbar.
153+
154+
r3dfox-fake-scroll-type = Non-native scrollbar theme
155+
156+
r3dfox-fake-scroll-type-desc = This controls the theme of the scrollbar.
157+
158+
r3dfox-theme =
159+
.label = Use r3dfox theme styles
160+
161+
r3dfox-theme-desc = This enables or disables the r3dfox theme.
162+
163+
r3dfox-drag =
164+
.label = Enable drag space on r3dfox theme styles
165+
166+
r3dfox-drag-desc = This enables or disables the caption/window bar drag space on the r3dfox theme.
167+
168+
r3dfox-colors =
169+
.label = Use r3dfox colors
170+
171+
r3dfox-colors-desc = This enables or disables the r3dfox colors.
172+
173+
r3dfox-menubar =
174+
.label = Transparent menubar
175+
176+
r3dfox-menubar-desc = This removes the menubar background.
177+
178+
r3dfox-navbar =
179+
.label = Translucent design
180+
181+
r3dfox-navbar-desc = This makes the tabs, navbar, urlbar, the top part of the UI all translucent.
182+
183+
r3dfox-less-fog =
184+
.label = Less intense caption bar fog
185+
186+
r3dfox-less-fog-desc = This reduces the amount of fog drawn on the caption bar, letting you better see the Aero effects.
187+
188+
r3dfox-fog =
189+
.label = Enable caption bar fog
190+
191+
r3dfox-fog-desc = This enables or disables caption bar fog completely.
192+
193+
r3dfox-transparency =
194+
.label = Force enable caption bar transparency
195+
196+
r3dfox-transparency-desc = Force enables caption bar transparency, may have varying results.
197+
198+
r3dfox-caption-text =
199+
.label = White caption text
200+
201+
r3dfox-caption-text-desc = Enable for white caption text.
202+
203+
r3dfox-one-offs =
204+
.label = Instant one off searches
205+
206+
r3dfox-one-offs-desc = Enable for instant one off searches.
207+
208+
r3dfox-e10s =
209+
.label = (BETA) Disable e10s (multiprocess)
210+
211+
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.
212+
213+
r3dfox-accessibility = Accessibility services
214+
215+
r3dfox-accessibility-desc = Recommended to disable if you do not need them for enhanced security and performance.
216+
217+
## General Section - Startup
142218

143219
startup-header = Startup
144220
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading

browser/themes/shared/jar.inc.mn

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
skin/classic/browser/tracking-protection-disabled.svg (../shared/identity-block/tracking-protection-disabled.svg)
105105
skin/classic/browser/tracking-protection-active.svg (../shared/identity-block/tracking-protection-active.svg)
106106

107+
skin/classic/browser/r3d-toolbar-drag-indicator.svg (../shared/r3d-toolbar-drag-indicator.svg)
107108
skin/classic/browser/toolbar-drag-indicator.svg (../shared/toolbar-drag-indicator.svg)
108109

109110
skin/classic/browser/protections/resolved-breach.svg (../shared/protections/resolved-breach.svg)
@@ -226,6 +227,7 @@
226227
skin/classic/browser/tabbrowser/fullscreen-and-pointerlock.css (../shared/tabbrowser/fullscreen-and-pointerlock.css)
227228
skin/classic/browser/tabbrowser/loading.svg (../shared/tabbrowser/loading.svg)
228229
skin/classic/browser/tabbrowser/loading-burst.svg (../shared/tabbrowser/loading-burst.svg)
230+
skin/classic/browser/tabbrowser/r3d-tab-drag-indicator.svg (../shared/tabbrowser/r3d-tab-drag-indicator.svg)
229231
skin/classic/browser/tabbrowser/tab-audio-playing-small.svg (../shared/tabbrowser/tab-audio-playing-small.svg)
230232
skin/classic/browser/tabbrowser/tab-audio-muted-small.svg (../shared/tabbrowser/tab-audio-muted-small.svg)
231233
skin/classic/browser/tabbrowser/tab-audio-blocked-small.svg (../shared/tabbrowser/tab-audio-blocked-small.svg)
@@ -286,3 +288,10 @@
286288
skin/classic/browser/weather/night-partly-cloudy-with-showers.svg (../shared/weather/night-partly-cloudy-with-showers.svg)
287289
skin/classic/browser/weather/night-partly-cloudy-with-thunderstorms.svg (../shared/weather/night-partly-cloudy-with-thunderstorms.svg)
288290
skin/classic/browser/weather/night-mostly-cloudy-with-flurries.svg (../shared/weather/night-mostly-cloudy-with-flurries.svg)
291+
292+
browser.jar:
293+
% skin browser classic/1.0 %skin/classic/browser/
294+
skin/classic/browser/r3dfox.css (../shared/r3dfox.css)
295+
skin/classic/browser/r3d_center.svg (../shared/icons/r3d_center.svg)
296+
skin/classic/browser/r3d_left_corner.svg (../shared/icons/r3d_left_corner.svg)
297+
skin/classic/browser/r3d_right_corner.svg (../shared/icons/r3d_right_corner.svg)

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

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,17 @@
3131
}
3232
}
3333

34-
/* Add a fog for background tabs to be visible on Windows 7 glass window background */
35-
@media (-moz-platform: windows-win7) {
36-
@media (-moz-windows-default-theme) {
34+
/* Black toolbar text for 7 to make stuffs visible */
35+
@media (-moz-platform: windows-win7),
36+
(-moz-platform: windows-win8) {
37+
@media (-moz-windows-default-theme), (-moz-windows-compositor) {
3738
#TabsToolbar {
38-
background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 40%, transparent);
3939
color: black;
4040
--toolbarbutton-icon-fill: currentColor;
4141
}
42-
}
43-
}
44-
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);
42+
:root {
43+
--lwt-text-color: black !important;
44+
}
5345
}
5446
}
5547

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)