EXT-7104 FIXED Removed bottom separator in the context menu over bottomtray buttons. Task implementation is already completed.
Also minor refactoring: * updated removing of chatbar menu items * removed useless instance members Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/424/ --HG-- branch : product-engine
parent
fa9d0e4a6c
commit
88820c843b
|
|
@ -156,10 +156,6 @@ LLBottomTray::LLBottomTray(const LLSD&)
|
|||
, mMovementButton(NULL)
|
||||
, mResizeState(RS_NORESIZE)
|
||||
, mBottomTrayContextMenu(NULL)
|
||||
, mMovementPanel(NULL)
|
||||
, mCamPanel(NULL)
|
||||
, mSnapshotPanel(NULL)
|
||||
, mGesturePanel(NULL)
|
||||
, mCamButton(NULL)
|
||||
, mBottomTrayLite(NULL)
|
||||
, mIsInLiteMode(false)
|
||||
|
|
@ -421,22 +417,12 @@ void LLBottomTray::updateContextMenu(S32 x, S32 y, MASK mask)
|
|||
|
||||
bool in_edit_box = edit_box->pointInView(local_x, local_y);
|
||||
|
||||
LLMenuItemGL* menu_item;
|
||||
menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Cut");
|
||||
if(menu_item)
|
||||
menu_item->setVisible(in_edit_box);
|
||||
menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Copy");
|
||||
if(menu_item)
|
||||
menu_item->setVisible(in_edit_box);
|
||||
menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Paste");
|
||||
if(menu_item)
|
||||
menu_item->setVisible(in_edit_box);
|
||||
menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Delete");
|
||||
if(menu_item)
|
||||
menu_item->setVisible(in_edit_box);
|
||||
menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Select_All");
|
||||
if(menu_item)
|
||||
menu_item->setVisible(in_edit_box);
|
||||
mBottomTrayContextMenu->setItemVisible("Separator", in_edit_box);
|
||||
mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Cut", in_edit_box);
|
||||
mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Copy", in_edit_box);
|
||||
mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Paste", in_edit_box);
|
||||
mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Delete", in_edit_box);
|
||||
mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Select_All", in_edit_box);
|
||||
}
|
||||
|
||||
void LLBottomTray::showGestureButton(BOOL visible)
|
||||
|
|
@ -483,12 +469,8 @@ BOOL LLBottomTray::postBuild()
|
|||
|
||||
mNearbyChatBar = getChild<LLNearbyChatBar>("chat_bar");
|
||||
mToolbarStack = getChild<LLLayoutStack>("toolbar_stack");
|
||||
mMovementPanel = getChild<LLPanel>("movement_panel");
|
||||
mMovementButton = mMovementPanel->getChild<LLButton>("movement_btn");
|
||||
mGesturePanel = getChild<LLPanel>("gesture_panel");
|
||||
mCamPanel = getChild<LLPanel>("cam_panel");
|
||||
mCamButton = mCamPanel->getChild<LLButton>("camera_btn");
|
||||
mSnapshotPanel = getChild<LLPanel>("snapshot_panel");
|
||||
mMovementButton = getChild<LLButton>("movement_btn");
|
||||
mCamButton = getChild<LLButton>("camera_btn");
|
||||
setRightMouseDownCallback(boost::bind(&LLBottomTray::showBottomTrayContextMenu,this, _2, _3,_4));
|
||||
|
||||
mSpeakPanel = getChild<LLPanel>("speak_panel");
|
||||
|
|
@ -1177,12 +1159,11 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const
|
|||
|
||||
void LLBottomTray::initResizeStateContainers()
|
||||
{
|
||||
// *TODO: get rid of mGesturePanel, mMovementPanel, mCamPanel, mSnapshotPanel instance members
|
||||
// init map with objects should be processed for each type
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, mGesturePanel));
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, mMovementPanel));
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, mCamPanel));
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel));
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild<LLPanel>("gesture_panel")));
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLPanel>("movement_panel")));
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLPanel>("cam_panel")));
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, getChild<LLPanel>("snapshot_panel")));
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SIDEBAR, getChild<LLPanel>("sidebar_btn_panel")));
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_BUILD, getChild<LLPanel>("build_btn_panel")));
|
||||
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SEARCH, getChild<LLPanel>("search_btn_panel")));
|
||||
|
|
|
|||
|
|
@ -385,10 +385,6 @@ protected:
|
|||
LLNearbyChatBar* mNearbyChatBar;
|
||||
LLLayoutStack* mToolbarStack;
|
||||
LLMenuGL* mBottomTrayContextMenu;
|
||||
LLPanel* mMovementPanel;
|
||||
LLPanel* mCamPanel;
|
||||
LLPanel* mSnapshotPanel;
|
||||
LLPanel* mGesturePanel;
|
||||
LLButton* mCamButton;
|
||||
LLButton* mMovementButton;
|
||||
LLBottomTrayLite* mBottomTrayLite;
|
||||
|
|
|
|||
Loading…
Reference in New Issue