summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llresizebar.cpp5
-rw-r--r--indra/newview/app_settings/settings.xml55
-rw-r--r--indra/newview/llbottomtray.cpp123
-rw-r--r--indra/newview/llbottomtray.h13
-rw-r--r--indra/newview/llsidetray.cpp59
-rw-r--r--indra/newview/llsidetray.h10
-rw-r--r--indra/newview/llviewercontrol.cpp29
-rw-r--r--indra/newview/llviewerwindow.cpp20
-rw-r--r--indra/newview/skins/default/xui/en/menu_bottomtray.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml49
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml2
11 files changed, 253 insertions, 123 deletions
diff --git a/indra/llui/llresizebar.cpp b/indra/llui/llresizebar.cpp
index 0c46edf300..5d26b904b5 100644
--- a/indra/llui/llresizebar.cpp
+++ b/indra/llui/llresizebar.cpp
@@ -182,6 +182,11 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask)
break;
}
+ notifyParent(LLSD().with("action", "resize")
+ .with("view_name", mResizingView->getName())
+ .with("new_height", new_height)
+ .with("new_width", new_width));
+
scaled_rect.mTop = scaled_rect.mBottom + new_height;
scaled_rect.mRight = scaled_rect.mLeft + new_width;
mResizingView->setRect(scaled_rect);
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f71662a7c8..7156af57ec 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8140,17 +8140,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowCameraButton</key>
- <map>
- <key>Comment</key>
- <string>Show/Hide Camera button in the bottom tray</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>ShowScriptErrors</key>
<map>
<key>Comment</key>
@@ -8173,39 +8162,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowSnapshotButton</key>
- <map>
- <key>Comment</key>
- <string>Show/Hide Snapshot button button in the bottom tray</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>ShowMoveButton</key>
- <map>
- <key>Comment</key>
- <string>Show/Hide Move button in the bottom tray</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>ShowGestureButton</key>
- <map>
- <key>Comment</key>
- <string>Show/Hide Gesture button in the bottom tray</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>ShowObjectRenderingCost</key>
<map>
<key>Comment</key>
@@ -8726,6 +8682,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>SidebarWithButtonsVisibility</key>
+ <map>
+ <key>Comment</key>
+ <string>Sets visibility of sidebar with its tabs' buttons</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>SkinCurrent</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 7f528c88b2..0595bedd31 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -61,7 +61,7 @@ namespace
const std::string& PANEL_CAMERA_NAME = "cam_panel";
const std::string& PANEL_GESTURE_NAME = "gesture_panel";
- S32 get_panel_min_width(LLLayoutStack* stack, LLPanel* panel)
+ S32 get_panel_min_width(LLLayoutStack* stack, LLView* panel)
{
S32 minimal_width = 0;
llassert(stack);
@@ -183,6 +183,13 @@ LLBottomTray::~LLBottomTray()
{
LLIMMgr::getInstance()->removeSessionObserver(this);
}
+
+ if (mNearbyChatBar)
+ {
+ // store custom width of chatbar panel.
+ S32 custom_width = mNearbyChatBar->getRect().getWidth();
+ gSavedSettings.setS32("ChatBarCustomWidth", custom_width);
+ }
}
// *TODO Vadim: why void* ?
@@ -361,6 +368,20 @@ S32 LLBottomTray::notifyParent(const LLSD& info)
showWellButton("im_well" == chiclet_name ? RS_IM_WELL : RS_NOTIFICATION_WELL, should_be_visible);
return 1;
}
+
+ if (info.has("action") && info["action"] == "resize")
+ {
+ const std::string& name = info["view_name"];
+
+ // expected only resize of nearby chatbar
+ if (mNearbyChatBar->getName() != name) return LLPanel::notifyParent(info);
+
+ const S32 new_width = info["new_width"];
+
+ processChatbarCustomization(new_width);
+
+ return 2;
+ }
return LLPanel::notifyParent(info);
}
@@ -648,6 +669,24 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent)
if (mNearbyChatBar) log(mNearbyChatBar, "after");
if (mChicletPanel) log(mChicletPanel, "after");
+
+
+ // Restore width of the chatbar on first reshape.
+ // we can not to do this from postBuild because reshape is called from parent view on startup
+ // creation after it and reset width according to resize logic.
+ static bool needs_restore_custom_state = true;
+ if (mNearbyChatBar && needs_restore_custom_state)
+ {
+ // restore custom width of chatbar panel.
+ S32 new_width = gSavedSettings.getS32("ChatBarCustomWidth");
+ if (new_width > 0)
+ {
+ processChatbarCustomization(new_width);
+ mNearbyChatBar->reshape(new_width, mNearbyChatBar->getRect().getHeight());
+ }
+ needs_restore_custom_state = false;
+ }
+
}
S32 LLBottomTray::processWidthDecreased(S32 delta_width)
@@ -1130,6 +1169,7 @@ void LLBottomTray::initResizeStateContainers()
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_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")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_WORLD_MAP, getChild<LLPanel>("world_map_btn_panel")));
@@ -1140,6 +1180,7 @@ void LLBottomTray::initResizeStateContainers()
mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT);
mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA);
mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT);
+ mButtonsProcessOrder.push_back(RS_BUTTON_SIDEBAR);
mButtonsProcessOrder.push_back(RS_BUTTON_BUILD);
mButtonsProcessOrder.push_back(RS_BUTTON_SEARCH);
mButtonsProcessOrder.push_back(RS_BUTTON_WORLD_MAP);
@@ -1155,6 +1196,7 @@ void LLBottomTray::initResizeStateContainers()
{
const EResizeState button_type = *it;
// is there an appropriate object?
+ llassert(mStateProcessedObjectMap.count(button_type) > 0);
if (0 == mStateProcessedObjectMap.count(button_type)) continue;
// set default width for it.
@@ -1166,24 +1208,40 @@ void LLBottomTray::initResizeStateContainers()
}
+// this method must be called before restoring of the chat entry field on startup
+// because it resets chatbar's width according to resize logic.
void LLBottomTray::initButtonsVisibility()
{
- // *TODO: move control settings of other buttons here
- setTrayButtonVisibleIfPossible(RS_BUTTON_BUILD, gSavedSettings.getBOOL("ShowBuildButton"));
- setTrayButtonVisibleIfPossible(RS_BUTTON_SEARCH, gSavedSettings.getBOOL("ShowSearchButton"));
- setTrayButtonVisibleIfPossible(RS_BUTTON_WORLD_MAP, gSavedSettings.getBOOL("ShowWorldMapButton"));
- setTrayButtonVisibleIfPossible(RS_BUTTON_MINI_MAP, gSavedSettings.getBOOL("ShowMiniMapButton"));
+ setVisibleAndFitWidths(RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton"));
+ setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton"));
+ setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton"));
+ setVisibleAndFitWidths(RS_BUTTON_SNAPSHOT, gSavedSettings.getBOOL("ShowSnapshotButton"));
+ setVisibleAndFitWidths(RS_BUTTON_SIDEBAR, gSavedSettings.getBOOL("ShowSidebarButton"));
+ setVisibleAndFitWidths(RS_BUTTON_BUILD, gSavedSettings.getBOOL("ShowBuildButton"));
+ setVisibleAndFitWidths(RS_BUTTON_SEARCH, gSavedSettings.getBOOL("ShowSearchButton"));
+ setVisibleAndFitWidths(RS_BUTTON_WORLD_MAP, gSavedSettings.getBOOL("ShowWorldMapButton"));
+ setVisibleAndFitWidths(RS_BUTTON_MINI_MAP, gSavedSettings.getBOOL("ShowMiniMapButton"));
}
void LLBottomTray::setButtonsControlsAndListeners()
{
- // *TODO: move control settings of other buttons here
+ gSavedSettings.declareBOOL("ShowGestureButton", TRUE, "Shows/Hides Gesture button in the bottom tray. (Declared in code)");
+ gSavedSettings.declareBOOL("ShowMoveButton", TRUE, "Shows/Hides Move button in the bottom tray. (Declared in code)");
+ gSavedSettings.declareBOOL("ShowSnapshotButton", TRUE, "Shows/Hides Snapshot button button in the bottom tray. (Declared in code)");
+ gSavedSettings.declareBOOL("ShowCameraButton", TRUE, "Show/Hide View button in the bottom tray. (Declared in code)");
+ gSavedSettings.declareBOOL("ShowSidebarButton", TRUE, "Shows/hides Sidebar button in the bottom tray. (Declared in code)");
gSavedSettings.declareBOOL("ShowBuildButton", TRUE, "Shows/Hides Build button in the bottom tray. (Declared in code)");
gSavedSettings.declareBOOL("ShowSearchButton", TRUE, "Shows/Hides Search button in the bottom tray. (Declared in code)");
gSavedSettings.declareBOOL("ShowWorldMapButton", TRUE, "Shows/Hides Map button in the bottom tray. (Declared in code)");
gSavedSettings.declareBOOL("ShowMiniMapButton", TRUE, "Shows/Hides Mini-Map button in the bottom tray. (Declared in code)");
+ gSavedSettings.declareS32("ChatBarCustomWidth", 0, "Stores customized width of chat bar. (Declared in code)");
+ gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2));
+ gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2));
+ gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2));
+ gSavedSettings.getControl("ShowSnapshotButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SNAPSHOT, _2));
+ gSavedSettings.getControl("ShowSidebarButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SIDEBAR, _2));
gSavedSettings.getControl("ShowBuildButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_BUILD, _2));
gSavedSettings.getControl("ShowSearchButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SEARCH, _2));
gSavedSettings.getControl("ShowWorldMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_WORLD_MAP, _2));
@@ -1262,17 +1320,18 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible
const S32 chatbar_shrunk_width =
mNearbyChatBar->getRect().getWidth() - get_panel_min_width(mToolbarStack, mNearbyChatBar);
- const S32 sum_of_min_widths =
- get_panel_min_width(mToolbarStack, mStateProcessedObjectMap[RS_BUTTON_CAMERA]) +
- get_panel_min_width(mToolbarStack, mStateProcessedObjectMap[RS_BUTTON_MOVEMENT]) +
- get_panel_min_width(mToolbarStack, mStateProcessedObjectMap[RS_BUTTON_GESTURES]) +
- get_panel_min_width(mToolbarStack, mSpeakPanel);
+ S32 sum_of_min_widths = get_panel_min_width(mToolbarStack, mSpeakPanel);
+ S32 sum_of_curr_widths = get_curr_width(mSpeakPanel);
+
+ resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin();
+ const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end();
- const S32 sum_of_curr_widths =
- get_curr_width(mStateProcessedObjectMap[RS_BUTTON_CAMERA]) +
- get_curr_width(mStateProcessedObjectMap[RS_BUTTON_MOVEMENT]) +
- get_curr_width(mStateProcessedObjectMap[RS_BUTTON_GESTURES]) +
- get_curr_width(mSpeakPanel);
+ for (; it != it_end; ++it)
+ {
+ LLPanel * cur_panel = mStateProcessedObjectMap[*it];
+ sum_of_min_widths += get_panel_min_width(mToolbarStack, cur_panel);
+ sum_of_curr_widths += get_curr_width(cur_panel);
+ }
const S32 possible_shrunk_width =
chatbar_shrunk_width + (sum_of_curr_widths - sum_of_min_widths);
@@ -1352,4 +1411,34 @@ void LLBottomTray::showWellButton(EResizeState object_type, bool visible)
}
}
+void LLBottomTray::processChatbarCustomization(S32 new_width)
+{
+ if (NULL == mNearbyChatBar) return;
+
+ const S32 delta_width = mNearbyChatBar->getRect().getWidth() - new_width;
+
+ if (delta_width == 0) return;
+
+ LLView * chiclet_layout_panel = mChicletPanel->getParent();
+ const S32 chiclet_min_width = get_panel_min_width(mToolbarStack, chiclet_layout_panel);
+ const S32 chiclet_panel_width = chiclet_layout_panel->getRect().getWidth();
+ const S32 available_chiclet_shrink_width = chiclet_panel_width - chiclet_min_width;
+ llassert(available_chiclet_shrink_width >= 0);
+
+ if (delta_width > 0) // panel gets narrowly
+ {
+ S32 total_possible_width = delta_width + available_chiclet_shrink_width;
+ processShowButtons(total_possible_width);
+ processExtendButtons(total_possible_width);
+ }
+ // here (delta_width < 0) // panel gets wider
+ else //if (-delta_width > available_chiclet_shrink_width)
+ {
+ S32 required_width = delta_width + available_chiclet_shrink_width;
+ S32 buttons_freed_width = 0;
+ processShrinkButtons(required_width, buttons_freed_width);
+ processHideButtons(required_width, buttons_freed_width);
+ }
+}
+
//EOF
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 5588aefb42..889dc42097 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -124,6 +124,7 @@ private:
, RS_BUTTON_SEARCH = 0x0400
, RS_BUTTON_WORLD_MAP = 0x0800
, RS_BUTTON_MINI_MAP = 0x1000
+ , RS_BUTTON_SIDEBAR = 0x2000
/*
Once new button that can be hidden on resize is added don't forget to update related places:
@@ -138,6 +139,7 @@ private:
*/
, RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES
| RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP
+ | RS_BUTTON_SIDEBAR
}EResizeState;
/**
@@ -341,6 +343,17 @@ private:
*/
void showWellButton(EResizeState object_type, bool visible);
+ /**
+ * Handles a customization of chatbar width.
+ *
+ * When chatbar gets wider layout stack will reduce chiclet panel (it is auto-resizable)
+ * But once chiclet panel reaches its minimal width Stack will force to reduce buttons width.
+ * including Speak button. The similar behavior is when chatbar gets narrowly.
+ * This methods force resize behavior to resize buttons properly in these cases.
+ */
+ void processChatbarCustomization(S32 new_width);
+
+
MASK mResizeState;
typedef std::map<EResizeState, LLPanel*> state_object_map_t;
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 3ec1855484..9159f42968 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -66,6 +66,21 @@ static const std::string TAB_PANEL_CAPTION_TITLE_BOX = "sidetray_tab_title";
LLSideTray* LLSideTray::sInstance = 0;
+/**
+ * Updates visibility of sidetray tabs buttons according to "SidebarWithButtonsVisibility" setting
+ *
+ * @param force_set_visible if true method ignores setting value and set buttons visible.
+ */
+static void update_tabs_buttons_visibility(bool force_set_visible = false)
+{
+ LLView* side_bar_tabs = gViewerWindow->getRootView()->getChildView("side_bar_tabs");
+ if (side_bar_tabs)
+ {
+ BOOL visible = LLUI::sSettingGroups["config"]->getBOOL("SidebarWithButtonsVisibility");
+ side_bar_tabs->setVisible(force_set_visible || visible);
+ }
+}
+
LLSideTray* LLSideTray::getInstance()
{
if (!sInstance)
@@ -258,6 +273,8 @@ LLSideTray::LLSideTray(Params& params)
p.name = "buttons_panel";
p.mouse_opaque = false;
mButtonsPanel = LLUICtrlFactory::create<LLPanel>(p);
+
+ initControlSettings();
}
@@ -547,6 +564,7 @@ void LLSideTray::collapseSideBar()
reflectCollapseChange();
setFocus( FALSE );
+ update_tabs_buttons_visibility();
}
void LLSideTray::expandSideBar()
@@ -572,6 +590,7 @@ void LLSideTray::expandSideBar()
btn->setImageOverlay( mActiveTab->mImageSelected );
}
+ update_tabs_buttons_visibility(true);
}
void LLSideTray::highlightFocused()
@@ -638,6 +657,9 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para
{
panel->onOpen(params);
}
+
+ update_tabs_buttons_visibility(true);
+
return panel;
}
}
@@ -720,11 +742,6 @@ bool LLSideTray::isPanelActive(const std::string& panel_name)
return (panel->getName() == panel_name);
}
-
-// *TODO: Eliminate magic constants.
-static const S32 fake_offset = 132;
-static const S32 fake_top_offset = 18;
-
void LLSideTray::updateSidetrayVisibility()
{
// set visibility of parent container based on collapsed state
@@ -734,3 +751,35 @@ void LLSideTray::updateSidetrayVisibility()
}
}
+void LLSideTray::initControlSettings()
+{
+ // set listeners to process runtime setting changes
+ LLUI::sSettingGroups["config"]->getControl("SidebarWithButtonsVisibility")->getSignal()->connect(boost::bind(&LLSideTray::toggleSidetrayAndTabButtonsVisibility, this, _2));
+
+ // update visibility according to current value
+ toggleSidetrayAndTabButtonsVisibility(LLUI::sSettingGroups["config"]->getBOOL("SidebarWithButtonsVisibility"));
+}
+
+// sidebar visibility is implemented via its expanding/collapsing
+void LLSideTray::toggleSidetrayAndTabButtonsVisibility(const LLSD::Boolean& new_visibility)
+{
+ // If new_visibility==FALSE it gets invisible but still can be expanded in other ways (Ctrl+I to see My Inventory)
+
+ // store collapsed state to restore it properly on next call
+ static bool was_collapsed = false;
+
+ if (!new_visibility && !mCollapsed)
+ {
+ collapseSideBar();
+ was_collapsed = true;
+ }
+ // should be visible: expand only if it was expanded when has been collapsed on previous call
+ else if (new_visibility && was_collapsed)
+ {
+ if (mCollapsed) expandSideBar();
+ was_collapsed = false;
+ }
+
+ update_tabs_buttons_visibility(new_visibility);
+}
+
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index e8fdee9430..ed6b376d5c 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -179,6 +179,16 @@ private:
LLSideTray::getInstance()->setEnabled(FALSE);
}
+ /**
+ * Initializes listener of SidebarWithButtonsVisibility setting and updates state according to it.
+ */
+ void initControlSettings();
+
+ /**
+ * Updates Sidebar and its Tab Buttons visibility according to passed value.
+ */
+ void toggleSidetrayAndTabButtonsVisibility(const LLSD::Boolean& new_visibility);
+
private:
LLPanel* mButtonsPanel;
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 514f72c334..f02e15706d 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -70,7 +70,6 @@
#include "llvosurfacepatch.h"
#include "llvowlsky.h"
#include "llrender.h"
-#include "llbottomtray.h"
#include "llnavigationbar.h"
#include "llfloatertools.h"
#include "llpaneloutfitsinventory.h"
@@ -460,30 +459,6 @@ bool toggle_agent_pause(const LLSD& newvalue)
return true;
}
-bool toggle_show_gesture_button(const LLSD& newvalue)
-{
- LLBottomTray::getInstance()->showGestureButton(newvalue.asBoolean());
- return true;
-}
-
-bool toggle_show_move_button(const LLSD& newvalue)
-{
- LLBottomTray::getInstance()->showMoveButton(newvalue.asBoolean());
- return true;
-}
-
-bool toggle_show_camera_button(const LLSD& newvalue)
-{
- LLBottomTray::getInstance()->showCameraButton(newvalue.asBoolean());
- return true;
-}
-
-bool toggle_show_snapshot_button(const LLSD& newvalue)
-{
- LLBottomTray::getInstance()->showSnapshotButton(newvalue.asBoolean());
- return true;
-}
-
bool toggle_show_navigation_panel(const LLSD& newvalue)
{
LLNavigationBar::getInstance()->showNavigationPanel(newvalue.asBoolean());
@@ -638,10 +613,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("QAMode")->getSignal()->connect(boost::bind(&show_debug_menus));
gSavedSettings.getControl("UseDebugMenus")->getSignal()->connect(boost::bind(&show_debug_menus));
gSavedSettings.getControl("AgentPause")->getSignal()->connect(boost::bind(&toggle_agent_pause, _2));
- gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&toggle_show_gesture_button, _2));
- gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&toggle_show_move_button, _2));
- gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&toggle_show_camera_button, _2));
- gSavedSettings.getControl("ShowSnapshotButton")->getSignal()->connect(boost::bind(&toggle_show_snapshot_button, _2));
gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&toggle_show_navigation_panel, _2));
gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2));
gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2));
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 56d22a0608..9b45ffcc82 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1664,26 +1664,6 @@ void LLViewerWindow::initWorldUI()
navbar->showFavoritesPanel(FALSE);
}
- if (!gSavedSettings.getBOOL("ShowCameraButton"))
- {
- LLBottomTray::getInstance()->showCameraButton(FALSE);
- }
-
- if (!gSavedSettings.getBOOL("ShowSnapshotButton"))
- {
- LLBottomTray::getInstance()->showSnapshotButton(FALSE);
- }
-
- if (!gSavedSettings.getBOOL("ShowMoveButton"))
- {
- LLBottomTray::getInstance()->showMoveButton(FALSE);
- }
-
- if (!gSavedSettings.getBOOL("ShowGestureButton"))
- {
- LLBottomTray::getInstance()->showGestureButton(FALSE);
- }
-
if ( gHUDView == NULL )
{
LLRect hud_rect = full_window;
diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml
index 5beafef4e4..ccd5388621 100644
--- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml
@@ -53,6 +53,17 @@
parameter="ShowSnapshotButton" />
</menu_item_check>
<menu_item_check
+ label="Sidebar button"
+ layout="topleft"
+ name="ShowSidebarButton">
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="ShowSidebarButton" />
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="ShowSidebarButton" />
+ </menu_item_check>
+ <menu_item_check
label="Build button"
layout="topleft"
name="ShowBuildButton">
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 2cb91fe1f0..2ba7bef502 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -48,29 +48,32 @@
left="0"
max_width="320"
min_height="23"
- min_width="216"
+ min_width="214"
mouse_opaque="false"
name="chat_bar"
top="4"
- user_resize="false"
- width="310" />
+ user_resize="true"
+ width="308" />
+ <!--
+ There is resize bar between chatbar and Speak button. It has 2px width (is is set as 2*UIResizeBarOverlap)
+ -->
<layout_panel
auto_resize="false"
follows="right"
height="28"
layout="topleft"
min_height="28"
- min_width="57"
+ min_width="59"
mouse_opaque="false"
name="speak_panel"
top_delta="0"
user_resize="false"
- width="108">
+ width="110">
<talk_button
follows="left|right"
height="23"
layout="topleft"
- left="0"
+ left="2"
name="talk"
top="5"
width="105">
@@ -190,7 +193,7 @@
min_width="40"
mouse_opaque="false"
name="snapshot_panel"
- width="40">
+ width="39">
<button
follows="left|right"
height="23"
@@ -218,6 +221,38 @@
min_height="28"
min_width="52"
mouse_opaque="false"
+ name="sidebar_btn_panel"
+ user_resize="false"
+ width="83">
+<!--*TODO: Implement toggle of sidebar with buttons
+Disabled for now.
+-->
+ <button
+ control_name="SidebarWithButtonsVisibility"
+ follows="left|right"
+ height="23"
+ image_pressed="PushButton_Press"
+ image_pressed_selected="PushButton_Selected_Press"
+ image_selected="PushButton_Selected_Press"
+ is_toggle="true"
+ label="Sidebar"
+ layout="topleft"
+ left="0"
+ name="sidebar_btn"
+ tool_tip="Shows/hides Sidebar"
+ top="5"
+ use_ellipses="true"
+ width="80">
+ </button>
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ follows="left|right"
+ height="28"
+ layout="topleft"
+ min_height="28"
+ min_width="52"
+ mouse_opaque="false"
name="build_btn_panel"
user_resize="false"
width="83">
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
index 5dbd8bfe6a..55df70eb71 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
@@ -7,7 +7,7 @@
left="0"
name="chat_bar"
top="21"
- width="310">
+ width="308">
<line_editor
border_style="line"
border_thickness="1"