From 23d6541d3ef31e41d18c86efc3902b6597c526a3 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 30 Sep 2015 21:13:52 +0300 Subject: [PATCH] Improved gif in history --- app/js/services.js | 12 ++++++++++-- app/less/app.less | 13 +++++++------ app/partials/desktop/full_gif.html | 6 +++--- app/partials/desktop/im.html | 27 +++++++++++++++++++-------- 4 files changed, 39 insertions(+), 19 deletions(-) diff --git a/app/js/services.js b/app/js/services.js index 1a5180e6..7007b585 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -1806,16 +1806,24 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) width: width, height: height }; + var dim; if (thumbPhotoSize && thumbPhotoSize._ != 'photoSizeEmpty') { - var dim = calcImageInBox(thumbPhotoSize.w, thumbPhotoSize.h, width, height); + if (isGif && doc.w && doc.h) { + dim = { + w: doc.w, + h: doc.h + }; + } else { + dim = calcImageInBox(thumbPhotoSize.w, thumbPhotoSize.h, width, height); + } thumb.width = dim.w; thumb.height = dim.h; thumb.location = thumbPhotoSize.location; thumb.size = thumbPhotoSize.size; } else if (isSticker) { - var dim = calcImageInBox(doc.w, doc.h, width, height); + dim = calcImageInBox(doc.w, doc.h, width, height); thumb.width = dim.w; thumb.height = dim.h; } diff --git a/app/less/app.less b/app/less/app.less index 04cbaa38..dd0d313f 100644 --- a/app/less/app.less +++ b/app/less/app.less @@ -3299,15 +3299,16 @@ h5 { } .img_gif_thumb { - -webkit-filter: blur(2px); - -moz-filter: blur(2px); - -o-filter: blur(2px); - -ms-filter: blur(2px); - filter: blur(2px); - filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius='2'); + -webkit-filter: blur(3px); + -moz-filter: blur(3px); + -o-filter: blur(3px); + -ms-filter: blur(3px); + filter: blur(3px); + filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius='3'); margin: -1px; padding: 1px; max-width: 100%; + height: auto; } .img_gif_image { max-width: 100%; diff --git a/app/partials/desktop/full_gif.html b/app/partials/desktop/full_gif.html index e6476a26..5875b1da 100644 --- a/app/partials/desktop/full_gif.html +++ b/app/partials/desktop/full_gif.html @@ -1,9 +1,9 @@ -
+
- - + +
diff --git a/app/partials/desktop/im.html b/app/partials/desktop/im.html index 6355aa60..e01d4641 100644 --- a/app/partials/desktop/im.html +++ b/app/partials/desktop/im.html @@ -103,7 +103,7 @@
-
+
@@ -140,21 +140,32 @@
-
+
- -
- + +
+ +
+ +
+
+
+
+ + + +
-
+
+ - +
-
+