ability to have different vertical and horizontal background

svn path=/trunk/KDE/kdelibs/; revision=938426
This commit is contained in:
Marco Martin 2009-03-11 21:03:50 +00:00
parent 5f49bb2333
commit 2236b76ee4

View File

@ -141,7 +141,13 @@ void Style::drawComplexControl(ComplexControl control,
const QRect slider = const QRect slider =
subControlRect(control, option, SC_ScrollBarSlider, widget).adjusted(1, 0, -1, 0); subControlRect(control, option, SC_ScrollBarSlider, widget).adjusted(1, 0, -1, 0);
if (scrollOption && scrollOption->orientation == Qt::Horizontal && d->scrollbar->hasElement("background-horizontal-center")) {
d->scrollbar->setElementPrefix("background-horizontal");
} else if (scrollOption && scrollOption->orientation == Qt::Vertical && d->scrollbar->hasElement("background-vertical-center")) {
d->scrollbar->setElementPrefix("background-vertical");
} else {
d->scrollbar->setElementPrefix("background"); d->scrollbar->setElementPrefix("background");
}
d->scrollbar->resizeFrame(option->rect.size()); d->scrollbar->resizeFrame(option->rect.size());
d->scrollbar->paintFrame(painter); d->scrollbar->paintFrame(painter);