From 554ccd718131d469a7cde1e188d9ef0f712a6ed9 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 24 Feb 2021 22:41:42 +0200 Subject: SL-14842 Apply toolstrip layout to Places floater Part #3 Removed unused buttons, moved some UI elements to be more in line with each other --- indra/newview/llpanellandmarks.cpp | 15 -------- indra/newview/llpanelplaces.cpp | 18 ---------- indra/newview/llpanelplaces.h | 2 -- indra/newview/llpanelplacestab.cpp | 7 ---- indra/newview/llpanelplacestab.h | 5 --- indra/newview/llpanelteleporthistory.cpp | 9 ----- .../skins/default/xui/en/panel_edit_pick.xml | 8 ++--- .../skins/default/xui/en/panel_landmark_info.xml | 10 +++--- .../skins/default/xui/en/panel_place_profile.xml | 10 +++--- .../newview/skins/default/xui/en/panel_places.xml | 40 ++-------------------- 10 files changed, 16 insertions(+), 108 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 3902c615a1..dfbdfad3bb 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -268,11 +268,6 @@ void LLLandmarksPanel::onShowOnMap() return; } - // Disable the "Map" button because loading landmark can take some time. - // During this time the button is useless. It will be enabled on callback finish - // or upon switching to other item. - mShowOnMapBtn->setEnabled(FALSE); - doActionOnCurSelectedLandmark(boost::bind(&LLLandmarksPanel::doShowOnMap, this, _1)); } @@ -357,15 +352,6 @@ void LLLandmarksPanel::updateVerbs() { if (!isTabVisible()) return; - - bool landmark_selected = isLandmarkSelected(); - mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport")); - mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info")); - mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map")); - - // TODO: mantipov: Uncomment when mShareBtn is supported - // Share button should be enabled when neither a folder nor a landmark is selected - //mShareBtn->setEnabled(NULL != current_item); } void LLLandmarksPanel::onSelectionChange(LLPlacesInventoryPanel* inventory_list, const std::deque &items, BOOL user_action) @@ -1348,7 +1334,6 @@ void LLLandmarksPanel::doShowOnMap(LLLandmark* landmark) LLFloaterReg::showInstance("world_map", "center"); } - mShowOnMapBtn->setEnabled(TRUE); mGearLandmarkMenu->setItemEnabled("show_on_map", TRUE); } diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 2a08a1b40d..d56194e5b4 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -295,9 +295,6 @@ BOOL LLPanelPlaces::postBuild() mOverflowBtn = getChild("overflow_btn"); mOverflowBtn->setMouseDownCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this)); - mPlaceInfoBtn = getChild("profile_btn"); - mPlaceInfoBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onProfileButtonClicked, this)); - mGearMenuButton = getChild("options_gear_btn"); mGearMenuButton->setMouseDownCallback(boost::bind(&LLPanelPlaces::onGearMenuClick, this)); @@ -933,14 +930,6 @@ void LLPanelPlaces::onOverflowButtonClicked() mOverflowBtn->setMenu(menu, LLMenuButton::MP_TOP_RIGHT); } -void LLPanelPlaces::onProfileButtonClicked() -{ - if (!mActivePanel) - return; - - mActivePanel->onShowProfile(); -} - bool LLPanelPlaces::onOverflowMenuItemEnable(const LLSD& param) { std::string value = param.asString(); @@ -1211,8 +1200,6 @@ void LLPanelPlaces::createTabs() LLLandmarksPanel* landmarks_panel = new LLLandmarksPanel(); if (landmarks_panel) { - landmarks_panel->setPanelPlacesButtons(this); - mTabContainer->addTabPanel( LLTabContainer::TabPanelParams(). panel(landmarks_panel). @@ -1223,8 +1210,6 @@ void LLPanelPlaces::createTabs() LLTeleportHistoryPanel* teleport_history_panel = new LLTeleportHistoryPanel(); if (teleport_history_panel) { - teleport_history_panel->setPanelPlacesButtons(this); - mTabContainer->addTabPanel( LLTabContainer::TabPanelParams(). panel(teleport_history_panel). @@ -1312,15 +1297,12 @@ void LLPanelPlaces::updateVerbs() 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("lp_options")->setVisible(show_options_btn); getChild("lp2")->setVisible(!show_options_btn); - mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); - if (is_place_info_visible) { mShowOnMapBtn->setEnabled(have_3d_pos); diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 576a0fb931..3b87eb6cb9 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -97,7 +97,6 @@ private: bool onOverflowMenuItemEnable(const LLSD& param); void onCreateLandmarkButtonClicked(const LLUUID& folder_id); void onBackButtonClicked(); - void onProfileButtonClicked(); void onGearMenuClick(); void onSortingMenuClick(); void onAddMenuClick(); @@ -134,7 +133,6 @@ private: LLButton* mCancelBtn; LLButton* mCloseBtn; LLMenuButton* mOverflowBtn; - LLButton* mPlaceInfoBtn; // Top menu LLMenuButton* mGearMenuButton; diff --git a/indra/newview/llpanelplacestab.cpp b/indra/newview/llpanelplacestab.cpp index 9644b7518e..9601ac54a4 100644 --- a/indra/newview/llpanelplacestab.cpp +++ b/indra/newview/llpanelplacestab.cpp @@ -47,13 +47,6 @@ bool LLPanelPlacesTab::isTabVisible() return true; } -void LLPanelPlacesTab::setPanelPlacesButtons(LLPanelPlaces* panel) -{ - mTeleportBtn = panel->getChild("teleport_btn"); - mShowOnMapBtn = panel->getChild("map_btn"); - mShowProfile = panel->getChild("profile_btn"); -} - void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos, U64 region_handle, const std::string& url, diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h index 6c9a6e9da7..886f4ce9c0 100644 --- a/indra/newview/llpanelplacestab.h +++ b/indra/newview/llpanelplacestab.h @@ -58,7 +58,6 @@ public: bool isTabVisible(); // Check if parent TabContainer is visible. - void setPanelPlacesButtons(LLPanelPlaces* panel); void onRegionResponse(const LLVector3d& landmark_global_pos, U64 region_handle, const std::string& url, @@ -69,10 +68,6 @@ public: void setFilterSubString(const std::string& string) { sFilterSubString = string; } protected: - LLButton* mTeleportBtn; - LLButton* mShowOnMapBtn; - LLButton* mShowProfile; - // Search string for filtering landmarks and teleport history locations static std::string sFilterSubString; }; diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 812ddf874e..48614e1e47 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -566,17 +566,8 @@ void LLTeleportHistoryPanel::updateVerbs() if (!mLastSelectedFlatlList) { - mTeleportBtn->setEnabled(false); - mShowProfile->setEnabled(false); - mShowOnMapBtn->setEnabled(false); return; } - - LLTeleportHistoryFlatItem* itemp = dynamic_cast (mLastSelectedFlatlList->getSelectedItem()); - - mTeleportBtn->setEnabled(NULL != itemp); - mShowProfile->setEnabled(NULL != itemp); - mShowOnMapBtn->setEnabled(NULL != itemp); } // virtual diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml index 553c112e6f..357a5559bf 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml @@ -26,7 +26,7 @@ name="back_btn" left="10" tab_stop="false" - top="2" + top="4" width="30" use_draw_context_alpha="false" /> Edit Pick 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 0101516792..f00d25ff05 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -67,7 +67,7 @@ name="back_btn" tool_tip="Back" tab_stop="false" - top="4" + top="2" width="30" use_draw_context_alpha="false" /> + top_pad="9" + width="324"> + top_pad="9" + width="324"> @@ -161,7 +160,7 @@ background_visible="true" tab_height="30" tab_group="2" tab_position="top" - top_pad="9" + top_pad="7" width="318" visible="true"/> - - - - - -