Subtract slider width from width for a preview

This caused the generated preview to be larger than the area it is
rendered into and the reason for being scaled down.

REVIEW: 108793
This commit is contained in:
Martin Gräßlin 2013-02-05 10:15:55 +01:00
parent 7d16cef10e
commit b6d92ed4e1

View file

@ -174,7 +174,9 @@ void KWinDecorationModule::init()
int KWinDecorationModule::itemWidth() const
{
return m_ui->decorationList->rootObject()->property("width").toInt();
const int width = m_ui->decorationList->rootObject()->property("width").toInt();
const int sliderWidth = m_ui->decorationList->verticalScrollBar()->width();
return width - sliderWidth;
}
// This is the selection handler setting