Move some chat styles from basic.style to chat.style.

This commit is contained in:
John Preston 2022-09-30 11:25:02 +04:00
parent ba2f92906b
commit b13471672d
25 changed files with 196 additions and 37 deletions

View file

@ -36,6 +36,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_boxes.h" #include "styles/style_boxes.h"
#include "styles/style_layers.h" #include "styles/style_layers.h"
#include "styles/style_window.h" #include "styles/style_window.h"
#include "styles/style_chat.h"
namespace { namespace {

View file

@ -673,7 +673,7 @@ int PeerListRow::paintNameIconGetWidth(
nameLeft, nameLeft,
nameTop, nameTop,
availableWidth, availableWidth,
st::msgNameStyle.font->height), st::semiboldFont->height),
nameWidth, nameWidth,
outerWidth, outerWidth,
{ {

View file

@ -588,7 +588,7 @@ void Row::elementsPaint(
: st::sessionTerminate.icon; : st::sessionTerminate.icon;
icon.paint(p, position.x(), position.y(), outerWidth); icon.paint(p, position.x(), position.y(), outerWidth);
} }
p.setFont(st::msgFont); p.setFont(st::normalFont);
p.setPen(st::sessionInfoFg); p.setPen(st::sessionInfoFg);
const auto locationLeft = st::sessionListItem.namePosition.x(); const auto locationLeft = st::sessionListItem.namePosition.x();
const auto available = outerWidth - locationLeft; const auto available = outerWidth - locationLeft;

View file

@ -299,7 +299,7 @@ mentionTop: 11px;
mentionFont: linkFont; mentionFont: linkFont;
mentionNameFg: windowFg; mentionNameFg: windowFg;
mentionNameFgOver: windowFgOver; mentionNameFgOver: windowFgOver;
mentionPhotoSize: msgPhotoSize; mentionPhotoSize: 33px;
mentionBg: windowBg; mentionBg: windowBg;
mentionBgOver: windowBgOver; mentionBgOver: windowBgOver;
mentionFg: windowSubTextFg; mentionFg: windowSubTextFg;

View file

@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_photo.h" #include "data/data_photo.h"
#include "data/data_photo_media.h" #include "data/data_photo_media.h"
#include "ui/image/image.h" #include "ui/image/image.h"
#include "styles/style_chat.h"
namespace Data { namespace Data {

View file

@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/text/text_options.h" #include "ui/text/text_options.h"
#include "apiwrap.h" #include "apiwrap.h"
#include "lang/lang_keys.h" #include "lang/lang_keys.h"
#include "styles/style_chat.h"
namespace { namespace {
@ -26,6 +27,9 @@ using UpdateFlag = Data::PeerUpdate::Flag;
} // namespace } // namespace
BotInfo::BotInfo() : text(st::msgMinWidth) {
}
UserData::UserData(not_null<Data::Session*> owner, PeerId id) UserData::UserData(not_null<Data::Session*> owner, PeerId id)
: PeerData(owner, id) : PeerData(owner, id)
, _flags((id == owner->session().userPeerId()) ? Flag::Self : Flag(0)) { , _flags((id == owner->session().userPeerId()) ? Flag::Self : Flag(0)) {

View file

@ -16,6 +16,8 @@ struct BotCommand;
} // namespace Data } // namespace Data
struct BotInfo { struct BotInfo {
BotInfo();
bool inited = false; bool inited = false;
bool readsAllHistory = false; bool readsAllHistory = false;
bool cantJoinGroups = false; bool cantJoinGroups = false;
@ -23,7 +25,7 @@ struct BotInfo {
int version = 0; int version = 0;
QString description, inlinePlaceholder; QString description, inlinePlaceholder;
std::vector<Data::BotCommand> commands; std::vector<Data::BotCommand> commands;
Ui::Text::String text = { int(st::msgMinWidth) }; // description Ui::Text::String text;
QString botMenuButtonText; QString botMenuButtonText;
QString botMenuButtonUrl; QString botMenuButtonUrl;

View file

@ -178,7 +178,7 @@ const Ui::Text::String &Entry::chatListNameText() const {
if (_chatListNameVersion < version) { if (_chatListNameVersion < version) {
_chatListNameVersion = version; _chatListNameVersion = version;
_chatListNameText.setText( _chatListNameText.setText(
st::msgNameStyle, st::semiboldTextStyle,
chatListName(), chatListName(),
Ui::NameTextOptions()); Ui::NameTextOptions());
} }

View file

@ -842,11 +842,11 @@ void InnerWidget::paintPeerSearchResult(
auto nameleft = context.st->nameLeft; auto nameleft = context.st->nameLeft;
auto namewidth = context.width - nameleft - context.st->padding.right(); 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()) { if (result->name.isEmpty()) {
result->name.setText( result->name.setText(
st::msgNameStyle, st::semiboldTextStyle,
peer->name(), peer->name(),
Ui::NameTextOptions()); Ui::NameTextOptions());
} }
@ -977,9 +977,9 @@ void InnerWidget::paintSearchInFilter(
- st::dialogsCancelSearch.width; - st::dialogsCancelSearch.width;
auto rectForName = QRect( auto rectForName = QRect(
nameleft, nameleft,
top + (st::dialogsSearchInHeight - st::msgNameFont->height) / 2, top + (st::dialogsSearchInHeight - st::semiboldFont->height) / 2,
namewidth, namewidth,
st::msgNameFont->height); st::semiboldFont->height);
if (icon) { if (icon) {
icon->paint(p, rectForName.topLeft(), width()); icon->paint(p, rectForName.topLeft(), width());
rectForName.setLeft(rectForName.left() + st::dialogsChatTypeSkip); rectForName.setLeft(rectForName.left() + st::dialogsChatTypeSkip);
@ -2540,7 +2540,7 @@ void InnerWidget::refreshSearchInChatLabel() {
}(); }();
if (!dialog.isEmpty()) { if (!dialog.isEmpty()) {
_searchInChatText.setText( _searchInChatText.setText(
st::msgNameStyle, st::semiboldTextStyle,
dialog, dialog,
Ui::DialogTextOptions()); Ui::DialogTextOptions());
} }

View file

@ -352,7 +352,10 @@ const Ui::Text::String &FakeRow::name() const {
? _item->displayFrom() ? _item->displayFrom()
: nullptr; : nullptr;
const auto peer = from ? from : _item->history()->peer.get(); 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; return _name;
} }

View file

@ -70,7 +70,7 @@ void PaintRowTopRight(
: st::dialogsDateFg); : st::dialogsDateFg);
p.drawText( p.drawText(
rectForName.left() + rectForName.width() + st::dialogsDateSkip, rectForName.left() + rectForName.width() + st::dialogsDateSkip,
rectForName.top() + st::msgNameFont->height - st::msgDateFont->descent, rectForName.top() + st::semiboldFont->height - st::normalFont->descent,
text); text);
} }
@ -392,7 +392,7 @@ void PaintRow(
nameleft, nameleft,
context.st->nameTop, context.st->nameTop,
namewidth, namewidth,
st::msgNameFont->height); st::semiboldFont->height);
const auto promoted = (history && history->useTopPromotion()) const auto promoted = (history && history->useTopPromotion())
&& !context.search; && !context.search;
@ -612,14 +612,14 @@ void PaintRow(
sendStateIcon->paint(p, rectForName.topLeft() + QPoint(rectForName.width(), 0), context.width); 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)) { if (flags & (Flag::SavedMessages | Flag::RepliesMessages)) {
auto text = (flags & Flag::SavedMessages) auto text = (flags & Flag::SavedMessages)
? tr::lng_saved_messages(tr::now) ? tr::lng_saved_messages(tr::now)
: tr::lng_replies_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()) { if (textWidth > rectForName.width()) {
text = st::msgNameFont->elided(text, rectForName.width()); text = st::semiboldFont->elided(text, rectForName.width());
} }
p.setPen(context.active p.setPen(context.active
? st::dialogsNameFgActive ? st::dialogsNameFgActive
@ -687,9 +687,9 @@ void PaintRow(
? st::dialogsArchiveFgOver ? st::dialogsArchiveFgOver
: st::dialogsArchiveFg); : st::dialogsArchiveFg);
auto text = entry->chatListName(); // TODO feed name with emoji 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()) { 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); p.drawTextLeft(rectForName.left(), rectForName.top(), context.width, text);
} }

View file

@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/unixtime.h" #include "base/unixtime.h"
#include "styles/style_layers.h" #include "styles/style_layers.h"
#include "styles/style_boxes.h" #include "styles/style_boxes.h"
#include "styles/style_chat.h"
namespace Data { namespace Data {
class CloudImageView; class CloudImageView;

View file

@ -516,7 +516,7 @@ private:
mutable ClickHandlerPtr _fromLink; mutable ClickHandlerPtr _fromLink;
const QDateTime _dateTime; const QDateTime _dateTime;
mutable Ui::Text::String _text = { st::msgMinWidth }; mutable Ui::Text::String _text;
mutable int _textWidth = -1; mutable int _textWidth = -1;
mutable int _textHeight = 0; mutable int _textHeight = 0;

View file

@ -648,7 +648,10 @@ TextSelection Service::adjustSelection(
return text().adjustSelection(selection, type); return text().adjustSelection(selection, type);
} }
EmptyPainter::EmptyPainter(not_null<History*> history) : _history(history) { EmptyPainter::EmptyPainter(not_null<History*> history)
: _history(history)
, _header(st::msgMinWidth)
, _text(st::msgMinWidth) {
if (NeedAboutGroup(_history)) { if (NeedAboutGroup(_history)) {
fillAboutGroup(); fillAboutGroup();
} }

View file

@ -127,8 +127,8 @@ private:
void fillAboutGroup(); void fillAboutGroup();
not_null<History*> _history; not_null<History*> _history;
Ui::Text::String _header = { st::msgMinWidth }; Ui::Text::String _header;
Ui::Text::String _text = { st::msgMinWidth }; Ui::Text::String _text;
std::vector<Ui::Text::String> _phrases; std::vector<Ui::Text::String> _phrases;
}; };

View file

@ -55,6 +55,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_info.h" #include "styles/style_info.h"
#include "styles/style_layers.h" #include "styles/style_layers.h"
#include "styles/style_menu_icons.h" #include "styles/style_menu_icons.h"
#include "styles/style_chat.h"
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtGui/QClipboard> #include <QtGui/QClipboard>

View file

@ -1482,7 +1482,8 @@ Link::Link(
not_null<Delegate*> delegate, not_null<Delegate*> delegate,
not_null<HistoryItem*> parent, not_null<HistoryItem*> parent,
Data::Media *media) Data::Media *media)
: ItemBase(delegate, parent) { : ItemBase(delegate, parent)
, _text(st::msgMinWidth) {
AddComponents(Info::Bit()); AddComponents(Info::Bit());
auto textWithEntities = parent->originalText(); auto textWithEntities = parent->originalText();

View file

@ -433,7 +433,7 @@ private:
std::shared_ptr<Data::DocumentMedia> _documentMedia; std::shared_ptr<Data::DocumentMedia> _documentMedia;
int _pixw = 0; int _pixw = 0;
int _pixh = 0; int _pixh = 0;
Ui::Text::String _text = { st::msgMinWidth }; Ui::Text::String _text;
QPixmap _thumbnail; QPixmap _thumbnail;
bool _thumbnailBlurred = true; bool _thumbnailBlurred = true;

View file

@ -99,7 +99,7 @@ void PeerListWidget::paintItem(Painter &p, int x, int y, Item *item, bool select
if (item->name.isEmpty()) { if (item->name.isEmpty()) {
item->name.setText( item->name.setText(
st::msgNameStyle, st::semiboldTextStyle,
item->peer->name(), item->peer->name(),
Ui::NameTextOptions()); Ui::NameTextOptions());
} }

View file

@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/cached_round_corners.h" #include "ui/cached_round_corners.h"
#include "lang/lang_keys.h" #include "lang/lang_keys.h"
#include "styles/style_boxes.h" #include "styles/style_boxes.h"
#include "styles/style_chat.h"
namespace Ui { namespace Ui {
namespace { namespace {

View file

@ -26,6 +26,147 @@ GroupCallUserpics {
align: align; 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 { defaultMessageBar: MessageBar {
title: semiboldTextStyle; title: semiboldTextStyle;
titleFg: windowActiveTextFg; titleFg: windowActiveTextFg;

View file

@ -678,7 +678,7 @@ void Notification::refreshLang() {
void Notification::prepareActionsCache() { void Notification::prepareActionsCache() {
auto replyCache = Ui::GrabWidget(_reply); auto replyCache = Ui::GrabWidget(_reply);
auto fadeWidth = st::notifyFadeRight.width(); 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 replyRight = _replyPadding - st::notifyBorderWidth;
auto actionsCacheWidth = _reply->width() + replyRight + fadeWidth; auto actionsCacheWidth = _reply->width() + replyRight + fadeWidth;
auto actionsCacheHeight = height() - actionsTop - st::notifyBorderWidth; auto actionsCacheHeight = height() - actionsTop - st::notifyBorderWidth;
@ -739,7 +739,7 @@ void Notification::paintEvent(QPaintEvent *e) {
p.setClipRect(e->rect()); p.setClipRect(e->rect());
p.drawImage(0, 0, _cache); p.drawImage(0, 0, _cache);
auto buttonsTop = st::notifyTextTop + st::msgNameFont->height; auto buttonsTop = st::notifyTextTop + st::semiboldFont->height;
if (a_actionsOpacity.animating()) { if (a_actionsOpacity.animating()) {
p.setOpacity(a_actionsOpacity.value(1.)); p.setOpacity(a_actionsOpacity.value(1.));
p.drawPixmapRight(st::notifyBorderWidth, buttonsTop, width(), _buttonsCache); 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; 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(); const auto reminder = _fromScheduled && _history->peer->isSelf();
if (!options.hideNameAndPhoto) { if (!options.hideNameAndPhoto) {
if (_fromScheduled) { if (_fromScheduled) {
static const auto emoji = Ui::Emoji::Find(QString::fromUtf8("\xF0\x9F\x93\x85")); static const auto emoji = Ui::Emoji::Find(QString::fromUtf8("\xF0\x9F\x93\x85"));
const auto size = Ui::Emoji::GetSizeNormal() / cIntRetinaFactor(); 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); 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)) { if (const auto chatTypeIcon = Dialogs::Ui::ChatTypeIcon(_history->peer)) {
chatTypeIcon->paint(p, rectForName.topLeft(), w); chatTypeIcon->paint(p, rectForName.topLeft(), w);
@ -858,7 +858,7 @@ void Notification::updateNotifyDisplay() {
_textCache = Ui::Text::String(itemWidth); _textCache = Ui::Text::String(itemWidth);
auto r = QRect( auto r = QRect(
st::notifyPhotoPos.x() + st::notifyPhotoSize + st::notifyTextLeft, st::notifyPhotoPos.x() + st::notifyPhotoSize + st::notifyTextLeft,
st::notifyItemTop + st::msgNameFont->height, st::notifyItemTop + st::semiboldFont->height,
itemWidth, itemWidth,
2 * st::dialogsTextFont->height); 2 * st::dialogsTextFont->height);
const auto text = !_reaction.empty() const auto text = !_reaction.empty()
@ -910,7 +910,7 @@ void Notification::updateNotifyDisplay() {
p.setPen(st::dialogsTextFgService); p.setPen(st::dialogsTextFgService);
p.drawText( p.drawText(
st::notifyPhotoPos.x() + st::notifyPhotoSize + st::notifyTextLeft, 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( st::dialogsTextFont->elided(
tr::lng_notification_preview(tr::now), tr::lng_notification_preview(tr::now),
itemWidth)); itemWidth));
@ -926,7 +926,7 @@ void Notification::updateNotifyDisplay() {
const auto fullTitle = manager()->addTargetAccountName( const auto fullTitle = manager()->addTargetAccountName(
title, title,
&_history->session()); &_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()); titleText.drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
} }

View file

@ -488,7 +488,7 @@ void MainMenu::moveBadge() {
_badge->move( _badge->move(
left, left,
st::mainMenuCoverNameTop, st::mainMenuCoverNameTop,
st::mainMenuCoverNameTop + st::msgNameStyle.font->height); st::mainMenuCoverNameTop + st::semiboldFont->height);
} }
void MainMenu::setupArchive() { void MainMenu::setupArchive() {
@ -830,7 +830,7 @@ void MainMenu::paintEvent(QPaintEvent *e) {
if (_nameVersion < user->nameVersion()) { if (_nameVersion < user->nameVersion()) {
_nameVersion = user->nameVersion(); _nameVersion = user->nameVersion();
_name.setText( _name.setText(
st::msgNameStyle, st::semiboldTextStyle,
user->name(), user->name(),
Ui::NameTextOptions()); Ui::NameTextOptions());
moveBadge(); moveBadge();

@ -1 +1 @@
Subproject commit 8815d7aec9b901191d08445f29e2edd0aeba7b2c Subproject commit 6e923872a4b66767da93f7e388f9fcedf266e1aa

@ -1 +1 @@
Subproject commit d5ec7cc296a074e8e2247ffc825c6d5c8647ed48 Subproject commit 80445f2bd3ebb377b990d2a471021e906e611240