Bug 1662536 - Implement startSpacing class to add margins to inline menulist columns. r=aleca a=wsmwk
authorRichard Marti <richard.marti@gmail.com>
Thu, 03 Sep 2020 10:46:50 +0300
changeset 39597 0bbe3811dd794e788857ab7e14f25f07ba823d97
parent 39596 656f6b4aca4812c2331169104afd11aa86a7861e
child 39598 fdd2f5dc3730bfd55f1c035ef70a68ba93c72678
push id2736
push userthunderbird@calypsoblue.org
push dateFri, 04 Sep 2020 17:25:43 +0000
treeherdercomm-beta@659fbd408909 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaleca, wsmwk
bugs1662536
Bug 1662536 - Implement startSpacing class to add margins to inline menulist columns. r=aleca a=wsmwk
mail/components/preferences/fonts.xhtml
mail/components/preferences/notifications.xhtml
mail/extensions/openpgp/content/ui/changeExpiryDlg.xhtml
mail/themes/shared/mail/preferences/dialog.css
--- a/mail/components/preferences/fonts.xhtml
+++ b/mail/components/preferences/fonts.xhtml
@@ -90,17 +90,19 @@
           <menulist id="defaultFontType" flex="1" style="width: 0px;">
             <menupopup>
               <menuitem value="serif" data-l10n-id="default-font-serif"/>
               <menuitem value="sans-serif" data-l10n-id="default-font-sans-serif"/>
             </menupopup>
           </menulist>
         </hbox>
         <hbox align="center" pack="end">
-          <label data-l10n-id="font-size-label" control="sizeVar"/>
+          <label control="sizeVar"
+                 data-l10n-id="font-size-label"
+                 class="startSpacing"/>
         </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"/>
@@ -153,17 +155,19 @@
         <!-- monospace row -->
         <hbox align="center" pack="end">
           <label control="monospace" data-l10n-id="font-monospace-label"/>
         </hbox>
         <hbox>
           <menulist id="monospace" flex="1" style="width: 0px;" crop="right" delayprefsave="true"/>
         </hbox>
         <hbox align="center" pack="end">
-          <label control="sizeMono" data-l10n-id="font-size-monospace-label"/>
+          <label control="sizeMono"
+                 data-l10n-id="font-size-monospace-label"
+                 class="startSpacing"/>
         </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"/>
--- a/mail/components/preferences/notifications.xhtml
+++ b/mail/components/preferences/notifications.xhtml
@@ -38,16 +38,18 @@
 
     <hbox align="center">
       <label id="totalOpenTimeBefore"
              control="totalOpenTime"
              data-l10n-id="open-time-label-before"/>
       <html:input id="totalOpenTime" type="number"
                   class="size3" min="1" max="3600"
                   preference="alerts.totalOpenTime"/>
-      <label id="totalOpenTimeEnd" data-l10n-id="open-time-label-after"/>
+      <label id="totalOpenTimeEnd"
+             data-l10n-id="open-time-label-after"
+             class="startSpacing"/>
     </hbox>
     <separator/>
 
     <script src="chrome://global/content/preferencesBindings.js"/>
     <script src="chrome://messenger/content/preferences/notifications.js"/>
   </dialog>
 </window>
--- a/mail/extensions/openpgp/content/ui/changeExpiryDlg.xhtml
+++ b/mail/extensions/openpgp/content/ui/changeExpiryDlg.xhtml
@@ -46,16 +46,17 @@
             <menulist id="expire-months" sizetopopup="always"
                       value="24"
                       disabled="true">
               <menupopup id="monthsPopup">
               </menupopup>
             </menulist>
             <label id="expire-months-label"
                    data-l10n-id="expire-in-months"
+                   class="startSpacing"
                    disabled="true"/>
           </hbox>
           <radio id="radio-expire-no" value="do-not-expire"
                  data-l10n-id="expire-never-label"/>
       </radiogroup>
     </html:fieldset>
   </html:div>
 
--- a/mail/themes/shared/mail/preferences/dialog.css
+++ b/mail/themes/shared/mail/preferences/dialog.css
@@ -71,32 +71,38 @@ menulist label {
   font-weight: unset;
 }
 
 .actionButtons + resizer {
   display: none;
 }
 
 menulist,
-button:not([dlgtype]),
+button,
 html|input[type="number"] {
   margin-inline-end: 0;
 }
 
 #configDeck {
   min-width: 750px;
   min-height: 500px;
 }
 
 /* Create a separate rule to unset these styles on .tree-input instead of
    using :not(.tree-input) so the selector specifity doesn't change. */
 textbox.tree-input {
   font-size: unset;
 }
 
+/* Give some space in front of elements that follows a menulist, button or an
+   input in dialogs */
+.startSpacing {
+  margin-inline-start: 8px;
+}
+
 /* Adjust the Lightning Edit Category dialog */
 #colorSelectRow {
   margin-top: 10px;
   margin-inline-start: 4px;
 }
 
 #logView {
   border: 1px solid var(--in-content-box-border-color);