From 4fc7b91a795fb4ad0eaf3b6c7a1779679889fcbf Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 11 Dec 2009 14:26:27 +0200 Subject: =?UTF-8?q?implemented=20EXT-2323=20=E2=80=9CGet=20rid=20from=20ob?= =?UTF-8?q?solete=20notification=20widgets=E2=80=9D;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/llui/CMakeLists.txt | 2 -- indra/llui/llpanel.cpp | 1 - 2 files changed, 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 74b49b846e..82ec02d2eb 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -26,7 +26,6 @@ include_directories( ) set(llui_SOURCE_FILES - llalertdialog.cpp llbutton.cpp llcheckboxctrl.cpp llclipboard.cpp @@ -112,7 +111,6 @@ set(llui_SOURCE_FILES set(llui_HEADER_FILES CMakeLists.txt - llalertdialog.h llbutton.h llcallbackmap.h llcheckboxctrl.h diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 750b190953..de2b43bf13 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -37,7 +37,6 @@ #define LLPANEL_CPP #include "llpanel.h" -#include "llalertdialog.h" #include "llfocusmgr.h" #include "llfontgl.h" #include "llrect.h" -- cgit v1.2.3 From f8f1252d32824d99e6f51fd1ea9789c1097f44de Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 15 Dec 2009 09:55:00 +0200 Subject: =?UTF-8?q?mplemented=20EXT-3396=20=E2=80=9CAll=20bottom=20bar=20b?= =?UTF-8?q?uttons,=20including=20chiclets=20and=20nearby=20chat,=20should?= =?UTF-8?q?=20work=20as=20toggles=E2=80=9D,=20made=20hide/unhide=20dockabl?= =?UTF-8?q?e=20floaters=20when=20undocked;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/llui/lldockablefloater.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 9c69e4f2b6..63faf44f9d 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -98,8 +98,15 @@ void LLDockableFloater::toggleInstance(const LLSD& sdname) else if (instance != NULL) { instance->setMinimized(FALSE); - instance->setVisible(TRUE); - gFloaterView->bringToFront(instance); + if (instance->getVisible()) + { + instance->setVisible(FALSE); + } + else + { + instance->setVisible(TRUE); + gFloaterView->bringToFront(instance); + } } } -- cgit v1.2.3 From 7ba2f99ae01f0bc08c869e8a250c888a5c17c49a Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 15 Dec 2009 19:10:27 +0200 Subject: =?UTF-8?q?mplemented=20EXT-3395=20=E2=80=9CDocked=20IM/Chat=20win?= =?UTF-8?q?dows=20shouldn't=20hide=20when=20voice=20control=20panel=20is?= =?UTF-8?q?=20opened=E2=80=9D;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/llui/lldockablefloater.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 63faf44f9d..9dc7861992 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -38,6 +38,8 @@ //static LLHandle LLDockableFloater::sInstanceHandle; +static const std::string VOICE_FLOATER("floater_voice_controls"), IM_FLOATER("panel_im"); + //static void LLDockableFloater::init(LLDockableFloater* thiz) { @@ -114,9 +116,11 @@ void LLDockableFloater::resetInstance() { if (mUniqueDocking && sInstanceHandle.get() != this) { - if (sInstanceHandle.get() != NULL && sInstanceHandle.get()->isDocked()) + if (sInstanceHandle.get() != NULL && sInstanceHandle.get()->isDocked() + && (getName() != VOICE_FLOATER || sInstanceHandle.get()->getName() != IM_FLOATER) + && (getName() != IM_FLOATER || sInstanceHandle.get()->getName() != VOICE_FLOATER)) { - sInstanceHandle.get()->setVisible(FALSE); + sInstanceHandle.get()->setVisible(FALSE); } sInstanceHandle = getHandle(); } -- cgit v1.2.3 From 87ef5c2472c5be44cc47ab3bbae1951a5c3a3a6a Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 15 Dec 2009 09:54:50 -0800 Subject: EXT-3471 Tabs need a pad_bottom override attribute Added label_pad_bottom and label_pad_left for tab containers. --- indra/llui/lltabcontainer.cpp | 13 ++++++++----- indra/llui/lltabcontainer.h | 9 ++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 2d9106923e..83e2e3db50 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -120,6 +120,8 @@ LLTabContainer::Params::Params() tab_min_width("tab_min_width"), tab_max_width("tab_max_width"), tab_height("tab_height"), + label_pad_bottom("label_pad_bottom"), + label_pad_left("label_pad_left"), tab_position("tab_position"), hide_tabs("hide_tabs", false), tab_padding_right("tab_padding_right"), @@ -145,6 +147,8 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mMinTabWidth(0), mMaxTabWidth(p.tab_max_width), mTabHeight(p.tab_height), + mLabelPadBottom(p.label_pad_bottom), + mLabelPadLeft(p.label_pad_left), mPrevArrowBtn(NULL), mNextArrowBtn(NULL), mIsVertical( p.tab_position == LEFT ), @@ -906,7 +910,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) if (placeholder) { - btn_rect.translate(0, -3); // *TODO: make configurable + btn_rect.translate(0, -6); // *TODO: make configurable LLTextBox::Params params; params.name(trimmed_label); params.rect(btn_rect); @@ -933,6 +937,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) p.image_selected(mMiddleTabParams.tab_left_image_selected); p.scale_image(true); p.font_halign = mFontHalign; + p.pad_bottom( mLabelPadBottom ); p.tab_stop(false); p.label_shadow(false); if (indent) @@ -956,8 +961,9 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) p.tab_stop(false); p.label_shadow(false); // Try to squeeze in a bit more text - p.pad_left(4); + p.pad_left( mLabelPadLeft ); p.pad_right(2); + p.pad_bottom( mLabelPadBottom ); p.font_halign = mFontHalign; p.follows.flags = FOLLOWS_LEFT; p.follows.flags = FOLLOWS_LEFT; @@ -1897,6 +1903,3 @@ void LLTabContainer::commitHoveredButton(S32 x, S32 y) } } } - - - diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index be9c6c7d06..5d0f194bf9 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -79,7 +79,9 @@ public: Optional tab_width, tab_min_width, tab_max_width, - tab_height; + tab_height, + label_pad_bottom, + label_pad_left; Optional hide_tabs; Optional tab_padding_right; @@ -261,6 +263,11 @@ private: S32 mTotalTabWidth; S32 mTabHeight; + // Padding under the text labels of tab buttons + S32 mLabelPadBottom; + // Padding to the left of text labels of tab buttons + S32 mLabelPadLeft; + LLFrameTimer mDragAndDropDelayTimer; LLFontGL::HAlign mFontHalign; -- cgit v1.2.3 From a183fb9f5efd5c49a0da7442dd8b7202db6167e7 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Tue, 15 Dec 2009 19:48:02 -0800 Subject: fix for gcc build --- indra/llui/lluictrlfactory.cpp | 1 + indra/llui/lluictrlfactory.h | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 625d3c63e5..40b22f515a 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -396,6 +396,7 @@ BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const std::string& na //static void LLUICtrlFactory::setCtrlParent(LLView* view, LLView* parent, S32 tab_group) { + if (tab_group == S32_MAX) tab_group = parent->getLastTabGroup(); parent->addChild(view, tab_group); } diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 6dab9521bb..9d26a9c9ef 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -201,7 +201,7 @@ public: if (parent) { - S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : parent->getLastTabGroup(); + S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : S32_MAX; setCtrlParent(widget, parent, tab_group); } return widget; @@ -311,7 +311,8 @@ fail: T* widget = createWidget(params, parent); - createChildren(widget, node, typename T::child_registry_t::instance(), output_node); + typedef typename T::child_registry_t registry_t; + createChildren(widget, node, registry_t::instance(), output_node); if (widget && !widget->postBuild()) { -- cgit v1.2.3 From 46f56f5d528ea3566f00e058250cb06361c2c10e Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 16 Dec 2009 09:45:15 -0800 Subject: eof newline --- indra/llui/lluictrlfactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 40b22f515a..01715c2792 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -455,4 +455,4 @@ dummy_widget_creator_func_t* LLUICtrlFactory::getDefaultWidgetFunc(const std::ty const std::string* LLUICtrlFactory::getWidgetTag(const std::type_info* widget_type) { return LLWidgetNameRegistry::instance().getValue(widget_type); -} \ No newline at end of file +} -- cgit v1.2.3 From d2ba39861475ce716ad7fd4a176553dd1dc056ca Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 16 Dec 2009 14:40:11 -0800 Subject: EXT-3522 Radio group layout not top-left based (was Sell Land floater missing sale of object) Most radio button layouts were broken because the radio item generation code wasn't fixing up the rectangles. This may not be the right fix, I need to talk to Richard. --- indra/llui/llradiogroup.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 74e30cd633..366290fd70 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -116,6 +116,10 @@ void LLRadioGroup::initFromParams(const Params& p) item_params.commit_callback.function = boost::bind(&LLRadioGroup::onClickButton, this, _1); item_params.from_xui = p.from_xui; + // *HACK: Because we are explicitly building our own children, + // need to fix-up layout for topleft + LLRadioCtrl::setupParams(item_params, this); + LLRadioCtrl* item = LLUICtrlFactory::create(item_params, this); mRadioButtons.push_back(item); } -- cgit v1.2.3 From 0be35a9fdb7fced0787653cb6f4aa45c2bf20a50 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 16 Dec 2009 16:03:37 -0800 Subject: Backed out changeset: f7fa81994ec8, 6611 (f7fa81994ec8) EXT-3522 Radio group layout not top-left based (was Sell Land floater missing sa --- indra/llui/llradiogroup.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 366290fd70..74e30cd633 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -116,10 +116,6 @@ void LLRadioGroup::initFromParams(const Params& p) item_params.commit_callback.function = boost::bind(&LLRadioGroup::onClickButton, this, _1); item_params.from_xui = p.from_xui; - // *HACK: Because we are explicitly building our own children, - // need to fix-up layout for topleft - LLRadioCtrl::setupParams(item_params, this); - LLRadioCtrl* item = LLUICtrlFactory::create(item_params, this); mRadioButtons.push_back(item); } -- cgit v1.2.3 From f452c01915be011814d92dcc1a398f450b6ce9c2 Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 17 Dec 2009 09:54:44 -0800 Subject: EXT-3087 - Crash when avatar icon truncated in interactive notifications reviewed by Mani --- indra/llui/lltextbase.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 1f120a1483..6c983fd92e 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1138,6 +1138,8 @@ void LLTextBase::reflow(S32 start_index) line_height = llmax(line_height, segment_height); remaining_pixels -= segment_width; + // getNumChars() and getDimensions() should return consistent results + llassert_always(remaining_pixels >= 0); seg_offset += character_count; S32 last_segment_char_on_line = segment->getStart() + seg_offset; @@ -2464,6 +2466,12 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin { LLWString text = mEditor.getWText(); + LLUIImagePtr image = mStyle->getImage(); + if( image.notNull()) + { + num_pixels -= image->getWidth(); + } + // search for newline and if found, truncate there S32 last_char = mStart + segment_offset; for (; last_char != mEnd; ++last_char) -- cgit v1.2.3