├── .github
└── workflows
│ └── test-build.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── configurator.py
├── requirements.txt
├── src
├── branding-template
│ ├── LICENSE
│ ├── PrivateBrowsing_150.png
│ ├── PrivateBrowsing_70.png
│ ├── background.png
│ ├── branding.nsi
│ ├── configure.sh
│ ├── content
│ │ ├── about-logo.png
│ │ ├── about-logo.svg
│ │ ├── about-logo@2x.png
│ │ ├── about-wordmark.svg
│ │ ├── about.png
│ │ ├── aboutDialog.css
│ │ ├── aboutlogins.svg
│ │ ├── firefox-wordmark.svg
│ │ ├── jar.mn
│ │ └── moz.build
│ ├── disk.icns
│ ├── document.icns
│ ├── document.ico
│ ├── document_pdf.ico
│ ├── dsstore
│ ├── firefox.VisualElementsManifest.xml
│ ├── locales
│ │ ├── en-US
│ │ │ ├── brand.dtd
│ │ │ ├── brand.ftl
│ │ │ └── brand.properties
│ │ ├── jar.mn
│ │ └── moz.build
│ ├── moz.build
│ ├── msix
│ │ └── Assets
│ │ │ ├── Document44x44.png
│ │ │ └── Wide310x150Logo.scale-200.png
│ ├── newtab.ico
│ ├── newwindow.ico
│ ├── pbmode.ico
│ ├── pref
│ │ └── firefox-branding.js
│ ├── private_browsing.VisualElementsManifest.xml
│ ├── stubinstaller
│ │ ├── bgstub.jpg
│ │ ├── installing_page.css
│ │ └── profile_cleanup_page.css
│ ├── wizHeader.bmp
│ ├── wizHeaderRTL.bmp
│ └── wizWatermark.bmp
├── changed
│ └── browser
│ │ └── themes
│ │ ├── linux
│ │ ├── browser.css
│ │ └── webRTC-indicator.css
│ │ ├── osx
│ │ ├── browser.css
│ │ └── webRTC-indicator.css
│ │ ├── shared
│ │ └── webRTC-indicator.css
│ │ └── windows
│ │ ├── browser.css
│ │ └── webRTC-indicator.css
├── distribution
│ ├── policies-flatpak.json
│ ├── policies-linux-appimage.json
│ ├── policies-linux.json
│ └── policies-windows.json
├── launch-app
│ ├── CMakeLists.txt
│ ├── README.md
│ └── src
│ │ ├── linux.cpp
│ │ ├── mac.cpp
│ │ ├── main.cpp
│ │ ├── placeholders.hpp
│ │ ├── platform_specific.hpp
│ │ ├── running_guard.cpp
│ │ ├── running_guard.hpp
│ │ ├── tray_mac.hpp
│ │ └── windows.cpp
├── mac
│ ├── Info-aarch64.plist
│ ├── Info-x86_64.plist
│ └── close-on-window-closed.patch
├── mozconfig.linux
├── mozconfig.linux-aarch64
├── mozconfig.mac-arm
├── mozconfig.mac-intel
├── mozconfig.windows
├── mozilla_dirsFromLibreWolf.patch
├── open-in-default-browser
│ ├── README.md
│ ├── builtin-open-in-default-browser.patch
│ ├── makefile
│ ├── open-in-default-browser
│ ├── open-in-default-browser-ext
│ │ ├── extension
│ │ │ ├── manifest.json
│ │ │ └── replaceLinks.js
│ │ └── moz.build
│ ├── open-in-default-browser-mac
│ └── open-in-default-browser.bat
├── packages
│ └── appimage
│ │ └── neutron.AppImage
│ │ ├── AppRun
│ │ ├── neutron.desktop
│ │ └── usr
│ │ └── share
│ │ └── icons
│ │ └── .gitignore
├── scripts
│ ├── build.py
│ └── build
│ │ ├── appimage
│ │ ├── appimage-aarch64
│ │ ├── download-firefox-source
│ │ ├── launch-app-linux
│ │ ├── launch-app-linux-aarch64
│ │ ├── launch-app-mac-arm
│ │ ├── launch-app-mac-intel
│ │ ├── launch-app-windows
│ │ ├── linux
│ │ ├── linux-aarch64
│ │ ├── mac-arm
│ │ ├── mac-intel
│ │ ├── open-in-default-browser
│ │ └── windows
└── windows
│ ├── app.rc
│ ├── fxc.patch
│ └── setup.nsi
└── test
├── config.json
└── test.svg
/.github/workflows/test-build.yml:
--------------------------------------------------------------------------------
1 | # This is a basic workflow to help you get started with Actions
2 |
3 | name: Test Build
4 |
5 | # Controls when the workflow will run
6 | on:
7 | # Triggers the workflow on push or pull request events but only for the "main" branch
8 | push:
9 | branches: [ "main" ]
10 | pull_request:
11 | branches: [ "main" ]
12 |
13 | # Allows you to run this workflow manually from the Actions tab
14 | workflow_dispatch:
15 |
16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
17 | jobs:
18 | # This workflow contains a single job called "build"
19 | build:
20 | # The type of runner that the job will run on
21 | runs-on: ubuntu-latest
22 |
23 | # Steps represent a sequence of tasks that will be executed as part of the job
24 | steps:
25 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26 | - uses: actions/checkout@v3
27 | with:
28 | submodules: "recursive"
29 |
30 | # Runs a set of commands using the runners shell
31 | - name: Install Dependencies
32 | run: |
33 | pip install -r requirements.txt
34 | sudo apt install aria2 mingw-w64 alsa libasound2-dev libpulse-dev cbindgen libdbus-glib2.0-cil-dev libgtk-3-0 libgtk-3-dev libpango-1.0-0 libpango1.0-dev nasm libnss3-dev libnss3 libx11-xcb-dev wasi-libc
35 |
36 | # Runs a set of commands using the runners shell
37 | - name: Configure and Build
38 | run: |
39 | python configurator.py -c test/config.json
40 | cd build
41 | python build.py
42 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # .gitignore - List of filenames git should ignore
2 |
3 | # Filenames that should be ignored wherever they appear
4 | *~
5 | *.pyc
6 | *.pyo
7 | TAGS
8 | tags
9 | compile_commands.json
10 | toolchains.json
11 |
12 | # Ignore ID generated by idutils and un-ignore id directory (for Indonesian locale)
13 | ID
14 | !id/
15 | .DS_Store*
16 | *.pdb
17 | *.egg-info
18 | .eslintcache
19 | # Filesystem temporaries
20 | .fuse_hidden*
21 |
22 | # Vim swap files.
23 | .*.sw[a-z]
24 | .sw[a-z]
25 |
26 | # Emacs directory variable files.
27 | **/.dir-locals.el
28 | # Emacs project sentinel files.
29 | **/.projectile
30 |
31 | # User files that may appear at the root
32 | /.mozconfig*
33 | /mozconfig*
34 | /configure
35 | /old-configure
36 | /config.cache
37 | /config.log
38 | /.clang_complete
39 | /machrc
40 | /.machrc
41 | /.cargo
42 | # pyenv artifact
43 | /.python-version
44 |
45 | # Empty marker file that's generated when we check out NSS
46 | security/manager/.nss.checkout
47 |
48 | # Build directories
49 | /obj*/
50 |
51 | # gecko.log is generated by various test harnesses
52 | /gecko.log
53 |
54 | # Ignore newtab component build assets
55 | browser/components/newtab/logs/
56 |
57 | # Build directories for js shell
58 | *_DBG.OBJ/
59 | *_OPT.OBJ/
60 | /js/src/*-obj/
61 | /js/src/obj-*/
62 |
63 | # SpiderMonkey configury
64 | js/src/configure
65 | js/src/old-configure
66 | js/src/autom4te.cache
67 | # SpiderMonkey test result logs
68 | js/src/tests/results-*.html
69 | js/src/tests/results-*.txt
70 |
71 | # Java HTML5 parser classes
72 | parser/html/java/htmlparser/
73 | parser/html/java/javaparser/
74 | parser/html/java/javaparser.jar
75 | parser/html/java/translator.jar
76 |
77 | # Ignore the files and directory that Eclipse IDE creates
78 | .project
79 | .cproject
80 | .settings/
81 |
82 | # Ignore the files and directory that JetBrains IDEs create.
83 | /.idea/
84 | *.iml
85 | # Android Monitor in Android Studio creates a captures/ directory.
86 | /captures/
87 |
88 | # Gradle cache.
89 | /.gradle/
90 |
91 | # Local Gradle configuration properties.
92 | /local.properties
93 |
94 | # Ignore chrome.manifest files from the devtools loader
95 | devtools/client/chrome.manifest
96 | devtools/shared/chrome.manifest
97 |
98 | # Ignore debugger build directories
99 | devtools/client/debugger/assets/build
100 | devtools/client/debugger/assets/module-manifest.json
101 |
102 | # Ignore node_modules directories in devtools
103 | devtools/**/node_modules
104 |
105 | # Ignore browsertime output directory
106 | browsertime-results
107 |
108 | # Tag files generated by GNU Global
109 | GTAGS
110 | GRTAGS
111 | GSYMS
112 | GPATH
113 |
114 | # Git clone directory for updating web-platform-tests
115 | testing/web-platform/sync/
116 |
117 | # Third party metadata for web-platform-tests
118 | testing/web-platform/products/
119 |
120 | # Android Gradle artifacts.
121 | mobile/android/gradle/.gradle
122 |
123 | # XCode project cruft
124 | /*.xcodeproj/
125 |
126 | # Rust/Cargo output from running `cargo` directly
127 | /target/
128 |
129 | # Ignore mozharness execution files
130 | testing/mozharness/.tox/
131 | testing/mozharness/build/
132 | testing/mozharness/logs/
133 | testing/mozharness/.coverage
134 | testing/mozharness/nosetests.xml
135 |
136 | # Ignore ESLint node_modules
137 | node_modules/
138 |
139 | # Ignore talos virtualenv and tp5n files.
140 | # The tp5n set is supposed to be decompressed at
141 | # testing/talos/talos/fis|tests/tp5n in order to run tests like tps
142 | # locally. Similarly, running talos requires a Python package virtual
143 | # environment. Both the virtual environment and tp5n files end up littering
144 | # the status command, so we ignore them.
145 | testing/talos/.Python
146 | testing/talos/bin/
147 | testing/talos/include/
148 | testing/talos/lib/
149 | testing/talos/talos/fis/tp5n.zip
150 | testing/talos/talos/fis/tp5n
151 | testing/talos/talos/tests/tp5n.zip
152 | testing/talos/talos/tests/tp5n
153 | testing/talos/talos/tests/devtools/damp.manifest.develop
154 |
155 | # Ignore sync tps logs and reports
156 | tps.log
157 | tps_result.json
158 |
159 | # Ignore files created when running a reftest.
160 | lextab.py
161 |
162 | # Ignore Visual Studio Code workspace files.
163 | .vscode/
164 | !.vscode/extensions.json
165 | !.vscode/tasks.json
166 |
167 | # Ignore various raptor performance framework files
168 | testing/raptor/.raptor-venv
169 | testing/raptor/raptor-venv
170 | testing/raptor/raptor/tests/json/
171 | testing/raptor/webext/raptor/auto_gen_test_config.js
172 |
173 | # Ignore appimages
174 | packages/appimage/datcord.AppImage/usr/bin/*
175 | packages/appimage/Datcord-x86_64.AppImage
176 |
177 | # Ignore flatpak
178 | packages/flatpak/flatpak
179 | packages/flatpak/shared-modules
180 | packages/flatpak/.flatpak-builder
181 |
182 | # Ignore build dir
183 | /build/
184 |
185 | # Launch app
186 | /src/launch-app/build/
187 | /src/launch-app/.cache/
188 | /src/launch-app/compile_flags.txt
189 |
190 | # Ignore any configs
191 | /config.json
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "src/launch-app/extern/boost"]
2 | path = src/launch-app/extern/boost
3 | url = https://github.com/boostorg/boost.git
4 | [submodule "src/launch-app/extern/traypp"]
5 | path = src/launch-app/extern/traypp
6 | url = https://github.com/gamingdoom/traypp.git
7 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Pranay Sanghai
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
9 |
Neutron
10 |
23 |
24 | # About Neutron
25 |
26 | Neutron is an open-source tool for creating desktop applications based on web applications. Neutron uses Gecko/Firefox under the hood.
27 |
28 | # Usage
29 | Neutron can be configured through the ``configurator.py`` configuration wizard. After being configured, ``config.json`` is generated in the build folder and ``build.py`` can be run to build your application. One example of a Neutron application is [Datcord](https://github.com/gamingdoom/datcord). More information can be found on the [wiki](https://github.com/gamingdoom/neutron/wiki).
30 | ## Making an application
31 | Currently, neutron applications can only be built on Linux.
32 | ```
33 | git clone https://github.com/gamingdoom/neutron.git --recurse-submodules -j8
34 | cd neutron
35 | pip install -r requirements.txt
36 | python configurator.py
37 | cd build
38 | python build.py
39 | ```
40 | # Why?
41 | Neutron is beneficial for the internet as a whole as it challenges the status quo of everything being Chromium based. If more people are able to use browsers other than Chromium, the internet will be freer since there will be no browser monoply.
42 |
--------------------------------------------------------------------------------
/configurator.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | import json
3 | import re
4 | import os
5 | import shutil
6 | import sys
7 | import argparse
8 |
9 | parser = argparse.ArgumentParser(
10 | description='This program can guide you through the process of configuring Neutron.')
11 |
12 | parser.add_argument("-c", "--config-file", help="File path of the config JSON generated by a past run of this program.", required=False)
13 | parser.add_argument("-k", "--keep-build-dir", help="Don't clear the build folder.", required=False, action="store_true")
14 |
15 | def main(args: argparse.Namespace):
16 | if not args.config_file:
17 | appinfo = {}
18 | appinfo["appName"] = input("Enter the name of your application (example: Datcord):\n")
19 | appinfo["internalAppName"] = appinfo["appName"].replace(" ", "-").lower()
20 | appinfo["url"] = input("Please enter the URL of your application (example: https://discord.com/app):\n")
21 | appinfo["logoSvgFilePath"] = os.path.abspath(input("Please provide a path to a SVG of the application's logo (example: ../src/datcord.svg):\n"))
22 | while True:
23 | try:
24 | appinfo["platforms"] = json.loads('{"array":' + input('List of lowercase platform names to build for (example: ["linux", "appimage", "windows"]):\n') + "}")["array"]
25 | break
26 | except json.JSONDecodeError:
27 | print("Please enter the platforms in the same format as the example.")
28 |
29 | answer = input("Should any external extensions be installed? [y/n]")
30 | if answer == ("Y" or "y"):
31 | try:
32 | appinfo["extensionURLs"] = json.loads('{"array":' + input('List URLs of extensions to install (example: ["https://example.com/extension.zip"]):\n') + "}")["array"]
33 | except json.JSONDecodeError:
34 | appinfo["extensionURLs"] = []
35 |
36 | appinfo["version"] = input("Enter the application version (example: 1.0.0):\n")
37 | appinfo["projectURL"] = input("Enter the URL to your project (example: https://github.com/gamingdoom/datcord):\n")
38 | appinfo["projectHelpURL"] = input("Enter the help URL for your project (example: https://github.com/gamingdoom/datcord/issues):\n")
39 |
40 | while True:
41 | answer = input("Allow links to open in the default browser? [y/n]\n")
42 | if answer == ("y" or "Y"):
43 | appinfo["openInDefaultBrowser"] = True
44 | if not shutil.which("web-ext"):
45 | print("web-ext missing! It must be installed to build support for opening links in the default browser.")
46 | exit(1)
47 |
48 | while True:
49 | appinfo["openInDefaultBrowserRegex"] = input("Please enter a regular expression that matches links that shouldn't open in the default browser (example: http[s]?://discord.com):\n")
50 | try:
51 | pattern = re.compile(appinfo["openInDefaultBrowserRegex"])
52 | if not pattern.match(appinfo["url"]):
53 | print("The provided pattern matched the url of the application!")
54 | continue
55 | break
56 | except:
57 | print("Invalid regular expression!")
58 | continue
59 | break
60 | elif answer == ("n" or "N"):
61 | appinfo["openInDefaultBrowser"] = False
62 | break
63 |
64 | while True:
65 | answer = input("Should the app run in the background when closed? This would make it deliver notifications even when closed. [y/n]\n")
66 | if answer == ("y" or "Y"):
67 | appinfo["runInBackground"] = True
68 | break
69 |
70 | elif answer == ("n" or "N"):
71 | appinfo["runInBackground"] = False
72 | break
73 |
74 | else:
75 | with open(args.config_file, "r") as f:
76 | appinfo = json.load(f)
77 |
78 | if not args.keep_build_dir:
79 | if os.path.exists("build"):
80 | print("Clearing build folder!")
81 | shutil.rmtree("build")
82 |
83 | os.mkdir("build")
84 |
85 | shutil.copyfile("src/scripts/build.py", "build/build.py")
86 | shutil.copytree("src", "build/src", dirs_exist_ok=True)
87 |
88 | with open("build/config.json", "w") as f:
89 | json.dump(appinfo, f, indent=4)
90 |
91 | print("Done! Run build.py in the build directory to build.")
92 |
93 | return
94 |
95 | if __name__ == "__main__":
96 | args = parser.parse_args()
97 | main(args)
98 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | pillow
2 | cairosvg
--------------------------------------------------------------------------------
/src/branding-template/LICENSE:
--------------------------------------------------------------------------------
1 | These files are under the MPL 2, as below. However, please note that you
2 | are not granted any trademark rights or licenses to the trademarks of the
3 | Mozilla Foundation or any party, including without limitation the
4 | Firefox name or logo.
5 |
6 | For more information, see: https://www.mozilla.org/foundation/licensing/
7 |
8 | This Source Code Form is subject to the terms of the Mozilla Public
9 | License, v. 2.0. If a copy of the MPL was not distributed with this
10 | file, You can obtain one at https://mozilla.org/MPL/2.0/.
11 |
--------------------------------------------------------------------------------
/src/branding-template/PrivateBrowsing_150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/PrivateBrowsing_150.png
--------------------------------------------------------------------------------
/src/branding-template/PrivateBrowsing_70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/PrivateBrowsing_70.png
--------------------------------------------------------------------------------
/src/branding-template/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/background.png
--------------------------------------------------------------------------------
/src/branding-template/branding.nsi:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | # NSIS branding defines for official release builds.
6 | # The nightly build branding.nsi is located in browser/installer/windows/nsis/
7 | # The unofficial build branding.nsi is located in browser/branding/unofficial/
8 |
9 | # BrandFullNameInternal is used for some registry and file system values
10 | # instead of BrandFullName and typically should not be modified.
11 | !define BrandFullNameInternal "NEUTRON_INTERNAL_APP_NAME"
12 | !define BrandFullName "NEUTRON_APP_NAME"
13 | !define CompanyName "NEUTRON_APP_NAME"
14 | !define URLInfoAbout "NEUTRON_PROJECT_URL"
15 | !define HelpLink "NEUTRON_PROJECT_HELP_URL"
16 |
17 | ; The OFFICIAL define is a workaround to support different urls for Release and
18 | ; Beta since they share the same branding when building with other branches that
19 | ; set the update channel to beta.
20 | !define OFFICIAL
21 | !define URLStubDownloadX86 "https://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-latest"
22 | !define URLStubDownloadAMD64 "https://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-latest"
23 | !define URLStubDownloadAArch64 "https://download.mozilla.org/?os=win64-aarch64&lang=${AB_CD}&product=firefox-latest"
24 | !define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=release&installer_lang=${AB_CD}"
25 | !define URLSystemRequirements "https://www.mozilla.org/firefox/system-requirements/"
26 | !define Channel "release"
27 |
28 | # The installer's certificate name and issuer expected by the stub installer
29 | !define CertNameDownload "Mozilla Corporation"
30 | !define CertIssuerDownload "DigiCert SHA2 Assured ID Code Signing CA"
31 |
32 | # Dialog units are used so the UI displays correctly with the system's DPI
33 | # settings. These are tweaked to look good with the en-US strings; ideally
34 | # we would customize them for each locale but we don't really have a way to
35 | # implement that and it would be a ton of work for the localizers.
36 | !define PROFILE_CLEANUP_LABEL_TOP "50u"
37 | !define PROFILE_CLEANUP_LABEL_LEFT "22u"
38 | !define PROFILE_CLEANUP_LABEL_WIDTH "175u"
39 | !define PROFILE_CLEANUP_LABEL_HEIGHT "100u"
40 | !define PROFILE_CLEANUP_LABEL_ALIGN "left"
41 | !define PROFILE_CLEANUP_CHECKBOX_LEFT "22u"
42 | !define PROFILE_CLEANUP_CHECKBOX_WIDTH "175u"
43 | !define PROFILE_CLEANUP_BUTTON_LEFT "22u"
44 | !define INSTALL_HEADER_TOP "70u"
45 | !define INSTALL_HEADER_LEFT "22u"
46 | !define INSTALL_HEADER_WIDTH "180u"
47 | !define INSTALL_HEADER_HEIGHT "100u"
48 | !define INSTALL_BODY_LEFT "22u"
49 | !define INSTALL_BODY_WIDTH "180u"
50 | !define INSTALL_INSTALLING_TOP "115u"
51 | !define INSTALL_INSTALLING_LEFT "270u"
52 | !define INSTALL_INSTALLING_WIDTH "150u"
53 | !define INSTALL_PROGRESS_BAR_TOP "100u"
54 | !define INSTALL_PROGRESS_BAR_LEFT "270u"
55 | !define INSTALL_PROGRESS_BAR_WIDTH "150u"
56 | !define INSTALL_PROGRESS_BAR_HEIGHT "12u"
57 |
58 | !define PROFILE_CLEANUP_CHECKBOX_TOP_MARGIN "12u"
59 | !define PROFILE_CLEANUP_BUTTON_TOP_MARGIN "12u"
60 | !define PROFILE_CLEANUP_BUTTON_X_PADDING "80u"
61 | !define PROFILE_CLEANUP_BUTTON_Y_PADDING "8u"
62 | !define INSTALL_BODY_TOP_MARGIN "20u"
63 |
64 | # Font settings that can be customized for each channel
65 | !define INSTALL_HEADER_FONT_SIZE 20
66 | !define INSTALL_HEADER_FONT_WEIGHT 600
67 | !define INSTALL_INSTALLING_FONT_SIZE 15
68 | !define INSTALL_INSTALLING_FONT_WEIGHT 600
69 |
70 | # UI Colors that can be customized for each channel
71 | !define COMMON_TEXT_COLOR 0x000000
72 | !define COMMON_BACKGROUND_COLOR 0xFFFFFF
73 | !define INSTALL_INSTALLING_TEXT_COLOR 0xFFFFFF
74 | # This color is written as 0x00BBGGRR because it's actually a COLORREF value.
75 | !define PROGRESS_BAR_BACKGROUND_COLOR 0xFFAA00
76 |
--------------------------------------------------------------------------------
/src/branding-template/configure.sh:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 |
6 | MOZ_APP_NAME=NEUTRON_INTERNAL_APP_NAME
7 | MOZ_APP_BASENAME=NEUTRON_APP_NAME
8 | MOZ_APP_PROFILE=NEUTRON_INTERNAL_APP_NAME
9 | MOZ_APP_VENDOR=NEUTRON_APP_NAME
10 | MOZ_APP_DISPLAYNAME=NEUTRON_APP_NAME
11 |
--------------------------------------------------------------------------------
/src/branding-template/content/about-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/content/about-logo.png
--------------------------------------------------------------------------------
/src/branding-template/content/about-logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/branding-template/content/about-logo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/content/about-logo@2x.png
--------------------------------------------------------------------------------
/src/branding-template/content/about-wordmark.svg:
--------------------------------------------------------------------------------
1 |
4 |
8 |
--------------------------------------------------------------------------------
/src/branding-template/content/about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/content/about.png
--------------------------------------------------------------------------------
/src/branding-template/content/aboutDialog.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | #aboutDialogContainer {
6 | background-color: #20123a;
7 | color: #fff;
8 | }
9 |
10 | #clientBox {
11 | padding: 10px 0 15px;
12 | }
13 |
14 | #leftBox {
15 | background-image: url("chrome://branding/content/about-logo.png");
16 | background-repeat: no-repeat;
17 | background-size: 192px auto;
18 | background-position: center 20%;
19 | /* min-width and min-height create room for the logo */
20 | min-width: 210px;
21 | min-height: 210px;
22 | margin-top: 20px;
23 | margin-inline-start: 30px;
24 | }
25 |
26 | @media (min-resolution: 2dppx) {
27 | #leftBox {
28 | background-image: url("chrome://branding/content/about-logo@2x.png");
29 | }
30 | }
31 |
32 | .text-link {
33 | color: #fff !important;
34 | text-decoration: underline;
35 | }
36 |
37 | .text-link:-moz-focusring {
38 | border-color: #fff;
39 | }
40 |
41 | #rightBox {
42 | margin-inline: 30px;
43 | }
44 |
45 | #bottomBox {
46 | background-color: hsla(235, 43%, 10%, .5);
47 | padding: 15px 10px 15px;
48 | }
49 |
50 | #trademark {
51 | font-size: xx-small;
52 | text-align: center;
53 | color: #999999;
54 | margin-block: 10px;
55 | }
56 |
--------------------------------------------------------------------------------
/src/branding-template/content/aboutlogins.svg:
--------------------------------------------------------------------------------
1 |
60 |
--------------------------------------------------------------------------------
/src/branding-template/content/firefox-wordmark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/branding-template/content/jar.mn:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | browser.jar:
6 | % content branding %content/branding/ contentaccessible=yes
7 | content/branding/about.png
8 | content/branding/about-logo.png
9 | content/branding/about-logo.svg
10 | content/branding/about-logo@2x.png
11 | content/branding/about-wordmark.svg
12 | content/branding/firefox-wordmark.svg
13 | content/branding/aboutlogins.svg
14 | content/branding/icon16.png (../default16.png)
15 | content/branding/icon32.png (../default32.png)
16 | content/branding/icon48.png (../default48.png)
17 | content/branding/icon64.png (../default64.png)
18 | content/branding/icon128.png (../default128.png)
19 | content/branding/aboutDialog.css
20 |
--------------------------------------------------------------------------------
/src/branding-template/content/moz.build:
--------------------------------------------------------------------------------
1 | # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 | # vim: set filetype=python:
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | JAR_MANIFESTS += ["jar.mn"]
8 |
--------------------------------------------------------------------------------
/src/branding-template/disk.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/disk.icns
--------------------------------------------------------------------------------
/src/branding-template/document.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/document.icns
--------------------------------------------------------------------------------
/src/branding-template/document.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/document.ico
--------------------------------------------------------------------------------
/src/branding-template/document_pdf.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/document_pdf.ico
--------------------------------------------------------------------------------
/src/branding-template/dsstore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/dsstore
--------------------------------------------------------------------------------
/src/branding-template/firefox.VisualElementsManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
12 |
13 |
--------------------------------------------------------------------------------
/src/branding-template/locales/en-US/brand.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/src/branding-template/locales/en-US/brand.ftl:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | ## Firefox and Mozilla Brand
6 | ##
7 | ## Firefox and Mozilla must be treated as a brand.
8 | ##
9 | ## They cannot be:
10 | ## - Transliterated.
11 | ## - Translated.
12 | ##
13 | ## Declension should be avoided where possible, leaving the original
14 | ## brand unaltered in prominent UI positions.
15 | ##
16 | ## For further details, consult:
17 | ## https://mozilla-l10n.github.io/styleguides/mozilla_general/#brands-copyright-and-trademark
18 |
19 | -brand-shorter-name = NEUTRON_APP_NAME
20 | -brand-short-name = NEUTRON_APP_NAME
21 | -brand-full-name = NEUTRON_APP_NAME
22 | # This brand name can be used in messages where the product name needs to
23 | # remain unchanged across different versions (Nightly, Beta, etc.).
24 | -brand-product-name = NEUTRON_APP_NAME
25 | -vendor-short-name = NEUTRON_APP_NAME
26 | trademarkInfo = { " " }
27 |
--------------------------------------------------------------------------------
/src/branding-template/locales/en-US/brand.properties:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | brandShorterName=NEUTRON_APP_NAME
6 | brandShortName=NEUTRON_APP_NAME
7 | brandFullName=NEUTRON_APP_NAME
8 | # LOCALIZATION NOTE(brandProductName):
9 | # This brand name can be used in messages where the product name needs to
10 | # remain unchanged across different versions (Nightly, Beta, etc.).
11 | brandProductName=NEUTRON_APP_NAME
12 | vendorShortName=NEUTRON_APP_NAME
13 |
--------------------------------------------------------------------------------
/src/branding-template/locales/jar.mn:
--------------------------------------------------------------------------------
1 | #filter substitution
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | [localization] @AB_CD@.jar:
7 | branding (%*.ftl)
8 |
9 | @AB_CD@.jar:
10 | % locale branding @AB_CD@ %locale/branding/
11 | locale/branding/brand.dtd (%brand.dtd)
12 | locale/branding/brand.properties (%brand.properties)
13 |
--------------------------------------------------------------------------------
/src/branding-template/locales/moz.build:
--------------------------------------------------------------------------------
1 | # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 | # vim: set filetype=python:
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | JAR_MANIFESTS += ["jar.mn"]
8 |
--------------------------------------------------------------------------------
/src/branding-template/moz.build:
--------------------------------------------------------------------------------
1 | # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 | # vim: set filetype=python:
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | DIRS += ['content', 'locales']
8 |
9 | DIST_SUBDIR = 'browser'
10 | export('DIST_SUBDIR')
11 |
12 | include('../branding-common.mozbuild')
13 | FirefoxBranding()
14 |
--------------------------------------------------------------------------------
/src/branding-template/msix/Assets/Document44x44.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/msix/Assets/Document44x44.png
--------------------------------------------------------------------------------
/src/branding-template/msix/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/msix/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/src/branding-template/newtab.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/newtab.ico
--------------------------------------------------------------------------------
/src/branding-template/newwindow.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/newwindow.ico
--------------------------------------------------------------------------------
/src/branding-template/pbmode.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/pbmode.ico
--------------------------------------------------------------------------------
/src/branding-template/pref/firefox-branding.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | // open links in default browser
6 | pref("network.protocol-handler.external.open", true);
7 | pref("network.protocol-handler.warn-external.open", true);
8 | pref("network.protocol-handler.expose.open", false);
9 |
10 | pref("permissions.default.camera", 1);
11 | pref("permissions.default.microphone", 1);
12 |
13 | pref("browser.link.open_newwindow", 1);
14 | pref("browser.warnOnQuit", false);
15 | pref("browser.uitour.enabled", false);
16 | pref("browser.privatebrowsing.vpnpromourl", "");
17 | pref("browser.tabs.inTitlebar", 0);
18 |
19 | pref("browser.startup.upgradeDialog.enabled", false);
20 | pref("browser.startup.firstrunSkipsHomepage", false);
21 | pref("browser.startup.page", 1);
22 | pref("browser.startup.homepage", "NEUTRON_APP_URL");
23 |
24 | pref("browser.shell.setDefaultPDFHandler", false);
25 | pref("browser.shell.setDefaultBrowserUserChoice", false);
26 | pref("browser.shell.checkDefaultBrowser", false);
27 | pref("browser.shell.skipDefaultBrowserCheckOnFirstRun", true);
28 | #ifdef XP_WIN
29 | pref("default-browser-agent.enabled", false);
30 | #endif
31 |
32 | pref("browser.urlbar.suggest.bookmark", false);
33 | pref("browser.urlbar.suggest.history", false);
34 | pref("browser.urlbar.suggest.openpage", false);
35 | pref("browser.urlbar.suggest.remotetab", false);
36 | pref("browser.urlbar.suggest.searches", false);
37 | pref("browser.urlbar.suggest.topsites", false);
38 | pref("browser.urlbar.suggest.engines", false);
39 |
40 | pref("xpinstall.signatures.required", false);
41 |
42 | // Don't show session restore page
43 | pref("browser.sessionstore.max_tabs_undo", 0);
44 | pref("browser.sessionstore.max_windows_undo", 0);
45 | pref("browser.sessionstore.max_resumed_crashes", 0);
46 | pref("browser.sessionstore.resume_from_crash", false);
47 | pref("browser.sessionstore.collect_session_storage", false);
48 | pref("browser.sessionstore.restore_on_demand", false);
49 | pref("browser.startup.couldRestoreSession.count", -1);
50 |
--------------------------------------------------------------------------------
/src/branding-template/private_browsing.VisualElementsManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
12 |
--------------------------------------------------------------------------------
/src/branding-template/stubinstaller/bgstub.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/stubinstaller/bgstub.jpg
--------------------------------------------------------------------------------
/src/branding-template/stubinstaller/installing_page.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | body {
6 | color: black;
7 | }
8 |
9 | /*
10 | * We want to treat the two pieces of text in the left column as one unit and
11 | center that unit vertically in the window. In order to make IE8 do that,
12 | we have to wrap the two bits of text in a container and make that a
13 | table-cell (which means we need an outer container that's display: table).
14 | So that's what this mess is doing.
15 | */
16 | #text_column {
17 | position: fixed;
18 | height: 100%;
19 | margin-left: 30px;
20 | width: 40%;
21 | display: table;
22 | }
23 |
24 | #text_column_container {
25 | display: table-cell;
26 | vertical-align: middle;
27 | padding-top: 60px;
28 | }
29 |
30 | #header {
31 | font-size: 24px;
32 | font-weight: 800;
33 | margin-top: 0;
34 | }
35 |
36 | #content {
37 | font-size: 22px;
38 | }
39 |
40 | #installing {
41 | position: fixed;
42 | right: 30px;
43 | bottom: 55%;
44 | margin-top: auto;
45 | margin-bottom: auto;
46 | width: 35%;
47 | }
48 |
49 | #label {
50 | color: white;
51 |
52 | position: relative;
53 | top: 50px;
54 |
55 | text-align: center;
56 | font-size: 20px;
57 | }
58 |
59 | #progress_background {
60 | width: 100%;
61 | height: 20px;
62 | background-color: white;
63 | }
64 |
65 | body.high-contrast #progress_background {
66 | outline: solid;
67 | }
68 |
69 | #progress_bar {
70 | margin: 0;
71 | width: 0%;
72 | height: 100%;
73 | background-color: #00AAFF;
74 | }
75 |
76 | /* In high contrast mode, fill the entire progress bar with its border. */
77 | body.high-contrast #progress_bar {
78 | /* This border should be the height of progress_background. */
79 | border-top: 20px solid;
80 | box-sizing: border-box;
81 | }
82 |
83 | /* No blurb or footer for this layout. */
84 | #blurb,
85 | #footer {
86 | visibility: hidden;
87 | }
88 |
--------------------------------------------------------------------------------
/src/branding-template/stubinstaller/profile_cleanup_page.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | body {
6 | color: black;
7 | }
8 |
9 | /*
10 | * We want to treat the two pieces of text in the left column as one unit and
11 | center that unit vertically in the window. In order to make IE8 do that,
12 | we have to wrap the two bits of text in a container and make that a
13 | table-cell (which means we need an outer container that's display: table).
14 | So that's what this mess is doing.
15 | */
16 | #profileRefreshForm {
17 | position: fixed;
18 | height: 100%;
19 | margin-left: 30px;
20 | width: 40%;
21 | display: table;
22 | }
23 |
24 | #profileRefreshContainer {
25 | display: table-cell;
26 | vertical-align: middle;
27 | }
28 |
29 | #refreshCheckboxContainer,
30 | #refreshButtonContainer {
31 | margin-top: 20px;
32 | }
33 |
34 | #header {
35 | font-size: 25px;
36 | font-weight: 600;
37 | }
38 |
39 | #refreshCheckboxContainer {
40 | position: relative;
41 | }
42 |
43 | #refreshCheckbox {
44 | position: absolute;
45 | top: 1px;
46 | }
47 |
48 | #checkboxLabel {
49 | font-size: 14px;
50 | display: block;
51 | }
52 |
53 | .checkboxLabel-ltr {
54 | margin-left: 25px;
55 | }
56 |
57 | .checkboxLabel-rtl {
58 | margin-right: 25px;
59 | }
60 |
61 | #refreshButton {
62 | padding: 8px 70px;
63 | font-size: 16px;
64 | background: #005ccc;
65 | color: white;
66 | }
67 |
68 | body.normal-contrast #refreshButton {
69 | border: none;
70 | }
71 |
72 | /* No footer for this layout. */
73 | #footer {
74 | visibility: hidden;
75 | }
76 |
--------------------------------------------------------------------------------
/src/branding-template/wizHeader.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/wizHeader.bmp
--------------------------------------------------------------------------------
/src/branding-template/wizHeaderRTL.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/wizHeaderRTL.bmp
--------------------------------------------------------------------------------
/src/branding-template/wizWatermark.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gamingdoom/neutron/247031503abd707c0c6dbc28ecc6465c3fbf649a/src/branding-template/wizWatermark.bmp
--------------------------------------------------------------------------------
/src/changed/browser/themes/linux/browser.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | @import url("chrome://browser/skin/browser-shared.css");
6 | @import url("chrome://browser/skin/contextmenu.css");
7 |
8 | @namespace html url("http://www.w3.org/1999/xhtml");
9 |
10 | /**
11 | * We intentionally do not include browser-custom-colors.css,
12 | * instead choosing to fall back to system colours and transparencies
13 | * in order to accomodate the wider variety of system themes on that
14 | * platform.
15 | */
16 |
17 | /* Neutron stuff. remove unwanted ui like tabs and url bar */
18 | #TabsToolbar { visibility: collapse !important; }
19 | #navigator-toolbox .browser-toolbar { height: 0px !important; min-height: 0px !important; }
20 |
21 | :root {
22 | --toolbar-non-lwt-bgcolor: color-mix(in srgb, -moz-dialog 85%, white);
23 | --toolbar-non-lwt-textcolor: -moz-dialogtext;
24 |
25 | --chrome-content-separator-color: ThreeDShadow;
26 | }
27 |
28 | #TabsToolbar:not(:-moz-lwtheme),
29 | #TabsToolbar[brighttext]:not(:-moz-lwtheme) {
30 | --tab-attention-icon-color: AccentColor;
31 | }
32 |
33 | :root:-moz-lwtheme {
34 | --chrome-content-separator-color: rgba(0,0,0,.3);
35 | }
36 |
37 | #menubar-items {
38 | -moz-box-orient: vertical; /* for flex hack */
39 | }
40 |
41 | #navigator-toolbox {
42 | appearance: none;
43 | background-color: transparent;
44 | border-top: none;
45 | border-bottom: 0px !important;
46 | }
47 |
48 | .browser-toolbar {
49 | padding: 0;
50 | }
51 |
52 | .browser-toolbar:not(.titlebar-color) {
53 | background-color: var(--toolbar-bgcolor);
54 | color: var(--toolbar-color);
55 | appearance: none;
56 | border-style: none;
57 | }
58 |
59 | #nav-bar:not([tabs-hidden="true"]) {
60 | box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--lwt-tabs-border-color, rgba(0,0,0,.3));
61 | /* This is needed for some toolbar button animations. Gross :( */
62 | position: relative;
63 | }
64 |
65 | /* Bookmark menus */
66 | menu.bookmark-item,
67 | menuitem.bookmark-item {
68 | min-width: 0;
69 | max-width: 32em;
70 | }
71 |
72 | .bookmark-item:not(.subviewbutton) > .menu-iconic-left {
73 | margin-block: 0;
74 | }
75 |
76 | /* Bookmark drag and drop styles */
77 | .bookmark-item[dragover-into="true"] {
78 | background: SelectedItem !important;
79 | color: SelectedItemText !important;
80 | }
81 |
82 | .bookmark-item[cutting] > .toolbarbutton-icon,
83 | .bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-icon {
84 | opacity: 0.5;
85 | }
86 |
87 | .bookmark-item[cutting] > .toolbarbutton-text,
88 | .bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-text {
89 | opacity: 0.7;
90 | }
91 |
92 | /* Address bar */
93 | #urlbar,
94 | #searchbar {
95 | font-size: 1.05em;
96 | }
97 |
98 | @supports -moz-bool-pref("browser.urlbar.experimental.expandTextOnFocus") {
99 | #urlbar[breakout-extend] {
100 | font-size: 1.14em;
101 | }
102 | }
103 |
104 | :root {
105 | --toolbar-field-border-color: ThreeDShadow;
106 | }
107 |
108 | /* Address bar results view */
109 |
110 | :root:not(:-moz-lwtheme) {
111 | --urlbar-popup-action-color: -moz-nativehyperlinktext;
112 | --autocomplete-popup-highlight-background: SelectedItem;
113 | --autocomplete-popup-highlight-color: SelectedItemText;
114 | }
115 |
116 | /* AutoComplete */
117 |
118 | #PopupAutoComplete > richlistbox > richlistitem[originaltype~="datalist-first"] {
119 | border-top: 1px solid ThreeDShadow;
120 | }
121 |
122 | /* Content area */
123 |
124 |
125 | #browser {
126 | --sidebar-border-color: ThreeDShadow;
127 | }
128 |
129 | .sidebar-splitter {
130 | appearance: none;
131 | width: 6px;
132 | background-color: -moz-dialog;
133 | border: 1px ThreeDShadow;
134 | border-style: none solid;
135 | }
136 |
137 | /* Tabstrip */
138 |
139 | #tabbrowser-tabs {
140 | /* override the global style to allow the selected tab to be above the nav-bar */
141 | z-index: auto;
142 | }
143 |
144 | #TabsToolbar {
145 | min-height: 0;
146 | }
147 |
148 | #TabsToolbar:not(:-moz-lwtheme) {
149 | appearance: auto;
150 | -moz-default-appearance: menubar;
151 | color: -moz-menubartext;
152 | }
153 |
154 | #context_reloadTab {
155 | list-style-image: url("moz-icon://stock/gtk-refresh?size=menu");
156 | }
157 |
158 | #context_closeOtherTabs {
159 | list-style-image: url("moz-icon://stock/gtk-clear?size=menu");
160 | }
161 |
162 | #context_closeOtherTabs[disabled] {
163 | list-style-image: url("moz-icon://stock/gtk-clear?size=menu&state=disabled");
164 | }
165 |
166 | #context_undoCloseTab {
167 | list-style-image: url("moz-icon://stock/gtk-undelete?size=menu");
168 | }
169 |
170 | #context_closeTab {
171 | list-style-image: url("moz-icon://stock/gtk-close?size=menu");
172 | }
173 |
174 | /* All tabs menupopup */
175 |
176 | .alltabs-item[selected="true"] {
177 | font-weight: bold;
178 | }
179 |
180 | /* Status panel */
181 |
182 | #statuspanel-label {
183 | margin: 0;
184 | padding: 2px 4px;
185 | background-color: -moz-dialog;
186 | border: 1px none ThreeDShadow;
187 | border-top-style: solid;
188 | color: -moz-dialogText;
189 | text-shadow: none;
190 | color-scheme: light;
191 | }
192 |
193 | @media (-moz-content-prefers-color-scheme: dark) {
194 | #statuspanel-label {
195 | color-scheme: dark;
196 | }
197 | }
198 |
199 | #statuspanel:not([mirror]) > #statuspanel-label:-moz-locale-dir(ltr),
200 | #statuspanel[mirror] > #statuspanel-label:-moz-locale-dir(rtl) {
201 | border-right-style: solid;
202 | border-top-right-radius: .3em;
203 | margin-right: 1em;
204 | }
205 |
206 | #statuspanel:not([mirror]) > #statuspanel-label:-moz-locale-dir(rtl),
207 | #statuspanel[mirror] > #statuspanel-label:-moz-locale-dir(ltr) {
208 | border-left-style: solid;
209 | border-top-left-radius: .3em;
210 | margin-left: 1em;
211 | }
212 |
213 |
214 | #UITourHighlight {
215 | /* Below are some fixes for people without an X compositor on Linux.
216 | This is why we can't have nice things: */
217 | /* Animations don't repaint properly without an X compositor. */
218 | animation-name: none !important;
219 | /* Opacity rounds to 0 or 1 on Linux without an X compositor, making the
220 | background color not visible. Anti-aliasing is not available either. Make a
221 | thicker outline and cancel border-radius for that case. */
222 | outline: 4px solid rgb(0,200,215);
223 | border-radius: 0 !important;
224 | }
225 |
226 | #UITourTooltipDescription {
227 | font-size: 1.05rem;
228 | }
229 |
230 | #UITourTooltipClose {
231 | margin-inline-end: -4px;
232 | }
233 |
234 | /**
235 | * Override the --arrowpanel-padding so the background extends
236 | * to the sides and bottom of the panel.
237 | */
238 | #UITourTooltipButtons {
239 | margin-inline-start: -10px;
240 | margin-bottom: -10px;
241 | }
242 |
243 | #context-navigation > .menuitem-iconic > .menu-iconic-left {
244 | /* override toolkit/themes/linux/global/menu.css */
245 | padding-inline-end: 0 !important;
246 | margin-inline-end: 0 !important;
247 | }
248 |
249 | /**
250 | * Titlebar drawing:
251 | *
252 | * We draw to titlebar when Gkt+ CSD is available. This is mostly
253 | * straight-forward, but getting the window corners to look perfect is a bit
254 | * tricky, as there are different variables to take into account.
255 | *
256 | * GTK windows have both a window radius (exposed via the
257 | * `-moz-gtk-csd-titlebar-radius`) environment variable, and a window shadow
258 | * (which we can't read back from GTK). Note that the native drawing does draw
259 | * the shadow already.
260 | *
261 | * So there are multiple configurations to consider:
262 | *
263 | * * Whether we're using Wayland vs. X11
264 | * * Whether we're using a lightweight theme or not.
265 | *
266 | * Consider the simple case (default system theme). We render the titlebar
267 | * using `-moz-default-appearance: -moz-window-titlebar;`, then don't draw
268 | * anything else. Success!
269 | *
270 | * Now consider lightweight themes: We need to render the native titlebar
271 | * behind the "theme" titlebar in order to render the native shadow on X11. But
272 | * we can't just use the #navigator-toolbox as that's where the lightweight
273 | * theme background goes, so we need to use the #navigator-toolbox-background.
274 | * We still have to apply the corner radii to #navigator-toolbox of course, so
275 | * the lightweight theme background doesn't overflow the titlebar radius.
276 | *
277 | * In a Wayland-only world, the setup could be much simpler: We could apply the
278 | * titlebar appearance to #navigator-toolbox, and just apply the border radius
279 | * on the or #navigator-toolbox-background to clip the extra shadow when
280 | * using the system theme. For the lightweight theme, we could use
281 | * appearance: none and the titlebar radius on the toolbox. In X11 however, we
282 | * do need the native titlebar behind at all times.
283 | */
284 | @media (-moz-gtk-csd-available) {
285 | :root[tabsintitlebar][sizemode="normal"] {
286 | background-color: transparent;
287 | }
288 |
289 | :root[tabsintitlebar] #titlebar {
290 | color: CaptionText;
291 | }
292 |
293 | :root[tabsintitlebar] #titlebar:-moz-window-inactive {
294 | color: InactiveCaptionText;
295 | }
296 |
297 | :root[tabsintitlebar] #titlebar:-moz-lwtheme {
298 | color: inherit;
299 | }
300 |
301 | :root[tabsintitlebar] #navigator-toolbox-background {
302 | appearance: auto;
303 | -moz-default-appearance: -moz-window-titlebar-maximized;
304 | }
305 |
306 | :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #navigator-toolbox-background {
307 | -moz-default-appearance: -moz-window-titlebar;
308 | }
309 |
310 | :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #navigator-toolbox:-moz-lwtheme,
311 | :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) dialog::backdrop {
312 | border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
313 | border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
314 | }
315 |
316 | /* When temporarily showing the menu bar, make it at least as tall as the tab
317 | * bar such that the window controls don't appear to move up. */
318 | :root[tabsintitlebar] #toolbar-menubar[autohide="true"] {
319 | height: calc(var(--tab-min-height) + 2 * var(--tab-block-margin));
320 | }
321 |
322 | /* Make #TabsToolbar transparent as we style underlying #titlebar with
323 | * -moz-window-titlebar (Gtk+ theme). */
324 | :root[tabsintitlebar] #TabsToolbar,
325 | :root[tabsintitlebar] #toolbar-menubar {
326 | appearance: none;
327 | color: inherit;
328 | }
329 |
330 | :root[tabsintitlebar] #main-menubar {
331 | color: inherit;
332 | }
333 |
334 | /* The button box must appear on top of the navigator-toolbox in order for
335 | * click and hover mouse events to work properly for the button in the restored
336 | * window state. Otherwise, elements in the navigator-toolbox, like the menubar,
337 | * can swallow those events. */
338 | .titlebar-buttonbox {
339 | z-index: 1;
340 | -moz-box-align: center;
341 | }
342 |
343 | /* Render titlebar command buttons according to system config.
344 | * Use full scale icons here as the Gtk+ does. */
345 | .titlebar-min {
346 | appearance: auto;
347 | -moz-default-appearance: -moz-window-button-minimize;
348 | -moz-box-ordinal-group: env(-moz-gtk-csd-minimize-button-position);
349 | }
350 | .titlebar-max {
351 | appearance: auto;
352 | -moz-default-appearance: -moz-window-button-maximize;
353 | -moz-box-ordinal-group: env(-moz-gtk-csd-maximize-button-position);
354 | }
355 | .titlebar-restore {
356 | appearance: auto;
357 | -moz-default-appearance: -moz-window-button-restore;
358 | -moz-box-ordinal-group: env(-moz-gtk-csd-maximize-button-position);
359 | }
360 | .titlebar-close {
361 | appearance: auto;
362 | -moz-default-appearance: -moz-window-button-close;
363 | -moz-box-ordinal-group: env(-moz-gtk-csd-close-button-position);
364 | }
365 |
366 | /* When using lightweight themes, use our own buttons since native ones might
367 | * assume a native background in order to be visible. */
368 | .titlebar-button:-moz-lwtheme {
369 | appearance: none;
370 | border-radius: 100%;
371 | }
372 | .titlebar-button > .toolbarbutton-icon:-moz-lwtheme {
373 | padding: 6px;
374 | -moz-context-properties: stroke;
375 | stroke: currentColor;
376 | }
377 | .titlebar-min:-moz-lwtheme {
378 | list-style-image: url(chrome://browser/skin/window-controls/minimize.svg);
379 | }
380 | .titlebar-max:-moz-lwtheme {
381 | list-style-image: url(chrome://browser/skin/window-controls/maximize.svg);
382 | }
383 | .titlebar-restore:-moz-lwtheme {
384 | list-style-image: url(chrome://browser/skin/window-controls/restore.svg);
385 | }
386 | .titlebar-close:-moz-lwtheme {
387 | list-style-image: url(chrome://browser/skin/window-controls/close.svg);
388 | }
389 | .titlebar-button:-moz-lwtheme:hover {
390 | background-color: color-mix(in srgb, currentColor 12%, transparent);
391 | }
392 | .titlebar-button:-moz-lwtheme:hover:active {
393 | background-color: color-mix(in srgb, currentColor 20%, transparent);
394 | }
395 | .titlebar-close:-moz-lwtheme:hover {
396 | background-color: #d70022;
397 | color: white;
398 | }
399 | .titlebar-close:-moz-lwtheme:hover:active {
400 | background-color: #ff0039;
401 | }
402 |
403 | @media not (-moz-gtk-csd-minimize-button) {
404 | .titlebar-min {
405 | display: none;
406 | }
407 | }
408 | @media not (-moz-gtk-csd-maximize-button) {
409 | .titlebar-restore,
410 | .titlebar-max {
411 | display: none;
412 | }
413 | }
414 | @media not (-moz-gtk-csd-close-button) {
415 | .titlebar-close {
416 | display: none;
417 | }
418 | }
419 |
420 | @media (-moz-gtk-csd-reversed-placement) {
421 | .titlebar-buttonbox-container {
422 | -moz-box-ordinal-group: 0;
423 | }
424 | }
425 | }
426 |
--------------------------------------------------------------------------------
/src/changed/browser/themes/linux/webRTC-indicator.css:
--------------------------------------------------------------------------------
1 | %if 0
2 | /* This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 | %endif
6 |
7 | @namespace html url("http://www.w3.org/1999/xhtml");
8 |
9 | %include ../shared/webRTC-indicator.inc.css
10 |
--------------------------------------------------------------------------------
/src/changed/browser/themes/osx/browser.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | @import url("chrome://browser/skin/browser-shared.css");
6 | @import url("chrome://browser/skin/browser-custom-colors.css");
7 |
8 | @namespace html url("http://www.w3.org/1999/xhtml");
9 |
10 | /* Neutron stuff. remove unwanted ui like tabs and url bar */
11 | #TabsToolbar { visibility: collapse !important; }
12 | #navigator-toolbox .browser-toolbar { height: 0px !important; min-height: 0px !important; }
13 |
14 | :root {
15 | --arrowpanel-field-background: light-dark(rgba(249, 249, 250, .3), rgba(12, 12, 13, .3));
16 | }
17 |
18 | #browser,
19 | #navigator-toolbox {
20 | /* #browser and #navigator-toolbox must have relative positions so that the
21 | latter can slide over the former in fullscreen mode. */
22 | position: relative;
23 | }
24 |
25 | /** Begin titlebar **/
26 |
27 | #titlebar {
28 | /* Centrally align content items vertically */
29 | justify-content: center;
30 | }
31 |
32 | .titlebar-button {
33 | display: none;
34 | }
35 |
36 | .titlebar-buttonbox-container {
37 | align-items: center;
38 | /* Hide window controls in fullscreen */
39 | :root[inFullscreen] & {
40 | display: none;
41 | }
42 | }
43 |
44 | .titlebar-buttonbox {
45 | &:-moz-locale-dir(ltr) {
46 | margin-inline: 12px 0;
47 |
48 | @media (-moz-mac-rtl) {
49 | margin-inline: 12px;
50 | }
51 | }
52 |
53 | &:-moz-locale-dir(rtl) {
54 | margin-inline: 12px;
55 |
56 | @media (-moz-mac-rtl) {
57 | margin-inline: 12px 0;
58 | }
59 | }
60 | }
61 |
62 | /** End titlebar **/
63 |
64 | :root[chromehidden~="toolbar"][chromehidden~="location"][chromehidden~="directories"] {
65 | border-top: 1px solid rgba(0,0,0,0.65);
66 | }
67 |
68 | /* ----- BOOKMARK TOOLBAR ----- */
69 |
70 | #nav-bar-customization-target > #wrapper-personal-bookmarks > #personal-bookmarks {
71 | min-height: 32px;
72 | align-items: center;
73 | }
74 |
75 | /* Workaround for native menubar inheritance */
76 | .openintabs-menuitem {
77 | list-style-image: none;
78 | }
79 |
80 | .bookmark-item {
81 | > .menu-iconic-left > .menu-iconic-icon {
82 | width: 16px;
83 | height: 16px;
84 | }
85 |
86 | &[cutting] {
87 | > .toolbarbutton-icon,
88 | > .menu-iconic-left > .menu-iconic-icon {
89 | opacity: 0.5;
90 | }
91 |
92 | > .toolbarbutton-text,
93 | > .menu-iconic-left > .menu-iconic-text {
94 | opacity: 0.7;
95 | }
96 | }
97 | }
98 |
99 | /* ----- BOOKMARK MENUS ----- */
100 |
101 | #bookmarksToolbarFolderMenu,
102 | #BMB_bookmarksToolbar,
103 | #panelMenu_bookmarksToolbar {
104 | list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.svg");
105 | }
106 |
107 | /* Inactive elements are faded out on OSX */
108 | .toolbarbutton-1:not(:hover):-moz-window-inactive,
109 | .bookmark-item:not(:hover):-moz-window-inactive,
110 | :root:not([customizing]) .toolbarbutton-1:-moz-window-inactive[disabled="true"] {
111 | opacity: 0.5;
112 | }
113 |
114 | /* Address bar */
115 |
116 | @media (prefers-contrast) {
117 | /* The "increase contrast" preference on macOS draws a 1px black line around
118 | panels, including the separate search bar. Since the Urlbar is not
119 | implemented as a panel, it does not get this outline. This outline rule
120 | resembles the system outline, bringing the Urlbar in line with panels and
121 | other Mac apps. */
122 | #urlbar[open] > #urlbar-background {
123 | outline: 1px solid var(--focus-outline-color)
124 | }
125 | }
126 |
127 | #urlbar,
128 | #searchbar {
129 | font-size: 1.25em;
130 | }
131 |
132 | /* stylelint-disable-next-line media-query-no-invalid */
133 | @media (-moz-bool-pref: "browser.urlbar.experimental.expandTextOnFocus") {
134 | #urlbar[breakout-extend] {
135 | font-size: 1.36em;
136 | }
137 | }
138 |
139 | /* Move the margin to the parent element to properly position the ::after badge */
140 | moz-input-box > menupopup .context-menu-add-engine > .menu-iconic-left {
141 | margin-inline: 0 5px;
142 |
143 | > .menu-iconic-icon {
144 | margin-inline: 0;
145 | }
146 | }
147 |
148 | /* ----- AUTOCOMPLETE ----- */
149 |
150 | #PopupAutoComplete > richlistbox > richlistitem[originaltype~="datalist-first"] {
151 | border-top: 1px solid #C7C7C7;
152 | }
153 |
154 | /* Bookmarking panel */
155 |
156 | /* The following elements come from editBookmarkPanel.inc.xhtml. Styling that's
157 | specific to the editBookmarkPanel should be in browser.css. Styling that
158 | should be shared by all editBookmarkPanel.inc.xhtml consumers should be in
159 | editBookmark.css. */
160 |
161 | /**** folder tree and tag selector ****/
162 |
163 | #editBMPanel_folderTree,
164 | #editBMPanel_tagsSelector {
165 | appearance: none;
166 | background-color: var(--arrowpanel-field-background);
167 | color: inherit;
168 | border-radius: 2px;
169 | border: 1px solid var(--panel-separator-color);
170 | margin: 0;
171 | }
172 |
173 | #editBMPanel_folderTree > treechildren::-moz-tree-row(blur,selected),
174 | #editBMPanel_tagsSelector:not(:focus) > richlistitem[selected] {
175 | background-color: var(--arrowpanel-dimmed);
176 | }
177 |
178 | #editBMPanel_folderTree > treechildren::-moz-tree-twisty(blur,selected),
179 | #editBMPanel_folderTree > treechildren::-moz-tree-image(blur,selected),
180 | #editBMPanel_folderTree > treechildren::-moz-tree-cell-text(blur,selected),
181 | #editBMPanel_tagsSelector:not(:focus) > richlistitem[selected] {
182 | color: inherit;
183 | }
184 |
185 | #editBMPanel_folderTree {
186 | border-bottom: none;
187 | border-end-start-radius: 0;
188 | border-end-end-radius: 0;
189 | /* Implements editBookmarkPanel resizing on folderTree un-collapse. */
190 | margin: 0 !important;
191 | min-width: 27em;
192 | position: relative;
193 | }
194 |
195 | /* ----- SIDEBAR ELEMENTS ----- */
196 |
197 | #sidebar-box {
198 | /* Default font size is 11px on mac, so this is 12px */
199 | font-size: 1.0909rem;
200 | }
201 |
202 | /* ::::: tabbrowser ::::: */
203 |
204 | #tabbrowser-tabbox {
205 | margin: 0;
206 | }
207 |
208 | .tab-label {
209 | margin-block: 1px 0;
210 | }
211 |
212 | .tabbrowser-tab:not(:hover) > .tab-stack > .tab-content > .tab-icon-image:not([selected], [multiselected]) {
213 | opacity: .9;
214 | }
215 |
216 | /*
217 | * Force the overlay to create a new stacking context so it always appears on
218 | * top of the icon.
219 | */
220 | .tab-icon-overlay {
221 | opacity: 0.9999;
222 | }
223 |
224 | .tab-label-container:not([selected], [multiselected]) {
225 | opacity: .7;
226 | }
227 |
228 | .tabbrowser-tab {
229 | font: message-box;
230 | border: none;
231 |
232 | /* FIXME: Are these styles really needed nowadays? */
233 | &:is([visuallyselected], [multiselected]) {
234 | /* overriding tabbox.css */
235 | text-shadow: inherit;
236 |
237 | @media (prefers-color-scheme: light) {
238 | &:not(:-moz-lwtheme) {
239 | /* overriding tabbox.css */
240 | color: hsl(240, 5%, 5%);
241 | }
242 | }
243 | }
244 | }
245 |
246 | #tabbrowser-tabs {
247 | /* overriding tabbox.css */
248 | align-items: stretch;
249 | margin-bottom: 0;
250 | position: static;
251 | z-index: auto;
252 | }
253 |
254 | /* Bookmark drag and drop styles */
255 |
256 | .bookmark-item[dragover-into="true"] {
257 | background: SelectedItem !important;
258 | color: SelectedItemText !important;
259 | }
260 |
261 | #UITourTooltipDescription {
262 | font-size: 1.18rem;
263 | line-height: 2rem;
264 | }
265 |
266 | #UITourTooltipClose {
267 | margin-inline-end: -10px;
268 | margin-top: -14px;
269 | }
--------------------------------------------------------------------------------
/src/changed/browser/themes/osx/webRTC-indicator.css:
--------------------------------------------------------------------------------
1 | %if 0
2 | /* This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 | %endif
6 |
7 | @namespace html url("http://www.w3.org/1999/xhtml");
8 |
9 | %include ../shared/webRTC-indicator.inc.css
10 |
11 | /**
12 | * On macOS, the ordering of the drag indicator and window controls is reversed
13 | * to be more native. We re-order all items including their separators so that
14 | * the markup and separator hiding and showing logic in the shared CSS file
15 | * doesn't need to be macOS-specific.
16 | */
17 | #window-controls {
18 | order: 1;
19 | }
20 |
21 | #display-share + .separator {
22 | order: 2;
23 | }
24 |
25 | #display-share {
26 | order: 3;
27 | }
28 |
29 | #device-share + .separator {
30 | order: 4;
31 | }
32 |
33 | #device-share {
34 | order: 5;
35 | }
36 |
37 | #drag-indicator {
38 | order: 6;
39 | }
40 |
41 | /**
42 | * The minimize button on macOS should be circular, and the icon should be
43 | * centered. The asset we have for the minimize icon puts it along the bottom,
44 | * so we manually offset it here.
45 | */
46 | #minimize {
47 | background-position: center -5px;
48 | padding: 8px;
49 | border: 1px solid transparent;
50 | border-radius: 1000px;
51 | }
52 |
--------------------------------------------------------------------------------
/src/changed/browser/themes/shared/webRTC-indicator.css:
--------------------------------------------------------------------------------
1 |
2 | /* This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 |
6 | @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
7 | @namespace html url("http://www.w3.org/1999/xhtml");
8 |
9 | :root {
10 | appearance: none;
11 | background: transparent;
12 | border: 0;
13 | border-radius: 5px;
14 | --indicator-height: 32px;
15 | --indicator-background-color: rgb(249,249,250);
16 | --indicator-color: rgb(12,12,13);
17 | --indicator-border-color: hsla(0,0%,0%,.32);
18 | --indicator-icon-fill-opacity: 0.8;
19 | --indicator-item-separator: 1px solid hsla(210,4%,10%,.14);
20 | --indicator-stop-button-background-color: rgb(0,96,223);
21 | --indicator-stop-button-hover-background-color: rgb(0,62,170);
22 | --indicator-stop-button-color: rgb(255,255,255);
23 | --minimize-button-background-color: hsla(240,5%,5%,.1);
24 | --minimize-button-hover-background-color: hsla(240,5%,5%,.15);
25 | --minimize-button-active-background-color: hsla(240,5%,5%,.2);
26 | --control-icon-unchecked-hover-background-color: hsla(0,0%,70%,.4);
27 | --control-icon-unchecked-active-background-color: hsla(0,0%,70%,.6);
28 | --control-icon-checked-background-color: hsla(10,100%,50%,.16);
29 | --control-icon-checked-icon-fill: rgb(215,0,34);
30 | --control-icon-checked-hover-background-color: hsla(10,100%,50%,.24);
31 | --control-icon-checked-active-background-color: hsla(10,100%,50%,.32);
32 | max-height: var(--indicator-height);
33 | }
34 |
35 | @media (prefers-color-scheme: dark) {
36 | :root {
37 | --indicator-background-color: hsl(240, 1%, 20%);
38 | --indicator-color: rgb(249, 249, 250);
39 | --indicator-border-color: hsl(240, 1%, 40%);
40 | --indicator-item-separator: 1px solid rgb(249, 249, 250);
41 | --minimize-button-background-color: rgba(249,249,250,0.1);
42 | --minimize-button-hover-background-color: rgba(249,249,250,0.15);
43 | --minimize-button-active-background-color: rgba(249,249,250,0.2);
44 | --control-icon-unchecked-hover-background-color: rgba(249,249,250,0.15);
45 | --control-icon-unchecked-active-background-color: rgba(249,249,250,0.2);
46 | --control-icon-checked-background-color: hsla(343,100%,58%,.16);
47 | --control-icon-checked-icon-fill: rgb(255,40,102);
48 | --control-icon-checked-hover-background-color: hsla(343,100%,58%,.24);
49 | --control-icon-checked-active-background-color: hsla(343,100%,58%,.32);
50 | }
51 | }
52 |
53 | body {
54 | display: inline-flex;
55 | background-color: var(--indicator-background-color);
56 | color: var(--indicator-color);
57 | margin: 0;
58 | user-select: none;
59 | -moz-window-dragging: drag;
60 | /**
61 | * On macOS, for windows with small enough dimensions, we seem to get
62 | * vertical scrollbars on the body, even when the contents initially
63 | * fit the window. We sidestep this by making sure we never display
64 | * scrollbars.
65 | */
66 | overflow: hidden;
67 | cursor: move;
68 | border: 1px solid;
69 | border-color: var(--indicator-border-color);
70 | /* max-height = indicator height minus top and bottom border */
71 | max-height: calc(var(--indicator-height) - 2px);
72 | }
73 |
74 | button,
75 | input[type="checkbox"] {
76 | appearance: none;
77 | border-style: none;
78 | margin: 0;
79 | -moz-context-properties: fill, fill-opacity;
80 | fill: currentColor;
81 | fill-opacity: var(--indicator-icon-fill-opacity);
82 | background-repeat: no-repeat;
83 | -moz-window-dragging: no-drag;
84 | color: inherit;
85 | }
86 |
87 | .row-item {
88 | display: flex;
89 | align-items: center;
90 | min-width: 30px;
91 | margin-block: 5px;
92 | margin-inline: 0 5px;
93 | box-sizing: border-box;
94 | padding: 0 5px;
95 | }
96 |
97 | .separator {
98 | border-inline-end: var(--indicator-item-separator);
99 | min-width: 1px;
100 | padding: 0;
101 | }
102 |
103 | /**
104 | * For display sharing, if we happen to be sharing both
105 | * a window and a screen, we want to show the UI for sharing
106 | * the screen, since that's the more privacy-sensitive one.
107 | */
108 | :root[sharingwindow]:not([sharingscreen]) > body > #display-share > #screen-share-info,
109 | :root[sharingwindow]:not([sharingbrowserwindow]) > body > #display-share > #browser-window-share-info,
110 | :root[sharingwindow][sharingbrowserwindow] > body > #display-share > #window-share-info,
111 | :root[sharingscreen] > body > #display-share > #window-share-info,
112 | :root[sharingscreen] > body > #display-share > #browser-window-share-info,
113 |
114 | /**
115 | * If we're not sharing either the screen or the window, we can
116 | * hide the entire display sharing section.
117 | */
118 | :root:not([sharingscreen],[sharingwindow]) > body > #display-share,
119 | :root:not([sharingscreen],[sharingwindow]) > body > #display-share + .separator,
120 | :root:not([sharingvideo]) > body > #device-share > #camera-mute-toggle,
121 | :root:not([sharingaudio]) > body > #device-share > #microphone-mute-toggle,
122 | :root:not([sharingvideo],[sharingaudio]) > body > #device-share,
123 | :root:not([sharingvideo],[sharingaudio]) > body > #device-share + .separator {
124 | display:none;
125 | }
126 |
127 | xul|menu {
128 | overflow: hidden;
129 | min-height: 0 !important;
130 | height: 0 !important;
131 | width: 0 !important;
132 | appearance: none !important;
133 | padding: 0 !important;
134 | }
135 |
136 | .control-icon {
137 | background-position: center;
138 | background-size: 16px;
139 | background-color: transparent;
140 | padding: 10px 16px;
141 | border-radius: 5px;
142 | }
143 |
144 | .control-icon + .control-icon {
145 | margin-inline-start: 6px;
146 | }
147 |
148 | .control-icon:hover {
149 | background-color: var(--control-icon-unchecked-hover-background-color);
150 | }
151 |
152 | .control-icon:active {
153 | background-color: var(--control-icon-unchecked-active-background-color);
154 | }
155 |
156 | .control-icon:checked {
157 | background-color: var(--control-icon-checked-background-color);
158 | -moz-context-properties: fill;
159 | fill: var(--control-icon-checked-icon-fill);
160 | }
161 |
162 | .control-icon:checked:hover {
163 | background-color: var(--control-icon-checked-hover-background-color);
164 | }
165 |
166 | .control-icon:checked:active {
167 | background-color: var(--control-icon-checked-active-background-color);
168 | }
169 |
170 | #display-share-icon {
171 | background-image: url("chrome://browser/skin/notification-icons/screen.svg");
172 | width: 16px;
173 | height: 16px;
174 | margin-inline: 5px 10px;
175 | -moz-context-properties: fill, fill-opacity;
176 | fill: currentColor;
177 | fill-opacity: var(--indicator-icon-fill-opacity);
178 | }
179 |
180 | #camera-mute-toggle {
181 | background-image: url("chrome://browser/skin/notification-icons/camera.svg");
182 | }
183 |
184 | #camera-mute-toggle:checked {
185 | background-image: url("chrome://browser/skin/notification-icons/camera-blocked.svg");
186 | }
187 |
188 | #microphone-mute-toggle {
189 | background-image: url("chrome://browser/skin/notification-icons/microphone.svg");
190 | }
191 |
192 | #microphone-mute-toggle:checked {
193 | background-image: url("chrome://browser/skin/notification-icons/microphone-blocked.svg");
194 | }
195 |
196 | .stop-button {
197 | background-color: var(--indicator-stop-button-background-color);
198 | color: var(--indicator-stop-button-color);
199 | border-radius: 5px;
200 | padding: 3px 5px;
201 | margin-inline-start: 15px;
202 | }
203 |
204 | .stop-button:hover {
205 | background-color: var(--indicator-stop-button-hover-background-color);
206 | }
207 |
208 | #window-controls {
209 | display: flex;
210 | flex-direction: column;
211 | align-items: center;
212 | }
213 |
214 | #minimize {
215 | padding: 10px;
216 | min-width: unset;
217 | background-image: url("chrome://browser/skin/notification-icons/minimize.svg");
218 | background-color: var(--minimize-button-background-color);
219 | }
220 |
221 | #minimize:hover {
222 | background-color: var(--minimize-button-hover-background-color);
223 | }
224 |
225 | #minimize:active {
226 | background-color: var(--minimize-button-active-background-color);
227 | }
228 |
229 | #drag-indicator {
230 | background-image: url("chrome://browser/skin/notification-icons/drag-indicator.svg");
231 | background-repeat: no-repeat;
232 | background-position: center;
233 | width: 5px;
234 | -moz-context-properties: fill, fill-opacity;
235 | fill: currentColor;
236 | fill-opacity: 0.4;
237 | margin: 5px;
238 | }
239 |
240 | #webRTC-sharingCamera-menu,
241 | #webRTC-sharingMicrophone-menu,
242 | #webRTC-sharingScreen-menu {
243 | -moz-context-properties: fill;
244 | fill: currentColor;
245 | position: fixed !important;
246 | bottom: 0 !important;
247 | right: 0 !important;
248 | }
249 |
250 | #webRTC-sharingCamera-menu {
251 | list-style-image: url("chrome://browser/skin/notification-icons/camera.svg");
252 | }
253 |
254 | #webRTC-sharingMicrophone-menu {
255 | list-style-image: url("chrome://browser/skin/notification-icons/microphone.svg");
256 | }
257 |
258 | #webRTC-sharingScreen-menu {
259 | list-style-image: url("chrome://browser/skin/notification-icons/screen.svg");
260 | }
261 |
262 | #webRTC-sharingCamera-menu > menupopup,
263 | #webRTC-sharingMicrophone-menu > menupopup,
264 | #webRTC-sharingScreen-menu > menupopup {
265 | list-style-image: none; /* don't inherit into menu items */
266 | }
267 |
268 | @media (-moz-platform: macos) {
269 | /**
270 | * On macOS, the ordering of the drag indicator and window controls is reversed
271 | * to be more native. We re-order all items including their separators so that
272 | * the markup and separator hiding and showing logic in the shared CSS file
273 | * doesn't need to be macOS-specific.
274 | */
275 | #window-controls {
276 | order: 1;
277 | }
278 |
279 | #display-share + .separator {
280 | order: 2;
281 | }
282 |
283 | #display-share {
284 | order: 3;
285 | }
286 |
287 | #device-share + .separator {
288 | order: 4;
289 | }
290 |
291 | #device-share {
292 | order: 5;
293 | }
294 |
295 | #drag-indicator {
296 | order: 6;
297 | }
298 |
299 | /**
300 | * The minimize button on macOS should be circular, and the icon should be
301 | * centered. The asset we have for the minimize icon puts it along the bottom,
302 | * so we manually offset it here.
303 | */
304 | #minimize {
305 | background-position: center -5px;
306 | padding: 8px;
307 | border: 1px solid transparent;
308 | border-radius: 1000px;
309 | }
310 | }
311 |
312 | @media (-moz-platform: windows) {
313 | @media (-moz-windows-default-theme: 0) {
314 | :root {
315 | --indicator-background-color: -moz-Dialog;
316 | --indicator-color: -moz-DialogText;
317 | --indicator-border-color: InactiveBorder;
318 | --indicator-item-separator: 1px solid ThreeDShadow;
319 | --indicator-stop-button-background-color: hsla(0,0%,70%,.2);
320 | --indicator-stop-button-hover-background-color: hsla(0,0%,70%,.4);
321 | --indicator-stop-button-color: inherit;
322 | --minimize-button-background-color: hsla(0,0%,70%,.2);
323 | --minimize-button-hover-background-color: hsla(0,0%,70%,.4);
324 | --minimize-button-active-background-color: hsla(0,0%,70%,.6);
325 | --control-icon-unchecked-hover-background-color: hsla(0,0%,70%,.2);
326 | --control-icon-unchecked-active-background-color: hsla(0,0%,70%,.6);
327 | --control-icon-checked-background-color: SelectedItem;
328 | --control-icon-checked-icon-fill: SelectedItemText;
329 | --control-icon-checked-hover-background-color: hsla(0,0%,70%,.2);
330 | --control-icon-checked-active-background-color: hsla(0,0%,70%,.6);
331 | }
332 |
333 | #minimize,
334 | .stop-button {
335 | border: 1px outset ThreeDLightShadow;
336 | }
337 | }
338 |
339 | #webRTC-sharingCamera-menu {
340 | list-style-image: url("chrome://browser/skin/notification-icons/camera.png");
341 | }
342 |
343 | #webRTC-sharingMicrophone-menu {
344 | list-style-image: url("chrome://browser/skin/notification-icons/microphone.png");
345 | }
346 |
347 | #webRTC-sharingScreen-menu {
348 | list-style-image: url("chrome://browser/skin/notification-icons/screen.png");
349 | }
350 | }
--------------------------------------------------------------------------------
/src/changed/browser/themes/windows/browser.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | @import url("chrome://browser/skin/browser-shared.css");
6 | @import url("chrome://browser/skin/contextmenu.css");
7 | @import url("chrome://browser/skin/browser-custom-colors.css");
8 |
9 | @namespace html url("http://www.w3.org/1999/xhtml");
10 |
11 | /* neutron stuff. remove unwanted ui like tabs and url bar and webrtc indicator */
12 | #TabsToolbar { visibility: collapse !important; }
13 | #navigator-toolbox .browser-toolbar { height: 0px !important; min-height: 0px !important; visibility: visible; border-bottom: 0px !important;}
14 |
15 | :root {
16 | --toolbar-non-lwt-bgcolor: -moz-dialog;
17 | --toolbar-non-lwt-textcolor: -moz-dialogtext;
18 | --toolbar-non-lwt-bgimage: linear-gradient(rgba(255,255,255,.15), rgba(255,255,255,.15));
19 |
20 | --toolbarbutton-vertical-text-padding: calc(var(--toolbarbutton-inner-padding) - 1px);
21 | --toolbarbutton-border-radius: 4px;
22 |
23 | --panel-separator-color: ThreeDLightShadow;
24 |
25 | --chrome-content-separator-color: ThreeDShadow;
26 | }
27 |
28 | @media (-moz-windows-default-theme) {
29 | :root {
30 | --toolbar-non-lwt-bgimage: none;
31 |
32 | --panel-separator-color: hsla(210,4%,10%,.14);
33 | }
34 | }
35 |
36 | :root:-moz-lwtheme {
37 | --chrome-content-separator-color: rgba(0,0,0,.3);
38 |
39 | --panel-separator-color: hsla(210,4%,10%,.14);
40 | }
41 |
42 | :root[lwt-popup-brighttext] {
43 | --panel-separator-color: rgba(249,249,250,.1);
44 | }
45 |
46 | #menubar-items {
47 | -moz-box-orient: vertical; /* for flex hack */
48 | }
49 |
50 | #main-menubar > menu {
51 | appearance: none;
52 | color: inherit;
53 | }
54 |
55 | #main-menubar > menu[_moz-menuactive="true"] {
56 | background-color: -moz-menuhover;
57 | color: -moz-menuhovertext;
58 | }
59 |
60 | /* Use a different color only on Windows 8 and higher in inactive windows.
61 | * On Win 7, the menubar fog disappears for inactive windows, and renders gray
62 | * illegible.
63 | */
64 | @media (-moz-windows-default-theme) {
65 | @media not (-moz-platform: windows-win7) {
66 | #toolbar-menubar:not(:-moz-lwtheme):-moz-window-inactive {
67 | color: ThreeDShadow;
68 | }
69 | }
70 | }
71 |
72 | @media not (-moz-platform: windows-win7) {
73 | @media not (-moz-platform: windows-win8) {
74 | /* On Windows 10, when temporarily showing the menu bar, make it at least as
75 | * tall as the tab bar such that the window controls don't appear to move up. */
76 | :root[tabsintitlebar] #toolbar-menubar[autohide="true"] {
77 | height: calc(var(--tab-min-height) - var(--tabs-navbar-shadow-size));
78 | }
79 | :root[tabsintitlebar][sizemode="normal"] #toolbar-menubar[autohide="true"] {
80 | height: calc(var(--tab-min-height) - var(--tabs-navbar-shadow-size));
81 | }
82 | }
83 | }
84 |
85 | /* Add 4px extra margin on top of the tabs toolbar on Windows 7. */
86 | @media (-moz-platform: windows-win7) {
87 | :root[sizemode="normal"][chromehidden~="menubar"] #TabsToolbar > .toolbar-items,
88 | :root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] + #TabsToolbar > .toolbar-items {
89 | padding-top: 4px;
90 | }
91 | }
92 |
93 | #navigator-toolbox,
94 | .browser-toolbar {
95 | appearance: none;
96 | }
97 |
98 | .browser-toolbar:not(.titlebar-color) {
99 | background-color: var(--toolbar-bgcolor);
100 | background-image: var(--toolbar-bgimage);
101 | background-clip: padding-box;
102 | color: var(--toolbar-color);
103 | }
104 |
105 | /* Add a fog for background tabs to be visible on Windows 7 glass window background */
106 | @media (-moz-platform: windows-win7) {
107 | @media (-moz-windows-default-theme) {
108 | #TabsToolbar:not(:-moz-lwtheme) {
109 | background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 80%, transparent);
110 | }
111 | }
112 | }
113 |
114 | @media (-moz-windows-compositor: 0),
115 | (-moz-windows-default-theme: 0),
116 | (-moz-platform: windows-win8) {
117 | /* Please keep the menu text colors in this media block in sync with
118 | * light-dark-overrides.css, minus the :not(:-moz-lwtheme) condition - see Bug 1165718.
119 | */
120 | :root[tabsintitlebar]:not(:-moz-lwtheme) {
121 | color: CaptionText;
122 | }
123 |
124 | :root[tabsintitlebar]:not(:-moz-lwtheme):-moz-window-inactive {
125 | color: InactiveCaptionText;
126 | }
127 | }
128 |
129 | @media (-moz-windows-classic) {
130 | /**
131 | * In the classic themes, the titlebar has a horizontal gradient, which is
132 | * problematic for reading the text of background tabs when they're in the
133 | * titlebar. We side-step this issue by layering our own background underneath
134 | * the tabs.
135 | */
136 | :root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar:not(:-moz-lwtheme) {
137 | background-image: linear-gradient(transparent, ActiveCaption);
138 | background-size: auto 200%;
139 | }
140 |
141 | :root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar:not(:-moz-lwtheme):-moz-window-inactive {
142 | background-image: linear-gradient(transparent, InactiveCaption);
143 | }
144 |
145 | /* Add a window top border for webextension themes */
146 | :root[tabsintitlebar][sizemode="normal"] #navigator-toolbox:-moz-lwtheme {
147 | background-image: linear-gradient(to bottom,
148 | ThreeDLightShadow 0, ThreeDLightShadow 1px,
149 | ThreeDHighlight 1px, ThreeDHighlight 2px,
150 | ActiveBorder 2px, ActiveBorder 4px, transparent 4px);
151 | }
152 |
153 | :root[tabsintitlebar] :is(#TabsToolbar, #toolbar-menubar) toolbarbutton:not(:-moz-lwtheme) {
154 | color: inherit;
155 | }
156 | }
157 |
158 | #nav-bar:not([tabs-hidden="true"]) {
159 | /* This is needed for some toolbar button animations. Gross :( */
160 | position: relative;
161 | }
162 |
163 | @media (-moz-windows-default-theme: 0) {
164 | #nav-bar:not(:-moz-lwtheme) {
165 | box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 ThreeDShadow;
166 | }
167 | }
168 | #nav-bar:-moz-lwtheme {
169 | box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--lwt-tabs-border-color, rgba(0,0,0,.3));
170 | }
171 | @media (-moz-windows-compositor: 0) {
172 | #nav-bar[tabs-hidden="true"] {
173 | box-shadow: none;
174 | }
175 | }
176 |
177 | /* Hide navbar for Datcord*/
178 | #nav-bar {
179 | visibility: collapse;
180 | }
181 |
182 | #print-preview-toolbar:not(:-moz-lwtheme) {
183 | appearance: auto;
184 | -moz-default-appearance: toolbox;
185 | }
186 |
187 | #browser-bottombox:not(:-moz-lwtheme) {
188 | background-color: -moz-dialog;
189 | }
190 |
191 | /* Titlebar */
192 |
193 | :root[tabsintitlebar][sizemode="normal"] #titlebar {
194 | appearance: auto;
195 | -moz-default-appearance: -moz-window-titlebar;
196 | }
197 |
198 | :root[tabsintitlebar][sizemode="maximized"] #titlebar {
199 | appearance: auto;
200 | -moz-default-appearance: -moz-window-titlebar-maximized;
201 | }
202 |
203 | @media (-moz-windows-compositor: 0) {
204 | /**
205 | * Anytime we're not using the compositor on Windows, the -moz-window-titlebar
206 | * and -moz-window-titlebar-maximized values for -moz-appearance override
207 | * backgrounds supplied by lwthemes. We make the #titlebar itself hidden, but
208 | * it's children visible in order to hide the background but keep the margin and
209 | * padding that comes from those -moz-window-titlebar rules.
210 | */
211 | :root:not([inDOMFullscreen]) #titlebar:-moz-lwtheme {
212 | visibility: hidden;
213 | }
214 | :root:not([inDOMFullscreen], [chromehidden~="menubar"]) #toolbar-menubar:-moz-lwtheme,
215 | :root:not([inDOMFullscreen], [chromehidden~="toolbar"]) #TabsToolbar:-moz-lwtheme {
216 | visibility: visible;
217 | }
218 | }
219 |
220 | @media (-moz-windows-classic) {
221 | :root[tabsintitlebar][sizemode="normal"] #toolbar-menubar {
222 | margin-top: 4px;
223 | }
224 | }
225 |
226 | .titlebar-buttonbox {
227 | /* For all Windows configurations except for Windows Aero and Windows Aero Basic,
228 | * the default -moz-default-appearance of -moz-window-button-box and
229 | * -moz-window-button-box-maximized adds unwanted margins to the button box. We
230 | * special case Windows Aero and Windows Aero Basic in browser-aero.css.
231 | */
232 | appearance: none;
233 | /* The button box must appear on top of the navigator-toolbox in order for
234 | * click and hover mouse events to work properly for the button in the restored
235 | * window state. Otherwise, elements in the navigator-toolbox, like the menubar,
236 | * can swallow those events. It will also place the buttons above the fog on
237 | * Windows 7 with Aero Glass.
238 | */
239 | z-index: 1;
240 | }
241 |
242 | .titlebar-buttonbox-container {
243 | -moz-box-align: stretch;
244 | }
245 |
246 | @media (-moz-platform: windows-win7),
247 | (-moz-platform: windows-win8) {
248 | /* Preserve window control buttons position at the top of the button box. */
249 | .titlebar-buttonbox-container {
250 | -moz-box-align: start;
251 | }
252 | }
253 |
254 | /* Window control buttons */
255 |
256 | .titlebar-min {
257 | appearance: auto;
258 | -moz-default-appearance: -moz-window-button-minimize;
259 | }
260 |
261 | .titlebar-max {
262 | appearance: auto;
263 | -moz-default-appearance: -moz-window-button-maximize;
264 | }
265 |
266 | .titlebar-restore {
267 | appearance: auto;
268 | -moz-default-appearance: -moz-window-button-restore;
269 | }
270 |
271 | .titlebar-close {
272 | appearance: auto;
273 | -moz-default-appearance: -moz-window-button-close;
274 | }
275 |
276 | @media (-moz-windows-classic: 0) {
277 | .titlebar-min {
278 | margin-inline-end: 2px;
279 | }
280 | }
281 |
282 | :root[tabletmode] .titlebar-min,
283 | :root[tabletmode] .titlebar-restore,
284 | :root[tabletmode] .titlebar-max {
285 | display: none;
286 | }
287 |
288 | /* Bookmark menus */
289 |
290 | menu.bookmark-item,
291 | menuitem.bookmark-item {
292 | min-width: 0;
293 | max-width: 32em;
294 | }
295 |
296 | .bookmark-item:not(.subviewbutton) > .menu-iconic-left {
297 | margin-block: 0;
298 | }
299 |
300 | .bookmark-item > .menu-iconic-left > .menu-iconic-icon {
301 | padding-inline-start: 0;
302 | }
303 |
304 | .bookmark-item[cutting] > .toolbarbutton-icon,
305 | .bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-icon {
306 | opacity: 0.5;
307 | }
308 |
309 | .bookmark-item[cutting] > .toolbarbutton-text,
310 | .bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-text {
311 | opacity: 0.7;
312 | }
313 |
314 |
315 | /* Address bar */
316 |
317 | @media not (prefers-contrast) {
318 | :root:not(:-moz-lwtheme) #urlbar {
319 | --urlbar-box-bgcolor: white;
320 | }
321 | :root[lwt-default-theme-in-dark-mode] #urlbar {
322 | --urlbar-box-bgcolor: var(--toolbar-field-focus-background-color);
323 | }
324 | }
325 |
326 | #urlbar,
327 | #searchbar {
328 | font-size: 1.15em;
329 | }
330 |
331 | @supports -moz-bool-pref("browser.urlbar.experimental.expandTextOnFocus") {
332 | #urlbar[breakout-extend] {
333 | font-size: 1.25em;
334 | }
335 | }
336 |
337 | @media (-moz-windows-default-theme: 0) {
338 | /* Windows HCM conventions use these colors for chiclets. We can't use them on
339 | other platforms because AccentColor can be shown atop SelectedItem,
340 | which has zero contrast. */
341 | :root {
342 | --urlbar-box-hover-bgcolor: SelectedItem;
343 | --urlbar-box-active-bgcolor: SelectedItem;
344 | --urlbar-box-hover-text-color: SelectedItemText;
345 | }
346 |
347 | #urlbar:not(:-moz-lwtheme, [focused="true"]) > #urlbar-background,
348 | #searchbar:not(:-moz-lwtheme, :focus-within) {
349 | border-color: ThreeDShadow;
350 | }
351 | }
352 |
353 | /* Address bar results view */
354 |
355 | @media (-moz-windows-default-theme: 0) {
356 | :root:not(:-moz-lwtheme) {
357 | --urlbar-popup-action-color: -moz-nativehyperlinktext;
358 | }
359 | }
360 |
361 | /* Autocomplete */
362 |
363 | #PopupAutoComplete > richlistbox > richlistitem[originaltype~="datalist-first"] {
364 | border-top: 1px solid ThreeDShadow;
365 | }
366 |
367 | /* Content area */
368 |
369 | #browser {
370 | --sidebar-border-color: ThreeDLightShadow;
371 | }
372 |
373 | /* Tabstrip */
374 |
375 | #TabsToolbar {
376 | min-height: 0;
377 | padding: 0;
378 | /* Hide tabstoolbar for Datcord */
379 | visibility: collapse;
380 | }
381 |
382 | @media (-moz-windows-default-theme: 0) {
383 | /* For high contrast themes. */
384 | #tabbrowser-tabpanels,
385 | :root[privatebrowsingmode=temporary] #tabbrowser-tabpanels {
386 | background-color: -moz-default-background-color;
387 | }
388 | }
389 |
390 | /* All tabs menupopup */
391 |
392 | .alltabs-item[selected="true"] {
393 | font-weight: bold;
394 | }
395 |
396 | toolbarbutton.bookmark-item[dragover="true"][open="true"] {
397 | appearance: none;
398 | background: SelectedItem !important;
399 | color: SelectedItemText !important;
400 | fill: SelectedItemText;
401 | }
402 |
403 | /* Bookmarks roots menu-items */
404 |
405 | #bookmarksToolbarFolderMenu,
406 | #BMB_bookmarksToolbar,
407 | #panelMenu_bookmarksToolbar {
408 | list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.svg");
409 | -moz-image-region: auto;
410 | }
411 |
412 | #PlacesToolbar menu menupopup {
413 | margin-top: -13px;
414 | }
415 |
416 | /* Status panel */
417 |
418 | #statuspanel-label {
419 | margin: 0;
420 | padding: 2px 4px;
421 | background-color: -moz-dialog;
422 | border: 1px none ThreeDLightShadow;
423 | border-top-style: solid;
424 | color: -moz-dialogText;
425 | text-shadow: none;
426 | }
427 |
428 | @media (-moz-windows-default-theme) {
429 | #statuspanel-label {
430 | background-color: #f9f9fa;
431 | color: #444;
432 | }
433 | }
434 |
435 | @media (-moz-content-prefers-color-scheme: dark) {
436 | #statuspanel-label {
437 | background-color: hsl(240, 1%, 20%);
438 | border-color: hsl(240, 1%, 40%);
439 | color: rgb(249, 249, 250);
440 | }
441 | }
442 |
443 | #statuspanel:not([mirror]) > #statuspanel-label:-moz-locale-dir(ltr),
444 | #statuspanel[mirror] > #statuspanel-label:-moz-locale-dir(rtl) {
445 | border-right-style: solid;
446 | /* disabled for triggering grayscale AA (bug 659213)
447 | border-top-right-radius: .3em;
448 | */
449 | margin-right: 1em;
450 | }
451 |
452 | #statuspanel:not([mirror]) > #statuspanel-label:-moz-locale-dir(rtl),
453 | #statuspanel[mirror] > #statuspanel-label:-moz-locale-dir(ltr) {
454 | border-left-style: solid;
455 | /* disabled for triggering grayscale AA (bug 659213)
456 | border-top-left-radius: .3em;
457 | */
458 | margin-left: 1em;
459 | }
460 |
461 | /* Prevent window controls from overlapping the nav bar's shadow on the tab
462 | * bar. */
463 | #TabsToolbar > .titlebar-buttonbox-container {
464 | margin-bottom: var(--tabs-navbar-shadow-size);
465 | }
466 |
467 | .private-browsing-indicator {
468 | margin-inline: 12px;
469 | }
470 |
471 | #UITourTooltipButtons {
472 | /**
473 | * Override the --arrowpanel-padding so the background extends
474 | * to the sides and bottom of the panel.
475 | */
476 | margin-inline: -10px;
477 | margin-bottom: -10px;
478 | }
479 |
480 | /* Make menu items larger when opened through touch. */
481 | #widget-overflow[touchmode] .toolbarbutton-1,
482 | panel[touchmode] .PanelUI-subView .subviewbutton,
483 | menupopup[touchmode] menu,
484 | menupopup[touchmode] menuitem {
485 | --arrowpanel-menuitem-padding-block: 12px;
486 | padding-block: var(--arrowpanel-menuitem-padding-block);
487 | }
488 |
489 | #contentAreaContextMenu[touchmode] > #context-navigation > menuitem {
490 | padding-block: 7px;
491 | }
492 |
493 | #context-navigation {
494 | background-color: menu;
495 | padding-bottom: 4px;
496 | }
497 |
498 | #context-sep-navigation {
499 | margin-inline-start: -28px;
500 | margin-top: -4px;
501 | }
502 |
503 | @media (-moz-windows-non-native-menus) {
504 | /* :not([hidden]) to avoid the display: flex unhiding the item. */
505 | #context-navigation:not([hidden]) {
506 | /* The Windows 10 version of the navigation area needs the scrollbox's
507 | background color, not the builtin "menu" color. */
508 | background-color: inherit;
509 | padding: 0 0 4px;
510 | /* Use modern flex box so we can use percentage widths to redistribute
511 | * spacing manually. */
512 | display: flex;
513 | flex-direction: row;
514 | /* We want the first and last icons to align with the text items which
515 | * have 1em inline padding, and for icons to be centered within their
516 | * hover state, so each icon of 16px needs 1em padding on both sides:
517 | */
518 | --menuitem-min-width: calc(2em + 16px);
519 | /* The total width of the container should then be at least 4 times that: */
520 | min-width: calc(4 * var(--menuitem-min-width));
521 | }
522 |
523 | #context-navigation > .menuitem-iconic {
524 | flex: 1 0 auto;
525 | }
526 |
527 | #context-navigation > .menuitem-iconic[_moz-menuactive="true"] {
528 | /* We only show hover state on the icons. This ensures there is no
529 | * dead space between icons, but the visible hover state is only
530 | * around the icons, and all the icons' hover states match each other.
531 | */
532 | background-color: transparent;
533 | }
534 |
535 | #context-navigation > .menuitem-iconic > .menu-iconic-left {
536 | margin: 0;
537 | padding: 0;
538 | }
539 |
540 | /* override styles from shared/contextmenu.inc.css */
541 | #context-navigation > .menuitem-iconic > .menu-iconic-left > .menu-iconic-icon {
542 | width: var(--menuitem-min-width);
543 | height: 32px;
544 | padding: 8px 1em;
545 | margin: 0;
546 | }
547 | #context-navigation > .menuitem-iconic[_moz-menuactive="true"] > .menu-iconic-left > .menu-iconic-icon {
548 | background-color: -moz-menuhover;
549 | }
550 |
551 | #context-navigation > .menuitem-iconic[_moz-menuactive="true"][disabled="true"] > .menu-iconic-left > .menu-iconic-icon {
552 | background-color: -moz-menuhoverdisabled;
553 | }
554 |
555 | /* If the menu is wider than the icons strictly need, the