From 8af9a1ee87352b64641f91c835668a31b23ddf50 Mon Sep 17 00:00:00 2001 From: Sai Kurogetsu Date: Wed, 7 Feb 2018 20:45:12 +0000 Subject: [PATCH] colored URL bar for private windows, issues #19, #21 --- ui/gnome-3.18-dark.css | 2 ++ ui/gnome-3.18-light.css | 2 ++ ui/gnome-3.26-dark.css | 2 ++ ui/gnome-3.26-light.css | 2 ++ ui/private-urlbar.css | 9 +++++++++ userChrome.css | 8 ++++++-- 6 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 ui/private-urlbar.css diff --git a/ui/gnome-3.18-dark.css b/ui/gnome-3.18-dark.css index 6f2acc9..eff85a9 100644 --- a/ui/gnome-3.18-dark.css +++ b/ui/gnome-3.18-dark.css @@ -52,6 +52,8 @@ --gnome-inactive-urlbar-color: rgb(212, 212, 212); --gnome-focused-urlbar-border-color: #0f2a46; --gnome-focused-urlbar-outline: 1px solid #21578f; + /* for private-urlbar.css only */ + --gnome-private-urlbar-bgimage: linear-gradient(#25003e, #25003e); /* Tab bar */ --gnome-tabbar-bgcolor: #2f3434; diff --git a/ui/gnome-3.18-light.css b/ui/gnome-3.18-light.css index dca09ae..c6ea341 100644 --- a/ui/gnome-3.18-light.css +++ b/ui/gnome-3.18-light.css @@ -52,6 +52,8 @@ --gnome-inactive-urlbar-color: rgb(50, 50, 50); --gnome-focused-urlbar-border-color: #0f2a46; --gnome-focused-urlbar-outline: 1px solid #21578f; + /* for private-urlbar.css only */ + --gnome-private-urlbar-bgimage: linear-gradient(#e6c2ff, #e6c2ff); /* Tab bar */ --gnome-tabbar-bgcolor: #d6d6d6; diff --git a/ui/gnome-3.26-dark.css b/ui/gnome-3.26-dark.css index 269f2e9..d77246e 100644 --- a/ui/gnome-3.26-dark.css +++ b/ui/gnome-3.26-dark.css @@ -52,6 +52,8 @@ --gnome-inactive-urlbar-color: #d3d4d5; --gnome-focused-urlbar-border-color: #0f2a46; --gnome-focused-urlbar-outline: 1px solid #21578f; + /* for private-urlbar.css only */ + --gnome-private-urlbar-bgimage: linear-gradient(#25003e, #25003e); /* Tab bar */ --gnome-tabbar-bgcolor: #272c2d; diff --git a/ui/gnome-3.26-light.css b/ui/gnome-3.26-light.css index b656840..cecab79 100644 --- a/ui/gnome-3.26-light.css +++ b/ui/gnome-3.26-light.css @@ -52,6 +52,8 @@ --gnome-inactive-urlbar-color: #323232; --gnome-focused-urlbar-border-color: #4a90d9; --gnome-focused-urlbar-outline: none; + /* for private-urlbar.css only */ + --gnome-private-urlbar-bgimage: linear-gradient(#e6c2ff, #e6c2ff); /* Tab bar */ --gnome-tabbar-bgcolor: #cfcfcd; diff --git a/ui/private-urlbar.css b/ui/private-urlbar.css new file mode 100644 index 0000000..faca417 --- /dev/null +++ b/ui/private-urlbar.css @@ -0,0 +1,9 @@ +@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +:root[privatebrowsingmode="temporary"] .urlbar-textbox-container { + background-image: var(--gnome-private-urlbar-bgimage) !important; +} + +#TabsToolbar .private-browsing-indicator { + display: none !important; +} diff --git a/userChrome.css b/userChrome.css index d251fc2..93a0ade 100644 --- a/userChrome.css +++ b/userChrome.css @@ -54,10 +54,14 @@ /* Hide the tab bar when only one tab is open * Warning: This also hides the private browsing indicator in private windows. - * You should move the new tab button somewhere else for this to work, because - * by default it is on the tab bar too. */ + * If you are using it, you might wanna enable the next feature too. Also you + * should move the new tab button somewhere else for this to work, because by + * default it is on the tab bar too. */ /*@import "ui/hide-single-tab.css"; /**/ +/* Replace the private browsing indicator with a colored URL bar */ +/*@import "ui/private-urlbar.css"; /**/ + /* Make all tab icons look kinda like symbolic icons */ /*@import "ui/symbolic-tab-icons.css"; /**/