| 199 | } |
| 200 | |
| 201 | void ScrollAreaCustom::scrollIndicator(int dp){ |
| 202 | int newY = container->y() - dp * container->height() / this->height(); |
| 203 | if(newY > 0) |
| 204 | newY = 0; |
| 205 | else if(newY < this->height() - container->height()) |
| 206 | newY = this->height() - container->height(); |
| 207 | container->move(container->x(), newY); |
| 208 | update(); |
| 209 | } |
| 210 | |
| 211 | void ScrollAreaCustom::wheelEvent(QWheelEvent *event){ |
| 212 | if(container->y() > 0 || container->y() + container->height() < this->height()) |