summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-01-08 17:19:27 +0000
committerRider Linden <rider@lindenlab.com>2019-01-08 17:19:27 +0000
commit84bb8e1167fde0ceac4c40bcc2b1841238817097 (patch)
treea5669c11b607f16e562f8eb4ff935b0eb3536fc8 /indra
parent721a8d20b73a921a6bb4ac5b9e0d0ca5a870f4fc (diff)
parent89abadaf2f8a4ea76bfe6433d6f3426ca41963dc (diff)
Merged in andreykproductengine/maint-eep (pull request #219)
SL-10280 Added label repositioning code to display percentage in correct places. Approved-by: Maxim Nikolenko <maximnproductengine@lindenlab.com>
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml8
2 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index cb6fd611ec..b27efb56fd 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -354,6 +354,17 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
mCurrentTimeLabel->setTextArg("[DSC]", std::string());
}
+ // Adjust Time&Percentage labels' location according to length
+ LLRect label_rect = getChild<LLTextBox>("p0", true)->getRect();
+ F32 slider_width = mFramesSlider->getRect().getWidth();
+ for (int i = 1; i < max_elm; i++)
+ {
+ LLTextBox *pcnt_label = getChild<LLTextBox>("p" + llformat("%d", i), true);
+ LLRect new_rect = pcnt_label->getRect();
+ new_rect.mLeft = label_rect.mLeft + (S32)(slider_width * (F32)i / (F32)(max_elm - 1)) - (S32)(pcnt_label->getTextPixelWidth() / 2);
+ pcnt_label->setRect(new_rect);
+ }
+
// Altitudes&Track labels
LLUIString formatted_label = getString("sky_track_label");
const LLEnvironment::altitude_list_t &altitudes = LLEnvironment::instance().getRegionAltitudes();
diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
index a6868d7f90..1aea1391d8 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
@@ -191,7 +191,7 @@
follows="left|top|right"
height="15"
layout="topleft"
- left_pad="39"
+ left_pad="37"
name="p1"
top_delta="0"
value="25%[DSC]"
@@ -200,7 +200,7 @@
follows="left|top|right"
height="15"
layout="topleft"
- left_pad="39"
+ left_pad="42"
name="p2"
top_delta="0"
value="50%[DSC]"
@@ -209,7 +209,7 @@
follows="left|top|right"
height="15"
layout="topleft"
- left_pad="39"
+ left_pad="42"
name="p3"
top_delta="0"
value="75%[DSC]"
@@ -218,7 +218,7 @@
follows="left|top|right"
height="15"
layout="topleft"
- left_pad="39"
+ left_pad="42"
name="p4"
top_delta="0"
value="100%[DSC]"