mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 13:47:05 +02:00
Show copy-to-clipboard button tooltip.
This commit is contained in:
parent
3fa88fad79
commit
89c35e8512
2 changed files with 9 additions and 0 deletions
|
@ -5607,6 +5607,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
"lng_bot_earn_credits_out_minimal" = "You cannot withdraw less than {link}.";
|
||||
"lng_bot_earn_credits_out_minimal_link#one" = "{count} star";
|
||||
"lng_bot_earn_credits_out_minimal_link#other" = "{count} stars";
|
||||
"lng_bot_copy_text_tooltip" = "Copy to Clipboard: {text}";
|
||||
|
||||
"lng_contact_add" = "Add";
|
||||
"lng_contact_send_message" = "Message";
|
||||
|
|
|
@ -651,6 +651,14 @@ QString ReplyMarkupClickHandler::buttonText() const {
|
|||
}
|
||||
|
||||
QString ReplyMarkupClickHandler::tooltip() const {
|
||||
if (const auto button = getButton()) {
|
||||
if (button->type == HistoryMessageMarkupButton::Type::CopyText) {
|
||||
return tr::lng_bot_copy_text_tooltip(
|
||||
tr::now,
|
||||
lt_text,
|
||||
st::wrap_rtl(QString::fromUtf8(button->data)));
|
||||
}
|
||||
}
|
||||
const auto button = getUrlButton();
|
||||
const auto url = button ? QString::fromUtf8(button->data) : QString();
|
||||
const auto text = _fullDisplayed ? QString() : buttonText();
|
||||
|
|
Loading…
Add table
Reference in a new issue