diff --git a/Telegram/SourceFiles/boxes/filters/edit_filter_box.cpp b/Telegram/SourceFiles/boxes/filters/edit_filter_box.cpp index 8a173ec7e..c5d94f52c 100644 --- a/Telegram/SourceFiles/boxes/filters/edit_filter_box.cpp +++ b/Telegram/SourceFiles/boxes/filters/edit_filter_box.cpp @@ -36,6 +36,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_boxes.h" #include "styles/style_layers.h" #include "styles/style_window.h" +#include "styles/style_chat.h" namespace { diff --git a/Telegram/SourceFiles/boxes/peer_list_box.cpp b/Telegram/SourceFiles/boxes/peer_list_box.cpp index caf058bbb..9459e46a7 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_box.cpp @@ -673,7 +673,7 @@ int PeerListRow::paintNameIconGetWidth( nameLeft, nameTop, availableWidth, - st::msgNameStyle.font->height), + st::semiboldFont->height), nameWidth, outerWidth, { diff --git a/Telegram/SourceFiles/boxes/sessions_box.cpp b/Telegram/SourceFiles/boxes/sessions_box.cpp index d74d26387..430bd3235 100644 --- a/Telegram/SourceFiles/boxes/sessions_box.cpp +++ b/Telegram/SourceFiles/boxes/sessions_box.cpp @@ -588,7 +588,7 @@ void Row::elementsPaint( : st::sessionTerminate.icon; icon.paint(p, position.x(), position.y(), outerWidth); } - p.setFont(st::msgFont); + p.setFont(st::normalFont); p.setPen(st::sessionInfoFg); const auto locationLeft = st::sessionListItem.namePosition.x(); const auto available = outerWidth - locationLeft; diff --git a/Telegram/SourceFiles/chat_helpers/chat_helpers.style b/Telegram/SourceFiles/chat_helpers/chat_helpers.style index ba706b6f8..29d4b0f47 100644 --- a/Telegram/SourceFiles/chat_helpers/chat_helpers.style +++ b/Telegram/SourceFiles/chat_helpers/chat_helpers.style @@ -299,7 +299,7 @@ mentionTop: 11px; mentionFont: linkFont; mentionNameFg: windowFg; mentionNameFgOver: windowFgOver; -mentionPhotoSize: msgPhotoSize; +mentionPhotoSize: 33px; mentionBg: windowBg; mentionBgOver: windowBgOver; mentionFg: windowSubTextFg; diff --git a/Telegram/SourceFiles/data/data_reply_preview.cpp b/Telegram/SourceFiles/data/data_reply_preview.cpp index 732cdb84d..4e558784c 100644 --- a/Telegram/SourceFiles/data/data_reply_preview.cpp +++ b/Telegram/SourceFiles/data/data_reply_preview.cpp @@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "data/data_photo.h" #include "data/data_photo_media.h" #include "ui/image/image.h" +#include "styles/style_chat.h" namespace Data { diff --git a/Telegram/SourceFiles/data/data_user.cpp b/Telegram/SourceFiles/data/data_user.cpp index 64edc3ae0..0a32223ca 100644 --- a/Telegram/SourceFiles/data/data_user.cpp +++ b/Telegram/SourceFiles/data/data_user.cpp @@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/text/text_options.h" #include "apiwrap.h" #include "lang/lang_keys.h" +#include "styles/style_chat.h" namespace { @@ -26,6 +27,9 @@ using UpdateFlag = Data::PeerUpdate::Flag; } // namespace +BotInfo::BotInfo() : text(st::msgMinWidth) { +} + UserData::UserData(not_null owner, PeerId id) : PeerData(owner, id) , _flags((id == owner->session().userPeerId()) ? Flag::Self : Flag(0)) { diff --git a/Telegram/SourceFiles/data/data_user.h b/Telegram/SourceFiles/data/data_user.h index 0e81d5f87..826883acc 100644 --- a/Telegram/SourceFiles/data/data_user.h +++ b/Telegram/SourceFiles/data/data_user.h @@ -16,6 +16,8 @@ struct BotCommand; } // namespace Data struct BotInfo { + BotInfo(); + bool inited = false; bool readsAllHistory = false; bool cantJoinGroups = false; @@ -23,7 +25,7 @@ struct BotInfo { int version = 0; QString description, inlinePlaceholder; std::vector commands; - Ui::Text::String text = { int(st::msgMinWidth) }; // description + Ui::Text::String text; QString botMenuButtonText; QString botMenuButtonUrl; diff --git a/Telegram/SourceFiles/dialogs/dialogs_entry.cpp b/Telegram/SourceFiles/dialogs/dialogs_entry.cpp index e69810707..13c928f99 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_entry.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_entry.cpp @@ -178,7 +178,7 @@ const Ui::Text::String &Entry::chatListNameText() const { if (_chatListNameVersion < version) { _chatListNameVersion = version; _chatListNameText.setText( - st::msgNameStyle, + st::semiboldTextStyle, chatListName(), Ui::NameTextOptions()); } diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp index 37c99e4dc..0f438db9a 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp @@ -842,11 +842,11 @@ void InnerWidget::paintPeerSearchResult( auto nameleft = context.st->nameLeft; auto namewidth = context.width - nameleft - context.st->padding.right(); - QRect rectForName(nameleft, context.st->nameTop, namewidth, st::msgNameFont->height); + QRect rectForName(nameleft, context.st->nameTop, namewidth, st::semiboldFont->height); if (result->name.isEmpty()) { result->name.setText( - st::msgNameStyle, + st::semiboldTextStyle, peer->name(), Ui::NameTextOptions()); } @@ -977,9 +977,9 @@ void InnerWidget::paintSearchInFilter( - st::dialogsCancelSearch.width; auto rectForName = QRect( nameleft, - top + (st::dialogsSearchInHeight - st::msgNameFont->height) / 2, + top + (st::dialogsSearchInHeight - st::semiboldFont->height) / 2, namewidth, - st::msgNameFont->height); + st::semiboldFont->height); if (icon) { icon->paint(p, rectForName.topLeft(), width()); rectForName.setLeft(rectForName.left() + st::dialogsChatTypeSkip); @@ -2540,7 +2540,7 @@ void InnerWidget::refreshSearchInChatLabel() { }(); if (!dialog.isEmpty()) { _searchInChatText.setText( - st::msgNameStyle, + st::semiboldTextStyle, dialog, Ui::DialogTextOptions()); } diff --git a/Telegram/SourceFiles/dialogs/dialogs_row.cpp b/Telegram/SourceFiles/dialogs/dialogs_row.cpp index 462db2f63..ed87dd4d5 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_row.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_row.cpp @@ -352,7 +352,10 @@ const Ui::Text::String &FakeRow::name() const { ? _item->displayFrom() : nullptr; const auto peer = from ? from : _item->history()->peer.get(); - _name.setText(st::msgNameStyle, peer->name(), Ui::NameTextOptions()); + _name.setText( + st::semiboldTextStyle, + peer->name(), + Ui::NameTextOptions()); } return _name; } diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp index 8b0b6c27b..285490f0c 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp @@ -70,7 +70,7 @@ void PaintRowTopRight( : st::dialogsDateFg); p.drawText( rectForName.left() + rectForName.width() + st::dialogsDateSkip, - rectForName.top() + st::msgNameFont->height - st::msgDateFont->descent, + rectForName.top() + st::semiboldFont->height - st::normalFont->descent, text); } @@ -392,7 +392,7 @@ void PaintRow( nameleft, context.st->nameTop, namewidth, - st::msgNameFont->height); + st::semiboldFont->height); const auto promoted = (history && history->useTopPromotion()) && !context.search; @@ -612,14 +612,14 @@ void PaintRow( sendStateIcon->paint(p, rectForName.topLeft() + QPoint(rectForName.width(), 0), context.width); } - p.setFont(st::msgNameFont); + p.setFont(st::semiboldFont); if (flags & (Flag::SavedMessages | Flag::RepliesMessages)) { auto text = (flags & Flag::SavedMessages) ? tr::lng_saved_messages(tr::now) : tr::lng_replies_messages(tr::now); - const auto textWidth = st::msgNameFont->width(text); + const auto textWidth = st::semiboldFont->width(text); if (textWidth > rectForName.width()) { - text = st::msgNameFont->elided(text, rectForName.width()); + text = st::semiboldFont->elided(text, rectForName.width()); } p.setPen(context.active ? st::dialogsNameFgActive @@ -687,9 +687,9 @@ void PaintRow( ? st::dialogsArchiveFgOver : st::dialogsArchiveFg); auto text = entry->chatListName(); // TODO feed name with emoji - auto textWidth = st::msgNameFont->width(text); + auto textWidth = st::semiboldFont->width(text); if (textWidth > rectForName.width()) { - text = st::msgNameFont->elided(text, rectForName.width()); + text = st::semiboldFont->elided(text, rectForName.width()); } p.drawTextLeft(rectForName.left(), rectForName.top(), context.width, text); } diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_filter.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_filter.cpp index 35eae243c..9f28a11ac 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_filter.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_filter.cpp @@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/unixtime.h" #include "styles/style_layers.h" #include "styles/style_boxes.h" +#include "styles/style_chat.h" namespace Data { class CloudImageView; diff --git a/Telegram/SourceFiles/history/view/history_view_element.h b/Telegram/SourceFiles/history/view/history_view_element.h index 68142325e..f66a5ffdb 100644 --- a/Telegram/SourceFiles/history/view/history_view_element.h +++ b/Telegram/SourceFiles/history/view/history_view_element.h @@ -516,7 +516,7 @@ private: mutable ClickHandlerPtr _fromLink; const QDateTime _dateTime; - mutable Ui::Text::String _text = { st::msgMinWidth }; + mutable Ui::Text::String _text; mutable int _textWidth = -1; mutable int _textHeight = 0; diff --git a/Telegram/SourceFiles/history/view/history_view_service_message.cpp b/Telegram/SourceFiles/history/view/history_view_service_message.cpp index bd95f76a2..0df0ffaf2 100644 --- a/Telegram/SourceFiles/history/view/history_view_service_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_service_message.cpp @@ -648,7 +648,10 @@ TextSelection Service::adjustSelection( return text().adjustSelection(selection, type); } -EmptyPainter::EmptyPainter(not_null history) : _history(history) { +EmptyPainter::EmptyPainter(not_null history) +: _history(history) +, _header(st::msgMinWidth) +, _text(st::msgMinWidth) { if (NeedAboutGroup(_history)) { fillAboutGroup(); } diff --git a/Telegram/SourceFiles/history/view/history_view_service_message.h b/Telegram/SourceFiles/history/view/history_view_service_message.h index 863b4ac80..1b36513d5 100644 --- a/Telegram/SourceFiles/history/view/history_view_service_message.h +++ b/Telegram/SourceFiles/history/view/history_view_service_message.h @@ -127,8 +127,8 @@ private: void fillAboutGroup(); not_null _history; - Ui::Text::String _header = { st::msgMinWidth }; - Ui::Text::String _text = { st::msgMinWidth }; + Ui::Text::String _header; + Ui::Text::String _text; std::vector _phrases; }; diff --git a/Telegram/SourceFiles/info/media/info_media_list_widget.cpp b/Telegram/SourceFiles/info/media/info_media_list_widget.cpp index 5f47999af..d21d55359 100644 --- a/Telegram/SourceFiles/info/media/info_media_list_widget.cpp +++ b/Telegram/SourceFiles/info/media/info_media_list_widget.cpp @@ -55,6 +55,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_info.h" #include "styles/style_layers.h" #include "styles/style_menu_icons.h" +#include "styles/style_chat.h" #include #include diff --git a/Telegram/SourceFiles/overview/overview_layout.cpp b/Telegram/SourceFiles/overview/overview_layout.cpp index 4c2c1f531..9d324f585 100644 --- a/Telegram/SourceFiles/overview/overview_layout.cpp +++ b/Telegram/SourceFiles/overview/overview_layout.cpp @@ -1482,7 +1482,8 @@ Link::Link( not_null delegate, not_null parent, Data::Media *media) -: ItemBase(delegate, parent) { +: ItemBase(delegate, parent) +, _text(st::msgMinWidth) { AddComponents(Info::Bit()); auto textWithEntities = parent->originalText(); diff --git a/Telegram/SourceFiles/overview/overview_layout.h b/Telegram/SourceFiles/overview/overview_layout.h index f87187043..83092341e 100644 --- a/Telegram/SourceFiles/overview/overview_layout.h +++ b/Telegram/SourceFiles/overview/overview_layout.h @@ -433,7 +433,7 @@ private: std::shared_ptr _documentMedia; int _pixw = 0; int _pixh = 0; - Ui::Text::String _text = { st::msgMinWidth }; + Ui::Text::String _text; QPixmap _thumbnail; bool _thumbnailBlurred = true; diff --git a/Telegram/SourceFiles/profile/profile_block_peer_list.cpp b/Telegram/SourceFiles/profile/profile_block_peer_list.cpp index 1db171dfc..fa19b2c9f 100644 --- a/Telegram/SourceFiles/profile/profile_block_peer_list.cpp +++ b/Telegram/SourceFiles/profile/profile_block_peer_list.cpp @@ -99,7 +99,7 @@ void PeerListWidget::paintItem(Painter &p, int x, int y, Item *item, bool select if (item->name.isEmpty()) { item->name.setText( - st::msgNameStyle, + st::semiboldTextStyle, item->peer->name(), Ui::NameTextOptions()); } diff --git a/Telegram/SourceFiles/ui/boxes/calendar_box.cpp b/Telegram/SourceFiles/ui/boxes/calendar_box.cpp index 6478a93f3..b6fb9cb00 100644 --- a/Telegram/SourceFiles/ui/boxes/calendar_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/calendar_box.cpp @@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/cached_round_corners.h" #include "lang/lang_keys.h" #include "styles/style_boxes.h" +#include "styles/style_chat.h" namespace Ui { namespace { diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index 4142c72d6..7d1f8adc3 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -26,6 +26,147 @@ GroupCallUserpics { align: align; } +msgMaxWidth: 430px; +msgFont: font(fsize); +msgNameFont: semiboldFont; +msgNameStyle: semiboldTextStyle; +msgServiceFont: semiboldFont; +msgServiceNameFont: semiboldFont; +msgServicePhotoWidth: 100px; +msgDateFont: font(13px); +msgMinWidth: 160px; +msgPhotoSize: 33px; +msgPhotoSkip: 40px; +msgPadding: margins(13px, 7px, 13px, 8px); +msgMargin: margins(16px, 6px, 56px, 2px); +msgMarginTopAttached: 0px; +msgLnkPadding: 2px; // for media open / save links +msgShadow: 2px; + +msgReplyPadding: margins(6px, 6px, 11px, 6px); +msgReplyBarPos: point(1px, 0px); +msgReplyBarSize: size(2px, 36px); +msgReplyBarSkip: 10px; +msgServicePadding: margins(12px, 3px, 12px, 4px); +msgServiceMargin: margins(10px, 10px, 10px, 2px); + +msgDateSpace: 12px; +msgDateDelta: point(2px, 5px); + +msgDateImgDelta: 4px; +msgDateImgPadding: point(8px, 2px); +msgDateImgCheckSpace: 4px; + +messageTextStyle: defaultTextStyle; +msgDateTextStyle: defaultTextStyle; +serviceTextPalette: TextPalette(defaultTextPalette) { + linkFg: msgServiceFg; + monoFg: msgServiceFg; + spoilerFg: msgServiceFg; + selectBg: msgServiceBgSelected; + selectFg: msgServiceFg; + selectLinkFg: msgServiceFg; + selectMonoFg: msgServiceFg; + selectSpoilerFg: msgServiceFg; + selectOverlay: msgServiceBgSelected; +} +serviceTextStyle: TextStyle(defaultTextStyle) { + font: msgServiceFont; + linkFont: msgServiceFont; + linkFontOver: font(fsize semibold underline); +} +inTextPalette: TextPalette(defaultTextPalette) { + linkFg: historyLinkInFg; + monoFg: msgInMonoFg; + spoilerFg: msgInDateFg; + selectBg: msgInBgSelected; + selectFg: historyTextInFgSelected; + selectLinkFg: historyLinkInFgSelected; + selectMonoFg: msgInMonoFgSelected; + selectSpoilerFg: msgInDateFgSelected; + selectOverlay: msgSelectOverlay; +} +inTextPaletteSelected: TextPalette(inTextPalette) { + linkFg: historyLinkInFgSelected; + monoFg: msgInMonoFgSelected; + spoilerFg: msgInDateFgSelected; +} +outTextPalette: TextPalette(defaultTextPalette) { + linkFg: historyLinkOutFg; + monoFg: msgOutMonoFg; + spoilerFg: msgOutDateFg; + selectBg: msgOutBgSelected; + selectFg: historyTextOutFgSelected; + selectLinkFg: historyLinkOutFgSelected; + selectMonoFg: msgOutMonoFgSelected; + selectSpoilerFg: msgOutDateFgSelected; + selectOverlay: msgSelectOverlay; +} +outTextPaletteSelected: TextPalette(outTextPalette) { + linkFg: historyLinkOutFgSelected; + monoFg: msgOutMonoFgSelected; + spoilerFg: msgOutDateFgSelected; +} +fwdTextStyle: TextStyle(semiboldTextStyle) { + linkFontOver: semiboldFont; +} +inFwdTextPalette: TextPalette(defaultTextPalette) { + linkFg: msgInServiceFg; +} +outFwdTextPalette: TextPalette(defaultTextPalette) { + linkFg: msgOutServiceFg; +} +inFwdTextPaletteSelected: TextPalette(defaultTextPalette) { + linkFg: msgInServiceFgSelected; +} +outFwdTextPaletteSelected: TextPalette(defaultTextPalette) { + linkFg: msgOutServiceFgSelected; +} +inReplyTextPalette: TextPalette(inTextPalette) { + linkFg: msgInDateFg; +} +inReplyTextPaletteSelected: TextPalette(inTextPaletteSelected) { + linkFg: msgInDateFgSelected; +} +outReplyTextPalette: TextPalette(outTextPalette) { + linkFg: msgOutDateFg; +} +outReplyTextPaletteSelected: TextPalette(outTextPaletteSelected) { + linkFg: msgOutDateFgSelected; +} +imgReplyTextPalette: TextPalette(defaultTextPalette) { + linkFg: msgImgReplyBarColor; +} +inSemiboldPalette: TextPalette(inTextPalette) { + linkFg: msgInServiceFg; + selectFg: msgInServiceFgSelected; + selectLinkFg: msgInServiceFgSelected; +} +outSemiboldPalette: TextPalette(outTextPalette) { + linkFg: msgOutServiceFg; + selectFg: msgOutServiceFgSelected; + selectLinkFg: msgOutServiceFgSelected; +} +historyComposeAreaPalette: TextPalette(defaultTextPalette) { + linkFg: historyComposeAreaFgService; +} + +mediaCaptionSkip: 5px; +mediaInBubbleSkip: 5px; +mediaThumbSize: 48px; +mediaNameTop: 3px; +mediaDetailsShift: 3px; +mediaUnreadSize: 7px; +mediaUnreadSkip: 5px; +mediaUnreadTop: 6px; + +mediaInPalette: TextPalette(defaultTextPalette) { + linkFg: mediaInFg; +} +mediaInPaletteSelected: TextPalette(defaultTextPalette) { + linkFg: mediaInFgSelected; +} + defaultMessageBar: MessageBar { title: semiboldTextStyle; titleFg: windowActiveTextFg; diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp index 20ccd614d..4e04d4ec0 100644 --- a/Telegram/SourceFiles/window/notifications_manager_default.cpp +++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp @@ -678,7 +678,7 @@ void Notification::refreshLang() { void Notification::prepareActionsCache() { auto replyCache = Ui::GrabWidget(_reply); auto fadeWidth = st::notifyFadeRight.width(); - auto actionsTop = st::notifyTextTop + st::msgNameFont->height; + auto actionsTop = st::notifyTextTop + st::semiboldFont->height; auto replyRight = _replyPadding - st::notifyBorderWidth; auto actionsCacheWidth = _reply->width() + replyRight + fadeWidth; auto actionsCacheHeight = height() - actionsTop - st::notifyBorderWidth; @@ -739,7 +739,7 @@ void Notification::paintEvent(QPaintEvent *e) { p.setClipRect(e->rect()); p.drawImage(0, 0, _cache); - auto buttonsTop = st::notifyTextTop + st::msgNameFont->height; + auto buttonsTop = st::notifyTextTop + st::semiboldFont->height; if (a_actionsOpacity.animating()) { p.setOpacity(a_actionsOpacity.value(1.)); p.drawPixmapRight(st::notifyBorderWidth, buttonsTop, width(), _buttonsCache); @@ -835,15 +835,15 @@ void Notification::updateNotifyDisplay() { int32 itemWidth = w - st::notifyPhotoPos.x() - st::notifyPhotoSize - st::notifyTextLeft - st::notifyClosePos.x() - st::notifyClose.width; - QRect rectForName(st::notifyPhotoPos.x() + st::notifyPhotoSize + st::notifyTextLeft, st::notifyTextTop, itemWidth, st::msgNameFont->height); + QRect rectForName(st::notifyPhotoPos.x() + st::notifyPhotoSize + st::notifyTextLeft, st::notifyTextTop, itemWidth, st::semiboldFont->height); const auto reminder = _fromScheduled && _history->peer->isSelf(); if (!options.hideNameAndPhoto) { if (_fromScheduled) { static const auto emoji = Ui::Emoji::Find(QString::fromUtf8("\xF0\x9F\x93\x85")); const auto size = Ui::Emoji::GetSizeNormal() / cIntRetinaFactor(); - const auto top = rectForName.top() + (st::msgNameFont->height - size) / 2; + const auto top = rectForName.top() + (st::semiboldFont->height - size) / 2; Ui::Emoji::Draw(p, emoji, Ui::Emoji::GetSizeNormal(), rectForName.left(), top); - rectForName.setLeft(rectForName.left() + size + st::msgNameFont->spacew); + rectForName.setLeft(rectForName.left() + size + st::semiboldFont->spacew); } if (const auto chatTypeIcon = Dialogs::Ui::ChatTypeIcon(_history->peer)) { chatTypeIcon->paint(p, rectForName.topLeft(), w); @@ -858,7 +858,7 @@ void Notification::updateNotifyDisplay() { _textCache = Ui::Text::String(itemWidth); auto r = QRect( st::notifyPhotoPos.x() + st::notifyPhotoSize + st::notifyTextLeft, - st::notifyItemTop + st::msgNameFont->height, + st::notifyItemTop + st::semiboldFont->height, itemWidth, 2 * st::dialogsTextFont->height); const auto text = !_reaction.empty() @@ -910,7 +910,7 @@ void Notification::updateNotifyDisplay() { p.setPen(st::dialogsTextFgService); p.drawText( st::notifyPhotoPos.x() + st::notifyPhotoSize + st::notifyTextLeft, - st::notifyItemTop + st::msgNameFont->height + st::dialogsTextFont->ascent, + st::notifyItemTop + st::semiboldFont->height + st::dialogsTextFont->ascent, st::dialogsTextFont->elided( tr::lng_notification_preview(tr::now), itemWidth)); @@ -926,7 +926,7 @@ void Notification::updateNotifyDisplay() { const auto fullTitle = manager()->addTargetAccountName( title, &_history->session()); - titleText.setText(st::msgNameStyle, fullTitle, Ui::NameTextOptions()); + titleText.setText(st::semiboldTextStyle, fullTitle, Ui::NameTextOptions()); titleText.drawElided(p, rectForName.left(), rectForName.top(), rectForName.width()); } diff --git a/Telegram/SourceFiles/window/window_main_menu.cpp b/Telegram/SourceFiles/window/window_main_menu.cpp index b2dda39c2..a50595f42 100644 --- a/Telegram/SourceFiles/window/window_main_menu.cpp +++ b/Telegram/SourceFiles/window/window_main_menu.cpp @@ -488,7 +488,7 @@ void MainMenu::moveBadge() { _badge->move( left, st::mainMenuCoverNameTop, - st::mainMenuCoverNameTop + st::msgNameStyle.font->height); + st::mainMenuCoverNameTop + st::semiboldFont->height); } void MainMenu::setupArchive() { @@ -830,7 +830,7 @@ void MainMenu::paintEvent(QPaintEvent *e) { if (_nameVersion < user->nameVersion()) { _nameVersion = user->nameVersion(); _name.setText( - st::msgNameStyle, + st::semiboldTextStyle, user->name(), Ui::NameTextOptions()); moveBadge(); diff --git a/Telegram/codegen b/Telegram/codegen index 8815d7aec..6e923872a 160000 --- a/Telegram/codegen +++ b/Telegram/codegen @@ -1 +1 @@ -Subproject commit 8815d7aec9b901191d08445f29e2edd0aeba7b2c +Subproject commit 6e923872a4b66767da93f7e388f9fcedf266e1aa diff --git a/Telegram/lib_ui b/Telegram/lib_ui index d5ec7cc29..80445f2bd 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit d5ec7cc296a074e8e2247ffc825c6d5c8647ed48 +Subproject commit 80445f2bd3ebb377b990d2a471021e906e611240