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:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user