diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-26 09:50:56 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-26 09:50:56 +0000 |
commit | 044e020bcb7e1dd94f689ba6977bcb07a87d8a35 (patch) | |
tree | cf549fa816d92f90fc5de775cba08d91d30874be /indra/llui | |
parent | 9f079954af9ca80498bf6953d65cc7e77e956f26 (diff) | |
parent | 92facf86d6bf1a7acecdc6e536ac2ad7bcdfdd96 (diff) |
PE merge.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llsearcheditor.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index 8075575bab..ec2ad5e5fa 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -44,17 +44,28 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) S32 srch_btn_top = p.search_button.top_pad + p.search_button.rect.height; S32 srch_btn_right = p.search_button.rect.width + p.search_button.left_pad; LLRect srch_btn_rect(p.search_button.left_pad, srch_btn_top, srch_btn_right, p.search_button.top_pad); + + S32 clr_btn_top = p.clear_button.rect.bottom + p.clear_button.rect.height; + S32 clr_btn_right = getRect().getWidth() - p.clear_button.pad_right; + S32 clr_btn_left = clr_btn_right - p.clear_button.rect.width; + LLRect clear_btn_rect(clr_btn_left, clr_btn_top, clr_btn_right, p.clear_button.rect.bottom); + S32 text_pad_left = p.text_pad_left; + S32 text_pad_right = p.text_pad_right; if (p.search_button_visible) text_pad_left += srch_btn_rect.getWidth(); + if (p.clear_button_visible) + text_pad_right = getRect().getWidth() - clr_btn_left + p.clear_button.pad_left; + // Set up line editor. LLLineEditor::Params line_editor_params(p); line_editor_params.name("filter edit box"); line_editor_params.rect(getLocalRect()); line_editor_params.follows.flags(FOLLOWS_ALL); line_editor_params.text_pad_left(text_pad_left); + line_editor_params.text_pad_right(text_pad_right); line_editor_params.revert_on_esc(false); line_editor_params.commit_callback.function(boost::bind(&LLUICtrl::onCommit, this)); line_editor_params.keystroke_callback(boost::bind(&LLSearchEditor::handleKeystroke, this)); @@ -82,10 +93,6 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) // Set up clear button. 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); |