summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterlagmeter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterlagmeter.cpp')
-rw-r--r--indra/newview/llfloaterlagmeter.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index 3753dcaaa8..100cbdb217 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -64,7 +64,7 @@ BOOL LLFloaterLagMeter::postBuild()
setIsChrome(TRUE);
// were we shrunk last time?
- if (gSavedSettings.getBOOL("LagMeterShrunk"))
+ if (isShrunk())
{
onClickShrink();
}
@@ -122,6 +122,7 @@ BOOL LLFloaterLagMeter::postBuild()
mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps");
// childSetAction("minimize", onClickShrink, this);
+ updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079)
return TRUE;
}
@@ -130,7 +131,7 @@ LLFloaterLagMeter::~LLFloaterLagMeter()
// save shrunk status for next time
// gSavedSettings.setBOOL("LagMeterShrunk", mShrunk);
// expand so we save the large window rectangle
- if (gSavedSettings.getBOOL("LagMeterShrunk"))
+ if (isShrunk())
{
onClickShrink();
}
@@ -205,7 +206,7 @@ void LLFloaterLagMeter::determineNetwork()
// *FIXME: We can't blame a large ping time on anything in
// particular if the frame rate is low, because a low frame
- // rate is a sure recipe for crappy ping times right now until
+ // rate is a sure recipe for bad ping times right now until
// the network handlers are de-synched from the rendering.
F32 client_frame_time_ms = 1000.0f * LLViewerStats::getInstance()->mFPSStat.getMeanDuration();
@@ -312,17 +313,15 @@ void LLFloaterLagMeter::determineServer()
}
}
-
-void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk"
+void LLFloaterLagMeter::updateControls(bool shrink)
{
// LLFloaterLagMeter * self = (LLFloaterLagMeter*)data;
LLButton * button = getChild<LLButton>("minimize");
S32 delta_width = mMaxWidth -mMinWidth;
LLRect r = getRect();
- bool shrunk = gSavedSettings.getBOOL("LagMeterShrunk");
- if(shrunk)
+ if(!shrink)
{
setTitle(getString("max_title_msg", mStringArgs) );
// make left edge appear to expand
@@ -368,5 +367,16 @@ void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk"
// self->childSetVisible("server_help", self->mShrunk);
// self->mShrunk = !self->mShrunk;
- gSavedSettings.setBOOL("LagMeterShrunk", !gSavedSettings.getBOOL("LagMeterShrunk"));
+}
+
+BOOL LLFloaterLagMeter::isShrunk()
+{
+ return gSavedSettings.getBOOL("LagMeterShrunk");
+}
+
+void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk"
+{
+ bool shrunk = isShrunk();
+ updateControls(!shrunk);
+ gSavedSettings.setBOOL("LagMeterShrunk", !shrunk);
}