diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2009-11-09 19:07:15 +0200 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2009-11-09 19:07:15 +0200 |
commit | 7e3cc1374795bc43646aecd29a0d4152b750c68e (patch) | |
tree | 442a9363cf9f1a1efcc634abbe838197ed4a4a48 /indra | |
parent | 9c5d1fd3bd9f9cfb20341b9fb7b1046784206432 (diff) |
Fixed normal bug EXT-2103 (There are no arrow icons on the Chiclets overflow buttons),
but Erica will have to set appropriate icon.
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llchiclet.cpp | 55 | ||||
-rw-r--r-- | indra/newview/llchiclet.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_bottomtray.xml | 27 |
4 files changed, 43 insertions, 44 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 9b27ea4728..0d724e32fb 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -58,7 +58,6 @@ static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t4("chiclet_im_group") static const LLRect CHICLET_RECT(0, 25, 25, 0); static const LLRect CHICLET_ICON_RECT(0, 24, 24, 0); static const LLRect VOICE_INDICATOR_RECT(25, 25, 45, 0); -static const LLRect PANEL_SCROLL_BUTTON_RECT(0, 25, 19, 5); S32 LLNotificationChiclet::mUreadSystemNotifications = 0; @@ -783,8 +782,6 @@ void LLIMGroupChiclet::onMenuItemClicked(const LLSD& user_data) LLChicletPanel::Params::Params() : chiclet_padding("chiclet_padding") , scrolling_offset("scrolling_offset") -, left_scroll_button("left_scroll_button") -, right_scroll_button("right_scroll_button") , min_width("min_width") { chiclet_padding = 3; @@ -795,22 +792,6 @@ LLChicletPanel::Params::Params() // min_width = 4 chiclets + 3 paddings min_width = 179 + 3*chiclet_padding; } - - left_scroll_button.name("left_scroll"); - left_scroll_button.label(LLStringUtil::null); - left_scroll_button.rect(PANEL_SCROLL_BUTTON_RECT); - left_scroll_button.tab_stop(false); - left_scroll_button.image_selected(LLUI::getUIImage("bottom_tray_scroll_left.tga")); - left_scroll_button.image_unselected(LLUI::getUIImage("bottom_tray_scroll_left.tga")); - left_scroll_button.image_hover_selected(LLUI::getUIImage("bottom_tray_scroll_left.tga")); - - right_scroll_button.name("right_scroll"); - right_scroll_button.label(LLStringUtil::null); - right_scroll_button.rect(PANEL_SCROLL_BUTTON_RECT); - right_scroll_button.tab_stop(false); - right_scroll_button.image_selected(LLUI::getUIImage("bottom_tray_scroll_right.tga")); - right_scroll_button.image_unselected(LLUI::getUIImage("bottom_tray_scroll_right.tga")); - right_scroll_button.image_hover_selected(LLUI::getUIImage("bottom_tray_scroll_right.tga")); }; LLChicletPanel::LLChicletPanel(const Params&p) @@ -823,23 +804,6 @@ LLChicletPanel::LLChicletPanel(const Params&p) , mMinWidth(p.min_width) , mShowControls(true) { - LLButton::Params scroll_button_params = p.left_scroll_button; - - mLeftScrollButton = LLUICtrlFactory::create<LLButton>(scroll_button_params); - addChild(mLeftScrollButton); - LLTransientFloaterMgr::getInstance()->addControlView(mLeftScrollButton); - - mLeftScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this)); - mLeftScrollButton->setEnabled(false); - - scroll_button_params = p.right_scroll_button; - mRightScrollButton = LLUICtrlFactory::create<LLButton>(scroll_button_params); - addChild(mRightScrollButton); - LLTransientFloaterMgr::getInstance()->addControlView(mRightScrollButton); - - mRightScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onRightScrollClick,this)); - mRightScrollButton->setEnabled(false); - LLPanel::Params panel_params; mScrollArea = LLUICtrlFactory::create<LLPanel>(panel_params,this); @@ -890,6 +854,16 @@ BOOL LLChicletPanel::postBuild() LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLChicletPanel::findChiclet<LLChiclet>, this, _1)); LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLChicletPanel::onCurrentVoiceChannelChanged, this, _1)); + mLeftScrollButton=getChild<LLButton>("chicklet_left_scroll_button"); + LLTransientFloaterMgr::getInstance()->addControlView(mLeftScrollButton); + mLeftScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this)); + mLeftScrollButton->setEnabled(false); + + mRightScrollButton=getChild<LLButton>("chicklet_right_scroll_button"); + LLTransientFloaterMgr::getInstance()->addControlView(mRightScrollButton); + mRightScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onRightScrollClick,this)); + mRightScrollButton->setEnabled(false); + return TRUE; } @@ -1065,23 +1039,24 @@ void LLChicletPanel::reshape(S32 width, S32 height, BOOL called_from_parent ) static const S32 SCROLL_BUTTON_PAD = 5; + //Needed once- to avoid error at first call of reshape() before postBuild() + if(!mLeftScrollButton||!mRightScrollButton) + return; + LLRect scroll_button_rect = mLeftScrollButton->getRect(); mLeftScrollButton->setRect(LLRect(0,height,scroll_button_rect.getWidth(), height - scroll_button_rect.getHeight())); - scroll_button_rect = mRightScrollButton->getRect(); mRightScrollButton->setRect(LLRect(width - scroll_button_rect.getWidth(),height, width, height - scroll_button_rect.getHeight())); - mScrollArea->setRect(LLRect(scroll_button_rect.getWidth() + SCROLL_BUTTON_PAD, height, width - scroll_button_rect.getWidth() - SCROLL_BUTTON_PAD, 0)); - mShowControls = width > mMinWidth; mScrollArea->setVisible(mShowControls); trimChiclets(); - showScrollButtonsIfNeeded(); + } void LLChicletPanel::arrange() diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 15c9a0bad8..97af82fe2f 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -677,9 +677,6 @@ public: Optional<S32> chiclet_padding, scrolling_offset; - Optional<LLButton::Params> left_scroll_button, - right_scroll_button; - Optional<S32> min_width; Params(); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index fba8e0b06c..0e533b1c0e 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -30,6 +30,8 @@ <texture name="Blank" file_name="Blank.png" preload="false" /> <texture name="BottomTray_BG" file_name="bottomtray/BottomTray_BG.png" preload="false" /> + <texture name="BottomTray_Scroll_Right" file_name="navbar/Arrow_Right_Off.png" preload="false" /> + <texture name="BottomTray_Scroll_Left" file_name="navbar/Arrow_Left_Off.png" preload="false" /> <texture name="BuyArrow_Off" file_name="navbar/BuyArrow_Off.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> <texture name="BuyArrow_Over" file_name="navbar/BuyArrow_Over.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index f833e0a1cb..ef91c6cd6e 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -233,7 +233,32 @@ top="0" chiclet_padding="3" scrolling_offset="40" - width="189" /> + width="189"> + <button + auto_resize="true" + follows="right" + height="23" + image_selected="BottomTray_Scroll_Left" + image_unselected="BottomTray_Scroll_Left" + layout="topleft" + name="chicklet_left_scroll_button" + tab_stop="false" + top="3" + visible="false" + width="20" /> + <button + auto_resize="true" + follows="right" + height="23" + image_selected="BottomTray_Scroll_Right" + image_unselected="BottomTray_Scroll_Right" + layout="topleft" + name="chicklet_right_scroll_button" + tab_stop="false" + top="3" + visible="false" + width="20" /> + </chiclet_panel> </layout_panel> <icon auto_resize="false" |