diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-06 18:55:33 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-06 18:55:33 +0300 |
commit | 0c6afa58de6b57ad41d31a3dddaac9ef30321960 (patch) | |
tree | e49f7897a1c643cf8ca93e06b3a5da383852ab40 /indra/newview/llpanelprofile.cpp | |
parent | c4aa8b1636b92f2b746df4ef319c10679883eb59 (diff) |
SL-15312 Larger image preview
At the moment without cursor handling
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 1542c425ce..441a69bc5d 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -59,6 +59,7 @@ #include "llavatarpropertiesprocessor.h" #include "llcallingcard.h" #include "llcommandhandler.h" +#include "llfloaterprofiletexture.h" #include "llfloaterreg.h" #include "llfilepicker.h" #include "llfirstuse.h" @@ -884,6 +885,7 @@ BOOL LLPanelProfileSecondLife::postBuild() mCantSeeOnMapIcon->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentPermissionsDialog(); }); mCanEditObjectsIcon->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentPermissionsDialog(); }); mCantEditObjectsIcon->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentPermissionsDialog(); }); + mSecondLifePic->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentProfileTexture(); }); return TRUE; } @@ -1075,6 +1077,20 @@ void LLPanelProfileSecondLife::setProfileImageUploaded(const LLUUID &image_asset FALSE); } + LLFloater *floater = mFloaterProfileTextureHandle.get(); + if (floater) + { + LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater); + if (mImageId.notNull()) + { + texture_view->loadAsset(mImageId); + } + else + { + texture_view->resetAsset(); + } + } + setProfileImageUploading(false); } @@ -1529,6 +1545,13 @@ void LLPanelProfileSecondLife::onCommitMenu(const LLSD& userdata) mSecondLifePic->setValue("Generic_Person_Large"); mImageId = LLUUID::null; + + LLFloater *floater = mFloaterProfileTextureHandle.get(); + if (floater) + { + LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater); + texture_view->resetAsset(); + } } else { @@ -1718,6 +1741,51 @@ void LLPanelProfileSecondLife::onShowAgentPermissionsDialog() } } +void LLPanelProfileSecondLife::onShowAgentProfileTexture() +{ + if (!getIsLoaded()) + { + return; + } + + LLFloater *floater = mFloaterProfileTextureHandle.get(); + if (!floater) + { + LLFloater* parent_floater = gFloaterView->getParentFloater(this); + if (parent_floater) + { + LLFloaterProfileTexture * texture_view = new LLFloaterProfileTexture(parent_floater); + mFloaterProfileTextureHandle = texture_view->getHandle(); + if (mImageId.notNull()) + { + texture_view->loadAsset(mImageId); + } + else + { + texture_view->resetAsset(); + } + texture_view->openFloater(); + texture_view->setVisibleAndFrontmost(TRUE); + + parent_floater->addDependentFloater(mFloaterProfileTextureHandle); + } + } + else // already open + { + LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater); + texture_view->setMinimized(FALSE); + texture_view->setVisibleAndFrontmost(TRUE); + if (mImageId.notNull()) + { + texture_view->loadAsset(mImageId); + } + else + { + texture_view->resetAsset(); + } + } +} + void LLPanelProfileSecondLife::onOpenNotes() { LLFloater* parent_floater = gFloaterView->getParentFloater(this); |