diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-08-04 00:15:36 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-08-04 00:15:36 +0300 |
commit | ea26ee5e92aa93ed966581ab17da5fc38d43a884 (patch) | |
tree | 9362314316f9cfddb84761745ebf9ba5fc0261cb /indra/newview/llfloaterworldmap.cpp | |
parent | eba7ae24dc00725909aea0ede7c8b3d3f4394017 (diff) | |
parent | 9dba9f80f4d40ec12a735ddbb66a9d103a959ece (diff) |
Merge branch 'master' into DRTVWR-548-maint-N
# Conflicts:
# indra/newview/llfloaterworldmap.cpp
# indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rwxr-xr-x | indra/newview/llfloaterworldmap.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 6bb0ed73e4..f363733261 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -45,6 +45,7 @@ //#include "llfirstuse.h" #include "llfloaterreg.h" // getTypedInstance() #include "llfocusmgr.h" +#include "lliconctrl.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" @@ -306,6 +307,8 @@ BOOL LLFloaterWorldMap::postBuild() F32 slider_zoom = mMapView->getZoom(); getChild<LLUICtrl>("zoom slider")->setValue(slider_zoom); + + getChild<LLPanel>("expand_btn_panel")->setMouseDownCallback(boost::bind(&LLFloaterWorldMap::onExpandCollapseBtn, this)); setDefaultBtn(NULL); @@ -1298,6 +1301,22 @@ void LLFloaterWorldMap::onCopySLURL() LLNotificationsUtil::add("CopySLURL", args); } +void LLFloaterWorldMap::onExpandCollapseBtn() +{ + LLLayoutStack* floater_stack = getChild<LLLayoutStack>("floater_map_stack"); + LLLayoutPanel* controls_panel = getChild<LLLayoutPanel>("controls_lp"); + + bool toggle_collapse = !controls_panel->isCollapsed(); + floater_stack->collapsePanel(controls_panel, toggle_collapse); + floater_stack->updateLayout(); + + std::string image_name = getString(toggle_collapse ? "expand_icon" : "collapse_icon"); + std::string tooltip = getString(toggle_collapse ? "expand_tooltip" : "collapse_tooltip"); + getChild<LLIconCtrl>("expand_collapse_icon")->setImage(LLUI::getUIImage(image_name)); + getChild<LLIconCtrl>("expand_collapse_icon")->setToolTip(tooltip); + getChild<LLPanel>("expand_btn_panel")->setToolTip(tooltip); +} + // protected void LLFloaterWorldMap::centerOnTarget(BOOL animate) { |