Pull viewer-beta in

master
Merov Linden 2010-12-06 16:56:25 -08:00
commit 8afbb58d4c
18 changed files with 112 additions and 33 deletions

View File

@ -358,6 +358,7 @@ Jonathan Yap
STORM-616
STORM-679
STORM-596
STORM-726
Kage Pixel
VWR-11
Ken March

View File

@ -944,6 +944,10 @@ F32 LLUICtrl::getCurrentTransparency()
case TT_INACTIVE:
alpha = sInactiveControlTransparency;
break;
case TT_FADING:
alpha = sInactiveControlTransparency / 2;
break;
}
return alpha;

View File

@ -123,8 +123,9 @@ public:
enum ETypeTransparency
{
TT_DEFAULT,
TT_ACTIVE,
TT_INACTIVE
TT_ACTIVE, // focused floater
TT_INACTIVE, // other floaters
TT_FADING, // fading toast
};
/*virtual*/ ~LLUICtrl();

View File

@ -456,8 +456,8 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
LLStyle::Params LLUrlEntryAgent::getStyle() const
{
LLStyle::Params style_params = LLUrlEntryBase::getStyle();
style_params.color = LLUIColorTable::instance().getColor("AgentLinkColor");
style_params.readonly_color = LLUIColorTable::instance().getColor("AgentLinkColor");
style_params.color = LLUIColorTable::instance().getColor("HTMLLinkColor");
style_params.readonly_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
return style_params;
}

View File

@ -167,6 +167,7 @@ BOOL LLCallFloater::postBuild()
//chrome="true" hides floater caption
if (mDragHandle)
mDragHandle->setTitleVisible(TRUE);
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
updateSession();
@ -205,6 +206,17 @@ void LLCallFloater::draw()
LLTransientDockableFloater::draw();
}
// virtual
void LLCallFloater::setFocus( BOOL b )
{
LLTransientDockableFloater::setFocus(b);
// Force using active floater transparency (STORM-730).
// We have to override setFocus() for LLCallFloater because selecting an item
// of the voice morphing combobox causes the floater to lose focus and thus become transparent.
updateTransparency(TT_ACTIVE);
}
// virtual
void LLCallFloater::onParticipantsChanged()
{

View File

@ -64,6 +64,7 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void draw();
/*virtual*/ void setFocus( BOOL b );
/**
* Is called by LLVoiceClient::notifyParticipantObservers when voice participant list is changed.

View File

@ -789,24 +789,22 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
// set the link for the object name to be the objectim SLapp
// (don't let object names with hyperlinks override our objectim Url)
LLStyle::Params link_params(style_params);
link_params.color.control = "HTMLLinkColor";
LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
link_params.color = link_color;
link_params.readonly_color = link_color;
link_params.is_link = true;
link_params.link_href = url;
mEditor->appendText(chat.mFromName + delimiter,
false, link_params);
}
else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
{
LLStyle::Params link_params(style_params);
// Setting is_link = true for agent SLURL to avoid applying default style to it.
// See LLTextBase::appendTextImpl().
link_params.is_link = true;
link_params.link_href = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString();
link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
// Add link to avatar's inspector and delimiter to message.
mEditor->appendText(chat.mFromName, false, link_params);
mEditor->appendText(delimiter, false, style_params);
mEditor->appendText(std::string(link_params.link_href) + delimiter, false, link_params);
}
else
{

View File

@ -343,6 +343,7 @@ BOOL LLFloaterCamera::postBuild()
{
setIsChrome(TRUE);
setTitleVisible(TRUE); // restore title visibility after chrome applying
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
mRotate = getChild<LLJoystickCameraRotate>(ORBIT);
mZoom = findChild<LLPanelCameraZoom>(ZOOM);

View File

@ -908,6 +908,8 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal();
previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame
}
gViewerWindow->playSnapshotAnimAndSound();
}
previewp->getWindow()->decBusyCount();
// only show fullscreen preview when in freeze frame mode
@ -1533,8 +1535,6 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data)
if (previewp && view)
{
previewp->updateSnapshot(TRUE);
gViewerWindow->playSnapshotAnimAndSound();
}
}
@ -2206,8 +2206,6 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
gSnapshotFloaterView->setEnabled(TRUE);
gSnapshotFloaterView->setVisible(TRUE);
gSnapshotFloaterView->adjustToFitScreen(this, FALSE);
gViewerWindow->playSnapshotAnimAndSound();
}
void LLFloaterSnapshot::onClose(bool app_quitting)

View File

@ -94,6 +94,7 @@ BOOL LLFloaterMove::postBuild()
{
setIsChrome(TRUE);
setTitleVisible(TRUE); // restore title visibility after chrome applying
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
LLDockableFloater::postBuild();

View File

@ -165,11 +165,20 @@ public:
: LLToast(p),
mNearbyChatScreenChannelp(nc_channelp)
{
updateTransparency();
setMouseEnterCallback(boost::bind(&LLNearbyChatToast::updateTransparency, this));
setMouseLeaveCallback(boost::bind(&LLNearbyChatToast::updateTransparency, this));
}
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void setBackgroundOpaque(BOOL b);
protected:
/*virtual*/ void setTransparentState(bool transparent);
private:
void updateTransparency();
LLNearbyChatScreenChannel* mNearbyChatScreenChannelp;
};
@ -597,4 +606,34 @@ void LLNearbyChatToast::onClose(bool app_quitting)
mNearbyChatScreenChannelp->onToastDestroyed(this, app_quitting);
}
// virtual
void LLNearbyChatToast::setBackgroundOpaque(BOOL b)
{
// We don't want background changes: transparency is handled differently.
LLToast::setBackgroundOpaque(TRUE);
}
// virtual
void LLNearbyChatToast::setTransparentState(bool transparent)
{
LLToast::setTransparentState(transparent);
updateTransparency();
}
void LLNearbyChatToast::updateTransparency()
{
ETypeTransparency transparency_type;
if (isHovered())
{
transparency_type = TT_ACTIVE;
}
else
{
transparency_type = getTransparentState() ? TT_FADING : TT_INACTIVE;
}
LLFloater::updateTransparency(transparency_type);
}
// EOF

View File

@ -180,6 +180,9 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type)
populateFoldersList();
// Prevent the floater from losing focus (if the sidepanel is undocked).
setFocus(TRUE);
LLPanelPlaceInfo::setInfoType(type);
}
@ -330,6 +333,9 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled)
// when it was enabled/disabled we set the text once again.
mNotesEditor->setText(mNotesEditor->getText());
}
// Prevent the floater from losing focus (if the sidepanel is undocked).
setFocus(TRUE);
}
const std::string& LLPanelLandmarkInfo::getLandmarkTitle() const

View File

@ -212,7 +212,8 @@ void LLPanelPicks::updateData()
mNoPicks = false;
mNoClassifieds = false;
getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("PicksClassifiedsLoadingText"));
mNoItemsLabel->setValue(LLTrans::getString("PicksClassifiedsLoadingText"));
mNoItemsLabel->setVisible(TRUE);
mPicksList->clear();
LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(getAvatarId());
@ -314,15 +315,17 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
mNoClassifieds = !mClassifiedsList->size();
}
if (mNoPicks && mNoClassifieds)
bool no_data = mNoPicks && mNoClassifieds;
mNoItemsLabel->setVisible(no_data);
if (no_data)
{
if(getAvatarId() == gAgentID)
{
getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("NoPicksClassifiedsText"));
mNoItemsLabel->setValue(LLTrans::getString("NoPicksClassifiedsText"));
}
else
{
getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("NoAvatarPicksClassifiedsText"));
mNoItemsLabel->setValue(LLTrans::getString("NoAvatarPicksClassifiedsText"));
}
}
}
@ -359,6 +362,8 @@ BOOL LLPanelPicks::postBuild()
mPicksList->setNoItemsCommentText(getString("no_picks"));
mClassifiedsList->setNoItemsCommentText(getString("no_classifieds"));
mNoItemsLabel = getChild<LLUICtrl>("picks_panel_text");
childSetAction(XML_BTN_NEW, boost::bind(&LLPanelPicks::onClickPlusBtn, this));
childSetAction(XML_BTN_DELETE, boost::bind(&LLPanelPicks::onClickDelete, this));
childSetAction(XML_BTN_TELEPORT, boost::bind(&LLPanelPicks::onClickTeleport, this));
@ -781,7 +786,7 @@ void LLPanelPicks::showAccordion(const std::string& name, bool show)
void LLPanelPicks::onPanelPickClose(LLPanel* panel)
{
panel->setVisible(FALSE);
getProfilePanel()->closePanel(panel);
}
void LLPanelPicks::onPanelPickSave(LLPanel* panel)

View File

@ -149,6 +149,7 @@ private:
LLPanelClassifiedInfo* mPanelClassifiedInfo;
LLPanelPickEdit* mPanelPickEdit;
LLToggleableMenu* mPlusMenu;
LLUICtrl* mNoItemsLabel;
// <classified_id, edit_panel>
typedef std::map<LLUUID, LLPanelClassifiedEdit*> panel_classified_edit_map_t;

View File

@ -217,6 +217,10 @@ void LLPanelProfile::setAllChildrenVisible(BOOL visible)
void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
{
// Hide currently visible panel (STORM-690).
setAllChildrenVisible(FALSE);
// Add the panel or bring it to front.
if (panel->getParent() != this)
{
addChild(panel);
@ -243,6 +247,18 @@ void LLPanelProfile::closePanel(LLPanel* panel)
if (panel->getParent() == this)
{
removeChild(panel);
// Make the underlying panel visible.
const child_list_t* child_list = getChildList();
if (child_list->size() > 0)
{
child_list->front()->setVisible(TRUE);
child_list->front()->setFocus(TRUE); // prevent losing focus by the floater
}
else
{
llwarns << "No underlying panel to make visible." << llendl;
}
}
}

View File

@ -141,10 +141,6 @@ LLToast::LLToast(const LLToast::Params& p)
// init callbacks if present
if(!p.on_delete_toast().empty())
mOnDeleteToastSignal.connect(p.on_delete_toast());
// *TODO: This signal doesn't seem to be used at all.
if(!p.on_mouse_enter().empty())
mOnMouseEnterSignal.connect(p.on_mouse_enter());
}
void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent)
@ -402,7 +398,6 @@ void LLToast::onToastMouseEnter()
{
mHideBtn->setVisible(TRUE);
}
mOnMouseEnterSignal(this);
mToastMouseEnterSignal(this, getValue());
}
}

View File

@ -90,8 +90,7 @@ public:
fading_time_secs; // Number of seconds while a toast is transparent
Optional<toast_callback_t> on_delete_toast,
on_mouse_enter;
Optional<toast_callback_t> on_delete_toast;
Optional<bool> can_fade,
can_be_stored,
enable_hide_btn,
@ -142,7 +141,7 @@ public:
//
virtual void setVisible(BOOL show);
/*virtual*/ void setBackgroundOpaque(BOOL b);
virtual void setBackgroundOpaque(BOOL b);
//
virtual void hide();
@ -182,7 +181,6 @@ public:
// Registers signals/callbacks for events
toast_signal_t mOnFadeSignal;
toast_signal_t mOnMouseEnterSignal;
toast_signal_t mOnDeleteToastSignal;
toast_signal_t mOnToastDestroyedSignal;
boost::signals2::connection setOnFadeCallback(toast_callback_t cb) { return mOnFadeSignal.connect(cb); }
@ -200,6 +198,10 @@ public:
LLHandle<LLToast> getHandle() { mHandle.bind(this); return mHandle; }
bool getTransparentState() const { return mIsTransparent; }
virtual void setTransparentState(bool transparent);
private:
void onToastMouseEnter();
@ -208,8 +210,6 @@ private:
void expire();
void setTransparentState(bool transparent);
LLUUID mNotificationID;
LLUUID mSessionID;
LLNotificationPtr mNotification;

View File

@ -127,7 +127,7 @@ top="20"
</text>
<combo_box
allow_text_entry="true"
control_name="LoginLocation"
control_name="NextLoginLocation"
follows="left|bottom"
height="23"
max_chars="128"