[Libreoffice-commits] .: basctl/source
Andras Timar
timar at kemper.freedesktop.org
Mon Feb 13 13:52:51 PST 2012
basctl/source/basicide/baside2b.cxx | 38 +++++++++++++++++++-----------------
1 file changed, 21 insertions(+), 17 deletions(-)
New commits:
commit 1f0784d2b877910b4a8ba3ed599333b5000ef7d0
Author: Tomcsik Bence <tomcsikbence at 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.
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index f74e134..d42a407 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1200,7 +1200,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);
@@ -1232,25 +1253,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 );
More information about the Libreoffice-commits
mailing list