Bug 514208: Create a theme for the nsPromptService dialogs [r=mark.finkle]
authorFabrice Desré <fabrice.desre@gmail.com>
Tue, 13 Oct 2009 08:15:37 -0400
changeset 65657 7e39b5a8d9ea6ae46f4f0788f6734941f72c4691
parent 65656 409ff0939e6c5173e728c1aed3eb4d78e22bcbca
child 65658 7103810a9883d03a161be26b024abf58e4db8488
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmark
bugs514208
Bug 514208: Create a theme for the nsPromptService dialogs [r=mark.finkle]
mobile/chrome/content/browser.css
mobile/chrome/content/prompt/alert.xul
mobile/chrome/content/prompt/confirm.xul
mobile/chrome/content/prompt/prompt.xul
mobile/chrome/content/prompt/promptPassword.xul
mobile/chrome/content/prompt/select.xul
mobile/themes/hildon/platform.css
mobile/themes/wince/platform.css
--- a/mobile/chrome/content/browser.css
+++ b/mobile/chrome/content/browser.css
@@ -170,10 +170,9 @@ richlistitem[type="warning"] {
 }
 
 richlistitem[type="message"]{
   -moz-binding: url("chrome://browser/content/bindings/console.xml#message");
 }
 
 dialog {
     -moz-binding: url("chrome://browser/content/bindings/dialog.xml#dialog");
-    font-size: 100%;
 }
--- a/mobile/chrome/content/prompt/alert.xul
+++ b/mobile/chrome/content/prompt/alert.xul
@@ -1,20 +1,20 @@
 <?xml version="1.0"?>
 <!DOCTYPE fdialog SYSTEM "chrome://browser/locale/prompt.dtd">
 <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       id="prompt-alert-dialog"
       onclose="this.PromptHelper.onCloseAlert(this);"
       script="chrome://browser/content/prompt/prompt.js">
   
   <label id="prompt-alert-title" crop="center"/>
-  <scrollbox orient="vertical">
+  <scrollbox orient="vertical" class="prompt-message">
     <description id="prompt-alert-message"/>
   </scrollbox>
-  <hbox id="prompt-alert-checkbox-box" collapsed="true" align="center">
-    <checkbox class="toggle-dark" id="prompt-alert-checkbox"/>
+  <hbox id="prompt-alert-checkbox-box" collapsed="true" align="center" class="prompt-message">
     <description id="prompt-alert-checkbox-msg"/>
+    <checkbox class="toggle-dark" id="prompt-alert-checkbox"/>
   </hbox>
-  <hbox pack="center">
+  <hbox pack="center" class="prompt-buttons">
     <button class="button-dark" label="&ok.label;"
             oncommand="document.getElementById('prompt-alert-dialog').close()"/>
   </hbox>
 </dialog>
--- a/mobile/chrome/content/prompt/confirm.xul
+++ b/mobile/chrome/content/prompt/confirm.xul
@@ -1,21 +1,21 @@
 <?xml version="1.0"?>
 <!DOCTYPE vbox SYSTEM "chrome://browser/locale/prompt.dtd">
 <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       id="prompt-confirm-dialog"
       onclose="this.PromptHelper.onCloseConfirm(this)"
       script="chrome://browser/content/prompt/prompt.js">
   <label id="prompt-confirm-title"/>
-  <scrollbox orient="vertical">
+  <scrollbox orient="vertical" class="prompt-message">
     <description id="prompt-confirm-message"/>
   </scrollbox>
-  <hbox id="prompt-confirm-checkbox-box" collapsed="true" align="center">
-    <checkbox class="toggle-dark" id="prompt-confirm-checkbox"/>
+  <hbox id="prompt-confirm-checkbox-box" collapsed="true" align="center" class="prompt-message">
     <description id="prompt-confirm-checkbox-msg"/>
+    <checkbox class="toggle-dark" id="prompt-confirm-checkbox"/>
   </hbox>
-  <hbox pack="center" id="prompt-confirm-button-box">
+  <hbox pack="center" id="prompt-confirm-button-box" class="prompt-buttons">
     <button class="button-dark" label="&ok.label;"
             oncommand="document.getElementById('prompt-confirm-dialog').PromptHelper.closeConfirm(true);"/>
     <button class="button-dark" label="&cancel.label;"
             oncommand="document.getElementById('prompt-confirm-dialog').PromptHelper.closeConfirm(false);"/>
   </hbox>
 </dialog>
--- a/mobile/chrome/content/prompt/prompt.xul
+++ b/mobile/chrome/content/prompt/prompt.xul
@@ -1,23 +1,23 @@
 <?xml version="1.0"?>
 <!DOCTYPE vbox SYSTEM "chrome://browser/locale/prompt.dtd">
 <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       id="prompt-prompt-dialog"
       onclose="this.PromptHelper.onClosePrompt(this)"
       onload="document.getElementById('prompt-prompt-textbox').focus()"
       script="chrome://browser/content/prompt/prompt.js">
   <label id="prompt-prompt-title"/>
-  <scrollbox orient="vertical">
+  <scrollbox orient="vertical" class="prompt-message">
     <description id="prompt-prompt-message"/>
   </scrollbox>
   <textbox id="prompt-prompt-textbox"/>
-  <hbox id="prompt-prompt-checkbox-box" collapsed="true" align="center">
-    <checkbox class="toggle-dark" id="prompt-prompt-checkbox"/>
+  <hbox id="prompt-prompt-checkbox-box" collapsed="true" align="center" class="prompt-message">
     <description id="prompt-prompt-checkbox-msg"/>
+    <checkbox class="toggle-dark" id="prompt-prompt-checkbox"/>
   </hbox>
-  <hbox pack="center" id="prompt-prompt-button-box">
+  <hbox pack="center" id="prompt-prompt-button-box" class="prompt-buttons">
     <button class="button-dark" label="&ok.label;"
             oncommand="document.getElementById('prompt-prompt-dialog').PromptHelper.closePrompt(true)"/>
     <button class="button-dark" label="&cancel.label;"
             oncommand="document.getElementById('prompt-prompt-dialog').PromptHelper.closePrompt(false)"/>
   </hbox>
 </dialog>
--- a/mobile/chrome/content/prompt/promptPassword.xul
+++ b/mobile/chrome/content/prompt/promptPassword.xul
@@ -6,17 +6,17 @@
  %commonDialogDTD;
 ]>
 <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       id="prompt-password-dialog"
       onclose="this.PromptHelper.onClosePassword(this)"
       onload="document.getElementById('prompt-password-user').focus()"
       script="chrome://browser/content/prompt/prompt.js">
   <label id="prompt-password-title"/>
-  <scrollbox orient="vertical">
+  <scrollbox orient="vertical" class="prompt-message">
     <description id="prompt-password-message"/>
   </scrollbox>
   <grid>
     <columns>
       <column flex="1"/>
       <column flex="1"/>
     </columns>
     <rows>
@@ -26,19 +26,19 @@
       </row>
       <row align="center">
         <label value="&editfield1.label;"/>
         <textbox type="password" id="prompt-password-password"/>
       </row>
     </rows>
   </grid>
   
-  <hbox id="prompt-password-checkbox-box" collapsed="true" align="center">
-    <checkbox class="toggle-dark" id="prompt-password-checkbox"/>
+  <hbox id="prompt-password-checkbox-box" collapsed="true" align="center" class="prompt-message">
     <description id="prompt-password-checkbox-msg"/>
+    <checkbox class="toggle-dark" id="prompt-password-checkbox"/>
   </hbox>
-  <hbox pack="center" id="prompt-password-button-box">
+  <hbox pack="center" id="prompt-password-button-box" class="prompt-buttons">
     <button class="button-dark" label="&ok.label;"
             oncommand="document.getElementById('prompt-password-dialog').PromptHelper.closePassword(true)"/>
     <button class="button-dark" label="&cancel.label;"
             oncommand="document.getElementById('prompt-password-dialog').PromptHelper.closePassword(false)"/>
   </hbox>
 </dialog>
--- a/mobile/chrome/content/prompt/select.xul
+++ b/mobile/chrome/content/prompt/select.xul
@@ -4,15 +4,15 @@
       id="prompt-select-dialog"
       script="chrome://browser/content/prompt/prompt.js"
       onclose="this.PromptHelper.onCloseSelect(this)">
   <label id="prompt-select-title"/>
   <scrollbox orient="vertical" class="prompt-message">
     <description id="prompt-select-message"/>
   </scrollbox>
   <menulist id="prompt-select-list" class="button-dark"/>
-  <hbox pack="center" id="prompt-prompt-button-box">
+  <hbox pack="center" id="prompt-prompt-button-box" class="prompt-buttons">
     <button class="button-dark" label="&ok.label;"
             oncommand="document.getElementById('prompt-select-dialog').PromptHelper.closeSelect(true);"/>
     <button class="button-dark" label="&cancel.label;"
             oncommand="document.getElementById('prompt-select-dialog').PromptHelper.closeSelect(false)"/>
   </hbox>
 </dialog>
--- a/mobile/themes/hildon/platform.css
+++ b/mobile/themes/hildon/platform.css
@@ -78,21 +78,43 @@ textbox[isempty="true"] {
 .sidebar-spacer {
   background-color: #36373b;
 }
 
 /* dialog popups ----------------------------------------------------------- */
 .dialog-dark {
   color: #fff;
   background-color: #36373b;
-  -moz-border-radius: 0 0 1mm 1mm;
+  -moz-border-radius: 1mm 1mm 1mm 1mm;
   padding: 8px;
   -moz-box-shadow: black 0 0.25mm 0.25mm;
 }
 
+/* prompt dialogs ---------------------------------------------------------- */
+
+dialog {
+  font-size: 2.4mm !important;
+}
+
+dialog .prompt-message {
+  font-size: 1.8mm !important;
+}
+
+dialog > scrollbox.prompt-message {
+  margin: 1mm 0 1mm 0;
+}
+
+dialog > hbox.prompt-message {
+  margin-top: 1mm;
+}
+
+dialog > hbox.prompt-buttons {
+  margin-top: 1mm;
+}
+
 /* buttons ----------------------------------------------------------------- */
 .button-text,
 .toolbarbutton-text {
   font-weight: normal;
   font-size: 2.4mm !important;
 }
 
 button {
--- a/mobile/themes/wince/platform.css
+++ b/mobile/themes/wince/platform.css
@@ -61,21 +61,43 @@ textbox[isempty="true"] {
 .sidebar-spacer {
   background-color: #36373b;
 }
 
 /* dialog popups ----------------------------------------------------------- */
 .dialog-dark {
   color: #fff;
   background-color: #36373b;
-  -moz-border-radius: 0 0 1mm 1mm;
+  -moz-border-radius: 1mm 1mm 1mm 1mm;
   padding: 8px;
   -moz-box-shadow: black 0 0.25mm 0.25mm;
 }
 
+/* prompt dialogs ---------------------------------------------------------- */
+
+dialog {
+  font-size: 9pt !important;
+}
+
+dialog .prompt-message {
+  font-size: 8pt !important;
+}
+
+dialog > scrollbox.prompt-message {
+  margin: 1mm 0 1mm 0;
+}
+
+dialog > hbox.prompt-message {
+  margin-top: 1mm;
+}
+
+dialog > hbox.prompt-buttons {
+  margin-top: 1mm;
+}
+
 /* buttons ----------------------------------------------------------------- */
 .button-text,
 .toolbarbutton-text {
   font-weight: bold !important;
   font-size: 8pt !important;
 }
 
 button {