summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lldockablefloater.cpp4
-rw-r--r--indra/llui/lldockablefloater.h2
-rw-r--r--indra/llui/llsearcheditor.cpp7
3 files changed, 8 insertions, 5 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 57baf28dab..a94f0206a6 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -223,10 +223,10 @@ void LLDockableFloater::draw()
LLFloater::draw();
}
-void LLDockableFloater::setDockControl(LLDockControl* dockControl)
+void LLDockableFloater::setDockControl(LLDockControl* dockControl, bool docked /* = true */)
{
mDockControl.reset(dockControl);
- setDocked(mDockControl.get() != NULL && mDockControl.get()->isDockVisible());
+ setDocked(docked && mDockControl.get() != NULL && mDockControl.get()->isDockVisible());
}
const LLUIImagePtr& LLDockableFloater::getDockTongue()
diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h
index 2b1ce99ae2..4d747390af 100644
--- a/indra/llui/lldockablefloater.h
+++ b/indra/llui/lldockablefloater.h
@@ -127,7 +127,7 @@ private:
void resetInstance();
protected:
- void setDockControl(LLDockControl* dockControl);
+ void setDockControl(LLDockControl* dockControl, bool docked = true);
const LLUIImagePtr& getDockTongue();
private:
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
index 6fa99df82e..491eeeab54 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);