mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Added icon to webview buttons from bot keyboards.
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 663 B |
Binary file not shown.
|
After Width: | Height: | Size: 761 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -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(
|
||||
|
||||
@@ -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 }};
|
||||
|
||||
Reference in New Issue
Block a user