summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateruipreview.cpp
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2012-01-30 22:27:01 -0500
committerDebi King (Dessie) <dessie@lindenlab.com>2012-01-30 22:27:01 -0500
commita39937f9303ce2100ebb40d6fcaa8d36a14e3cb7 (patch)
tree3c0d951cafadbd90c736cfbb9e2e4329d05407c7 /indra/newview/llfloateruipreview.cpp
parent6298daf266369dbd3600c5fdf287f9c680b2a897 (diff)
parentbd4c629e38aa2ab7223a5ef3b8e23ad91229b512 (diff)
merge
Diffstat (limited to 'indra/newview/llfloateruipreview.cpp')
-rw-r--r--indra/newview/llfloateruipreview.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 4c9c4cb154..d741b5b133 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -915,14 +915,16 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
{
panel->buildFromFile(path); // build it
LLRect new_size = panel->getRect(); // get its rectangle
- panel->setOrigin(0,0); // reset its origin point so it's not offset by -left or other XUI attributes
+ panel->setOrigin(2,2); // reset its origin point so it's not offset by -left or other XUI attributes
(*floaterp)->setTitle(path); // use the file name as its title, since panels have no guaranteed meaningful name attribute
panel->setUseBoundingRect(TRUE); // enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements)
panel->updateBoundingRect(); // update bounding rect
LLRect bounding_rect = panel->getBoundingRect(); // get the bounding rect
LLRect new_rect = panel->getRect(); // get the panel's rect
new_rect.unionWith(bounding_rect); // union them to make sure we get the biggest one possible
- (*floaterp)->reshape(new_rect.getWidth(), new_rect.getHeight() + floater_header_size); // reshape floater to match the union rect's dimensions
+ LLRect floater_rect = new_rect;
+ floater_rect.stretch(4, 4);
+ (*floaterp)->reshape(floater_rect.getWidth(), floater_rect.getHeight() + floater_header_size); // reshape floater to match the union rect's dimensions
panel->reshape(new_rect.getWidth(), new_rect.getHeight()); // reshape panel to match the union rect's dimensions as well (both are needed)
(*floaterp)->addChild(panel); // add panel as child
(*floaterp)->openFloater(); // open floater (needed?)