From 215b95eb64ebea58d6f2bda5f90e307836aca093 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 18 Nov 2009 11:35:11 +0200 Subject: related to EXT-2515 "Docked floaters should be resizeable" avoid undock floater when resize initiated not by user --HG-- branch : product-engine --- indra/llui/lldockablefloater.cpp | 10 ---------- indra/llui/lldockablefloater.h | 1 - indra/llui/llresizehandle.cpp | 6 ++++++ 3 files changed, 6 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 9a2f2ab4d3..9c69e4f2b6 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -206,16 +206,6 @@ void LLDockableFloater::draw() LLFloater::draw(); } -void LLDockableFloater::reshape(S32 width, S32 height, BOOL called_from_parent) -{ - if (isDocked()) - { - setDocked(false); - } - - LLFloater::reshape(width, height, called_from_parent); -} - void LLDockableFloater::setDockControl(LLDockControl* dockControl) { mDockControl.reset(dockControl); diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index e5f94dca91..46491d8a29 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -65,7 +65,6 @@ public: /* virtula */BOOL postBuild(); /* virtual */void setDocked(bool docked, bool pop_on_undock = true); /* virtual */void draw(); - /* virtual */void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /** * If descendant class overrides setVisible() then it must still invoke its diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp index 7449c339a0..6239a8f721 100644 --- a/indra/llui/llresizehandle.cpp +++ b/indra/llui/llresizehandle.cpp @@ -135,6 +135,12 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) LLView* resizing_view = getParent(); if( resizing_view ) { + // undock floater when user resize it + if (((LLFloater*)getParent())->isDocked()) + { + ((LLFloater*)getParent())->setDocked(false, false); + } + // Resize the parent LLRect orig_rect = resizing_view->getRect(); LLRect scaled_rect = orig_rect; -- cgit v1.2.3 From c22a90669c78bd206593d112d44e9c6cbc1503fb Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 18 Nov 2009 13:04:17 +0200 Subject: Work on normal sub-task EXT-2553 (Change Sys well icon & Counter according to ALTERNATE design) - implemented counter next to the left from an envelope icon. - button now has fixed width for 3 digits. --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 26 ++++++++-------------- indra/newview/llchiclet.h | 11 ++++----- .../skins/default/xui/en/panel_bottomtray.xml | 17 +++++++------- 3 files changed, 23 insertions(+), 31 deletions(-) (limited to 'indra') 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(button_params); addChild(mButton); - LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications; - mCounterCtrl = LLUICtrlFactory::create(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"> + width="54">