Kaydet (Commit) 8ac3b0dd authored tarafından Caolán McNamara's avatar Caolán McNamara

minimize the scrollbar optimal size for the variable direction

Change-Id: Iae8647f5827bee1f0939d3da4e03b5312588bbfd
üst 6a0d5330
...@@ -1455,7 +1455,21 @@ Size ScrollBar::GetOptimalSize() const ...@@ -1455,7 +1455,21 @@ Size ScrollBar::GetOptimalSize() const
{ {
if (mbCalcSize) if (mbCalcSize)
const_cast<ScrollBar*>(this)->ImplCalc(sal_False); const_cast<ScrollBar*>(this)->ImplCalc(sal_False);
return getCurrentCalcSize();
Size aRet = getCurrentCalcSize();
const long nMinThumbSize = GetSettings().GetStyleSettings().GetMinThumbSize();
if (GetStyle() & WB_HORZ)
{
aRet.Width() = maBtn1Rect.GetWidth() + nMinThumbSize + maBtn2Rect.GetWidth();
}
else
{
aRet.Height() = maBtn1Rect.GetHeight() + nMinThumbSize + maBtn2Rect.GetHeight();
}
return aRet;
} }
Size ScrollBar::getCurrentCalcSize() const Size ScrollBar::getCurrentCalcSize() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment