diff --git a/Telegram/Resources/icons/chat/markup_webview.png b/Telegram/Resources/icons/chat/markup_webview.png new file mode 100644 index 000000000..801937d7c Binary files /dev/null and b/Telegram/Resources/icons/chat/markup_webview.png differ diff --git a/Telegram/Resources/icons/chat/markup_webview@2x.png b/Telegram/Resources/icons/chat/markup_webview@2x.png new file mode 100644 index 000000000..068f4f00b Binary files /dev/null and b/Telegram/Resources/icons/chat/markup_webview@2x.png differ diff --git a/Telegram/Resources/icons/chat/markup_webview@3x.png b/Telegram/Resources/icons/chat/markup_webview@3x.png new file mode 100644 index 000000000..d52aa42c9 Binary files /dev/null and b/Telegram/Resources/icons/chat/markup_webview@3x.png differ diff --git a/Telegram/SourceFiles/history/history_item_components.cpp b/Telegram/SourceFiles/history/history_item_components.cpp index 7ea8597bb..2fe99415b 100644 --- a/Telegram/SourceFiles/history/history_item_components.cpp +++ b/Telegram/SourceFiles/history/history_item_components.cpp @@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/chat/chat_style.h" #include "ui/chat/chat_theme.h" #include "ui/painter.h" +#include "ui/rect.h" #include "ui/power_saving.h" #include "history/history.h" #include "history/history_item.h" @@ -1080,7 +1081,22 @@ void ReplyKeyboard::Style::paintButton( tx += (tw - st::botKbStyle.font->elidew) / 2; tw = st::botKbStyle.font->elidew; } - button.text.drawElided(p, tx, rect.y() + _st->textTop + ((rect.height() - _st->height) / 2), tw, 1, style::al_top); + button.text.drawElided( + p, + tx, + rect.y() + _st->textTop + ((rect.height() - _st->height) / 2), + tw, + 1, + style::al_top); + if (button.type == HistoryMessageMarkupButton::Type::SimpleWebView) { + const auto &icon = st::markupWebview; + st::markupWebview.paint( + p, + rect::right(rect) - icon.width() - _st->padding / 2, + rect.y() + _st->padding / 2, + rect.width(), + p.pen().color()); + } } void HistoryMessageReplyMarkup::createForwarded( diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index 3dda7dd8b..d6b30390c 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -1219,3 +1219,5 @@ chatUniqueTextPadding: margins(12px, 2px, 12px, 8px); chatUniqueTableSkip: 9px; chatUniqueRowSkip: 4px; chatUniqueButtonPadding: margins(12px, 4px, 12px, 16px); + +markupWebview: icon {{ "chat/markup_webview", windowFg }};