aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llwebbrowserctrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llwebbrowserctrl.cpp')
-rw-r--r--linden/indra/newview/llwebbrowserctrl.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/linden/indra/newview/llwebbrowserctrl.cpp b/linden/indra/newview/llwebbrowserctrl.cpp
index 879d229..7fedc4c 100644
--- a/linden/indra/newview/llwebbrowserctrl.cpp
+++ b/linden/indra/newview/llwebbrowserctrl.cpp
@@ -66,8 +66,8 @@ LLWebBrowserCtrl::LLWebBrowserCtrl( const std::string& name, const LLRect& rect
66 mIgnoreUIScale( true ), 66 mIgnoreUIScale( true ),
67 mAlwaysRefresh( false ) 67 mAlwaysRefresh( false )
68{ 68{
69 S32 screen_width = mIgnoreUIScale ? llround((F32)mRect.getWidth() * LLUI::sGLScaleFactor.mV[VX]) : mRect.getWidth(); 69 S32 screen_width = mIgnoreUIScale ? llround((F32)mRect.getWidth() * LLUI::sGLScaleFactor.mV[VX]) : llround((F32)mRect.getWidth() * gViewerWindow->getDisplayScale().mV[VX]);
70 S32 screen_height = mIgnoreUIScale ? llround((F32)mRect.getHeight() * LLUI::sGLScaleFactor.mV[VY]) : mRect.getHeight(); 70 S32 screen_height = mIgnoreUIScale ? llround((F32)mRect.getHeight() * LLUI::sGLScaleFactor.mV[VY]) : llround((F32)mRect.getHeight() * gViewerWindow->getDisplayScale().mV[VY]);
71 71
72 // create a new browser window 72 // create a new browser window
73 { 73 {
@@ -322,8 +322,9 @@ void LLWebBrowserCtrl::onVisibilityChange ( BOOL new_visibility )
322// 322//
323void LLWebBrowserCtrl::reshape( S32 width, S32 height, BOOL called_from_parent ) 323void LLWebBrowserCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
324{ 324{
325 S32 screen_width = mIgnoreUIScale ? llround((F32)width * LLUI::sGLScaleFactor.mV[VX]) : width; 325 S32 screen_width = mIgnoreUIScale ? llround((F32)width * LLUI::sGLScaleFactor.mV[VX]) : llround((F32)width * gViewerWindow->getDisplayScale().mV[VX]);
326 S32 screen_height = mIgnoreUIScale ? llround((F32)height * LLUI::sGLScaleFactor.mV[VX]) : height; 326 S32 screen_height = mIgnoreUIScale ? llround((F32)height * LLUI::sGLScaleFactor.mV[VY]) : llround((F32)height * gViewerWindow->getDisplayScale().mV[VY]);
327
327 // when floater is minimized, these sizes are negative 328 // when floater is minimized, these sizes are negative
328 if ( screen_height > 0 && screen_width > 0 ) 329 if ( screen_height > 0 && screen_width > 0 )
329 { 330 {
@@ -500,8 +501,8 @@ void LLWebBrowserCtrl::draw()
500 501
501void LLWebBrowserCtrl::convertInputCoords(S32& x, S32& y) 502void LLWebBrowserCtrl::convertInputCoords(S32& x, S32& y)
502{ 503{
503 x = mIgnoreUIScale ? llround((F32)x * LLUI::sGLScaleFactor.mV[VX]) : x; 504 x = mIgnoreUIScale ? llround((F32)x * LLUI::sGLScaleFactor.mV[VX]) : llround((F32)x * gViewerWindow->getDisplayScale().mV[VX]);
504 y = mIgnoreUIScale ? llround((F32)(mRect.getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]) : (mRect.getHeight() - y); 505 y = mIgnoreUIScale ? llround((F32)(mRect.getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]) : llround((F32)(mRect.getHeight() - y) * gViewerWindow->getDisplayScale().mV[VY]);
505} 506}
506 507
507//////////////////////////////////////////////////////////////////////////////// 508////////////////////////////////////////////////////////////////////////////////