From 2aa9f1bcbe0c51f9de24d52a08726dc13038f5b8 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 13 Nov 2009 14:57:06 -0500 Subject: EXT-2477 minimizing while in appearance editing mode leaves a bad state when minimizing the viewer while in appearance editing mode with unsaved changes kicks you out of appearance editing mode and leaves you unable to recover as the editor always starts itself on the shape tab. Fixed this in two ways: 1) if a wearable is dirty when the editor is opened, that is the tab that is selected. 2) the camera mode is not forcibly changed away from appearance editing mode on minimize. This only needs to happen if we are in mouselook. Code reviewed by Vir. --HG-- branch : avatar-pipeline --- indra/newview/llviewerwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1054223dcf..90a79698f6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1015,7 +1015,10 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) } // SL-53351: Make sure we're not in mouselook when minimised, to prevent control issues - gAgent.changeCameraToDefault(); + if (gAgent.getCameraMode() == CAMERA_MODE_MOUSELOOK) + { + gAgent.changeCameraToDefault(); + } send_agent_pause(); -- cgit v1.2.3 From 4b80c9978c48b6a9eaac2ed358e81cf06f3e2cb5 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Mon, 16 Nov 2009 23:17:24 +0200 Subject: Fixed Stand / Stop flying buttons (EXT-2408, EXT-2467, EXT-2513). The buttons are now attached to the movement controls floater while it's visible (EXT-984). --HG-- branch : product-engine --- indra/newview/llviewerwindow.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 90a79698f6..48f0f7516f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1566,8 +1566,6 @@ void LLViewerWindow::initWorldUI() LLPanel* panel_ssf_container = getRootView()->getChild("stand_stop_flying_container"); LLPanelStandStopFlying* panel_stand_stop_flying = LLPanelStandStopFlying::getInstance(); - panel_stand_stop_flying->setShape(panel_ssf_container->getLocalRect()); - panel_stand_stop_flying->setFollowsAll(); panel_ssf_container->addChild(panel_stand_stop_flying); panel_ssf_container->setVisible(TRUE); -- cgit v1.2.3 From f1da0a4ff4e6de98422f0b4534034120bec558b7 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 16 Nov 2009 13:55:51 -0800 Subject: EXT-1478 Tool-tip background and border colors are being ignored - hooked up xml EXT-2237 Preferences > Alerts shows "$ignoretext" in the list EXT-1582 The current edit coordinates are displaced from their background EXT-1466 Change Mouselook text "Press ESC to return to World View" to match stylesheet reviewed by James --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1054223dcf..0c5d813f45 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4129,7 +4129,7 @@ void LLViewerWindow::drawMouselookInstructions() { // Draw instructions for mouselook ("Press ESC to return to World View" partially transparent at the bottom of the screen.) const std::string instructions = LLTrans::getString("LeaveMouselook"); - const LLFontGL* font = LLFontGL::getFont(LLFontDescriptor("SansSerif", "Huge", LLFontGL::BOLD)); + const LLFontGL* font = LLFontGL::getFont(LLFontDescriptor("SansSerif", "Large", LLFontGL::BOLD)); //to be on top of Bottom bar when it is opened const S32 INSTRUCTIONS_PAD = 50; -- cgit v1.2.3 From b38ca5ec323beecd7fa431addb021199c85764f6 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 16 Nov 2009 15:47:45 -0800 Subject: fix for UI scale != 1.0 breaking edit tools, web browser, world view rect, etc. --- indra/newview/llviewerwindow.cpp | 63 +++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 23 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1054223dcf..79520b2d8e 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2277,7 +2277,7 @@ void LLViewerWindow::handleScrollWheel(S32 clicks) // Zoom the camera in and out behavior - if(top_ctrl == 0 && mWorldViewRectRaw.pointInRect(mCurrentMousePoint.mX, mCurrentMousePoint.mY) ) + if(top_ctrl == 0 && getWorldViewRectScaled().pointInRect(mCurrentMousePoint.mX, mCurrentMousePoint.mY) ) gAgent.handleScrollWheel(clicks); return; @@ -2285,8 +2285,8 @@ void LLViewerWindow::handleScrollWheel(S32 clicks) void LLViewerWindow::moveCursorToCenter() { - S32 x = mWorldViewRectRaw.getWidth() / 2; - S32 y = mWorldViewRectRaw.getHeight() / 2; + S32 x = getWorldViewWidthScaled() / 2; + S32 y = getWorldViewHeightScaled() / 2; //on a forced move, all deltas get zeroed out to prevent jumping mCurrentMousePoint.set(x,y); @@ -2857,6 +2857,11 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window) // 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); + + new_world_rect.mLeft = llround((F32)new_world_rect.mLeft * mDisplayScale.mV[VX]); + new_world_rect.mRight = llround((F32)new_world_rect.mRight * mDisplayScale.mV[VX]); + new_world_rect.mBottom = llround((F32)new_world_rect.mBottom * mDisplayScale.mV[VY]); + new_world_rect.mTop = llround((F32)new_world_rect.mTop * mDisplayScale.mV[VY]); } if (mWorldViewRectRaw != new_world_rect) @@ -2868,6 +2873,12 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window) gResizeScreenTexture = TRUE; LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() ); LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() ); + + mWorldViewRectScaled = mWorldViewRectRaw; + mWorldViewRectScaled.mLeft = llround((F32)mWorldViewRectScaled.mLeft / mDisplayScale.mV[VX]); + mWorldViewRectScaled.mRight = llround((F32)mWorldViewRectScaled.mRight / mDisplayScale.mV[VX]); + mWorldViewRectScaled.mBottom = llround((F32)mWorldViewRectScaled.mBottom / mDisplayScale.mV[VY]); + mWorldViewRectScaled.mTop = llround((F32)mWorldViewRectScaled.mTop / mDisplayScale.mV[VY]); } } @@ -3139,10 +3150,10 @@ void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback { mPickScreenRegion.setCenterAndSize(x, y_from_bot, PICK_DIAMETER, PICK_DIAMETER); - if (mPickScreenRegion.mLeft < mWorldViewRectRaw.mLeft) mPickScreenRegion.translate(mWorldViewRectRaw.mLeft - mPickScreenRegion.mLeft, 0); - if (mPickScreenRegion.mBottom < mWorldViewRectRaw.mBottom) mPickScreenRegion.translate(0, mWorldViewRectRaw.mBottom - mPickScreenRegion.mBottom); - if (mPickScreenRegion.mRight > mWorldViewRectRaw.mRight ) mPickScreenRegion.translate(mWorldViewRectRaw.mRight - mPickScreenRegion.mRight, 0); - if (mPickScreenRegion.mTop > mWorldViewRectRaw.mTop ) mPickScreenRegion.translate(0, mWorldViewRectRaw.mTop - mPickScreenRegion.mTop); + if (mPickScreenRegion.mLeft < mWorldViewRectScaled.mLeft) mPickScreenRegion.translate(mWorldViewRectScaled.mLeft - mPickScreenRegion.mLeft, 0); + if (mPickScreenRegion.mBottom < mWorldViewRectScaled.mBottom) mPickScreenRegion.translate(0, mWorldViewRectScaled.mBottom - mPickScreenRegion.mBottom); + if (mPickScreenRegion.mRight > mWorldViewRectScaled.mRight ) mPickScreenRegion.translate(mWorldViewRectScaled.mRight - mPickScreenRegion.mRight, 0); + if (mPickScreenRegion.mTop > mWorldViewRectScaled.mTop ) mPickScreenRegion.translate(0, mWorldViewRectScaled.mTop - mPickScreenRegion.mTop); } // set frame buffer region for picking results @@ -3348,11 +3359,11 @@ LLVector3 LLViewerWindow::mouseDirectionGlobal(const S32 x, const S32 y) const F32 fov = LLViewerCamera::getInstance()->getView(); // find world view center in scaled ui coordinates - F32 center_x = (F32)getWorldViewRectRaw().getCenterX() / mDisplayScale.mV[VX]; - F32 center_y = (F32)getWorldViewRectRaw().getCenterY() / mDisplayScale.mV[VY]; + F32 center_x = getWorldViewRectScaled().getCenterX(); + F32 center_y = getWorldViewRectScaled().getCenterY(); // calculate pixel distance to screen - F32 distance = ((F32)getWorldViewHeightRaw() / (mDisplayScale.mV[VY] * 2.f)) / (tan(fov / 2.f)); + F32 distance = ((F32)getWorldViewHeightScaled() * 0.5f) / (tan(fov / 2.f)); // calculate click point relative to middle of screen F32 click_x = x - center_x; @@ -3371,11 +3382,11 @@ LLVector3 LLViewerWindow::mouseDirectionGlobal(const S32 x, const S32 y) const LLVector3 LLViewerWindow::mousePointHUD(const S32 x, const S32 y) const { // find screen resolution - S32 height = llround((F32)getWorldViewHeightRaw() / mDisplayScale.mV[VY]); + S32 height = getWorldViewHeightScaled(); // find world view center - F32 center_x = (F32)getWorldViewRectRaw().getCenterX() / mDisplayScale.mV[VX]; - F32 center_y = (F32)getWorldViewRectRaw().getCenterY() / mDisplayScale.mV[VY]; + F32 center_x = getWorldViewRectScaled().getCenterX(); + F32 center_y = getWorldViewRectScaled().getCenterY(); // remap with uniform scale (1/height) so that top is -0.5, bottom is +0.5 F32 hud_x = -((F32)x - center_x) / height; @@ -3393,12 +3404,12 @@ LLVector3 LLViewerWindow::mouseDirectionCamera(const S32 x, const S32 y) const F32 fov_width = fov_height * LLViewerCamera::getInstance()->getAspect(); // find screen resolution - S32 height = llround((F32)getWorldViewHeightRaw() / mDisplayScale.mV[VY]); - S32 width = llround((F32)getWorldViewWidthRaw() / mDisplayScale.mV[VX]); + S32 height = getWorldViewHeightScaled(); + S32 width = getWorldViewWidthScaled(); // find world view center - F32 center_x = (F32)getWorldViewRectRaw().getCenterX() / mDisplayScale.mV[VX]; - F32 center_y = (F32)getWorldViewRectRaw().getCenterY() / mDisplayScale.mV[VY]; + F32 center_x = getWorldViewRectScaled().getCenterX(); + F32 center_y = getWorldViewRectScaled().getCenterY(); // calculate click point relative to middle of screen F32 click_x = (((F32)x - center_x) / (F32)width) * fov_width * -1.f; @@ -4165,14 +4176,20 @@ LLRootView* LLViewerWindow::getRootView() const LLRect LLViewerWindow::getWorldViewRectScaled() const { - LLRect world_view_rect = mWorldViewRectRaw; - world_view_rect.mLeft = llround((F32)world_view_rect.mLeft / mDisplayScale.mV[VX]); - world_view_rect.mRight = llround((F32)world_view_rect.mRight / mDisplayScale.mV[VX]); - world_view_rect.mBottom = llround((F32)world_view_rect.mBottom / mDisplayScale.mV[VY]); - world_view_rect.mTop = llround((F32)world_view_rect.mTop / mDisplayScale.mV[VY]); - return world_view_rect; + return mWorldViewRectScaled; +} + +S32 LLViewerWindow::getWorldViewHeightScaled() const +{ + return mWorldViewRectScaled.getHeight(); } +S32 LLViewerWindow::getWorldViewWidthScaled() const +{ + return mWorldViewRectScaled.getWidth(); +} + + S32 LLViewerWindow::getWorldViewHeightRaw() const { return mWorldViewRectRaw.getHeight(); -- cgit v1.2.3 From 32fd8fa0874abc39bbe0f16f8eb5723bd83afb41 Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Mon, 16 Nov 2009 16:18:59 -0800 Subject: EXT-2110 - Help -> Abuse Report produces noticeable 3-10 second hang Only happens with small windows because of some code that does font resizing on high res. Changed the scale factor threshold to cover vast majority of cases. --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 90a79698f6..bb57226050 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3944,7 +3944,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei return FALSE ; } - BOOL high_res = scale_factor > 1.f; + BOOL high_res = scale_factor >= 2.f; // Font scaling is slow, only do so if rez is much higher if (high_res) { send_agent_pause(); -- cgit v1.2.3