diff options
| author | Palmer Truelson <palmer@lindenlab.com> | 2010-02-23 17:19:58 -0800 |
|---|---|---|
| committer | Palmer Truelson <palmer@lindenlab.com> | 2010-02-23 17:19:58 -0800 |
| commit | 54a95f706fe42cbef272c53e3fadfc2cf7ecfd0f (patch) | |
| tree | d9b1f05ce695fa3ef5ee41949d3799d4e9a3e050 /indra/llui/llsearcheditor.cpp | |
| parent | 7885748497d8b95f51c65f7f84a40d1405429616 (diff) | |
| parent | 0980df1e0ce99bdafdd4e806cbacad96c71729cc (diff) | |
merge
Diffstat (limited to 'indra/llui/llsearcheditor.cpp')
| -rw-r--r-- | indra/llui/llsearcheditor.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index 6fa99df82e..8075575bab 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -60,6 +60,7 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) line_editor_params.keystroke_callback(boost::bind(&LLSearchEditor::handleKeystroke, this)); mSearchEditor = LLUICtrlFactory::create<LLLineEditor>(line_editor_params); + mSearchEditor->setPassDelete(TRUE); addChild(mSearchEditor); if (p.search_button_visible) @@ -79,10 +80,12 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) if (p.clear_button_visible) { // Set up clear button. - S32 clr_btn_width = getRect().getHeight(); // button is square, and as tall as search editor - LLRect clear_btn_rect(getRect().getWidth() - clr_btn_width, getRect().getHeight(), getRect().getWidth(), 0); LLButton::Params clr_btn_params(p.clear_button); clr_btn_params.name(std::string("clear button")); + S32 clr_btn_top = clr_btn_params.rect.bottom + clr_btn_params.rect.height; + S32 clr_btn_right = getRect().getWidth() - clr_btn_params.pad_right; + S32 clr_btn_left = clr_btn_right - clr_btn_params.rect.width; + LLRect clear_btn_rect(clr_btn_left, clr_btn_top, clr_btn_right, p.clear_button.rect.bottom); clr_btn_params.rect(clear_btn_rect) ; clr_btn_params.follows.flags(FOLLOWS_RIGHT|FOLLOWS_TOP); clr_btn_params.tab_stop(false); @@ -153,7 +156,7 @@ void LLSearchEditor::setFocus( BOOL b ) void LLSearchEditor::onClearButtonClick(const LLSD& data) { setText(LLStringUtil::null); - mSearchEditor->doDelete(); // force keystroke callback + mSearchEditor->onCommit(); // force keystroke callback } void LLSearchEditor::handleKeystroke() |
