basctl/source/basicide/baside2b.cxx | 38 +++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-)
New commits: commit b7570fce38cb5a7b4fc7042d7f8b0bde2c134913 Author: Tomcsik Bence <tomcsikbe...@gmail.com> Date: Mon Feb 13 16:06:03 2012 +0100 Wrong size of 'Remove watch' button at Basic IDE. fdo#44237 This patch resize the nVirtToolBoxHeight in WatchWindow::WatchWindow if the aRemoveWatchButton plus some space is higher than nVirtToolBoxHeight. So the aRemoveWatchButton doesn't go into aHeaderBar. Signed-off-by: Andras Timar <ati...@suse.com> diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index dfef385..2c960bb 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1160,7 +1160,28 @@ WatchWindow::WatchWindow( Window* pParent ) : aXEdit.SetAccessibleName(String(IDEResId( RID_STR_WATCHNAME))); aTreeListBox.SetAccessibleName(String(IDEResId(RID_STR_WATCHNAME))); + long nTextLen = GetTextWidth( aWatchStr ) + DWBORDER + 3; + aXEdit.SetPosPixel( Point( nTextLen, 3 ) ); + aXEdit.SetAccHdl( LINK( this, WatchWindow, EditAccHdl ) ); + aXEdit.GetAccelerator().InsertItem( 1, KeyCode( KEY_RETURN ) ); + aXEdit.GetAccelerator().InsertItem( 2, KeyCode( KEY_ESCAPE ) ); + aXEdit.Show(); + + aRemoveWatchButton.Disable(); + aRemoveWatchButton.SetClickHdl( LINK( this, WatchWindow, ButtonHdl ) ); + aRemoveWatchButton.SetPosPixel( Point( nTextLen + aXEdit.GetSizePixel().Width() + 4, 2 ) ); + Size aSz( aRemoveWatchButton.GetModeImage().GetSizePixel() ); + aSz.Width() += 6; + aSz.Height() += 6; + aRemoveWatchButton.SetSizePixel( aSz ); + aRemoveWatchButton.Show(); + + long nRWBtnSize = aRemoveWatchButton.GetModeImage().GetSizePixel().Height() + 10; nVirtToolBoxHeight = aXEdit.GetSizePixel().Height() + 7; + + if ( nRWBtnSize > nVirtToolBoxHeight ) + nVirtToolBoxHeight = nRWBtnSize; + nHeaderBarHeight = 16; aTreeListBox.SetHelpId(HID_BASICIDE_WATCHWINDOW_LIST); @@ -1192,25 +1213,8 @@ WatchWindow::WatchWindow( Window* pParent ) : aHeaderBar.Show(); - aRemoveWatchButton.Disable(); - aTreeListBox.Show(); - long nTextLen = GetTextWidth( aWatchStr ) + DWBORDER; - aXEdit.SetPosPixel( Point( nTextLen, 3 ) ); - aXEdit.SetAccHdl( LINK( this, WatchWindow, EditAccHdl ) ); - aXEdit.GetAccelerator().InsertItem( 1, KeyCode( KEY_RETURN ) ); - aXEdit.GetAccelerator().InsertItem( 2, KeyCode( KEY_ESCAPE ) ); - aXEdit.Show(); - - aRemoveWatchButton.SetClickHdl( LINK( this, WatchWindow, ButtonHdl ) ); - aRemoveWatchButton.SetPosPixel( Point( nTextLen + aXEdit.GetSizePixel().Width() + 4, 2 ) ); - Size aSz( aRemoveWatchButton.GetModeImage().GetSizePixel() ); - aSz.Width() += 6; - aSz.Height() += 6; - aRemoveWatchButton.SetSizePixel( aSz ); - aRemoveWatchButton.Show(); - SetText( String( IDEResId( RID_STR_WATCHNAME ) ) ); SetHelpId( HID_BASICIDE_WATCHWINDOW ); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits