mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Profile members block displayed when mouse is over group members count.
This commit is contained in:
@@ -127,9 +127,9 @@ return qobject_cast<TWidget*>(parentWidget()); \
|
||||
const TWidget *tparent() const { \
|
||||
return qobject_cast<const TWidget*>(parentWidget()); \
|
||||
} \
|
||||
virtual void leaveToChildEvent(QEvent *e) { /* e -- from enterEvent() of child TWidget */ \
|
||||
virtual void leaveToChildEvent(QEvent *e, QWidget *child) { /* e -- from enterEvent() of child TWidget */ \
|
||||
} \
|
||||
virtual void enterFromChildEvent(QEvent *e) { /* e -- from leaveEvent() of child TWidget */ \
|
||||
virtual void enterFromChildEvent(QEvent *e, QWidget *child) { /* e -- from leaveEvent() of child TWidget */ \
|
||||
} \
|
||||
void moveToLeft(int x, int y, int outerw = 0) { \
|
||||
move(rtl() ? ((outerw > 0 ? outerw : parentWidget()->width()) - x - width()) : x, y); \
|
||||
@@ -158,12 +158,12 @@ void rtlupdate(int x, int y, int w, int h) { \
|
||||
protected: \
|
||||
void enterEvent(QEvent *e) override { \
|
||||
TWidget *p(tparent()); \
|
||||
if (p) p->leaveToChildEvent(e); \
|
||||
if (p) p->leaveToChildEvent(e, this); \
|
||||
return enterEventHook(e); \
|
||||
} \
|
||||
void leaveEvent(QEvent *e) override { \
|
||||
TWidget *p(tparent()); \
|
||||
if (p) p->enterFromChildEvent(e); \
|
||||
if (p) p->enterFromChildEvent(e, this); \
|
||||
return leaveEventHook(e); \
|
||||
}
|
||||
|
||||
@@ -199,6 +199,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~TWidget() {
|
||||
}
|
||||
|
||||
protected:
|
||||
void enterEventHook(QEvent *e) {
|
||||
return QWidget::enterEvent(e);
|
||||
|
Reference in New Issue
Block a user