Add preference to hide one-off search buttons and adjust CSS positioning

This commit is contained in:
mr. M
2025-03-02 17:03:58 +01:00
parent a500407dc3
commit 7b124f1dc2
4 changed files with 15 additions and 3 deletions

View File

@@ -59,7 +59,6 @@ if test "$ZEN_RELEASE"; then
ac_add_options --disable-rust-tests
ac_add_options --disable-default-browser-agent
# ac_add_options --enable-minify=js,properties
if ! test "$ZEN_DISABLE_LTO"; then
# only enable full LTO when ZEN_RELEASE_BRANCH is 'release'

View File

@@ -121,6 +121,7 @@ pref('zen.urlbar.replace-newtab', true);
pref('zen.urlbar.behavior', 'floating-on-type'); // default, floating-on-type, float
pref('zen.urlbar.wait-to-clear', 45000); // in ms (default 45s)
pref('zen.urlbar.show-domain-only-in-sidebar', true);
pref('zen.urlbar.hide-one-offs', true);
#ifdef XP_MACOSX
// Disable for macos in the meantime until @HarryHeres finds a solution for hight DPI screens

View File

@@ -435,9 +435,8 @@ button.popup-notification-dropmarker {
font-size: 1.5em !important;
width: min(90%, 60rem) !important;
}
top: 50vh !important;
top: 25vh !important;
transform: translateX(-50%);
margin-top: -20%;
left: 50% !important;
#urlbar-container:has(&) {

View File

@@ -0,0 +1,13 @@
diff --git a/browser/components/search/SearchOneOffs.sys.mjs b/browser/components/search/SearchOneOffs.sys.mjs
index 6dcd68f7ec4da72f9510ac3c8ff1cecffbd70e92..f712b95d03be46f7d81bad4113f533f0515a92b9 100644
--- a/browser/components/search/SearchOneOffs.sys.mjs
+++ b/browser/components/search/SearchOneOffs.sys.mjs
@@ -446,7 +446,7 @@ export class SearchOneOffs {
// For the search-bar, always show the one-off buttons where there is an
// option to add an engine.
let addEngineNeeded = isSearchBar && addEngines.length;
- let hideOneOffs = (await this.willHide()) && !addEngineNeeded;
+ let hideOneOffs = (await this.willHide()) && !addEngineNeeded || Services.prefs.getBoolPref("zen.urlbar.hide-one-offs");
// The _engineInfo cache is used by more consumers, thus it is not a good
// representation of whether this method already updated the one-off buttons