فهرست منبع

reduce minimal image width, scale small images depending on message text width

cyberta 4 سال پیش
والد
کامیت
37818bf6e2
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      deltachat-ios/Chat/Views/Cells/ImageTextCell.swift

+ 2 - 2
deltachat-ios/Chat/Views/Cells/ImageTextCell.swift

@@ -4,7 +4,7 @@ import DcCore
 import SDWebImage
 import SDWebImage
 
 
 class ImageTextCell: BaseMessageCell {
 class ImageTextCell: BaseMessageCell {
-    let minImageWidth: CGFloat = 175
+    let minImageWidth: CGFloat = 125
     var imageHeightConstraint: NSLayoutConstraint?
     var imageHeightConstraint: NSLayoutConstraint?
     var imageWidthConstraint: NSLayoutConstraint?
     var imageWidthConstraint: NSLayoutConstraint?
 
 
@@ -140,7 +140,7 @@ class ImageTextCell: BaseMessageCell {
             } else {
             } else {
                 if width == minImageWidth {
                 if width == minImageWidth {
                     // very small width images should be forced to not be scaled down further
                     // very small width images should be forced to not be scaled down further
-                    self.imageWidthConstraint = self.contentImageView.widthAnchor.constraint(equalToConstant: width)
+                    self.imageWidthConstraint = self.contentImageView.widthAnchor.constraint(greaterThanOrEqualToConstant: width)
                 } else {
                 } else {
                     // large width images might scale down until the max allowed text width
                     // large width images might scale down until the max allowed text width
                     self.imageWidthConstraint = self.contentImageView.widthAnchor.constraint(lessThanOrEqualToConstant: width)
                     self.imageWidthConstraint = self.contentImageView.widthAnchor.constraint(lessThanOrEqualToConstant: width)