summaryrefslogtreecommitdiff
path: root/vcl/source/window/brdwin.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-10-08 06:56:07 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2016-12-20 14:19:16 +0100
commit27be8a263eddb54cb6b66cc0f832bfd02016a694 (patch)
treedd8d5bf9c4cc2e627f7f1d36d4b4524477d93d33 /vcl/source/window/brdwin.cxx
parent98e45efa6ab58c67fb3940b9f6fc4b65542d4d6f (diff)
KDE4 fix edit box borders
When recalculating the native window frame borders, calculate using already existing window borders. Otherwise the KDE edit box results in an unlimited recursion for increasing the bounding rects, if the control doesn't fit. Change-Id: I45e51e4796b06097ca537c656f004133dfacd033
Diffstat (limited to 'vcl/source/window/brdwin.cxx')
-rw-r--r--vcl/source/window/brdwin.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index b62eb6a94d5c..f66664a1f1df 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -530,9 +530,11 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
if( mbNWFBorder )
{
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( (const Point&)Point(), Size( mnWidth < 10 ? 10 : mnWidth, mnHeight < 10 ? 10 : mnHeight ) );
- Rectangle aBounds( aCtrlRegion );
- Rectangle aContent( aCtrlRegion );
+ Size aMinSize( mnWidth - mnLeftBorder - mnRightBorder, mnHeight - mnTopBorder - mnBottomBorder );
+ if( aMinSize.Width() < 10 ) aMinSize.setWidth( 10 );
+ if( aMinSize.Height() < 10 ) aMinSize.setHeight( 10 );
+ Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize );
+ Rectangle aBounds, aContent;
if( pWin->GetNativeControlRegion( aCtrlType, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aControlValue, OUString(),
aBounds, aContent ) )