2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

Most of the new Settings sections filled with widgets.

Some animations added: new scale slider, widget_slide_wrap<TWidget>.
Any TWidget now can resizeToWidth() with overriden resizeGetHeight().
This commit is contained in:
John Preston
2016-08-22 19:16:21 +02:00
parent b9e22f59a1
commit 993b91ac15
50 changed files with 1516 additions and 181 deletions

View File

@@ -2557,9 +2557,7 @@ bool BotKeyboard::forceReply() const {
return _forceReply;
}
void BotKeyboard::resizeToWidth(int newWidth, int maxOuterHeight) {
_maxOuterHeight = maxOuterHeight;
int BotKeyboard::resizeGetHeight(int newWidth) {
updateStyle(newWidth);
_height = st::botKbScroll.deltat + st::botKbScroll.deltab + (_impl ? _impl->naturalHeight() : 0);
if (_maximizeSize) {
@@ -2570,10 +2568,7 @@ void BotKeyboard::resizeToWidth(int newWidth, int maxOuterHeight) {
int implHeight = _height - (st::botKbScroll.deltat + st::botKbScroll.deltab);
_impl->resize(implWidth, implHeight);
}
QSize newSize(newWidth, _height);
if (newSize != size()) {
resize(newSize);
}
return _height;
}
bool BotKeyboard::maximizeSize() const {