Work on major bug EXT-5589 (Notifications button falls under side panel)
Applayed Eugene Mutavchi's patch: -- removed min/max width params from xml <string> 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-enginemaster
parent
6575b685e9
commit
acc97bd55f
|
|
@ -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]) +
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="chat_bar">
|
||||
<string name="min_width">
|
||||
192
|
||||
</string>
|
||||
<string name="max_width">
|
||||
320
|
||||
</string>
|
||||
<line_editor label="Klik her for at chatte." name="chat_box" tool_tip="Tryk på enter for at tale, Ctrl-Enter for at råbe."/>
|
||||
<button name="show_nearby_chat" tool_tip="Viser/skjuler log for chat nærved"/>
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="chat_bar">
|
||||
<string name="min_width">
|
||||
192
|
||||
</string>
|
||||
<string name="max_width">
|
||||
320
|
||||
</string>
|
||||
<line_editor label="Zum Chatten hier klicken." name="chat_box" tool_tip="Eingabe drücken, um zu sprechen, Strg-Eingabe drücken, um zu Rufen."/>
|
||||
<button name="show_nearby_chat" tool_tip="Protokoll des Chats in der Nähe anzeigen/ausblenden"/>
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -8,12 +8,6 @@
|
|||
name="chat_bar"
|
||||
top="21"
|
||||
width="310">
|
||||
<string name="min_width">
|
||||
216
|
||||
</string>
|
||||
<string name="max_width">
|
||||
320
|
||||
</string>
|
||||
<line_editor
|
||||
border_style="line"
|
||||
border_thickness="1"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="chat_bar">
|
||||
<string name="min_width">
|
||||
192
|
||||
</string>
|
||||
<string name="max_width">
|
||||
320
|
||||
</string>
|
||||
<line_editor label="Pulsa aquí para chatear." name="chat_box" tool_tip="Pulsa Enter para decirlo o Ctrl+Enter para gritarlo"/>
|
||||
<button name="show_nearby_chat" tool_tip="Muestra o esconde el registro del chat"/>
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="chat_bar">
|
||||
<string name="min_width">
|
||||
192
|
||||
</string>
|
||||
<string name="max_width">
|
||||
320
|
||||
</string>
|
||||
<line_editor label="Cliquer ici pour chatter." name="chat_box" tool_tip="Appuyer sur Entrée pour dire, Ctrl-Entrée pour crier"/>
|
||||
<button name="show_nearby_chat" tool_tip="Affiche/Masque le journal de chats près de vous"/>
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="chat_bar">
|
||||
<string name="min_width">
|
||||
192
|
||||
</string>
|
||||
<string name="max_width">
|
||||
320
|
||||
</string>
|
||||
<line_editor label="Clicca qui per la chat." name="chat_box" tool_tip="Premi Invio per dire, Ctrl+Invio per gridare"/>
|
||||
<button name="show_nearby_chat" tool_tip="Mostra/Nasconde la chat log nei dintorni"/>
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="chat_bar">
|
||||
<string name="min_width">
|
||||
192
|
||||
</string>
|
||||
<string name="max_width">
|
||||
320
|
||||
</string>
|
||||
<line_editor label="ここをクリックしてチャットを開始します。" name="chat_box" tool_tip="Enter キーを押して発言し、Ctrl + Enter キーで叫びます。"/>
|
||||
<button name="show_nearby_chat" tool_tip="近くのチャットログを表示・非表示"/>
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="chat_bar">
|
||||
<string name="min_width">
|
||||
192
|
||||
</string>
|
||||
<string name="max_width">
|
||||
320
|
||||
</string>
|
||||
<line_editor label="Clique aqui para bater papo." name="chat_box" tool_tip="Tecle Enter para falar, Ctrl+Enter para gritar"/>
|
||||
<button name="show_nearby_chat" tool_tip="Mostra/oculta o histórico do bate-papo local"/>
|
||||
</panel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue