From ae9ca1be630e47e2314eabf9b8edb16eadda9828 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 11 Dec 2009 10:56:49 -0800 Subject: EXT-3313 Media Settings window has no background if viewer is too short Code to set default floater position to top-left was causing incorrect floater height computation when floater XML specified a bottom coordinate. Reviewed with Callum. --- indra/llui/llfloater.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/llui/llfloater.cpp') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index fd7b64af02..e822b4843c 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2703,6 +2703,18 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr o output_node, output_params, &default_params); } + // Default floater position to top-left corner of screen + // However, some legacy floaters have explicit top or bottom + // coordinates set, so respect their wishes. + if (!params.rect.top.isProvided() && !params.rect.bottom.isProvided()) + { + params.rect.top.set(0); + } + if (!params.rect.left.isProvided() && !params.rect.right.isProvided()) + { + params.rect.left.set(0); + } + setupParams(params, parent); initFromParams(params); -- cgit v1.2.3 From 401a51cac130a317204c2df9dd571fca92a861c3 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 11 Dec 2009 13:50:54 -0800 Subject: note to get rid of hack --- indra/llui/llfloater.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llfloater.cpp') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index fd7b64af02..9037578077 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1649,6 +1649,7 @@ void LLFloater::draw() } else { + //FIXME: get rid of this hack // draw children LLView* focused_child = dynamic_cast(gFocusMgr.getKeyboardFocus()); BOOL focused_child_visible = FALSE; -- cgit v1.2.3