AO wiondow now remembers full/small interface state and sizes.

meow-7.2.2
ZiRee 2011-04-26 23:58:29 +02:00
parent f17cb816d1
commit 37b0ffd5be
3 changed files with 47 additions and 3 deletions

View File

@ -225,6 +225,11 @@ BOOL FloaterAO::postBuild()
updateList();
if(gSavedPerAccountSettings.getBOOL("UseFullAOInterface"))
onClickMore();
else
onClickLess();
return LLDockableFloater::postBuild();
}
@ -620,15 +625,23 @@ void FloaterAO::onClickNext()
void FloaterAO::onClickMore()
{
LLRect fullSize=gSavedPerAccountSettings.getRect("floater_rect_animation_overrider");
LLRect fullSize=gSavedPerAccountSettings.getRect("floater_rect_animation_overrider_full");
LLRect smallSize=getRect();
if(fullSize.getHeight()<getMinHeight())
fullSize.setOriginAndSize(fullSize.mLeft,fullSize.mBottom,fullSize.getWidth(),getRect().getHeight());
if(fullSize.getWidth()<getMinWidth())
fullSize.setOriginAndSize(fullSize.mLeft,fullSize.mBottom,getRect().getWidth(),fullSize.getHeight());
mMore=TRUE;
mSmallInterfacePanel->setVisible(FALSE);
mMainInterfacePanel->setVisible(TRUE);
setCanResize(TRUE);
gSavedPerAccountSettings.setBOOL("UseFullAOInterface",TRUE);
reshape(getRect().getWidth(),fullSize.getHeight());
}
@ -638,16 +651,20 @@ void FloaterAO::onClickLess()
LLRect smallSize=mSmallInterfacePanel->getRect();
smallSize.setLeftTopAndSize(0,0,smallSize.getWidth(),smallSize.getHeight()+getHeaderHeight());
gSavedPerAccountSettings.setRect("floater_rect_animation_overrider_full",fullSize);
mMore=FALSE;
mSmallInterfacePanel->setVisible(TRUE);
mMainInterfacePanel->setVisible(FALSE);
setCanResize(FALSE);
gSavedPerAccountSettings.setBOOL("UseFullAOInterface",FALSE);
reshape(getRect().getWidth(),smallSize.getHeight());
// save current size and position
gSavedPerAccountSettings.setRect("floater_rect_animation_overrider",fullSize);
gSavedPerAccountSettings.setRect("floater_rect_animation_overrider_full",fullSize);
}
// virtual

View File

@ -262,6 +262,33 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>UseFullAOInterface</key>
<map>
<key>Comment</key>
<string>Use the full Animation Overrider interface (TRUE) or the small, reduced interface (FALSE).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>floater_rect_animation_overrider_full</key>
<map>
<key>Comment</key>
<string>Position and size for the full Animation Overrider interface. The defaults are just dummy values.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
</array>
</map>
<!-- End of Firestorm settings -->
</map>
</llsd>

View File

@ -390,7 +390,7 @@
left="10"
top="4"
width="180"
height="45"
height="52"
visible="false"
follows="left|right|top"
layout="topleft">