From 96c1a0e3540d0e7a8a40fd2ec1e82604f6201c01 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Tue, 13 Dec 2011 17:48:22 +0000 Subject: adjust multiline button and scrollbar size/positions --- sc/source/ui/app/inputwin.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 5843cda72755..a324994f1a69 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -873,7 +873,8 @@ ScInputBarGroup::ScInputBarGroup(Window* pParent, ScTabViewShell* pViewSh) // too bad at the size from 'Settings' for me // set button width to scrollbar width then for the moment aButton.SetClickHdl ( LINK( this, ScInputBarGroup, ClickHdl ) ); - aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), aMultiTextWnd.GetPixelHeightForLines(1)) ); + // Add 2 pixels to compensate for the fact that scrollbar of the same width doesn't quite match + aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize() + 2, aMultiTextWnd.GetPixelHeightForLines(1)) ); aButton.Enable(); aButton.SetSymbol( SYMBOL_SPIN_DOWN ); aButton.SetQuickHelpText( ScResId( SCSTR_QHELP_EXPAND_FORMULA ) ); @@ -928,7 +929,7 @@ void ScInputBarGroup::Resize() Size aSize = GetSizePixel(); aSize.Width() = Max( ((long)(nWidth - nLeft - LEFT_OFFSET)), (long)0 ); - aScrollBar.SetPosPixel(Point(aSize.Width()- ( aButton.GetSizePixel().Width() ) + 1, aButton.GetSizePixel().Height() - 1 )); + aScrollBar.SetPosPixel(Point( aSize.Width() - aButton.GetSizePixel().Width() + 2, aButton.GetSizePixel().Height() ) ); Size aTmpSize( aSize ); aTmpSize.Width() = aTmpSize.Width() - aButton.GetSizePixel().Width(); -- cgit