From 4eb72a12a2280d3be6ac556ad80eb953d249e8eb Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 9 Nov 2009 15:29:47 -0800 Subject: data driven layout of top-level UI elements EXT-1219 Side tray slide-out animation cleaned up some layout of bottom tray contents reviewed by James --- indra/newview/llviewerwindow.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.h') diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index d7c403739e..31a458a15b 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -294,7 +294,6 @@ public: void updateKeyboardFocus(); void updateWorldViewRect(bool use_full_window=false); - void updateBottomTrayRect(); BOOL handleKey(KEY key, MASK mask); void handleScrollWheel (S32 clicks); @@ -451,6 +450,8 @@ protected: BOOL mIgnoreActivate; std::string mInitAlert; // Window / GL initialization requires an alert + + LLView* mWorldViewPlaceholder; // widget that spans the portion of screen dedicated to rendering the 3d world class LLDebugText* mDebugText; // Internal class for debug text -- cgit v1.2.3 From 2bc97bd68a774dd373c5688b5dc660abe90b37cc Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 9 Nov 2009 16:01:21 -0800 Subject: renamed LLLayoutStack::idle to LLLayoutStack::updateClass converted mWorldViewPlaceholder to a LLHandle improved layout of panel_bottomtray reviewed by James --- indra/newview/llviewerwindow.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.h') diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 31a458a15b..6750c39dbb 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -451,7 +451,7 @@ protected: 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 mWorldViewPlaceholder; // widget that spans the portion of screen dedicated to rendering the 3d world class LLDebugText* mDebugText; // Internal class for debug text -- cgit v1.2.3 From 06fd32edf63d38db6f3db4a57798570c69ca1a36 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 10 Nov 2009 12:04:35 -0800 Subject: EXT-677 Build tool arrows work again with UI size != 1.0 Must use scaled (virtual) pixels in some computations Will review with Richard --- indra/newview/llviewerwindow.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.h') diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index c2906b1718..b7f2b91c52 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -212,8 +212,9 @@ public: // Window in raw pixels as seen on screen. const LLRect& getWindowRect() const { return mWindowRect; }; - // portion of window that shows 3d world + // portion of window that shows 3d world, in raw unscaled pixels const LLRect& getWorldViewRect() const { return mWorldViewRect; }; + // Use this rect for most UI computations, it accounts for UI size scaling LLRect getVirtualWorldViewRect() const; S32 getWorldViewHeight() const; S32 getWorldViewWidth() const; -- cgit v1.2.3 From 0f6242d9fd948cda1abf18885eef320b22d310c5 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 10 Nov 2009 14:00:38 -0800 Subject: Sanitize naming of getWindowRect (scaled vs. raw pixels) and getWorldViewRect (scaled vs. raw) Reduces chance of future UI bugs related to UI size. Discussed with Richard. --- indra/newview/llviewerwindow.h | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'indra/newview/llviewerwindow.h') diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index b7f2b91c52..58a4729a5a 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -210,22 +210,23 @@ public: // LLRootView* getRootView() const; + // 3D world area in scaled pixels (via UI scale), use for most UI computations + LLRect getWorldViewRectScaled() const; + + // 3D world area, in raw unscaled pixels + LLRect getWorldViewRectRaw() const { return mWorldViewRectRaw; } + S32 getWorldViewHeightRaw() const; + S32 getWorldViewWidthRaw() const; + + // Window in scaled pixels (via UI scale), use for most UI computations + LLRect getWindowRectScaled() const { return mWindowRectScaled; } + S32 getWindowHeightScaled() const; + S32 getWindowWidthScaled() const; + // Window in raw pixels as seen on screen. - const LLRect& getWindowRect() const { return mWindowRect; }; - // portion of window that shows 3d world, in raw unscaled pixels - const LLRect& getWorldViewRect() const { return mWorldViewRect; }; - // Use this rect for most UI computations, it accounts for UI size scaling - LLRect getVirtualWorldViewRect() const; - S32 getWorldViewHeight() const; - S32 getWorldViewWidth() const; - S32 getWindowDisplayHeight() const; - S32 getWindowDisplayWidth() const; - - // Window in scaled pixels (via UI scale), use this for - // UI elements checking size. - const LLRect& getVirtualWindowRect() const { return mVirtualWindowRect; }; - S32 getWindowHeight() const; - S32 getWindowWidth() const; + LLRect getWindowRectRaw() const { return mWindowRectRaw; } + S32 getWindowHeightRaw() const; + S32 getWindowWidthRaw() const; LLWindow* getWindow() const { return mWindow; } void* getPlatformWindow() const; @@ -411,10 +412,11 @@ protected: BOOL mActive; BOOL mWantFullscreen; BOOL mShowFullscreenProgress; - LLRect mWindowRect; - LLRect mVirtualWindowRect; - LLRect mWorldViewRect; // specifies area of screen where we render the 3D world - LLRootView* mRootView; // a view of size mWindowRect, containing all child views + + LLRect mWindowRectRaw; // whole window, including UI + LLRect mWindowRectScaled; // whole window, scaled by UI size + LLRect mWorldViewRectRaw; // area of screen for 3D world + LLRootView* mRootView; // a view of size mWindowRectRaw, containing all child views LLVector2 mDisplayScale; LLCoordGL mCurrentMousePoint; // last mouse position in GL coords -- cgit v1.2.3