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
meow-7.2.2
Andrey Kleshchev 2021-02-24 22:41:42 +02:00
parent 02036560a6
commit 554ccd7181
10 changed files with 16 additions and 108 deletions

View File

@ -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<LLFolderViewItem*> &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);
}

View File

@ -295,9 +295,6 @@ BOOL LLPanelPlaces::postBuild()
mOverflowBtn = getChild<LLMenuButton>("overflow_btn");
mOverflowBtn->setMouseDownCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this));
mPlaceInfoBtn = getChild<LLButton>("profile_btn");
mPlaceInfoBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onProfileButtonClicked, this));
mGearMenuButton = getChild<LLMenuButton>("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<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)
{
mShowOnMapBtn->setEnabled(have_3d_pos);

View File

@ -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;

View File

@ -47,13 +47,6 @@ bool LLPanelPlacesTab::isTabVisible()
return true;
}
void LLPanelPlacesTab::setPanelPlacesButtons(LLPanelPlaces* panel)
{
mTeleportBtn = panel->getChild<LLButton>("teleport_btn");
mShowOnMapBtn = panel->getChild<LLButton>("map_btn");
mShowProfile = panel->getChild<LLButton>("profile_btn");
}
void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos,
U64 region_handle,
const std::string& url,

View File

@ -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;
};

View File

@ -566,17 +566,8 @@ void LLTeleportHistoryPanel::updateVerbs()
if (!mLastSelectedFlatlList)
{
mTeleportBtn->setEnabled(false);
mShowProfile->setEnabled(false);
mShowOnMapBtn->setEnabled(false);
return;
}
LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem());
mTeleportBtn->setEnabled(NULL != itemp);
mShowProfile->setEnabled(NULL != itemp);
mShowOnMapBtn->setEnabled(NULL != itemp);
}
// virtual

View File

@ -26,7 +26,7 @@
name="back_btn"
left="10"
tab_stop="false"
top="2"
top="4"
width="30"
use_draw_context_alpha="false" />
<text
@ -39,17 +39,17 @@
left_pad="4"
name="title"
text_color="LtGray"
top="2"
top="4"
width="250">
Edit Pick
</text>
<scroll_container
color="DkGray2"
follows="all"
height="502"
height="501"
layout="topleft"
left="8"
top_pad="10"
top_pad="9"
name="profile_scroll"
opaque="true"
width="312">

View File

@ -67,7 +67,7 @@
name="back_btn"
tool_tip="Back"
tab_stop="false"
top="4"
top="2"
width="30"
use_draw_context_alpha="false" />
<text
@ -78,20 +78,20 @@
left_pad="7"
name="title"
text_color="LtGray"
top="3"
top="2"
use_ellipses="true"
value="Place Profile"
width="280" />
<scroll_container
color="DkGray2"
follows="all"
height="532"
height="534"
layout="topleft"
left="9"
name="place_scroll"
opaque="true"
top_pad="10"
width="331">
top_pad="9"
width="324">
<panel
bg_alpha_color="DkGray2"
follows="left|top|right"

View File

@ -172,7 +172,7 @@
name="back_btn"
tool_tip="Back"
tab_stop="false"
top="4"
top="2"
width="30"
use_draw_context_alpha="false" />
<text
@ -183,20 +183,20 @@
left_pad="10"
name="title"
text_color="LtGray"
top="4"
top="2"
use_ellipses="true"
value="Place Profile"
width="280" />
<scroll_container
color="DkGray2"
follows="all"
height="572"
height="575"
layout="topleft"
left="9"
name="place_scroll"
opaque="true"
top_pad="10"
width="331">
top_pad="9"
width="324">
<panel
bg_alpha_color="DkGray2"
follows="left|top|right|bottom"

View File

@ -38,7 +38,7 @@ background_visible="true"
animate="false"
border_size="0"
follows="left|top|right"
height="25"
height="27"
layout="topleft"
orientation="horizontal"
top="0"
@ -47,7 +47,6 @@ background_visible="true"
width="320">
<layout_panel
auto_resize="true"
height="25"
layout="topleft"
name="filter_panel"
width="193">
@ -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"/>
<panel
@ -315,41 +314,6 @@ background_visible="true"
name="lp2"
auto_resize="true"
width="116">
<!--*********************** Profile button ***********************-->
<layout_stack
follows="bottom|left|right"
height="23"
layout="topleft"
mouse_opaque="false"
name="bottom_bar_profile_ls"
left="0"
orientation="horizontal"
top="0"
width="110">
<layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
left_pad="3"
mouse_opaque="false"
name="profile_btn_lp"
auto_resize="true"
width="102">
<button
follows="bottom|left|right"
height="23"
label="Profile"
layout="topleft"
mouse_opaque="false"
name="profile_btn"
left="1"
tool_tip="Show place profile"
top="0"
width="101" />
</layout_panel>
</layout_stack>
<!--*********************** Close button ***********************-->