Bug 1489581 - Improve vertical centering inside the content blocking "disabled" label. r=paolo

Labels in the identity popup that are potentially multiline get dynamic heights set
as part of the descriptionHeightWorkaround. This causes some cross-platform glitches
in vertically centering the icon and the label of the disabled indicator.

The disabled label doesn't really need to be multiline, so we avoid doing that. This
also means that we need to make some changes to handle long "Disabled" labels a little
more gracefully, but looking at existing translations of the word "Disabled" we won't
run into trouble: https://transvision.mozfr.org/string/?entity=browser/chrome/browser/browser.dtd:contentBlocking.disabled.label&repo=gecko_strings

Differential Revision: https://phabricator.services.mozilla.com/D6041

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Johann Hofmann 2018-09-18 12:14:35 +00:00
Родитель f977de03b4
Коммит 0c60d58387
2 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -52,7 +52,7 @@
class="identity-popup-section"
when-connection="not-secure secure secure-ev secure-cert-user-overridden extension">
<vbox id="identity-popup-content-blocking-content" flex="1">
<hbox>
<hbox align="start">
<label id="tracking-protection-label"
class="identity-popup-headline"
flex="1">&trackingProtection.title;</label>
@ -62,9 +62,11 @@
<hbox id="identity-popup-content-blocking-disabled-label">
<image/>
<label id="identity-popup-content-blocking-disabled-label-exception"
tooltiptext="&contentBlocking.exception.tooltip;">&contentBlocking.disabled.label;</label>
value="&contentBlocking.disabled.label;"
tooltiptext="&contentBlocking.exception.tooltip;"/>
<label id="identity-popup-content-blocking-disabled-label-global"
tooltiptext="&contentBlocking.disabled.tooltip;">&contentBlocking.disabled.label;</label>
value="&contentBlocking.disabled.label;"
tooltiptext="&contentBlocking.disabled.tooltip;"/>
</hbox>
<toolbarbutton id="tracking-protection-preferences-button"
class="identity-popup-preferences-button subviewbutton"

Просмотреть файл

@ -376,11 +376,12 @@ description#identity-popup-content-verifier,
/* Disabled label */
#identity-popup-content-blocking-disabled-label {
padding: 0px 5px;
padding: 2px 5px;
border-radius: 3px;
margin: 5px;
display: none;
color: #fff;
-moz-box-align: center;
}
#identity-popup-content-blocking-content[hasException] #identity-popup-content-blocking-disabled-label {
@ -410,7 +411,6 @@ description#identity-popup-content-verifier,
#identity-popup-content-blocking-disabled-label > label {
margin: 0;
line-height: 18px;
}
#identity-popup-content-blocking-disabled-label > image {