don't put buttons if the theme doesn't have any
This commit is contained in:
parent
95682718bf
commit
bab9b0a1a3
@ -305,6 +305,26 @@ QRect Style::subControlRect(ComplexControl control, const QStyleOptionComplex *o
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CC_ScrollBar: {
|
||||
const bool hasButtons = d->scrollbar->hasElement("arrow-up");
|
||||
switch (subControl) {
|
||||
//If one of the arrows is missing, don't reserve space for them
|
||||
case SC_ScrollBarAddLine:
|
||||
if (!hasButtons) {
|
||||
rect.setRect(0,0,0,0);
|
||||
}
|
||||
break;
|
||||
|
||||
case SC_ScrollBarSubLine:
|
||||
if (!hasButtons) {
|
||||
rect.setRect(0,0,0,0);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user