Bug 1856992 - Fix tracking protection active icon with system dark theme. r=adw

This is simpler and also fixes this icon on Linux's system dark theme,
which has been broken forever.

Depends on D190069

Differential Revision: https://phabricator.services.mozilla.com/D190070
This commit is contained in:
Emilio Cobos Álvarez 2023-10-05 07:37:46 +00:00
parent 925f5deecb
commit 3bccb94b5d
4 changed files with 9 additions and 26 deletions

View File

@ -256,20 +256,16 @@
max-width: 500px;
}
#urlbar-input-container[pageproxystate="valid"] > #tracking-protection-icon-container > #tracking-protection-icon-box > #tracking-protection-icon {
#urlbar-input-container[pageproxystate="valid"] > #tracking-protection-icon-container > #tracking-protection-icon-box {
list-style-image: url(chrome://browser/skin/tracking-protection.svg);
}
#urlbar-input-container[pageproxystate="valid"] > #tracking-protection-icon-container > #tracking-protection-icon-box[hasException] > #tracking-protection-icon {
list-style-image: url(chrome://browser/skin/tracking-protection-disabled.svg);
}
&[active] {
list-style-image: url(chrome://browser/skin/tracking-protection-active.svg);
}
#urlbar-input-container[pageproxystate="valid"] > #tracking-protection-icon-container > #tracking-protection-icon-box:not([hasException])[active] > #tracking-protection-icon {
list-style-image: url(chrome://browser/skin/tracking-protection-active.svg);
}
:root[lwt-toolbar-field-brighttext] #urlbar-input-container[pageproxystate="valid"] > #tracking-protection-icon-container > #tracking-protection-icon-box:not([hasException])[active] > #tracking-protection-icon {
list-style-image: url(chrome://browser/skin/tracking-protection-active-brighttext.svg);
&[hasException] {
list-style-image: url(chrome://browser/skin/tracking-protection-disabled.svg);
}
}
#urlbar-input-container[pageproxystate="invalid"] > #tracking-protection-icon-container {

View File

@ -1,12 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" width="16" height="16">
<defs>
<linearGradient id="a" x1="16" y1="0" x2="0" y2="16" gradientUnits="userSpaceOnUse">
<stop stop-color="#CB9EFF"/>
<stop offset="1" stop-color="#00DDFF"/>
</linearGradient>
</defs>
<path d="M8 16a1.88 1.88 0 0 1-.872-.215c-1.763-.919-3.382-2.408-4.559-4.193-.563-.853-.962-1.893-1.182-3.09L.776 5.177a1.998 1.998 0 0 1 1.015-2.12L7.064.237A1.973 1.973 0 0 1 8.932.234l5.273 2.872a2 2 0 0 1 1.018 2.127l-.61 3.279c-.22 1.188-.616 2.223-1.179 3.076-1.177 1.786-2.798 3.277-4.563 4.198A1.879 1.879 0 0 1 8 16zM7.659 1.336 2.363 4.168 2 4.928l.616 3.348c.19 1.031.525 1.915.996 2.628 1.062 1.611 2.517 2.951 4.095 3.773l.585.001.001-.001c1.581-.823 3.037-2.165 4.099-3.777.469-.713.804-1.593.993-2.617l.614-3.3-.367-.766-5.291-2.882-.682.001z" fill="url(#a)"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -4,8 +4,8 @@
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" width="16" height="16">
<defs>
<linearGradient id="a" x1="16" y1="0" x2="0" y2="16" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB71FF"/>
<stop offset="1" stop-color="#0250BB"/>
<stop stop-color="light-dark(#AB71FF, #CB9EFF)"/>
<stop offset="1" stop-color="light-dark(#0250BB, #00DDFF)"/>
</linearGradient>
</defs>
<path d="M8 16a1.88 1.88 0 0 1-.872-.215c-1.763-.919-3.382-2.408-4.559-4.193-.563-.853-.962-1.893-1.182-3.09L.776 5.177a1.998 1.998 0 0 1 1.015-2.12L7.064.237A1.973 1.973 0 0 1 8.932.234l5.273 2.872a2 2 0 0 1 1.018 2.127l-.61 3.279c-.22 1.188-.616 2.223-1.179 3.076-1.177 1.786-2.798 3.277-4.563 4.198A1.879 1.879 0 0 1 8 16zM7.659 1.336 2.363 4.168 2 4.928l.616 3.348c.19 1.031.525 1.915.996 2.628 1.062 1.611 2.517 2.951 4.095 3.773l.585.001.001-.001c1.581-.823 3.037-2.165 4.099-3.777.469-.713.804-1.593.993-2.617l.614-3.3-.367-.766-5.291-2.882-.682.001z" fill="url(#a)"/>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -100,7 +100,6 @@
skin/classic/browser/tracking-protection.svg (../shared/identity-block/tracking-protection.svg)
skin/classic/browser/tracking-protection-disabled.svg (../shared/identity-block/tracking-protection-disabled.svg)
skin/classic/browser/tracking-protection-active.svg (../shared/identity-block/tracking-protection-active.svg)
skin/classic/browser/tracking-protection-active-brighttext.svg (../shared/identity-block/tracking-protection-active-brighttext.svg)
skin/classic/browser/toolbar-drag-indicator.svg (../shared/toolbar-drag-indicator.svg)