SL-10280 Added label repositioning code to display percentage in correct places.
parent
1871f03d12
commit
89abadaf2f
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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]"
|
||||
|
|
|
|||
Loading…
Reference in New Issue