summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
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]"