From 0c7e91205f9b2fc8fe55e5a65f4bfa908d105c37 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 24 Feb 2012 16:57:12 -0800 Subject: 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 --- indra/llui/llfloaterreg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llfloaterreg.cpp') 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) { -- cgit v1.2.3 From fbfad41587a8ba723348eb848a7366f02da87052 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 27 Feb 2012 13:06:10 -0800 Subject: EXP-1181 FIX As a designer, I would like to specify default floater positions using relative coordinates store and load floater relative positions --- indra/llui/llfloaterreg.cpp | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'indra/llui/llfloaterreg.cpp') diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 7729e855ba..ef55e74166 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -358,9 +358,7 @@ void LLFloaterReg::restoreVisibleInstances() //static std::string LLFloaterReg::getRectControlName(const std::string& name) { - std::string res = std::string("floater_rect_") + name; - LLStringUtil::replaceChar( res, ' ', '_' ); - return res; + return std::string("floater_rect_") + getBaseControlName(name); } //static @@ -368,19 +366,48 @@ std::string LLFloaterReg::declareRectControl(const std::string& name) { std::string controlname = getRectControlName(name); LLFloater::getControlGroup()->declareRect(controlname, LLRect(), - llformat("Window Position and Size for %s", name.c_str()), + llformat("Window Size for %s", name.c_str()), TRUE); return controlname; } +std::string LLFloaterReg::declarePosXControl(const std::string& name) +{ + std::string controlname = std::string("floater_pos_x_") + getBaseControlName(name); + LLFloater::getControlGroup()->declareF32(controlname, + 10.f, + llformat("Window X Position for %s", name.c_str()), + TRUE); + return controlname; +} + +std::string LLFloaterReg::declarePosYControl(const std::string& name) +{ + std::string controlname = std::string("floater_pos_y_") + getBaseControlName(name); + LLFloater::getControlGroup()->declareF32(controlname, + 10.f, + llformat("Window Y Position for %s", name.c_str()), + TRUE); + + return controlname; +} + + //static std::string LLFloaterReg::getVisibilityControlName(const std::string& name) { - std::string res = std::string("floater_vis_") + name; + return std::string("floater_vis_") + getBaseControlName(name); +} + +//static +std::string LLFloaterReg::getBaseControlName(const std::string& name) +{ + std::string res(name); LLStringUtil::replaceChar( res, ' ', '_' ); return res; } + //static std::string LLFloaterReg::declareVisibilityControl(const std::string& name) { -- cgit v1.2.3 From b9521a38f11dd9f44f216adb7d02263d25272572 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Mar 2012 15:00:48 -0700 Subject: CHUI-59 FIX Floater stacking offset only occurs first time a floater is opened changed stacking logic to attempt to stack against any floater that is cascade head *or* in a cascade group --- indra/llui/llfloaterreg.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llui/llfloaterreg.cpp') diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index ef55e74166..3d124cf885 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -96,7 +96,9 @@ LLFloater* LLFloaterReg::getLastFloaterCascading() { LLFloater* inst = *iter; - if (inst->getVisible() && inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADING)) + if (inst->getVisible() + && (inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADING) + || inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADE_GROUP))) { if (candidate_rect.mTop > inst->getRect().mTop) { -- cgit v1.2.3 From 5f90875a9e92c7c92f92a32e64908a776fce64c6 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 16 Mar 2012 17:52:28 -0700 Subject: EXP-1181 FIX as a designer I would like to specify default floater positions using realtive coordinates changed settings naming scheme for floater positioning so that related settings appear together in file --- indra/llui/llfloaterreg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/llfloaterreg.cpp') diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 3d124cf885..9115eb7174 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -375,7 +375,7 @@ std::string LLFloaterReg::declareRectControl(const std::string& name) std::string LLFloaterReg::declarePosXControl(const std::string& name) { - std::string controlname = std::string("floater_pos_x_") + getBaseControlName(name); + std::string controlname = std::string("floater_pos_") + getBaseControlName(name) + "_x"; LLFloater::getControlGroup()->declareF32(controlname, 10.f, llformat("Window X Position for %s", name.c_str()), @@ -385,7 +385,7 @@ std::string LLFloaterReg::declarePosXControl(const std::string& name) std::string LLFloaterReg::declarePosYControl(const std::string& name) { - std::string controlname = std::string("floater_pos_y_") + getBaseControlName(name); + std::string controlname = std::string("floater_pos_") + getBaseControlName(name) + "_y"; LLFloater::getControlGroup()->declareF32(controlname, 10.f, llformat("Window Y Position for %s", name.c_str()), -- cgit v1.2.3