SL-20380 Add group notices button as hover button on Groups floater
parent
b2fde09454
commit
683e96ed61
|
|
@ -936,3 +936,20 @@ S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 availabl
|
|||
expanded_tab_height /= num_expanded;
|
||||
return expanded_tab_height;
|
||||
}
|
||||
|
||||
void LLAccordionCtrl::collapseAllTabs()
|
||||
{
|
||||
if (mAccordionTabs.size() > 0)
|
||||
{
|
||||
for (size_t i = 0; i < mAccordionTabs.size(); ++i)
|
||||
{
|
||||
LLAccordionCtrlTab *tab = mAccordionTabs[i];
|
||||
|
||||
if (tab->getDisplayChildren())
|
||||
{
|
||||
tab->setDisplayChildren(false);
|
||||
}
|
||||
}
|
||||
arrange();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,6 +122,8 @@ public:
|
|||
void setComparator(const LLTabComparator* comp) { mTabComparator = comp; }
|
||||
void sort();
|
||||
|
||||
void collapseAllTabs();
|
||||
|
||||
/**
|
||||
* Sets filter substring as a search_term for help text when there are no any visible tabs.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ void LLGroupActions::inspect(const LLUUID& group_id)
|
|||
}
|
||||
|
||||
// static
|
||||
void LLGroupActions::show(const LLUUID& group_id)
|
||||
void LLGroupActions::show(const LLUUID &group_id, bool expand_notices_tab)
|
||||
{
|
||||
if (group_id.isNull())
|
||||
return;
|
||||
|
|
@ -406,6 +406,10 @@ void LLGroupActions::show(const LLUUID& group_id)
|
|||
LLSD params;
|
||||
params["group_id"] = group_id;
|
||||
params["open_tab_name"] = "panel_group_info_sidetray";
|
||||
if (expand_notices_tab)
|
||||
{
|
||||
params["action"] = "show_notices";
|
||||
}
|
||||
|
||||
LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
|
||||
LLFloater *floater = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>("people");
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
/**
|
||||
* Show group information panel.
|
||||
*/
|
||||
static void show(const LLUUID& group_id);
|
||||
static void show(const LLUUID& group_id, bool expand_notices_tab = false);
|
||||
|
||||
/**
|
||||
* Show group inspector floater.
|
||||
|
|
|
|||
|
|
@ -303,6 +303,7 @@ void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LL
|
|||
|
||||
item->getChildView("info_btn")->setVisible( false);
|
||||
item->getChildView("profile_btn")->setVisible( false);
|
||||
item->getChildView("notices_btn")->setVisible(false);
|
||||
item->setGroupIconVisible(mShowIcons);
|
||||
if (!mShowIcons)
|
||||
{
|
||||
|
|
@ -403,6 +404,7 @@ mGroupIcon(NULL),
|
|||
mGroupNameBox(NULL),
|
||||
mInfoBtn(NULL),
|
||||
mProfileBtn(NULL),
|
||||
mNoticesBtn(NULL),
|
||||
mVisibilityHideBtn(NULL),
|
||||
mVisibilityShowBtn(NULL),
|
||||
mGroupID(LLUUID::null),
|
||||
|
|
@ -435,6 +437,9 @@ BOOL LLGroupListItem::postBuild()
|
|||
mProfileBtn = getChild<LLButton>("profile_btn");
|
||||
mProfileBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onProfileBtnClick(); });
|
||||
|
||||
mNoticesBtn = getChild<LLButton>("notices_btn");
|
||||
mNoticesBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onNoticesBtnClick(); });
|
||||
|
||||
mVisibilityHideBtn = findChild<LLButton>("visibility_hide_btn");
|
||||
if (mVisibilityHideBtn)
|
||||
{
|
||||
|
|
@ -470,6 +475,7 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask)
|
|||
{
|
||||
mInfoBtn->setVisible(true);
|
||||
mProfileBtn->setVisible(true);
|
||||
mNoticesBtn->setVisible(true);
|
||||
if (mForAgent && mVisibilityHideBtn)
|
||||
{
|
||||
LLGroupData agent_gdatap;
|
||||
|
|
@ -489,6 +495,7 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask)
|
|||
getChildView("hovered_icon")->setVisible( false);
|
||||
mInfoBtn->setVisible(false);
|
||||
mProfileBtn->setVisible(false);
|
||||
mNoticesBtn->setVisible(false);
|
||||
if (mVisibilityHideBtn)
|
||||
{
|
||||
mVisibilityHideBtn->setVisible(false);
|
||||
|
|
@ -583,6 +590,11 @@ void LLGroupListItem::onProfileBtnClick()
|
|||
LLGroupActions::show(mGroupID);
|
||||
}
|
||||
|
||||
void LLGroupListItem::onNoticesBtnClick()
|
||||
{
|
||||
LLGroupActions::show(mGroupID, true);
|
||||
}
|
||||
|
||||
void LLGroupListItem::onVisibilityBtnClick(bool new_visibility)
|
||||
{
|
||||
LLGroupData agent_gdatap;
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ private:
|
|||
void setBold(bool bold);
|
||||
void onInfoBtnClick();
|
||||
void onProfileBtnClick();
|
||||
void onNoticesBtnClick();
|
||||
void onVisibilityBtnClick(bool new_visibility);
|
||||
|
||||
LLTextBox* mGroupNameBox;
|
||||
|
|
@ -130,6 +131,7 @@ private:
|
|||
LLGroupIconCtrl* mGroupIcon;
|
||||
LLButton* mInfoBtn;
|
||||
LLButton* mProfileBtn;
|
||||
LLButton* mNoticesBtn;
|
||||
LLButton* mVisibilityHideBtn;
|
||||
LLButton* mVisibilityShowBtn;
|
||||
|
||||
|
|
|
|||
|
|
@ -134,6 +134,15 @@ void LLPanelGroup::onOpen(const LLSD& key)
|
|||
if(panel_notices)
|
||||
panel_notices->refreshNotices();
|
||||
}
|
||||
if (str_action == "show_notices")
|
||||
{
|
||||
setGroupID(group_id);
|
||||
|
||||
LLAccordionCtrl *tab_ctrl = getChild<LLAccordionCtrl>("groups_accordion");
|
||||
tab_ctrl->collapseAllTabs();
|
||||
getChild<LLAccordionCtrlTab>("group_notices_tab")->setDisplayChildren(true);
|
||||
tab_ctrl->arrange();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
|
|
@ -239,6 +239,8 @@ with the same filename but different name
|
|||
<texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" />
|
||||
<texture name="Generic_Person_Large" file_name="icons/Generic_Person_Large.png" preload="false" />
|
||||
|
||||
<texture name="Group_Notices" file_name="icons/Group_Notices.png" preload="false" />
|
||||
|
||||
<texture name="Hand" file_name="icons/hand.png" preload="false" />
|
||||
|
||||
<texture name="Help_Press" file_name="navbar/Help_Press.png" preload="false" />
|
||||
|
|
|
|||
|
|
@ -48,6 +48,18 @@
|
|||
use_ellipses="true"
|
||||
value="Unknown"
|
||||
width="242" />
|
||||
<button
|
||||
name="notices_btn"
|
||||
tool_tip="Group Notices"
|
||||
top_delta="-4"
|
||||
left_pad="3"
|
||||
right="-53"
|
||||
height="20"
|
||||
width="20"
|
||||
follows="right"
|
||||
image_pressed="Group_Notices"
|
||||
image_unselected="Group_Notices"
|
||||
tab_stop="false"/>
|
||||
<button
|
||||
follows="right"
|
||||
height="16"
|
||||
|
|
@ -58,7 +70,7 @@
|
|||
name="info_btn"
|
||||
tool_tip="More info"
|
||||
tab_stop="false"
|
||||
top_delta="-2"
|
||||
top_delta="2"
|
||||
width="16" />
|
||||
<!--*TODO: Should only appear on rollover-->
|
||||
<button
|
||||
|
|
@ -71,6 +83,6 @@
|
|||
name="profile_btn"
|
||||
tab_stop="false"
|
||||
tool_tip="View profile"
|
||||
top_delta="-2"
|
||||
top_delta="0"
|
||||
width="20" />
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -53,10 +53,22 @@
|
|||
text_color="ScrollUnselectedColor"
|
||||
use_ellipses="true"
|
||||
/>
|
||||
<button
|
||||
name="notices_btn"
|
||||
tool_tip="Group Notices"
|
||||
top_delta="-4"
|
||||
left_pad="3"
|
||||
right="-80"
|
||||
height="20"
|
||||
width="20"
|
||||
follows="right"
|
||||
image_pressed="Group_Notices"
|
||||
image_unselected="Group_Notices"
|
||||
tab_stop="false"/>
|
||||
<button
|
||||
name="visibility_hide_btn"
|
||||
tool_tip="Hide group on my profile"
|
||||
top_delta="-3"
|
||||
top_delta="0"
|
||||
left_pad="3"
|
||||
right="-53"
|
||||
height="20"
|
||||
|
|
|
|||
Loading…
Reference in New Issue