mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 07:35:12 +00:00
Fixes for minimum sticker width
This commit is contained in:
@@ -12,7 +12,7 @@ using "ui/widgets/widgets.style";
|
|||||||
minPhotoSize: 100px;
|
minPhotoSize: 100px;
|
||||||
minVideoSize: 160px;
|
minVideoSize: 160px;
|
||||||
maxMediaSize: 430px;
|
maxMediaSize: 430px;
|
||||||
maxStickerSize: 128px;
|
maxStickerSize: 256px;
|
||||||
maxGifSize: 320px;
|
maxGifSize: 320px;
|
||||||
maxVideoMessageSize: 240px;
|
maxVideoMessageSize: 240px;
|
||||||
maxSignatureSize: 144px;
|
maxSignatureSize: 144px;
|
||||||
@@ -20,6 +20,8 @@ maxWallPaperWidth: 160px;
|
|||||||
maxWallPaperHeight: 240px;
|
maxWallPaperHeight: 240px;
|
||||||
historyThemeSize: size(272px, 176px);
|
historyThemeSize: size(272px, 176px);
|
||||||
|
|
||||||
|
historyStickerHeight: 128px;
|
||||||
|
|
||||||
historyMinimalWidth: 380px;
|
historyMinimalWidth: 380px;
|
||||||
|
|
||||||
historyScroll: ScrollArea(defaultScrollArea) {
|
historyScroll: ScrollArea(defaultScrollArea) {
|
||||||
|
@@ -30,7 +30,7 @@ QSize UnwrappedMedia::countOptimalSize() {
|
|||||||
_content->refreshLink();
|
_content->refreshLink();
|
||||||
_contentSize = NonEmptySize(DownscaledSize(
|
_contentSize = NonEmptySize(DownscaledSize(
|
||||||
_content->size(),
|
_content->size(),
|
||||||
{ st::maxStickerSize, st::maxStickerSize }));
|
{ st::maxStickerSize, st::historyStickerHeight }));
|
||||||
auto maxWidth = _contentSize.width();
|
auto maxWidth = _contentSize.width();
|
||||||
const auto minimal = st::largeEmojiSize + 2 * st::largeEmojiOutline;
|
const auto minimal = st::largeEmojiSize + 2 * st::largeEmojiOutline;
|
||||||
auto minHeight = std::max(_contentSize.height(), minimal);
|
auto minHeight = std::max(_contentSize.height(), minimal);
|
||||||
|
@@ -65,7 +65,7 @@ QSize Sticker::size() {
|
|||||||
} else {
|
} else {
|
||||||
_size = DownscaledSize(
|
_size = DownscaledSize(
|
||||||
_size,
|
_size,
|
||||||
{ st::maxStickerSize, st::maxStickerSize });
|
{ st::maxStickerSize, st::historyStickerHeight });
|
||||||
}
|
}
|
||||||
return _size;
|
return _size;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user