diff options
author | brad kittenbrink <brad@lindenlab.com> | 2009-08-05 18:45:18 -0700 |
---|---|---|
committer | brad kittenbrink <brad@lindenlab.com> | 2009-08-05 18:45:18 -0700 |
commit | a8d216e194327c7bee8a42c983f7f2ca01adb385 (patch) | |
tree | 76819d6e78c7e7cf0c5e54d319847f4731c77205 /indra/llui/llsearcheditor.cpp | |
parent | 860a82863966435bea680d8541f051e99a6c226c (diff) | |
parent | 24d146a9ff26af1f3e4cf5af2c5238ca42e2c6c7 (diff) |
Merged in my DEV-35401 "doubleton" fix.
Diffstat (limited to 'indra/llui/llsearcheditor.cpp')
-rw-r--r-- | indra/llui/llsearcheditor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index 3516712dc9..fbcbb55b85 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -39,20 +39,20 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) : LLUICtrl(p) { - const S32 fudge = 2; - S32 btn_height = getRect().getHeight() - (fudge * 2); + S32 btn_top = p.search_button.top_pad + p.search_button.rect.height; + S32 btn_right = p.search_button.rect.width + p.search_button.left_pad; + LLRect search_btn_rect(p.search_button.left_pad, btn_top, btn_right, p.search_button.top_pad); 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(btn_height + fudge); + line_editor_params.text_pad_left(p.text_pad_left + search_btn_rect.getWidth()); line_editor_params.commit_callback.function(boost::bind(&LLUICtrl::onCommit, this)); mSearchEditor = LLUICtrlFactory::create<LLLineEditor>(line_editor_params); addChild(mSearchEditor); - LLRect search_btn_rect(fudge, fudge + btn_height, fudge + btn_height, fudge); LLButton::Params button_params(p.search_button); button_params.name(std::string("clear filter")); button_params.rect(search_btn_rect) ; |