2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Added type voice for inline bots, fixed keyboard buttons bug.

This commit is contained in:
John Preston
2016-04-11 08:02:39 +04:00
parent 2b58e4d3a8
commit 00367ec07a
3 changed files with 14 additions and 10 deletions

View File

@@ -2587,7 +2587,8 @@ void ReplyKeyboard::resize(int width, int height) {
int buttonw = qMax(button.text.maxWidth(), 1);
float64 textw = exact ? buttonw : (widthForText / float64(s));
float64 minw = _st->minButtonWidth(button.type);
float64 w = minw + qMax(textw, 0.);
float64 w = minw + textw;
accumulate_max(w, 2 * float64(_st->buttonPadding()));
int rectx = static_cast<int>(std::floor(x));
int rectw = static_cast<int>(std::floor(x + w)) - rectx;