diff --git a/Telegram/Resources/icons/inline_button_web.png b/Telegram/Resources/icons/inline_button_web.png new file mode 100644 index 000000000..bfecfa02f Binary files /dev/null and b/Telegram/Resources/icons/inline_button_web.png differ diff --git a/Telegram/Resources/icons/inline_button_web@2x.png b/Telegram/Resources/icons/inline_button_web@2x.png new file mode 100644 index 000000000..9d33b9235 Binary files /dev/null and b/Telegram/Resources/icons/inline_button_web@2x.png differ diff --git a/Telegram/Resources/icons/inline_button_web@3x.png b/Telegram/Resources/icons/inline_button_web@3x.png new file mode 100644 index 000000000..c820324d2 Binary files /dev/null and b/Telegram/Resources/icons/inline_button_web@3x.png differ diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index be923897f..f525acddb 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -143,6 +143,8 @@ void KeyboardStyle::paintButtonIcon( case Type::Buy: return &st->msgBotKbPaymentIcon(); case Type::SwitchInlineSame: case Type::SwitchInline: return &st->msgBotKbSwitchPmIcon(); + case Type::WebView: + case Type::SimpleWebView: return &st->msgBotKbWebviewIcon(); } return nullptr; }(); @@ -174,6 +176,8 @@ int KeyboardStyle::minButtonWidth( case Type::Callback: case Type::CallbackWithPassword: case Type::Game: iconWidth = st::historySendingInvertedIcon.width(); break; + case Type::WebView: + case Type::SimpleWebView: iconWidth = st::msgBotKbWebviewIcon.width(); break; } if (iconWidth > 0) { result = std::max(result, 2 * iconWidth + 4 * int(st::msgBotKbIconPadding)); diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index 57b996bc6..d835af71f 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -483,6 +483,7 @@ msgBotKbIconPadding: 2px; msgBotKbUrlIcon: icon {{ "inline_button_url", msgBotKbIconFg }}; msgBotKbSwitchPmIcon: icon {{ "inline_button_switch", msgBotKbIconFg }}; msgBotKbPaymentIcon: icon {{ "inline_button_card", msgBotKbIconFg }}; +msgBotKbWebviewIcon: icon {{ "inline_button_web", msgBotKbIconFg }}; msgBotKbButton: BotKeyboardButton { margin: 5px; padding: 10px; diff --git a/Telegram/SourceFiles/ui/chat/chat_style.cpp b/Telegram/SourceFiles/ui/chat/chat_style.cpp index 91b6fabaa..5c2a9c270 100644 --- a/Telegram/SourceFiles/ui/chat/chat_style.cpp +++ b/Telegram/SourceFiles/ui/chat/chat_style.cpp @@ -124,6 +124,7 @@ ChatStyle::ChatStyle() { make(_msgBotKbUrlIcon, st::msgBotKbUrlIcon); make(_msgBotKbPaymentIcon, st::msgBotKbPaymentIcon); make(_msgBotKbSwitchPmIcon, st::msgBotKbSwitchPmIcon); + make(_msgBotKbWebviewIcon, st::msgBotKbWebviewIcon); make(_historyFastCommentsIcon, st::historyFastCommentsIcon); make(_historyFastShareIcon, st::historyFastShareIcon); make(_historyGoToOriginalIcon, st::historyGoToOriginalIcon); diff --git a/Telegram/SourceFiles/ui/chat/chat_style.h b/Telegram/SourceFiles/ui/chat/chat_style.h index 49e629f93..e9e176542 100644 --- a/Telegram/SourceFiles/ui/chat/chat_style.h +++ b/Telegram/SourceFiles/ui/chat/chat_style.h @@ -232,6 +232,9 @@ public: [[nodiscard]] const style::icon &msgBotKbSwitchPmIcon() const { return _msgBotKbSwitchPmIcon; } + [[nodiscard]] const style::icon &msgBotKbWebviewIcon() const { + return _msgBotKbWebviewIcon; + } [[nodiscard]] const style::icon &historyFastCommentsIcon() const { return _historyFastCommentsIcon; } @@ -326,6 +329,7 @@ private: style::icon _msgBotKbUrlIcon = { Qt::Uninitialized }; style::icon _msgBotKbPaymentIcon = { Qt::Uninitialized }; style::icon _msgBotKbSwitchPmIcon = { Qt::Uninitialized }; + style::icon _msgBotKbWebviewIcon = { Qt::Uninitialized }; style::icon _historyFastCommentsIcon = { Qt::Uninitialized }; style::icon _historyFastShareIcon = { Qt::Uninitialized }; style::icon _historyGoToOriginalIcon = { Qt::Uninitialized };