summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-02-24 16:57:12 -0800
committerRichard Linden <none@none>2012-02-24 16:57:12 -0800
commit0c7e91205f9b2fc8fe55e5a65f4bfa908d105c37 (patch)
tree6650cb18b1376f5417ea1bd627a75e8cfb81f8c3 /indra
parent0fc6c5df969681659b1cc20bf06e9b1f8708d7a4 (diff)
EXP-1181 FIX As a designer, I would like to specify default floater positions using relative coordinates
fixed bug where resizing window would cause stacked floaters to move relative to each other renamed positioning enums to reflect the fact that they apply all the time now, not just when opening floaters
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llfloater.cpp32
-rw-r--r--indra/llui/llfloater.h12
-rw-r--r--indra/llui/llfloaterreg.cpp2
-rw-r--r--indra/newview/llviewerwindow.cpp2
4 files changed, 25 insertions, 23 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 992f7e1602..65bd63a187 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -68,10 +68,10 @@ namespace LLInitParam
{
void TypeValues<LLFloaterEnums::EOpenPositioning>::declareValues()
{
- declare("relative", LLFloaterEnums::OPEN_POSITIONING_RELATIVE);
- declare("cascading", LLFloaterEnums::OPEN_POSITIONING_CASCADING);
- declare("centered", LLFloaterEnums::OPEN_POSITIONING_CENTERED);
- declare("specified", LLFloaterEnums::OPEN_POSITIONING_SPECIFIED);
+ declare("relative", LLFloaterEnums::POSITIONING_RELATIVE);
+ declare("cascading", LLFloaterEnums::POSITIONING_CASCADING);
+ declare("centered", LLFloaterEnums::POSITIONING_CENTERED);
+ declare("specified", LLFloaterEnums::POSITIONING_SPECIFIED);
}
}
@@ -177,7 +177,7 @@ LLFloater::Params::Params()
save_visibility("save_visibility", false),
can_dock("can_dock", false),
show_title("show_title", true),
- positioning("positioning", LLFloaterEnums::OPEN_POSITIONING_RELATIVE),
+ positioning("positioning", LLFloaterEnums::POSITIONING_RELATIVE),
header_height("header_height", 0),
legacy_header_height("legacy_header_height", 0),
close_image("close_image"),
@@ -873,7 +873,7 @@ bool LLFloater::applyRectControl()
{
// other floaters in our group, position ourselves relative to them and don't save the rect
mRectControl.clear();
- mPositioning = LLFloaterEnums::OPEN_POSITIONING_CASCADE_GROUP;
+ mPositioning = LLFloaterEnums::POSITIONING_CASCADE_GROUP;
}
else if (mRectControl.size() > 1)
{
@@ -912,16 +912,16 @@ void LLFloater::applyPositioning(LLFloater* other)
// Otherwise position according to the positioning code
switch (mPositioning)
{
- case LLFloaterEnums::OPEN_POSITIONING_CENTERED:
+ case LLFloaterEnums::POSITIONING_CENTERED:
center();
break;
- case LLFloaterEnums::OPEN_POSITIONING_SPECIFIED:
+ case LLFloaterEnums::POSITIONING_SPECIFIED:
//translateIntoRect(gFloaterView->getSnapRect());
break;
- case LLFloaterEnums::OPEN_POSITIONING_CASCADE_GROUP:
- case LLFloaterEnums::OPEN_POSITIONING_CASCADING:
+ case LLFloaterEnums::POSITIONING_CASCADE_GROUP:
+ case LLFloaterEnums::POSITIONING_CASCADING:
if (other != NULL && other != this)
{
stackWith(*other);
@@ -942,12 +942,12 @@ void LLFloater::applyPositioning(LLFloater* other)
translate(snap_rect.mLeft, snap_rect.mBottom);
//translateIntoRect(snap_rect);
}
- mPositioning = LLFloaterEnums::OPEN_POSITIONING_SPECIFIED;
+ mPositioning = LLFloaterEnums::POSITIONING_SPECIFIED;
setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
break;
- case LLFloaterEnums::OPEN_POSITIONING_RELATIVE:
+ case LLFloaterEnums::POSITIONING_RELATIVE:
{
LLRect snap_rect = gFloaterView->getSnapRect();
LLRect floater_view_screen_rect = gFloaterView->calcScreenRect();
@@ -1076,7 +1076,7 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
if (by_user && !isMinimized())
{
storeRectControl();
- mPositioning = LLFloaterEnums::OPEN_POSITIONING_RELATIVE;
+ mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
LLRect screen_rect = calcScreenRect();
mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
}
@@ -1596,7 +1596,7 @@ void LLFloater::setDocked(bool docked, bool pop_on_undock)
if (mDocked)
{
setMinimized(FALSE);
- mPositioning = LLFloaterEnums::OPEN_POSITIONING_RELATIVE;
+ mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
}
updateTitleButtons();
@@ -2977,7 +2977,7 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
LLPanel::initFromParams(p);
// override any follows flags
- if (mPositioning != LLFloaterEnums::OPEN_POSITIONING_SPECIFIED)
+ if (mPositioning != LLFloaterEnums::POSITIONING_SPECIFIED)
{
setFollows(FOLLOWS_NONE);
}
@@ -3279,7 +3279,7 @@ void LLFloater::stackWith(LLFloater& other)
setShape(next_rect);
- other.mPositioning = LLFloaterEnums::OPEN_POSITIONING_SPECIFIED;
+ other.mPositioning = LLFloaterEnums::POSITIONING_SPECIFIED;
other.setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 9b26adde40..48dc290a93 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -64,12 +64,12 @@ namespace LLFloaterEnums
{
enum EOpenPositioning
{
- OPEN_POSITIONING_RELATIVE,
- OPEN_POSITIONING_CASCADING,
- OPEN_POSITIONING_CASCADE_GROUP,
- OPEN_POSITIONING_CENTERED,
- OPEN_POSITIONING_SPECIFIED,
- OPEN_POSITIONING_COUNT
+ POSITIONING_RELATIVE,
+ POSITIONING_CASCADING,
+ POSITIONING_CASCADE_GROUP,
+ POSITIONING_CENTERED,
+ POSITIONING_SPECIFIED,
+ POSITIONING_COUNT
};
}
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index e144b68f5e..7729e855ba 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -96,7 +96,7 @@ LLFloater* LLFloaterReg::getLastFloaterCascading()
{
LLFloater* inst = *iter;
- if (inst->getVisible() && inst->isPositioning(LLFloaterEnums::OPEN_POSITIONING_CASCADING))
+ if (inst->getVisible() && inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADING))
{
if (candidate_rect.mTop > inst->getRect().mTop)
{
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b1b6abe723..9a9f8fd013 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2170,6 +2170,8 @@ void LLViewerWindow::reshape(S32 width, S32 height)
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width);
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_HEIGHT, (F64)height);
+
+ LLLayoutStack::updateClass();
}
}