Bug 1536030 - remove grid usage from preferences' fonts.xul, messengerLanguages.xul and receipts.xul. r=mkmelin
authorKhushil Mistry <khushil324@gmail.com>
Thu, 21 Mar 2019 15:43:00 +0100
changeset 26150 fc8015e62158
parent 26149 f9d9f70bc490
child 26151 34cf7d8564ad
push id15696
push usermozilla@jorgk.com
push dateSat, 23 Mar 2019 08:18:55 +0000
treeherdercomm-central@34cf7d8564ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1536030
Bug 1536030 - remove grid usage from preferences' fonts.xul, messengerLanguages.xul and receipts.xul. r=mkmelin
mail/components/preferences/fonts.xul
mail/components/preferences/messengerLanguages.xul
mail/components/preferences/receipts.xul
--- a/mail/components/preferences/fonts.xul
+++ b/mail/components/preferences/fonts.xul
@@ -72,109 +72,97 @@
             <menuitem value="x-tibt"          label="&font.langGroup.tibetan;"/>
             <menuitem value="x-cans"          label="&font.langGroup.canadian;"/>
             <menuitem value="x-unicode"       label="&font.langGroup.other;"/>
           </menupopup>
         </menulist>
       </hbox>
 
       <separator class="thin"/>
-
-      <grid>
-        <columns>
-          <column/>
-          <column flex="1"/>
-          <column/>
-          <column/>
-        </columns>
-
-        <rows>
-          <row>
-            <separator class="thin"/>
-          </row>
-
-          <row align="center">
-            <hbox align="center" pack="end">
-              <label accesskey="&proportional.accesskey;"
-                     control="defaultFontType">&proportional.label;</label>
-            </hbox>
-
-            <menulist id="defaultFontType" flex="1" style="width: 0px;">
-              <menupopup>
-                <menuitem value="serif" label="&useDefaultFontSerif.label;"/>
-                <menuitem value="sans-serif"
-                          label="&useDefaultFontSansSerif.label;"/>
-              </menupopup>
-            </menulist>
-
-            <hbox align="center" pack="end">
-              <label value="&size.label;"
-                     accesskey="&sizeProportional.accesskey;"
-                     control="sizeVar"/>
-            </hbox>
+      <separator class="thin"/>
 
-            <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>
-          </row>
-          <row align="center">
-            <hbox align="center" pack="end">
-              <label accesskey="&serif.accesskey;"
-                     control="serif">&serif.label;</label>
-            </hbox>
-            <menulist id="serif" flex="1" style="width: 0px;" delayprefsave="true"
-                      onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
-            <spacer/>
-          </row>
-          <row align="center">
-            <hbox align="center" pack="end">
-              <label accesskey="&sans-serif.accesskey;"
-                     control="sans-serif">&sans-serif.label;</label>
-            </hbox>
-            <menulist id="sans-serif" flex="1" style="width: 0px;" delayprefsave="true"
-                      onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
-            <spacer/>
-          </row>
-          <row align="center">
-            <hbox align="center" pack="end">
-              <label accesskey="&monospace.accesskey;"
-                     control="monospace">&monospace.label;</label>
-            </hbox>
-            <menulist id="monospace" flex="1" style="width: 0px;" crop="right" delayprefsave="true"
-                      onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
-            <hbox align="center" pack="end">
-              <label accesskey="&sizeMonospace.accesskey;"
-                     control="sizeMono">&size.label;</label>
-            </hbox>
+      <hbox flex="1">
+        <vbox flex="1">
+          <hbox flex="1" align="center" pack="end">
+            <label accesskey="&proportional.accesskey;"
+                   control="defaultFontType">&proportional.label;</label>
+          </hbox>
+          <hbox flex="1" align="center" pack="end">
+            <label accesskey="&serif.accesskey;" control="serif">&serif.label;</label>
+          </hbox>
+          <hbox flex="1" align="center" pack="end">
+            <label accesskey="&sans-serif.accesskey;" control="sans-serif">&sans-serif.label;</label>
+          </hbox>
+          <hbox flex="1" align="center" pack="end">
+            <label accesskey="&monospace.accesskey;" control="monospace">&monospace.label;</label>
+          </hbox>
+        </vbox>
+        <vbox>
+          <menulist id="defaultFontType">
+            <menupopup>
+              <menuitem value="serif" label="&useDefaultFontSerif.label;"/>
+              <menuitem value="sans-serif" label="&useDefaultFontSansSerif.label;"/>
+            </menupopup>
+          </menulist>
+          <menulist id="serif"
+                    delayprefsave="true"
+                    onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
+          <menulist id="sans-serif"
+                    delayprefsave="true"
+                    onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
+          <menulist id="monospace"
+                    crop="right"
+                    delayprefsave="true"
+                    onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
+        </vbox>
+        <vbox>
+          <hbox flex="1" align="center" pack="end">
+            <label value="&size.label;" accesskey="&sizeProportional.accesskey;" control="sizeVar"/>
+          </hbox>
+          <hbox flex="1">
+            <label value=""/>
+          </hbox>
+          <hbox flex="1">
+            <label value=""/>
+          </hbox>
+          <hbox flex="1" align="center" pack="end">
+            <label accesskey="&sizeMonospace.accesskey;" control="sizeMono">&size.label;</label>
+          </hbox>
+        </vbox>
+        <vbox>
+          <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>
+          <vbox flex="1" pack="end" align="end">
             <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"/>
@@ -194,19 +182,19 @@
                 <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>
-          </row>
-        </rows>
-      </grid>
+          </vbox>
+        </vbox>
+      </hbox>
 
       <separator class="thin"/>
 
       <hbox flex="1">
         <spacer flex="1"/>
         <hbox align="center" pack="end">
           <label accesskey="&minSize.accesskey;"
                  control="minSize">&minSize.label;</label>
@@ -267,42 +255,38 @@
     </groupbox>
 
     <groupbox align="start">
       <label><html:h2>&languagesTitle2.label;</html:h2></label>
 
       <label value="&composingDescription2.label;"/>
 
       <separator class="thin"/>
-      <grid>
-        <columns>
-          <column/>
-          <column flex="1"/>
-        </columns>
-
-        <rows>
-          <row align="center" class="indent">
+      <hbox>
+        <vbox pack="end">
+          <hbox align="center" flex="1" class="indent">
             <label control="sendDefaultCharsetList"
                    value="&sendDefaultCharset.label;"
                    accesskey="&sendDefaultCharset.accesskey;"/>
-            <menulist is="menulist-charsetpicker" id="sendDefaultCharsetList"
-                      subset="sending"
-                      preference="mailnews.send_default_charset"/>
-          </row>
-
-          <row align="center" class="indent">
+          </hbox>
+          <hbox align="center" flex="1" class="indent">
             <label control="viewDefaultCharsetList"
                    value="&viewDefaultCharsetList.label;"
                    accesskey="&viewDefaultCharsetList.accesskey;"/>
-            <menulist is="menulist-charsetpicker" id="viewDefaultCharsetList"
-                      subset="viewing"
-                      preference="mailnews.view_default_charset"/>
-          </row>
-        </rows>
-      </grid>
+          </hbox>
+        </vbox>
+        <vbox>
+          <menulist is="menulist-charsetpicker" id="sendDefaultCharsetList"
+                    subset="sending"
+                    preference="mailnews.send_default_charset"/>
+          <menulist is="menulist-charsetpicker" id="viewDefaultCharsetList"
+                    subset="viewing"
+                    preference="mailnews.view_default_charset"/>
+        </vbox>
+      </hbox>
 
       <separator class="thin"/>
 
       <checkbox id="replyInDefaultCharset" label="&replyInDefaultCharset3.label;"
                 preference="mailnews.reply_in_default_charset"
                 accesskey="&replyInDefaultCharset3.accesskey;"/>
     </groupbox>
     <separator/>
--- a/mail/components/preferences/messengerLanguages.xul
+++ b/mail/components/preferences/messengerLanguages.xul
@@ -23,44 +23,46 @@
 
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
   <script type="application/javascript" src="chrome://messenger/content/preferences/messengerLanguages.js"/>
 
   <vbox id="messengerLanguagesDialogPane"
         class="prefpane largeDialogContainer"
         flex="1">
     <description data-l10n-id="messenger-languages-description"/>
-
-    <grid flex="1">
-      <columns>
-        <column flex="1"/>
-        <column/>
-      </columns>
-      <rows>
-        <row flex="1">
-            <richlistbox id="selectedLocales" flex="1"/>
-          <vbox>
-            <button id="up" class="action-button" disabled="true" data-l10n-id="languages-customize-moveup"/>
-            <button id="down" class="action-button" disabled="true" data-l10n-id="languages-customize-movedown"/>
-            <button id="remove" class="action-button" disabled="true" data-l10n-id="languages-customize-remove"/>
-          </vbox>
-        </row>
-        <row>
-          <menulist id="availableLocales"
-                    class="available-locales-list"
-                    data-l10n-id="messenger-languages-select-language"
-                    data-l10n-attrs="placeholder,label">
-            <menupopup/>
-          </menulist>
+    <hbox flex="1">
+      <vbox flex="1">
+        <richlistbox id="selectedLocales" flex="1"/>
+        <menulist id="availableLocales"
+                  class="available-locales-list"
+                  data-l10n-id="messenger-languages-select-language"
+                  data-l10n-attrs="placeholder,label">
+          <menupopup/>
+        </menulist>
+      </vbox>
+      <vbox>
+        <button id="up"
+                class="action-button"
+                disabled="true"
+                data-l10n-id="languages-customize-moveup"/>
+        <button id="down"
+                class="action-button"
+                disabled="true"
+                data-l10n-id="languages-customize-movedown"/>
+        <button id="remove"
+                class="action-button"
+                disabled="true"
+                data-l10n-id="languages-customize-remove"/>
+        <vbox flex="1" pack="end">
           <button id="add"
                   class="add-messenger-language action-button"
                   data-l10n-id="languages-customize-add"
                   disabled="true"/>
-        </row>
-      </rows>
-    </grid>
+        </vbox>
+      </vbox>
+    </hbox>
     <hbox id="warning-message" class="message-bar message-bar-warning" hidden="true">
       <image class="message-bar-icon"/>
       <description class="message-bar-description" data-l10n-id="messenger-languages-error"/>
     </hbox>
     <separator class="thin"/>
   </vbox>
 </dialog>
--- a/mail/components/preferences/receipts.xul
+++ b/mail/components/preferences/receipts.xul
@@ -43,52 +43,59 @@
     <separator class="thin"/>
 
     <label control="receiptSend">&requestMDN.label;</label>
     <radiogroup id="receiptSend" class="indent" preference="mail.mdn.report.enabled"
                 oncommand="enableDisableAllowedReceipts();">
       <radio value="false" label="&never.label;" accesskey="&never.accesskey;"/>
       <radio value="true" label="&returnSome.label;" accesskey="&returnSome.accesskey;"/>
 
-      <grid class="indent">
-        <columns>
-          <column/>
-          <column/>
-        </columns>
-        <rows>
-          <row align="center">
-            <label id="notInToCcLabel" accesskey="&notInToCc.accesskey;" control="notInToCcPref" value="&notInToCc.label;"/>
-            <menulist id="notInToCcPref" preference="mail.mdn.report.not_in_to_cc">
-              <menupopup>
-                <menuitem value="0" label="&neverSend.label;"/>
-                <menuitem value="1" label="&alwaysSend.label;"/>
-                <menuitem value="2" label="&askMe.label;"/>
-              </menupopup>
-            </menulist>
-          </row>
-          <row align="center">
-            <label id="outsideDomainLabel" accesskey="&outsideDomain.accesskey;"
-                   control="outsideDomainPref" value="&outsideDomain.label;"/>
-            <menulist id="outsideDomainPref" preference="mail.mdn.report.outside_domain">
-              <menupopup>
-                <menuitem value="0" label="&neverSend.label;"/>
-                <menuitem value="1" label="&alwaysSend.label;"/>
-                <menuitem value="2" label="&askMe.label;"/>
-              </menupopup>
-            </menulist>
-          </row>
-          <row align="center">
-            <label id="otherCasesLabel" accesskey="&otherCases.accesskey;" control="otherCasesPref"
+      <vbox class="indent">
+        <hbox align="center">
+          <hbox flex="1">
+            <label id="notInToCcLabel"
+                   accesskey="&notInToCc.accesskey;"
+                   control="notInToCcPref"
+                   value="&notInToCc.label;"/>
+          </hbox>
+          <menulist id="notInToCcPref" preference="mail.mdn.report.not_in_to_cc">
+            <menupopup>
+              <menuitem value="0" label="&neverSend.label;"/>
+              <menuitem value="1" label="&alwaysSend.label;"/>
+              <menuitem value="2" label="&askMe.label;"/>
+            </menupopup>
+          </menulist>
+        </hbox>
+        <hbox align="center">
+          <hbox flex="1">
+            <label id="outsideDomainLabel"
+                   accesskey="&outsideDomain.accesskey;"
+                   control="outsideDomainPref"
+                   value="&outsideDomain.label;"/>
+          </hbox>
+          <menulist id="outsideDomainPref" preference="mail.mdn.report.outside_domain">
+            <menupopup>
+              <menuitem value="0" label="&neverSend.label;"/>
+              <menuitem value="1" label="&alwaysSend.label;"/>
+              <menuitem value="2" label="&askMe.label;"/>
+            </menupopup>
+          </menulist>
+        </hbox>
+        <hbox align="center">
+          <hbox flex="1">
+            <label id="otherCasesLabel"
+                   accesskey="&otherCases.accesskey;"
+                   control="otherCasesPref"
                    value="&otherCases.label;"/>
-            <menulist id="otherCasesPref" preference="mail.mdn.report.other">
-              <menupopup>
-                <menuitem value="0" label="&neverSend.label;"/>
-                <menuitem value="1" label="&alwaysSend.label;"/>
-                <menuitem value="2" label="&askMe.label;"/>
-              </menupopup>
-            </menulist>
-          </row>
-        </rows>
-      </grid>
+          </hbox>
+          <menulist id="otherCasesPref" preference="mail.mdn.report.other">
+            <menupopup>
+              <menuitem value="0" label="&neverSend.label;"/>
+              <menuitem value="1" label="&alwaysSend.label;"/>
+              <menuitem value="2" label="&askMe.label;"/>
+            </menupopup>
+          </menulist>
+        </hbox>
+      </vbox>
     </radiogroup>
     <separator/>
   </prefpane>
 </dialog>