diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 616a59af0..56ad08e72 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2341,6 +2341,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "ktg_pinned_message_show" = "Show pinned message"; "ktg_pinned_message_hide" = "Hide pinned message"; -"ktg_settings_adaptive_baloons" = "Adaptive baloons"; +"ktg_settings_adaptive_bubbles" = "Adaptive bubbles"; // Keys finished diff --git a/Telegram/Resources/langs/rewrites/ru.json b/Telegram/Resources/langs/rewrites/ru.json index ace3fca5c..fc59a598d 100644 --- a/Telegram/Resources/langs/rewrites/ru.json +++ b/Telegram/Resources/langs/rewrites/ru.json @@ -81,5 +81,5 @@ "ktg_profile_supergroup_id": "ID супергруппы", "ktg_profile_channel_id": "ID канала", "ktg_settings_show_phone_number": "Показывать телефон в боковом меню", - "ktg_settings_adaptive_baloons": "Адаптивные пузырьки сообщений" + "ktg_settings_adaptive_bubbles": "Адаптивные пузырьки сообщений" } diff --git a/Telegram/SourceFiles/core/kotato_settings.cpp b/Telegram/SourceFiles/core/kotato_settings.cpp index a01dad791..6a0e8fbd9 100644 --- a/Telegram/SourceFiles/core/kotato_settings.cpp +++ b/Telegram/SourceFiles/core/kotato_settings.cpp @@ -152,9 +152,14 @@ bool Manager::readCustomFile() { } } - const auto settingsAdaptiveBaloonsIt = settings.constFind(qsl("adaptive_baloons")); - if (settingsAdaptiveBaloonsIt != settings.constEnd() && (*settingsAdaptiveBaloonsIt).isBool()) { - cSetAdaptiveBaloons((*settingsAdaptiveBaloonsIt).toBool()); + const auto settingsAdaptiveBubblesIt = settings.constFind(qsl("adaptive_bubbles")); + if (settingsAdaptiveBubblesIt != settings.constEnd() && (*settingsAdaptiveBubblesIt).isBool()) { + cSetAdaptiveBubbles((*settingsAdaptiveBubblesIt).toBool()); + } else { + const auto settingsAdaptiveBaloonsIt = settings.constFind(qsl("adaptive_baloons")); + if (settingsAdaptiveBaloonsIt != settings.constEnd() && (*settingsAdaptiveBaloonsIt).isBool()) { + cSetAdaptiveBubbles((*settingsAdaptiveBaloonsIt).toBool()); + } } const auto settingsBigEmojiOutlineIt = settings.constFind(qsl("big_emoji_outline")); @@ -248,7 +253,7 @@ void Manager::writeDefaultFile() { settings.insert(qsl("fonts"), settingsFonts); settings.insert(qsl("sticker_height"), StickerHeight()); - settings.insert(qsl("adaptive_baloons"), cAdaptiveBaloons()); + settings.insert(qsl("adaptive_bubbles"), cAdaptiveBubbles()); settings.insert(qsl("big_emoji_outline"), BigEmojiOutline()); settings.insert(qsl("always_show_scheduled"), cAlwaysShowScheduled()); settings.insert(qsl("show_chat_id"), cShowChatId()); @@ -301,7 +306,7 @@ void Manager::writeCurrentSettings() { settings.insert(qsl("fonts"), settingsFonts); settings.insert(qsl("sticker_height"), StickerHeight()); - settings.insert(qsl("adaptive_baloons"), cAdaptiveBaloons()); + settings.insert(qsl("adaptive_bubbles"), cAdaptiveBubbles()); settings.insert(qsl("big_emoji_outline"), BigEmojiOutline()); settings.insert(qsl("always_show_scheduled"), cAlwaysShowScheduled()); settings.insert(qsl("show_chat_id"), cShowChatId()); diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index a44565285..fb75d68dd 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -2046,7 +2046,7 @@ void HistoryInner::recountHistoryGeometry() { updateBotInfo(false); if (_botAbout && !_botAbout->info->text.isEmpty()) { int32 tw = _scroll->width() - st::msgMargin.left() - st::msgMargin.right(); - if (!cAdaptiveBaloons() && tw > st::msgMaxWidth) tw = st::msgMaxWidth; + if (!cAdaptiveBubbles() && tw > st::msgMaxWidth) tw = st::msgMaxWidth; tw -= st::msgPadding.left() + st::msgPadding.right(); int32 mw = qMax(_botAbout->info->text.maxWidth(), st::msgNameFont->width(tr::lng_bot_description(tr::now))); if (tw > mw) tw = mw; @@ -2056,7 +2056,7 @@ void HistoryInner::recountHistoryGeometry() { int32 descH = st::msgMargin.top() + st::msgPadding.top() + st::msgNameFont->height + st::botDescSkip + _botAbout->height + st::msgPadding.bottom() + st::msgMargin.bottom(); int32 descMaxWidth = _scroll->width(); - if (Adaptive::ChatWide() && !cAdaptiveBaloons()) { + if (Adaptive::ChatWide() && !cAdaptiveBubbles()) { descMaxWidth = qMin(descMaxWidth, int32(st::msgMaxWidth + 2 * st::msgPhotoSkip + 2 * st::msgMargin.left())); } int32 descAtX = (descMaxWidth - _botAbout->width) / 2 - st::msgPadding.left(); @@ -2093,7 +2093,7 @@ void HistoryInner::updateBotInfo(bool recount) { Ui::ItemTextBotNoMonoOptions()); if (recount) { int32 tw = _scroll->width() - st::msgMargin.left() - st::msgMargin.right(); - if (!cAdaptiveBaloons() && tw > st::msgMaxWidth) tw = st::msgMaxWidth; + if (!cAdaptiveBubbles() && tw > st::msgMaxWidth) tw = st::msgMaxWidth; tw -= st::msgPadding.left() + st::msgPadding.right(); int32 mw = qMax(_botAbout->info->text.maxWidth(), st::msgNameFont->width(tr::lng_bot_description(tr::now))); if (tw > mw) tw = mw; @@ -2248,7 +2248,7 @@ void HistoryInner::updateSize() { if (_botAbout && _botAbout->height > 0) { int32 descH = st::msgMargin.top() + st::msgPadding.top() + st::msgNameFont->height + st::botDescSkip + _botAbout->height + st::msgPadding.bottom() + st::msgMargin.bottom(); int32 descMaxWidth = _scroll->width(); - if (Adaptive::ChatWide() && !cAdaptiveBaloons()) { + if (Adaptive::ChatWide() && !cAdaptiveBubbles()) { descMaxWidth = qMin(descMaxWidth, int32(st::msgMaxWidth + 2 * st::msgPhotoSkip + 2 * st::msgMargin.left())); } int32 descAtX = (descMaxWidth - _botAbout->width) / 2 - st::msgPadding.left(); @@ -2574,7 +2574,7 @@ void HistoryInner::mouseActionUpdate() { dateWidth += st::msgServicePadding.left() + st::msgServicePadding.right(); auto dateLeft = st::msgServiceMargin.left(); auto maxwidth = _contentWidth; - if (Adaptive::ChatWide() && !cAdaptiveBaloons()) { + if (Adaptive::ChatWide() && !cAdaptiveBubbles()) { maxwidth = qMin(maxwidth, int32(st::msgMaxWidth + 2 * st::msgPhotoSkip + 2 * st::msgMargin.left())); } auto widthForDate = maxwidth - st::msgServiceMargin.left() - st::msgServiceMargin.left(); diff --git a/Telegram/SourceFiles/history/view/history_view_element.cpp b/Telegram/SourceFiles/history/view/history_view_element.cpp index e09f5ac17..62e34c8d1 100644 --- a/Telegram/SourceFiles/history/view/history_view_element.cpp +++ b/Telegram/SourceFiles/history/view/history_view_element.cpp @@ -161,7 +161,7 @@ void UnreadBar::paint(Painter &p, int y, int w) const { int left = st::msgServiceMargin.left(); int maxwidth = w; - if (Adaptive::ChatWide() && !cAdaptiveBaloons()) { + if (Adaptive::ChatWide() && !cAdaptiveBubbles()) { maxwidth = qMin( maxwidth, st::msgMaxWidth diff --git a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp index 4642f11db..717fdb7e1 100644 --- a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp @@ -2151,7 +2151,7 @@ void ListWidget::mouseActionUpdate() { dateWidth += st::msgServicePadding.left() + st::msgServicePadding.right(); auto dateLeft = st::msgServiceMargin.left(); auto maxwidth = view->width(); - if (Adaptive::ChatWide() && !cAdaptiveBaloons()) { + if (Adaptive::ChatWide() && !cAdaptiveBubbles()) { maxwidth = qMin(maxwidth, int32(st::msgMaxWidth + 2 * st::msgPhotoSkip + 2 * st::msgMargin.left())); } auto widthForDate = maxwidth - st::msgServiceMargin.left() - st::msgServiceMargin.left(); diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 912f87f96..cf5303c0d 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1616,7 +1616,7 @@ QRect Message::countGeometry() const { // contentLeft += st::msgPhotoSkip - (hmaxwidth - hwidth); } accumulate_min(contentWidth, maxWidth()); - if (!cAdaptiveBaloons()) { + if (!cAdaptiveBubbles()) { accumulate_min(contentWidth, st::msgMaxWidth); } if (mediaWidth < contentWidth) { @@ -1660,7 +1660,7 @@ int Message::resizeContentGetHeight(int newWidth) { contentWidth -= st::msgPhotoSkip; } accumulate_min(contentWidth, maxWidth()); - if (!cAdaptiveBaloons()) { + if (!cAdaptiveBubbles()) { accumulate_min(contentWidth, st::msgMaxWidth); } if (mediaDisplayed) { @@ -1685,7 +1685,7 @@ int Message::resizeContentGetHeight(int newWidth) { auto mediaOnBottom = (mediaDisplayed && media->isBubbleBottom()) || (entry/* && entry->isBubbleBottom()*/); auto mediaOnTop = (mediaDisplayed && media->isBubbleTop()) || (entry && entry->isBubbleTop()); - if (!cAdaptiveBaloons() && contentWidth == maxWidth()) { + if (!cAdaptiveBubbles() && contentWidth == maxWidth()) { if (mediaDisplayed) { if (entry) { newHeight += entry->resizeGetHeight(contentWidth); diff --git a/Telegram/SourceFiles/history/view/history_view_service_message.cpp b/Telegram/SourceFiles/history/view/history_view_service_message.cpp index 65b1fda10..2f792c70b 100644 --- a/Telegram/SourceFiles/history/view/history_view_service_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_service_message.cpp @@ -164,7 +164,7 @@ void paintBubblePart(Painter &p, int x, int y, int width, int height, SideStyle void paintPreparedDate(Painter &p, const QString &dateText, int dateTextWidth, int y, int w) { int left = st::msgServiceMargin.left(); int maxwidth = w; - if (Adaptive::ChatWide() && !cAdaptiveBaloons()) { + if (Adaptive::ChatWide() && !cAdaptiveBubbles()) { maxwidth = qMin(maxwidth, WideChatWidth()); } w = maxwidth - st::msgServiceMargin.left() - st::msgServiceMargin.left(); @@ -315,7 +315,7 @@ not_null Service::message() const { QRect Service::countGeometry() const { auto result = QRect(0, 0, width(), height()); - if (Adaptive::ChatWide() && !cAdaptiveBaloons()) { + if (Adaptive::ChatWide() && !cAdaptiveBubbles()) { result.setWidth(qMin(result.width(), st::msgMaxWidth + 2 * st::msgPhotoSkip + 2 * st::msgMargin.left())); } return result.marginsRemoved(st::msgServiceMargin); @@ -338,7 +338,7 @@ QSize Service::performCountCurrentSize(int newWidth) { item->_textHeight = 0; } else { auto contentWidth = newWidth; - if (Adaptive::ChatWide() && !cAdaptiveBaloons()) { + if (Adaptive::ChatWide() && !cAdaptiveBubbles()) { accumulate_min(contentWidth, st::msgMaxWidth + 2 * st::msgPhotoSkip + 2 * st::msgMargin.left()); } contentWidth -= st::msgServiceMargin.left() + st::msgServiceMargin.left(); // two small margins diff --git a/Telegram/SourceFiles/history/view/media/history_view_document.cpp b/Telegram/SourceFiles/history/view/media/history_view_document.cpp index 1d6697247..7e03dda62 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_document.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_document.cpp @@ -151,7 +151,7 @@ QSize Document::countOptimalSize() { if (auto named = Get()) { accumulate_max(maxWidth, tleft + named->_namew + tright); - if (cAdaptiveBaloons() && captioned) { + if (cAdaptiveBubbles() && captioned) { accumulate_max(maxWidth, captioned->_caption.maxWidth() + st::msgPadding.left() + st::msgPadding.right()); } else { accumulate_min(maxWidth, st::msgMaxWidth); diff --git a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp index af891bcad..b70e8952e 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp @@ -123,10 +123,10 @@ QSize Gif::countOptimalSize() { const auto size = style::ConvertScale(videoSize()); auto tw = size.width(); auto th = size.height(); - if ((!cAdaptiveBaloons() || captionWithPaddings <= maxSize) && tw > maxSize) { + if ((!cAdaptiveBubbles() || captionWithPaddings <= maxSize) && tw > maxSize) { th = (maxSize * th) / tw; tw = maxSize; - } else if (cAdaptiveBaloons() && captionWithPaddings > maxSize && tw > captionWithPaddings) { + } else if (cAdaptiveBubbles() && captionWithPaddings > maxSize && tw > captionWithPaddings) { th = (captionWithPaddings * th) / tw; tw = captionWithPaddings; } @@ -147,7 +147,7 @@ QSize Gif::countOptimalSize() { } if (_parent->hasBubble()) { if (!_caption.isEmpty()) { - if (cAdaptiveBaloons()) { + if (cAdaptiveBubbles()) { accumulate_max(maxWidth, captionWithPaddings); } auto captionw = maxWidth - st::msgPadding.left() - st::msgPadding.right(); @@ -183,10 +183,10 @@ QSize Gif::countCurrentSize(int newWidth) { const auto size = style::ConvertScale(videoSize()); auto tw = size.width(); auto th = size.height(); - if ((!cAdaptiveBaloons() || captionWithPaddings <= maxSize) && tw > maxSize) { + if ((!cAdaptiveBubbles() || captionWithPaddings <= maxSize) && tw > maxSize) { th = (maxSize * th) / tw; tw = maxSize; - } else if (cAdaptiveBaloons() && captionWithPaddings > maxSize && tw > captionWithPaddings) { + } else if (cAdaptiveBubbles() && captionWithPaddings > maxSize && tw > captionWithPaddings) { th = (captionWithPaddings * th) / tw; tw = captionWithPaddings; } @@ -213,7 +213,7 @@ QSize Gif::countCurrentSize(int newWidth) { } if (_parent->hasBubble()) { if (!_caption.isEmpty()) { - if (cAdaptiveBaloons()) { + if (cAdaptiveBubbles()) { accumulate_max(newWidth, captionWithPaddings); accumulate_min(newWidth, availableWidth); } diff --git a/Telegram/SourceFiles/history/view/media/history_view_location.cpp b/Telegram/SourceFiles/history/view/media/history_view_location.cpp index 717a1c223..8745b5b2d 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_location.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_location.cpp @@ -61,13 +61,13 @@ QSize Location::countOptimalSize() { if (_parent->hasBubble()) { if (!_title.isEmpty()) { - if (cAdaptiveBaloons()) { + if (cAdaptiveBubbles()) { maxWidth = qMax(maxWidth, _title.maxWidth() + st::msgPadding.left() + st::msgPadding.right()); } minHeight += qMin(_title.countHeight(maxWidth - st::msgPadding.left() - st::msgPadding.right()), 2 * st::webPageTitleFont->height); } if (!_description.isEmpty()) { - if (cAdaptiveBaloons()) { + if (cAdaptiveBubbles()) { maxWidth = qMax(maxWidth, _description.maxWidth() + st::msgPadding.left() + st::msgPadding.right()); } minHeight += qMin(_description.countHeight(maxWidth - st::msgPadding.left() - st::msgPadding.right()), 3 * st::webPageDescriptionFont->height); @@ -94,7 +94,7 @@ QSize Location::countCurrentSize(int newWidth) { auto newHeight = th; if (tw > newWidth) { newHeight = (newWidth * newHeight / tw); - } else if (!cAdaptiveBaloons()) { + } else if (!cAdaptiveBubbles()) { newWidth = tw; } else { newHeight = (newWidth * newHeight / tw); diff --git a/Telegram/SourceFiles/history/view/media/history_view_media_grouped.cpp b/Telegram/SourceFiles/history/view/media/history_view_media_grouped.cpp index 244fd5abf..413275fa4 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_media_grouped.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_media_grouped.cpp @@ -80,7 +80,7 @@ QSize GroupedMedia::countOptimalSize() { + st::msgPadding.left() + st::msgPadding.right(); auto groupMaxWidth = st::historyGroupWidthMax; - if (cAdaptiveBaloons()) { + if (cAdaptiveBubbles()) { accumulate_max(groupMaxWidth, captionWithPaddings); } @@ -102,7 +102,7 @@ QSize GroupedMedia::countOptimalSize() { } if (!_caption.isEmpty()) { - if (cAdaptiveBaloons()) { + if (cAdaptiveBubbles()) { maxWidth = qMax(maxWidth, captionWithPaddings); } auto captionw = maxWidth - st::msgPadding.left() - st::msgPadding.right(); diff --git a/Telegram/SourceFiles/history/view/media/history_view_photo.cpp b/Telegram/SourceFiles/history/view/media/history_view_photo.cpp index 8e226f33a..f9321e20e 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_photo.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_photo.cpp @@ -80,10 +80,10 @@ QSize Photo::countOptimalSize() { if (!tw || !th) { tw = th = 1; } - if ((!cAdaptiveBaloons() || (captionWithPaddings <= st::maxMediaSize && !inWebPage)) && tw > st::maxMediaSize) { + if ((!cAdaptiveBubbles() || (captionWithPaddings <= st::maxMediaSize && !inWebPage)) && tw > st::maxMediaSize) { th = (st::maxMediaSize * th) / tw; tw = st::maxMediaSize; - } else if (cAdaptiveBaloons() && captionWithPaddings > st::maxMediaSize && tw > captionWithPaddings) { + } else if (cAdaptiveBubbles() && captionWithPaddings > st::maxMediaSize && tw > captionWithPaddings) { th = (captionWithPaddings * th) / tw; tw = captionWithPaddings; } @@ -100,7 +100,7 @@ QSize Photo::countOptimalSize() { maxWidth = qMax(maxActualWidth, th); minHeight = qMax(th, st::minPhotoSize); if (_parent->hasBubble() && !_caption.isEmpty()) { - if (cAdaptiveBaloons()) { + if (cAdaptiveBubbles()) { maxActualWidth = qMax(maxActualWidth, captionWithPaddings); maxWidth = qMax(maxWidth, captionWithPaddings); } @@ -122,10 +122,10 @@ QSize Photo::countCurrentSize(int newWidth) { auto inWebPage = (_parent->media() != this); auto tw = style::ConvertScale(_data->width()); auto th = style::ConvertScale(_data->height()); - if ((!cAdaptiveBaloons() || (captionWithPaddings <= st::maxMediaSize && !inWebPage)) && tw > st::maxMediaSize) { + if ((!cAdaptiveBubbles() || (captionWithPaddings <= st::maxMediaSize && !inWebPage)) && tw > st::maxMediaSize) { th = (st::maxMediaSize * th) / tw; tw = st::maxMediaSize; - } else if (cAdaptiveBaloons() && captionWithPaddings > st::maxMediaSize && tw > captionWithPaddings) { + } else if (cAdaptiveBubbles() && captionWithPaddings > st::maxMediaSize && tw > captionWithPaddings) { th = (captionWithPaddings * th) / tw; tw = captionWithPaddings; } @@ -152,7 +152,7 @@ QSize Photo::countCurrentSize(int newWidth) { newWidth = qMax(_pixw, minWidth); auto newHeight = qMax(_pixh, st::minPhotoSize); if (_parent->hasBubble() && !_caption.isEmpty()) { - if (cAdaptiveBaloons()) { + if (cAdaptiveBubbles()) { newWidth = qMax(newWidth, captionWithPaddings); newWidth = qMin(newWidth, availableWidth); } diff --git a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp index c41c8a14d..2d6df09fe 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp @@ -278,7 +278,7 @@ QSize WebPage::countOptimalSize() { _durationWidth = st::msgDateFont->width(_duration); } maxWidth += st::msgPadding.left() + st::webPageLeft + st::msgPadding.right(); - if (cAdaptiveBaloons()) { + if (cAdaptiveBubbles()) { accumulate_min(maxWidth, st::msgMaxWidth); accumulate_max(maxWidth, _parent->plainMaxWidth()); } @@ -296,7 +296,7 @@ QSize WebPage::countCurrentSize(int newWidth) { return { newWidth, minHeight() }; } - if (cAdaptiveBaloons() && !asArticle()) { + if (cAdaptiveBubbles() && !asArticle()) { accumulate_min(newWidth, maxWidth()); } diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index 132f6a000..cf518f9c1 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -232,7 +232,7 @@ rpl::producer BigEmojiOutlineChanges() { return gBigEmojiOutline.changes(); } -bool gAdaptiveBaloons = false; +bool gAdaptiveBubbles = false; bool gAlwaysShowScheduled = true; bool gShowChatId = true; diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index 303027ed5..5dca583d4 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -192,7 +192,7 @@ void SetStickerHeight(int height); [[nodiscard]] int StickerHeight(); [[nodiscard]] rpl::producer StickerHeightChanges(); -DeclareSetting(bool, AdaptiveBaloons); +DeclareSetting(bool, AdaptiveBubbles); DeclareSetting(bool, AlwaysShowScheduled); DeclareSetting(bool, ShowChatId); diff --git a/Telegram/SourceFiles/settings/settings_kotato.cpp b/Telegram/SourceFiles/settings/settings_kotato.cpp index 7ec6e7721..d3773f41d 100644 --- a/Telegram/SourceFiles/settings/settings_kotato.cpp +++ b/Telegram/SourceFiles/settings/settings_kotato.cpp @@ -69,25 +69,25 @@ void SetupKotatoChats(not_null container) { updateStickerHeight); updateStickerHeightLabel(StickerHeight()); - const auto adaptiveBaloonsToggled = Ui::CreateChild>( + const auto adaptiveBubblesToggled = Ui::CreateChild>( container.get()); AddButton( container, - tr::ktg_settings_adaptive_baloons(), + tr::ktg_settings_adaptive_bubbles(), st::settingsButton )->toggleOn( - adaptiveBaloonsToggled->events_starting_with_copy(cAdaptiveBaloons()) + adaptiveBubblesToggled->events_starting_with_copy(cAdaptiveBubbles()) )->toggledValue( ) | rpl::filter([](bool enabled) { - return (enabled != cAdaptiveBaloons()); + return (enabled != cAdaptiveBubbles()); }) | rpl::start_with_next([=](bool enabled) { const auto confirmed = [=] { - cSetAdaptiveBaloons(enabled); + cSetAdaptiveBubbles(enabled); KotatoSettings::Write(); App::restart(); }; const auto cancelled = [=] { - adaptiveBaloonsToggled->fire(cAdaptiveBaloons() == true); + adaptiveBubblesToggled->fire(cAdaptiveBubbles() == true); }; Ui::show(Box( tr::lng_settings_need_restart(tr::now), diff --git a/Telegram/SourceFiles/window/themes/window_theme_preview.cpp b/Telegram/SourceFiles/window/themes/window_theme_preview.cpp index cfd57c1db..7520e2b6d 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_preview.cpp +++ b/Telegram/SourceFiles/window/themes/window_theme_preview.cpp @@ -251,7 +251,7 @@ void Generator::addAudioBubble(QVector waveform, int waveactive, QString wa tleft = st::msgFilePadding.left() + st::msgFileSize + st::msgFilePadding.right(); tright = st::msgFileThumbPadding.left(); accumulate_max(width, tleft + st::normalFont->width(wavestatus) + skipBlock.width() + st::msgPadding.right()); - if (!cAdaptiveBaloons()) { + if (!cAdaptiveBubbles()) { accumulate_min(width, st::msgMaxWidth); } @@ -281,7 +281,7 @@ void Generator::addTextBubble(QString text, QString date, Status status) { auto width = _history.width() - st::msgMargin.left() - st::msgMargin.right(); accumulate_min(width, st::msgPadding.left() + bubble.text.maxWidth() + st::msgPadding.right()); - if (!cAdaptiveBaloons()) { + if (!cAdaptiveBubbles()) { accumulate_min(width, st::msgMaxWidth); } @@ -307,7 +307,7 @@ void Generator::addPhotoBubble(QString image, QString caption, QString date, Sta auto width = _history.width() - st::msgMargin.left() - st::msgMargin.right(); accumulate_min(width, bubble.photoWidth); - if (!cAdaptiveBaloons()) { + if (!cAdaptiveBubbles()) { accumulate_min(width, st::msgMaxWidth); }