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.
meow-7.2.2
James Cook 2009-12-11 10:56:49 -08:00
parent a87b99cd95
commit ae9ca1be63
3 changed files with 12 additions and 3 deletions

View File

@ -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);

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
bottom="666"
can_close="true"
can_drag_on_left="false"
can_minimize="true"

View File

@ -9,8 +9,6 @@
background_visible="true"
background_opaque="false"
header_height="25"
top="0"
left="0"
close_image="Icon_Close_Foreground"
restore_image="Icon_Restore_Foreground"
minimize_image="Icon_Minimize_Foreground"