MCPcopy Create free account
hub / github.com/Linloir/GraphBuilder / paintEvent

Method paintEvent

customScrollContainer.cpp:29–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void ScrollAreaCustom::paintEvent(QPaintEvent *event){
30 container->resize(this->width(), container->height());
31 if(container->height() > this->height() && container->y() < this->height() - container->height() && curSpd == 0 && bounce->state() == QAbstractAnimation::Stopped)
32 container->move(container->x(), this->height() - container->height());
33 if(container->height() <= this->height()){
34 container->move(container->x(), 0);
35 indicator->hide();
36 }
37 else{
38 indicator->show();
39 }
40 indicator->resize(indicator->width(), (int)((double)this->height() * this->height() / (double)container->height()));
41 indicator->move(this->width() - indicator->width() - 3, -container->y() * this->height() / container->height());
42}
43
44void ScrollAreaCustom::mousePressEvent(QMouseEvent *event){
45 if(container->height() > this->height()){

Callers

nothing calls this directly

Calls 1

moveMethod · 0.80

Tested by

no test coverage detected