Cleanup widgets

This commit is contained in:
IlyaShurupov 2024-06-26 11:30:02 +03:00
parent 9e7704a446
commit 15127c5122
19 changed files with 455 additions and 221 deletions

View file

@ -13,7 +13,7 @@ void ScrollBarWidget::eventProcess(const Events& events) {
return;
}
if (events.getScrollY() != 0) {
if (events.getScrollY() != 0 && mArea.isInside(events.getPointer())) {
auto offset = events.getScrollY() < 0 ? 1.0f : -1.0f;
mPositionFraction += mSizeFraction * offset * 0.3f;
mPositionFraction = tp::clamp(mPositionFraction, 0.f, 1.f - mSizeFraction);