From 2bc97bd68a774dd373c5688b5dc660abe90b37cc Mon Sep 17 00:00:00 2001
From: richard <none@none>
Date: Mon, 9 Nov 2009 16:01:21 -0800
Subject: [PATCH] renamed LLLayoutStack::idle to LLLayoutStack::updateClass
 converted mWorldViewPlaceholder to a LLHandle<LLView> improved layout of
 panel_bottomtray

reviewed by James
---
 indra/llui/lllayoutstack.cpp                            | 2 +-
 indra/llui/lllayoutstack.h                              | 2 +-
 indra/newview/llsidetray.cpp                            | 6 +++---
 indra/newview/llsidetray.h                              | 5 +----
 indra/newview/llviewerwindow.cpp                        | 8 ++++----
 indra/newview/llviewerwindow.h                          | 2 +-
 indra/newview/skins/default/xui/en/panel_bottomtray.xml | 4 ++--
 7 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 596b3a3e70a..5999e1a29e0 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -790,7 +790,7 @@ void LLLayoutStack::calcMinExtents()
 // we might still need to call updateLayout during UI draw phase, in case UI elements
 // are resizing themselves dynamically
 //static 
-void LLLayoutStack::idle()
+void LLLayoutStack::updateClass()
 {
 	for (LLInstanceTracker::instance_iter it = beginInstances(); it != endInstances(); ++it)
 	{
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index 11d604b7ec7..8475079f5eb 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -83,7 +83,7 @@ class LLLayoutStack : public LLView, LLInstanceTracker<LLLayoutStack>
 	void updatePanelAutoResize(const std::string& panel_name, BOOL auto_resize);
 
 
-	static void idle();
+	static void updateClass();
 
 protected:
 	LLLayoutStack(const Params&);
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index f0e782d44d8..061587f11b7 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -455,7 +455,7 @@ void		LLSideTray::onToggleCollapse()
 
 void LLSideTray::reflectCollapseChange()
 {
-	setPanelRect();
+	updateSidetrayVisibility();
 
 	if(mCollapsed)
 	{
@@ -475,7 +475,7 @@ void LLSideTray::arrange()
 {
 	static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());	
 
-	setPanelRect();
+	updateSidetrayVisibility();
 	
 	LLRect ctrl_rect;
 	ctrl_rect.setLeftTopAndSize(0,
@@ -637,7 +637,7 @@ LLPanel*	LLSideTray::showPanel		(const std::string& panel_name, const LLSD& para
 static const S32	fake_offset = 132;
 static const S32	fake_top_offset = 18;
 
-void	LLSideTray::setPanelRect	()
+void	LLSideTray::updateSidetrayVisibility()
 {
 	// set visibility of parent container based on collapsed state
 	if (getParent())
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 72a9465baa0..4d6081e230c 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -134,9 +134,6 @@ class LLSideTray : public LLPanel, private LLDestroyClass<LLSideTray>
 	
 	void		reshape			(S32 width, S32 height, BOOL called_from_parent = TRUE);
 
-	void		resetPanelRect	();
-	
-
 protected:
 	LLSideTrayTab* getTab		(const std::string& name);
 
@@ -147,7 +144,7 @@ class LLSideTray : public LLPanel, private LLDestroyClass<LLSideTray>
 
 	void		toggleTabButton	(LLSideTrayTab* tab);
 
-	void		setPanelRect	();
+	void		updateSidetrayVisibility();
 
 	
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b15019f830f..5e5aec5cb95 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1406,7 +1406,7 @@ void LLViewerWindow::initBase()
 	getRootView()->addChild(main_view);
 
 	// placeholder widget that controls where "world" is rendered
-	mWorldViewPlaceholder = main_view->getChildView("world_view_rect");
+	mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle();
 
 	// Constrain floaters to inside the menu and status bar regions.
 	gFloaterView = getRootView()->getChild<LLFloaterView>("Floater View");
@@ -2329,7 +2329,7 @@ void LLViewerWindow::updateUI()
 	static std::string last_handle_msg;
 
 	// animate layout stacks so we have up to date rect for world view
-	LLLayoutStack::idle();
+	LLLayoutStack::updateClass();
 
 	updateWorldViewRect();
 
@@ -2839,9 +2839,9 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window)
 	// start off using whole window to render world
 	LLRect new_world_rect = mWindowRect;
 
-	if (use_full_window == false)
+	if (use_full_window == false && mWorldViewPlaceholder.get())
 	{
-		new_world_rect = mWorldViewPlaceholder->calcScreenRect();
+		new_world_rect = mWorldViewPlaceholder.get()->calcScreenRect();
 		// clamp to at least a 1x1 rect so we don't try to allocate zero width gl buffers
 		new_world_rect.mTop = llmax(new_world_rect.mTop, new_world_rect.mBottom + 1);
 		new_world_rect.mRight = llmax(new_world_rect.mRight, new_world_rect.mLeft + 1);
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 31a458a15b5..6750c39dbbf 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -451,7 +451,7 @@ class LLViewerWindow : public LLWindowCallbacks
 
 	std::string		mInitAlert;			// Window / GL initialization requires an alert
 
-	LLView*			mWorldViewPlaceholder;	// widget that spans the portion of screen dedicated to rendering the 3d world
+	LLHandle<LLView> mWorldViewPlaceholder;	// widget that spans the portion of screen dedicated to rendering the 3d world
 	
 	class LLDebugText* mDebugText; // Internal class for debug text
 	
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index faa38084f1a..d990ebfd4a9 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -56,9 +56,9 @@
          height="28"
          layout="topleft"
          min_height="28"
-         width="100"
+         width="104"
          top_delta="0"
-         min_width="100"
+         min_width="104"
          name="speak_panel"
          user_resize="false">
           <talk_button
-- 
GitLab