summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-02-12 16:26:52 +0200
committerMike Antipov <mantipov@productengine.com>2010-02-12 16:26:52 +0200
commit951fd66000a22d65c76d44f5de5e38a76513b528 (patch)
tree73f7a9cf89b06627ee658b856f294a98377f3ef7 /indra
parent5a5262bbdc72f5040cd681b452417c29c86cfafe (diff)
Completed normal task EXT-3410 (Liberate filter_editor clear_button height width parameters - art is distorted)
- improved calculation of clear_button position (to be xml driven) - replaced clear_button art with suggested Icon_Close_Toast in filter_editor widget --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llsearcheditor.cpp6
-rw-r--r--indra/newview/skins/default/xui/en/widgets/filter_editor.xml4
-rw-r--r--indra/newview/skins/default/xui/en/widgets/search_editor.xml8
3 files changed, 12 insertions, 6 deletions
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
index 838dbbd135..491eeeab54 100644
--- a/indra/llui/llsearcheditor.cpp
+++ b/indra/llui/llsearcheditor.cpp
@@ -80,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);
diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
index 1228f6be3d..0720621f0b 100644
--- a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
@@ -16,6 +16,6 @@
image_unselected="Search"
image_selected="Search" />
<clear_button label=""
- image_unselected="Icon_Close_Foreground"
- image_selected="Icon_Close_Press" />
+ image_unselected="Icon_Close_Toast"
+ image_selected="Icon_Close_Toast" />
</filter_editor>
diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
index 1616e4c3f7..a9a760b3a4 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
@@ -15,7 +15,11 @@
height="13"
image_unselected="Search"
image_selected="Search" />
- <clear_button
+ <clear_button
+ bottom="4"
+ height="16"
image_unselected="Icon_Close_Foreground"
- image_selected="Icon_Close_Press" />
+ image_selected="Icon_Close_Press"
+ pad_right="4"
+ width="16" />
</search_editor>