From aeb64da07a094a1d398da85b66726a2a4de8ae6b Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Tue, 6 Jan 2015 10:49:02 -0500 Subject: STORM-2100 Incorrect displays in Script Information window --- doc/contributions.txt | 1 + indra/newview/llfloaterscriptlimits.cpp | 27 +++++++++++++---- .../skins/default/xui/en/floater_script_limits.xml | 3 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 12 ++++---- .../xui/en/panel_script_limits_my_avatar.xml | 12 ++++---- .../xui/en/panel_script_limits_region_memory.xml | 34 +++++++++++----------- 6 files changed, 53 insertions(+), 36 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index db26e50d3f..f1d8522533 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -753,6 +753,7 @@ Jonathan Yap STORM-2099 STORM-2091 STORM-2092 + STORM-2100 Kadah Coba STORM-1060 STORM-1843 diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index eae16b9f03..56d3a266b1 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -523,6 +523,8 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) LLScrollListCell::Params cell_params; cell_params.font = LLFontGL::getFontSansSerif(); + // Start out right justifying numeric displays + cell_params.font_halign = LLFontGL::RIGHT; cell_params.column = "size"; cell_params.value = size; @@ -532,6 +534,8 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) cell_params.value = urls; item_params.columns.add(cell_params); + cell_params.font_halign = LLFontGL::LEFT; + // The rest of the columns are text to left justify them cell_params.column = "name"; cell_params.value = name_buf; item_params.columns.add(cell_params); @@ -546,7 +550,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) cell_params.column = "location"; cell_params.value = has_locations - ? llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z) + ? llformat("<%0.0f, %0.0f, %0.0f>", location_x, location_y, location_z) : ""; item_params.columns.add(cell_params); @@ -623,13 +627,24 @@ void LLPanelScriptLimitsRegionMemory::setRegionSummary(LLSD content) if((mParcelMemoryUsed >= 0) && (mParcelMemoryMax >= 0)) { - S32 parcel_memory_available = mParcelMemoryMax - mParcelMemoryUsed; - LLStringUtil::format_map_t args_parcel_memory; args_parcel_memory["[COUNT]"] = llformat ("%d", mParcelMemoryUsed); - args_parcel_memory["[MAX]"] = llformat ("%d", mParcelMemoryMax); - args_parcel_memory["[AVAILABLE]"] = llformat ("%d", parcel_memory_available); - std::string msg_parcel_memory = LLTrans::getString("ScriptLimitsMemoryUsed", args_parcel_memory); + std::string translate_message; + + if (0 < mParcelMemoryMax) + { + S32 parcel_memory_available = mParcelMemoryMax - mParcelMemoryUsed; + + args_parcel_memory["[MAX]"] = llformat ("%d", mParcelMemoryMax); + args_parcel_memory["[AVAILABLE]"] = llformat ("%d", parcel_memory_available); + translate_message = "ScriptLimitsMemoryUsed"; + } + else + { + translate_message = "ScriptLimitsMemoryUsedSimple"; + } + + std::string msg_parcel_memory = LLTrans::getString(translate_message, args_parcel_memory); getChild("memory_used")->setValue(LLSD(msg_parcel_memory)); } diff --git a/indra/newview/skins/default/xui/en/floater_script_limits.xml b/indra/newview/skins/default/xui/en/floater_script_limits.xml index 6b36cdfcc5..96b2ceec63 100644 --- a/indra/newview/skins/default/xui/en/floater_script_limits.xml +++ b/indra/newview/skins/default/xui/en/floater_script_limits.xml @@ -8,7 +8,8 @@ name="scriptlimits" save_rect="true" title="SCRIPT INFORMATION" - width="480"> + min_width="620" + width="620"> @@ -425,7 +425,7 @@ parameter="destinations" /> @@ -448,7 +448,7 @@ parameter="mini_map" /> + width="620"> + width="620"> Avatar Script Usage + width="620"> + width="620"> + width="620"> Loading... + width="600"> + width="620"> + width="620"> Parcel Script Memory + width="620"> + width="620"> + width="620"> + width="620"> Loading... + width="600">