From 6c3cc4fb277156ca7a92d1ccb9710365bb6da111 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Fri, 27 Sep 2019 04:17:01 +0300 Subject: [PATCH] Fixes for minimum sticker width --- Telegram/SourceFiles/history/history.style | 4 +++- .../history/view/media/history_view_media_unwrapped.cpp | 2 +- .../SourceFiles/history/view/media/history_view_sticker.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/history/history.style b/Telegram/SourceFiles/history/history.style index ee5e4c943..b54bf7a81 100644 --- a/Telegram/SourceFiles/history/history.style +++ b/Telegram/SourceFiles/history/history.style @@ -12,7 +12,7 @@ using "ui/widgets/widgets.style"; minPhotoSize: 100px; minVideoSize: 160px; maxMediaSize: 430px; -maxStickerSize: 128px; +maxStickerSize: 256px; maxGifSize: 320px; maxVideoMessageSize: 240px; maxSignatureSize: 144px; @@ -20,6 +20,8 @@ maxWallPaperWidth: 160px; maxWallPaperHeight: 240px; historyThemeSize: size(272px, 176px); +historyStickerHeight: 128px; + historyMinimalWidth: 380px; historyScroll: ScrollArea(defaultScrollArea) { diff --git a/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.cpp b/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.cpp index fdc16644f..7eb96e37e 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.cpp @@ -30,7 +30,7 @@ QSize UnwrappedMedia::countOptimalSize() { _content->refreshLink(); _contentSize = NonEmptySize(DownscaledSize( _content->size(), - { st::maxStickerSize, st::maxStickerSize })); + { st::maxStickerSize, st::historyStickerHeight })); auto maxWidth = _contentSize.width(); const auto minimal = st::largeEmojiSize + 2 * st::largeEmojiOutline; auto minHeight = std::max(_contentSize.height(), minimal); diff --git a/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp b/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp index e6ce77168..95c792036 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp @@ -65,7 +65,7 @@ QSize Sticker::size() { } else { _size = DownscaledSize( _size, - { st::maxStickerSize, st::maxStickerSize }); + { st::maxStickerSize, st::historyStickerHeight }); } return _size; }