diff options
author | Gergo Mocsi <gmocsi91@gmail.com> | 2013-08-29 12:04:06 +0200 |
---|---|---|
committer | Gergo Mocsi <gmocsi91@gmail.com> | 2013-09-02 18:17:03 +0200 |
commit | d9e81b8540dd932222400663d746a7ecce4823df (patch) | |
tree | 7b733b437b5b5010a510d5dfa5972a46636ff426 /basctl/source | |
parent | 7f9597903f5b5c842fae9b32b06b4d04c2228873 (diff) |
GSOC work, renaming+listbox right side fix
Fixed the small bug in positioning the listbox to the right side.
Function ResizeListBox was renamed to ResizeAndPositionListBox.
Change-Id: I3cea54ad5658ee1628935b4975f52fe78c1ff5c3
Diffstat (limited to 'basctl/source')
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 447d77d5b372..9bafa517d7fd 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -529,7 +529,7 @@ public: void ClearListBox(); void SetTextSelection( const TextSelection& aSel ); const TextSelection& GetTextSelection() const; - void ResizeListBox(); + void ResizeAndPositionListBox(); void SelectFirstEntry(); //selects first entry in ListBox void ClearAndHide(); /* diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 89a22d85ce85..a68e77f069c2 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -880,7 +880,7 @@ void EditorWindow::SetupAndShowCodeCompleteWnd( const std::vector< OUString >& a } // show it pCodeCompleteWnd->Show(); - pCodeCompleteWnd->ResizeListBox(); + pCodeCompleteWnd->ResizeAndPositionListBox(); pCodeCompleteWnd->SelectFirstEntry(); // correct text selection, and set it aSel.GetStart().GetIndex() += 1; @@ -2824,7 +2824,7 @@ const TextSelection& CodeCompleteWindow::GetTextSelection() const return aTextSelection; } -void CodeCompleteWindow::ResizeListBox() +void CodeCompleteWindow::ResizeAndPositionListBox() { if( pListBox->GetEntryCount() >= 1 ) {// if there is at least one element inside @@ -2862,9 +2862,9 @@ void CodeCompleteWindow::ResizeListBox() aPos.Y() -= aSize.getHeight() + nParentFontHeight + nCursorPad; } - if( aVisArea.BottomLeft().getX() + aPos.getX() + aSize.getWidth() > aBottomPoint.getX() ) + if( aVisArea.TopLeft().getX() + aPos.getX() + aSize.getWidth() > aBottomPoint.getX() ) {//clipped at the right side, move it a bit left - aPos.X() -= aSize.getWidth(); + aPos.X() -= aSize.getWidth() + aVisArea.TopLeft().getX(); } //set the position SetPosPixel( aPos ); |