summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorTomcsik Bence <tomcsikbence@gmail.com>2012-02-13 16:06:03 +0100
committerAndras Timar <atimar@suse.com>2012-02-13 22:52:43 +0100
commit1f0784d2b877910b4a8ba3ed599333b5000ef7d0 (patch)
tree9d33d5f11778c6f7cbc82d310c0a0318188335cd /basctl
parent80a72c4cc7edc6b4c0b88d841500617cd733cbf7 (diff)
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.
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2b.cxx38
1 files changed, 21 insertions, 17 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index f74e134d56eb..d42a407a405f 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 );