summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-05-26 17:45:01 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-05-26 17:45:01 +0300
commit293f5184811abdf5a9a41db490a58389dc3523fb (patch)
tree06c7d9a4712bf88389990660b17ea563825b0c9c /indra/newview
parent2938b8238c4c937b18faf2595532cb60a4071712 (diff)
SL-13279 Changes in Landmarks view UI - clarify that Notes are editable
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp9
-rw-r--r--indra/newview/llpanellandmarkinfo.h2
-rw-r--r--indra/newview/llpanelplaces.cpp15
-rw-r--r--indra/newview/llpanelplaces.h1
-rw-r--r--indra/newview/skins/default/colors.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmark_info.xml21
-rw-r--r--indra/newview/skins/default/xui/en/panel_places.xml93
7 files changed, 64 insertions, 80 deletions
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 9b55fe9ce2..8a6a9f1fcd 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -78,7 +78,7 @@ BOOL LLPanelLandmarkInfo::postBuild()
mCreator = getChild<LLTextBox>("creator");
mCreated = getChild<LLTextBox>("created");
- mLandmarkTitle = getChild<LLTextBox>("title_value");
+ mLandmarkTitle = getChild<LLLineEditor>("title_value");
mLandmarkTitleEditor = getChild<LLLineEditor>("title_editor");
mNotesEditor = getChild<LLTextEditor>("notes_editor");
mFolderCombo = getChild<LLComboBox>("folder_combo");
@@ -117,6 +117,7 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type)
landmark_info_panel->setVisible(type == LANDMARK);
getChild<LLTextBox>("folder_label")->setVisible(is_info_type_create_landmark);
+ getChild<LLButton>("edit_btn")->setVisible(!is_info_type_create_landmark);
mFolderCombo->setVisible(is_info_type_create_landmark);
switch(type)
@@ -134,10 +135,6 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type)
std::string name = parcel->getName();
LLVector3 agent_pos = gAgent.getPositionAgent();
- std::string desc;
- LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_FULL, agent_pos);
- mNotesEditor->setText(desc);
-
if (name.empty())
{
S32 region_x = ll_round(agent_pos.mV[VX]);
@@ -152,6 +149,7 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type)
}
else
{
+ std::string desc;
LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_NORMAL, agent_pos);
region_name = desc;
}
@@ -349,6 +347,7 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled)
mNotesEditor->setReadOnly(!enabled);
mFolderCombo->setVisible(enabled);
getChild<LLTextBox>("folder_label")->setVisible(enabled);
+ getChild<LLButton>("edit_btn")->setVisible(!enabled);
// HACK: To change the text color in a text editor
// when it was enabled/disabled we set the text once again.
diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h
index 01a6fd6b3d..9712736182 100644
--- a/indra/newview/llpanellandmarkinfo.h
+++ b/indra/newview/llpanellandmarkinfo.h
@@ -71,7 +71,7 @@ private:
LLTextBox* mOwner;
LLTextBox* mCreator;
LLTextBox* mCreated;
- LLTextBox* mLandmarkTitle;
+ LLLineEditor* mLandmarkTitle;
LLLineEditor* mLandmarkTitleEditor;
LLTextEditor* mNotesEditor;
LLComboBox* mFolderCombo;
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 2ef82d0cf9..53870fb5c7 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -59,6 +59,7 @@
#include "llinventorymodel.h"
#include "lllandmarkactions.h"
#include "lllandmarklist.h"
+#include "lllayoutstack.h"
#include "llpanellandmarkinfo.h"
#include "llpanellandmarks.h"
#include "llpanelpick.h"
@@ -280,9 +281,6 @@ BOOL LLPanelPlaces::postBuild()
mShowOnMapBtn = getChild<LLButton>("map_btn");
mShowOnMapBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onShowOnMapButtonClicked, this));
- mEditBtn = getChild<LLButton>("edit_btn");
- mEditBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this));
-
mSaveBtn = getChild<LLButton>("save_btn");
mSaveBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onSaveButtonClicked, this));
@@ -355,6 +353,9 @@ BOOL LLPanelPlaces::postBuild()
LLComboBox* folder_combo = mLandmarkInfo->getChild<LLComboBox>("folder_combo");
folder_combo->setCommitCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this));
+ LLButton* edit_btn = mLandmarkInfo->getChild<LLButton>("edit_btn");
+ edit_btn->setCommitCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this));
+
createTabs();
updateVerbs();
@@ -532,7 +533,6 @@ void LLPanelPlaces::setItem(LLInventoryItem* item)
BOOL is_landmark_editable = gInventory.isObjectDescendentOf(mItem->getUUID(), gInventory.getRootFolderID()) &&
mItem->getPermissions().allowModifyBy(gAgent.getID());
- mEditBtn->setEnabled(is_landmark_editable);
mSaveBtn->setEnabled(is_landmark_editable);
if (is_landmark_editable)
@@ -1216,13 +1216,16 @@ void LLPanelPlaces::updateVerbs()
mTeleportBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn && !is_pick_panel_visible);
mShowOnMapBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn && !is_pick_panel_visible);
- mOverflowBtn->setVisible(is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn);
- mEditBtn->setVisible(mPlaceInfoType == LANDMARK_INFO_TYPE && !isLandmarkEditModeOn);
mSaveBtn->setVisible(isLandmarkEditModeOn);
mCancelBtn->setVisible(isLandmarkEditModeOn);
mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn);
mPlaceInfoBtn->setVisible(!is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn && !is_pick_panel_visible);
+ bool show_options_btn = is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn;
+ mOverflowBtn->setVisible(show_options_btn);
+ getChild<LLLayoutPanel>("lp_options")->setVisible(show_options_btn);
+ getChild<LLLayoutPanel>("lp2")->setVisible(!show_options_btn);
+
mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos);
if (is_place_info_visible)
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index 27f991c202..978b030b2e 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -121,7 +121,6 @@ private:
LLButton* mPlaceProfileBackBtn;
LLButton* mTeleportBtn;
LLButton* mShowOnMapBtn;
- LLButton* mEditBtn;
LLButton* mSaveBtn;
LLButton* mCancelBtn;
LLButton* mCloseBtn;
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index e0da7f5d9e..e1cf708094 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -42,6 +42,9 @@
name="Gray"
value="0.5 0.5 0.5 1" />
<color
+ name="DkGray0"
+ value="0.27 0.27 0.27 1" />
+ <color
name="DkGray"
value="0.125 0.125 0.125 1" />
<color
diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
index dd80f6eac8..e3b8e91c4f 100644
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
@@ -277,9 +277,13 @@
top_pad="10"
value="Title:"
width="290" />
- <text
+ <line_editor
+ text_readonly_color="white"
+ enabled="false"
+ use_bg_color="true"
+ bg_color="DkGray0"
parse_urls="false"
- follows="left|top"
+ follows="left|top|right"
height="22"
layout="topleft"
left="0"
@@ -309,7 +313,7 @@
value="My notes:"
width="290" />
<text_editor
- bg_readonly_color="DkGray2"
+ bg_readonly_color="DkGray0"
follows="all"
height="75"
layout="topleft"
@@ -340,6 +344,17 @@
name="folder_combo"
top_pad="5"
width="200" />
+ <button
+ follows="bottom|left|right"
+ height="23"
+ label="Edit"
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="edit_btn"
+ tool_tip="Edit landmark information"
+ top_pad="-42"
+ width="100" />
</panel>
</panel>
</scroll_container>
diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml
index 7d171490e8..1f32ae53ba 100644
--- a/indra/newview/skins/default/xui/en/panel_places.xml
+++ b/indra/newview/skins/default/xui/en/panel_places.xml
@@ -82,6 +82,7 @@ background_visible="true"
layout="topleft"
mouse_opaque="false"
name="bottom_bar_ls0"
+ animate="false"
left="4"
orientation="horizontal"
top="0"
@@ -150,8 +151,32 @@ background_visible="true"
width="85" />
</layout_panel>
</layout_stack>
- </layout_panel>
-
+ </layout_panel>
+ <!--*********************** Options button ***********************-->
+ <layout_panel
+ follows="bottom|right"
+ height="23"
+ layout="bottomleft"
+ left_pad="0"
+ mouse_opaque="false"
+ visible="false"
+ name="lp_options"
+ auto_resize="false"
+ width="23">
+ <menu_button
+ follows="bottom|right"
+ height="23"
+ image_disabled="ComboButton_UpOff"
+ image_unselected="ComboButton_UpOff"
+ image_selected="ComboButton_UpSelected"
+ layout="topleft"
+ mouse_opaque="false"
+ name="overflow_btn"
+ tool_tip="Show additional options"
+ top="0"
+ left="0"
+ width="23" />
+ </layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
@@ -159,69 +184,9 @@ background_visible="true"
left_pad="0"
mouse_opaque="false"
name="lp2"
- auto_resize="true"
+ auto_resize="true"
width="116">
-
- <!--*********************** Edit, Options buttons ***********************-->
-
- <layout_stack
- follows="bottom|left|right"
- height="23"
- layout="topleft"
- mouse_opaque="false"
- name="bottom_bar_ls3"
- left="0"
- orientation="horizontal"
- top="0"
- width="113">
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="0"
- mouse_opaque="false"
- name="edit_btn_lp"
- auto_resize="true"
- width="84">
- <button
- follows="bottom|left|right"
- height="23"
- label="Edit"
- layout="topleft"
- left="1"
- mouse_opaque="false"
- name="edit_btn"
- tool_tip="Edit landmark information"
- top="0"
- width="83" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|right"
- height="23"
- layout="bottomleft"
- left_pad="0"
- mouse_opaque="false"
- name="overflow_btn_lp"
- auto_resize="true"
- width="24">
- <menu_button
- follows="bottom|right"
- height="23"
- image_disabled="ComboButton_UpOff"
- image_unselected="ComboButton_UpOff"
- image_selected="ComboButton_UpSelected"
- layout="topleft"
- mouse_opaque="false"
- name="overflow_btn"
- tool_tip="Show additional options"
- top="0"
- left="1"
- width="23" />
- </layout_panel>
- </layout_stack>
-
+
<!--*********************** Profile button ***********************-->
<layout_stack