зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1800828 - Simplify markup of fonts dialog. r=Gijs,settings-reviewers
This doesn't fix the bug but removes some unnecessary elements (now that the prefs search was improved), and moves some CSS out of inline styles into already-existing rules. Differential Revision: https://phabricator.services.mozilla.com/D162342
This commit is contained in:
Родитель
c2016c37dd
Коммит
d79afafaec
|
@ -70,63 +70,55 @@
|
|||
|
||||
<separator class="thin"/>
|
||||
|
||||
<box style="display: grid; grid-template-columns: auto 1fr auto auto;">
|
||||
<box id="font-chooser-group">
|
||||
<!-- proportional row -->
|
||||
<hbox align="center" pack="end">
|
||||
<label data-l10n-id="fonts-proportional-header" control="defaultFontType"/>
|
||||
</hbox>
|
||||
<!-- This <hbox> is needed to position search tooltips correctly. -->
|
||||
<hbox>
|
||||
<menulist id="defaultFontType" flex="1" style="width: 0px;">
|
||||
<menupopup>
|
||||
<menuitem value="serif" data-l10n-id="fonts-default-serif"/>
|
||||
<menuitem value="sans-serif" data-l10n-id="fonts-default-sans-serif"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<menulist id="defaultFontType">
|
||||
<menupopup>
|
||||
<menuitem value="serif" data-l10n-id="fonts-default-serif"/>
|
||||
<menuitem value="sans-serif" data-l10n-id="fonts-default-sans-serif"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<hbox align="center" pack="end">
|
||||
<label data-l10n-id="fonts-proportional-size" control="sizeVar"/>
|
||||
</hbox>
|
||||
<!-- This <hbox> is needed to position search tooltips correctly. -->
|
||||
<hbox>
|
||||
<menulist id="sizeVar" delayprefsave="true">
|
||||
<menupopup>
|
||||
<menuitem value="9" label="9"/>
|
||||
<menuitem value="10" label="10"/>
|
||||
<menuitem value="11" label="11"/>
|
||||
<menuitem value="12" label="12"/>
|
||||
<menuitem value="13" label="13"/>
|
||||
<menuitem value="14" label="14"/>
|
||||
<menuitem value="15" label="15"/>
|
||||
<menuitem value="16" label="16"/>
|
||||
<menuitem value="17" label="17"/>
|
||||
<menuitem value="18" label="18"/>
|
||||
<menuitem value="20" label="20"/>
|
||||
<menuitem value="22" label="22"/>
|
||||
<menuitem value="24" label="24"/>
|
||||
<menuitem value="26" label="26"/>
|
||||
<menuitem value="28" label="28"/>
|
||||
<menuitem value="30" label="30"/>
|
||||
<menuitem value="32" label="32"/>
|
||||
<menuitem value="34" label="34"/>
|
||||
<menuitem value="36" label="36"/>
|
||||
<menuitem value="40" label="40"/>
|
||||
<menuitem value="44" label="44"/>
|
||||
<menuitem value="48" label="48"/>
|
||||
<menuitem value="56" label="56"/>
|
||||
<menuitem value="64" label="64"/>
|
||||
<menuitem value="72" label="72"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<menulist id="sizeVar" delayprefsave="true">
|
||||
<menupopup>
|
||||
<menuitem value="9" label="9"/>
|
||||
<menuitem value="10" label="10"/>
|
||||
<menuitem value="11" label="11"/>
|
||||
<menuitem value="12" label="12"/>
|
||||
<menuitem value="13" label="13"/>
|
||||
<menuitem value="14" label="14"/>
|
||||
<menuitem value="15" label="15"/>
|
||||
<menuitem value="16" label="16"/>
|
||||
<menuitem value="17" label="17"/>
|
||||
<menuitem value="18" label="18"/>
|
||||
<menuitem value="20" label="20"/>
|
||||
<menuitem value="22" label="22"/>
|
||||
<menuitem value="24" label="24"/>
|
||||
<menuitem value="26" label="26"/>
|
||||
<menuitem value="28" label="28"/>
|
||||
<menuitem value="30" label="30"/>
|
||||
<menuitem value="32" label="32"/>
|
||||
<menuitem value="34" label="34"/>
|
||||
<menuitem value="36" label="36"/>
|
||||
<menuitem value="40" label="40"/>
|
||||
<menuitem value="44" label="44"/>
|
||||
<menuitem value="48" label="48"/>
|
||||
<menuitem value="56" label="56"/>
|
||||
<menuitem value="64" label="64"/>
|
||||
<menuitem value="72" label="72"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
|
||||
<!-- serif row -->
|
||||
<hbox align="center" pack="end">
|
||||
<label data-l10n-id="fonts-serif" control="serif"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<menulist id="serif" flex="1" style="width: 0px;" delayprefsave="true"/>
|
||||
</hbox>
|
||||
<menulist id="serif" delayprefsave="true"/>
|
||||
<spacer/>
|
||||
<spacer/>
|
||||
|
||||
|
@ -134,9 +126,7 @@
|
|||
<hbox align="center" pack="end">
|
||||
<label data-l10n-id="fonts-sans-serif" control="sans-serif"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<menulist id="sans-serif" flex="1" style="width: 0px;" delayprefsave="true"/>
|
||||
</hbox>
|
||||
<menulist id="sans-serif" delayprefsave="true"/>
|
||||
<spacer/>
|
||||
<spacer/>
|
||||
|
||||
|
@ -144,43 +134,43 @@
|
|||
<hbox align="center" pack="end">
|
||||
<label data-l10n-id="fonts-monospace" control="monospace"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<menulist id="monospace" flex="1" style="width: 0px;" crop="right" delayprefsave="true"/>
|
||||
</hbox>
|
||||
<!--
|
||||
FIXME(emilio): Why is this the only menulist here with crop="right"?
|
||||
This goes back to the beginning of time...
|
||||
-->
|
||||
<menulist id="monospace" crop="right" delayprefsave="true"/>
|
||||
<hbox align="center" pack="end">
|
||||
<label data-l10n-id="fonts-monospace-size" control="sizeMono"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<menulist id="sizeMono" delayprefsave="true">
|
||||
<menupopup>
|
||||
<menuitem value="9" label="9"/>
|
||||
<menuitem value="10" label="10"/>
|
||||
<menuitem value="11" label="11"/>
|
||||
<menuitem value="12" label="12"/>
|
||||
<menuitem value="13" label="13"/>
|
||||
<menuitem value="14" label="14"/>
|
||||
<menuitem value="15" label="15"/>
|
||||
<menuitem value="16" label="16"/>
|
||||
<menuitem value="17" label="17"/>
|
||||
<menuitem value="18" label="18"/>
|
||||
<menuitem value="20" label="20"/>
|
||||
<menuitem value="22" label="22"/>
|
||||
<menuitem value="24" label="24"/>
|
||||
<menuitem value="26" label="26"/>
|
||||
<menuitem value="28" label="28"/>
|
||||
<menuitem value="30" label="30"/>
|
||||
<menuitem value="32" label="32"/>
|
||||
<menuitem value="34" label="34"/>
|
||||
<menuitem value="36" label="36"/>
|
||||
<menuitem value="40" label="40"/>
|
||||
<menuitem value="44" label="44"/>
|
||||
<menuitem value="48" label="48"/>
|
||||
<menuitem value="56" label="56"/>
|
||||
<menuitem value="64" label="64"/>
|
||||
<menuitem value="72" label="72"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<menulist id="sizeMono" delayprefsave="true">
|
||||
<menupopup>
|
||||
<menuitem value="9" label="9"/>
|
||||
<menuitem value="10" label="10"/>
|
||||
<menuitem value="11" label="11"/>
|
||||
<menuitem value="12" label="12"/>
|
||||
<menuitem value="13" label="13"/>
|
||||
<menuitem value="14" label="14"/>
|
||||
<menuitem value="15" label="15"/>
|
||||
<menuitem value="16" label="16"/>
|
||||
<menuitem value="17" label="17"/>
|
||||
<menuitem value="18" label="18"/>
|
||||
<menuitem value="20" label="20"/>
|
||||
<menuitem value="22" label="22"/>
|
||||
<menuitem value="24" label="24"/>
|
||||
<menuitem value="26" label="26"/>
|
||||
<menuitem value="28" label="28"/>
|
||||
<menuitem value="30" label="30"/>
|
||||
<menuitem value="32" label="32"/>
|
||||
<menuitem value="34" label="34"/>
|
||||
<menuitem value="36" label="36"/>
|
||||
<menuitem value="40" label="40"/>
|
||||
<menuitem value="44" label="44"/>
|
||||
<menuitem value="48" label="48"/>
|
||||
<menuitem value="56" label="56"/>
|
||||
<menuitem value="64" label="64"/>
|
||||
<menuitem value="72" label="72"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</box>
|
||||
<separator class="thin"/>
|
||||
<hbox align="center" pack="end">
|
||||
|
|
|
@ -667,6 +667,11 @@ richlistitem[selected] .actionsMenu:focus-visible {
|
|||
* Font group and font dialog menulist fixes
|
||||
*/
|
||||
|
||||
#font-chooser-group {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto auto;
|
||||
}
|
||||
|
||||
#defaultFont {
|
||||
width: 25ch;
|
||||
}
|
||||
|
@ -675,6 +680,7 @@ richlistitem[selected] .actionsMenu:focus-visible {
|
|||
#serif,
|
||||
#sans-serif,
|
||||
#monospace {
|
||||
width: 0; /* Might be able to be removed */
|
||||
min-width: 30ch;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче