summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llchiclet.cpp26
-rw-r--r--indra/newview/llchiclet.h11
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml17
3 files changed, 23 insertions, 31 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 4078fac4ec..caf6917d90 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -81,27 +81,17 @@ LLNotificationChiclet::Params::Params()
button.tab_stop(FALSE);
button.label(LLStringUtil::null);
- unread_notifications.name("unread");
- unread_notifications.font(LLFontGL::getFontSansSerif());
- unread_notifications.text_color=(LLColor4::white);
- unread_notifications.font_halign(LLFontGL::HCENTER);
- unread_notifications.mouse_opaque(FALSE);
}
LLNotificationChiclet::LLNotificationChiclet(const Params& p)
: LLChiclet(p)
, mButton(NULL)
-, mCounterCtrl(NULL)
+, mCounter(0)
{
LLButton::Params button_params = p.button;
- button_params.rect(p.rect());
mButton = LLUICtrlFactory::create<LLButton>(button_params);
addChild(mButton);
- LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications;
- mCounterCtrl = LLUICtrlFactory::create<LLChicletNotificationCounterCtrl>(unread_params);
- addChild(mCounterCtrl);
-
// connect counter handlers to the signals
connectCounterUpdatersToSignal("notify");
connectCounterUpdatersToSignal("groupnotify");
@@ -126,13 +116,15 @@ void LLNotificationChiclet::connectCounterUpdatersToSignal(std::string notificat
void LLNotificationChiclet::setCounter(S32 counter)
{
- mCounterCtrl->setCounter(counter);
-}
+ std::string s_count;
+ if(counter != 0)
+ {
+ s_count = llformat("%d", counter);
+ }
-void LLNotificationChiclet::setShowCounter(bool show)
-{
- LLChiclet::setShowCounter(show);
- mCounterCtrl->setVisible(getShowCounter());
+ mButton->setLabel(s_count);
+
+ mCounter = counter;
}
boost::signals2::connection LLNotificationChiclet::setClickCallback(
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index eab4a282f5..bb5dc1e550 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -638,13 +638,14 @@ public:
/*virtual*/ void setCounter(S32 counter);
- /*virtual*/S32 getCounter() { return mCounterCtrl->getCounter(); }
-
- /*virtual*/ void setShowCounter(bool show);
+ // *TODO: mantipov: seems getCounter is not necessary for LLNotificationChiclet
+ // but inherited interface requires it to implement.
+ // Probably it can be safe removed.
+ /*virtual*/S32 getCounter() { return mCounter; }
boost::signals2::connection setClickCallback(const commit_callback_t& cb);
- /*virtual*/ ~ LLNotificationChiclet();
+ /*virtual*/ ~LLNotificationChiclet();
// methods for updating a number of unread System notifications
void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); }
@@ -662,7 +663,7 @@ protected:
protected:
LLButton* mButton;
- LLChicletNotificationCounterCtrl* mCounterCtrl;
+ S32 mCounter;
};
/*
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index d2933c0c0e..00711a29e0 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -299,8 +299,8 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
min_height="28"
top="0"
name="sys_well_panel"
- width="34"
- min_width="34"
+ width="54"
+ min_width="54"
user_resize="false">
<chiclet_notification
follows="right"
@@ -309,22 +309,21 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
left="0"
name="sys_well"
top="4"
- width="34">
+ width="54">
<button
auto_resize="true"
halign="right"
height="23"
follows="right"
flash_color="EmphasisColor"
+ left="0"
name="Unread"
image_overlay="Notices_Unread"
- width="20"
+ image_overlay_alignment="right"
+ pad_right="6"
+ pad_left="6"
+ width="54"
/>
- <unread_notifications
- width="34"
- height="20"
- left="0"
- top="19" />
</chiclet_notification>
</layout_panel>
<icon