From c96d2621a079115dcc9ca7ae0d93f4cb45f8903f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 16 Mar 2021 19:57:14 +0100 Subject: [PATCH] Set max-width and MIN_ZOOM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This might have some side effects but as far as I can tell they shouldn't be too problematic Signed-off-by: Šimon Brandner --- res/css/views/elements/_ImageView.scss | 2 ++ src/components/views/elements/ImageView.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/res/css/views/elements/_ImageView.scss b/res/css/views/elements/_ImageView.scss index 90f265b0c1..c9183a9eab 100644 --- a/res/css/views/elements/_ImageView.scss +++ b/res/css/views/elements/_ImageView.scss @@ -35,6 +35,8 @@ limitations under the License. .mx_ImageView_image { pointer-events: all; + max-width: 95%; + max-height: 95%; } .mx_ImageView_panel { diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index a8e70fe700..d3be3c1d54 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -31,7 +31,7 @@ import {formatFullDate} from "../../../DateUtils"; import dis from '../../../dispatcher/dispatcher'; import {replaceableComponent} from "../../../utils/replaceableComponent"; -const MIN_ZOOM = 95; +const MIN_ZOOM = 100; const MAX_ZOOM = 300; // This is used for the buttons const ZOOM_STEP = 10;