2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fixed scrolling by a child widget in ScrollArea by touch screen.

ScrollArea now always generates MouseMove when scrolled.
Fixed crash in BotKeyboard resizing with style change.
Fixed stickers box animations.
This commit is contained in:
John Preston
2016-06-15 20:13:46 +03:00
parent a058b6e3a6
commit 84f704448a
16 changed files with 94 additions and 74 deletions

View File

@@ -159,12 +159,12 @@ protected: \
void enterEvent(QEvent *e) override { \
TWidget *p(tparent()); \
if (p) p->leaveToChildEvent(e); \
return QWidget::enterEvent(e); \
return enterEventHook(e); \
} \
void leaveEvent(QEvent *e) override { \
TWidget *p(tparent()); \
if (p) p->enterFromChildEvent(e); \
return QWidget::leaveEvent(e); \
return leaveEventHook(e); \
}
class TWidget : public QWidget {
@@ -199,6 +199,14 @@ public:
}
}
protected:
void enterEventHook(QEvent *e) {
return QWidget::enterEvent(e);
}
void leaveEventHook(QEvent *e) {
return QWidget::leaveEvent(e);
}
};
void myEnsureResized(QWidget *target);
@@ -330,3 +338,9 @@ private:
T *_widget;
};
void sendSynteticMouseEvent(QWidget *widget, QEvent::Type type, Qt::MouseButton button, const QPoint &globalPoint);
inline void sendSynteticMouseEvent(QWidget *widget, QEvent::Type type, Qt::MouseButton button) {
return sendSynteticMouseEvent(widget, type, button, QCursor::pos());
}