Bug 1619155 - Fix contact photo UI. r=mkmelin
authorGeoff Lankow <geoff@darktrojan.net>
Tue, 31 Mar 2020 12:32:43 +1300
changeset 38646 f38c4f986fa7dc0a930c2b1a60fca96471d29171
parent 38645 d723075a045482d5d467d74e57c61c1b2f71a5cc
child 38647 d42df03dfe10ed6b1574ff7946874bb5099a0824
push id400
push userclokep@gmail.com
push dateMon, 04 May 2020 18:56:09 +0000
reviewersmkmelin
bugs1619155
Bug 1619155 - Fix contact photo UI. r=mkmelin
mail/components/addrbook/content/abCommon.js
mail/themes/linux/mail/addrbook/cardDialog.css
mail/themes/osx/mail/addrbook/cardDialog.css
mail/themes/windows/mail/addrbook/cardDialog.css
--- a/mail/components/addrbook/content/abCommon.js
+++ b/mail/components/addrbook/content/abCommon.js
@@ -1165,16 +1165,17 @@ var gImageDownloader = (function() {
       downloader.saveURI(
         source,
         principal,
         null,
         null,
         null,
         null,
         tempFile,
+        Ci.nsIContentPolicy.TYPE_IMAGE,
         privacy
       );
     } catch (e) {
       Cu.reportError(e);
       cleanup();
       if (callbackError) {
         callbackError(ERROR_SAVE);
       }
@@ -1329,16 +1330,17 @@ var gImageDownloader = (function() {
     downloader.saveURI(
       source,
       principal,
       null,
       null,
       null,
       null,
       target,
+      Ci.nsIContentPolicy.TYPE_IMAGE,
       privacy
     );
   }
 
   // Publicly accessible methods.
   return {
     cancelSave,
     savePhoto,
--- a/mail/themes/linux/mail/addrbook/cardDialog.css
+++ b/mail/themes/linux/mail/addrbook/cardDialog.css
@@ -99,16 +99,22 @@
 #PhotoDropTarget {
   margin-top: 5px;
 }
 
 #PhotoDropTarget:hover {
   border: 1px dashed #CACAFF;
 }
 
+#PhotoFile {
+  background-position: 4px center;
+  background-repeat: no-repeat;
+  padding-inline-start: 24px;
+}
+
 #ProgressContainer {
   max-height: 0;
   transition: all .5s ease-out;
   overflow: hidden;
 }
 
 #ProgressContainer.expanded {
   margin-top: 10px;
--- a/mail/themes/osx/mail/addrbook/cardDialog.css
+++ b/mail/themes/osx/mail/addrbook/cardDialog.css
@@ -102,16 +102,23 @@
 #PhotoDropTarget {
   margin-top: 5px;
 }
 
 #PhotoDropTarget:hover {
   border: 1px dashed #CACAFF;
 }
 
+#PhotoFile {
+  background-position: 2px center;
+  background-repeat: no-repeat;
+  background-size: 16px;
+  padding-inline-start: 20px;
+}
+
 #ProgressContainer {
   max-height: 0;
   transition: all .5s ease-out;
   overflow: hidden;
 }
 
 #ProgressContainer.expanded {
   margin-top: 10px;
--- a/mail/themes/windows/mail/addrbook/cardDialog.css
+++ b/mail/themes/windows/mail/addrbook/cardDialog.css
@@ -103,16 +103,22 @@
 #PhotoDropTarget {
   margin-top: 5px;
 }
 
 #PhotoDropTarget:hover {
   border: 1px dashed #CACAFF;
 }
 
+#PhotoFile {
+  background-position: 2px center;
+  background-repeat: no-repeat;
+  padding-inline-start: 20px;
+}
+
 #ProgressContainer {
   max-height: 0;
   transition: all .5s ease-out;
   overflow: hidden;
 }
 #ProgressContainer.expanded {
   margin-top: 10px;
   max-height: 40px; /* something higher than the actual height, but not too large */