mirror of https://github.com/procxx/kepka.git
Generate fake mouse move event when scrolling the new profiles.
This commit is contained in:
parent
520260f207
commit
6aca90c478
|
@ -115,7 +115,6 @@ void MembersWidget::setVisibleTopBottom(int visibleTop, int visibleBottom) {
|
|||
}
|
||||
|
||||
preloadUserPhotos();
|
||||
updateSelection();
|
||||
}
|
||||
|
||||
int MembersWidget::resizeGetHeight(int newWidth) {
|
||||
|
|
|
@ -124,6 +124,14 @@ void Widget::onScroll() {
|
|||
int scrollTop = _scroll->scrollTop();
|
||||
_inner->setVisibleTopBottom(scrollTop, scrollTop + _scroll->height());
|
||||
_fixedBarShadow->setMode((scrollTop > 0) ? ToggleableShadow::Mode::Shown : ToggleableShadow::Mode::Hidden);
|
||||
|
||||
auto windowHandle = window()->windowHandle();
|
||||
auto globalPoint = QCursor::pos();
|
||||
auto localPoint = windowHandle->mapFromGlobal(globalPoint);
|
||||
QMouseEvent ev(QEvent::MouseMove, localPoint, localPoint, globalPoint, Qt::NoButton, QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers(), Qt::MouseEventSynthesizedByApplication);
|
||||
ev.setTimestamp(getms());
|
||||
|
||||
QGuiApplication::sendEvent(windowHandle, &ev);
|
||||
}
|
||||
|
||||
void Widget::showAnimatedHook() {
|
||||
|
|
Loading…
Reference in New Issue