From acc97bd55fbdaecb16f47ae53e896eb0ca7d53c5 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 24 Feb 2010 16:41:28 +0200 Subject: Work on major bug EXT-5589 (Notifications button falls under side panel) Applayed Eugene Mutavchi's patch: -- removed min/max width params from xml tags -- "min_width" for nearby chat bar now is got from the an appropriate layout panel params -- "max_width" for nearby chat bar is moved to constant. --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 12 +++++----- indra/newview/llnearbychatbar.cpp | 26 ---------------------- indra/newview/llnearbychatbar.h | 3 --- .../skins/default/xui/da/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/de/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/en/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/es/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/fr/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/it/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/ja/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/pt/panel_nearby_chat_bar.xml | 6 ----- 11 files changed, 6 insertions(+), 83 deletions(-) (limited to 'indra') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 24b8ef3320..3511328161 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -60,6 +60,7 @@ namespace const std::string& PANEL_MOVEMENT_NAME = "movement_panel"; const std::string& PANEL_CAMERA_NAME = "cam_panel"; const std::string& PANEL_GESTURE_NAME = "gesture_panel"; + const S32 MAX_CHAT_BAR_WIDTH = 320; S32 get_panel_min_width(LLLayoutStack* stack, LLPanel* panel) { @@ -672,7 +673,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) } const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); - const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth(); + const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mNearbyChatBar); if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width) { // we have some space to decrease chatbar panel @@ -748,8 +749,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); - const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth(); - const S32 chatbar_panel_max_width = mNearbyChatBar->getMaxWidth(); + const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mNearbyChatBar); const S32 chatbar_available_shrink_width = chatbar_panel_width - chatbar_panel_min_width; const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width; @@ -826,9 +826,9 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) // how many space can nearby chatbar take? S32 chatbar_panel_width_ = mNearbyChatBar->getRect().getWidth(); - if (delta_width > 0 && chatbar_panel_width_ < chatbar_panel_max_width) + if (delta_width > 0 && chatbar_panel_width_ < MAX_CHAT_BAR_WIDTH) { - S32 delta_panel_max = chatbar_panel_max_width - chatbar_panel_width_; + S32 delta_panel_max = MAX_CHAT_BAR_WIDTH - chatbar_panel_width_; S32 delta_panel = llmin(delta_width, delta_panel_max); lldebugs << "Unprocesed delta width: " << delta_width << ", can be applied to chatbar: " << delta_panel_max @@ -1186,7 +1186,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible { // Calculate the possible shrunk width as difference between current and minimal widths const S32 chatbar_shrunk_width = - mNearbyChatBar->getRect().getWidth() - mNearbyChatBar->getMinWidth(); + mNearbyChatBar->getRect().getWidth() - get_panel_min_width(mToolbarStack, mNearbyChatBar); const S32 sum_of_min_widths = get_panel_min_width(mToolbarStack, mStateProcessedObjectMap[RS_BUTTON_CAMERA]) + diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index ad98a29fb2..483756b16e 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -407,32 +407,6 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask ) return handled; } -S32 LLNearbyChatBar::getMinWidth() const -{ - static S32 min_width = -1; - - if (min_width < 0) - { - const std::string& s = getString("min_width"); - min_width = !s.empty() ? atoi(s.c_str()) : 300; - } - - return min_width; -} - -S32 LLNearbyChatBar::getMaxWidth() const -{ - static S32 max_width = -1; - - if (max_width < 0) - { - const std::string& s = getString("max_width"); - max_width = !s.empty() ? atoi(s.c_str()) : 510; - } - - return max_width; -} - BOOL LLNearbyChatBar::matchChatTypeTrigger(const std::string& in_str, std::string* out_str) { U32 in_len = in_str.length(); diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index d9a7403611..559c1ee091 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -117,9 +117,6 @@ public: static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); - S32 getMinWidth() const; - S32 getMaxWidth() const; - protected: static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str); static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata); diff --git a/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml index 2aa7ed7c6c..949cbcbd7b 100644 --- a/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml @@ -1,11 +1,5 @@ - - 192 - - - 320 -