diff options
Diffstat (limited to 'indra/newview/llfloatermap.cpp')
-rw-r--r-- | indra/newview/llfloatermap.cpp | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 051ab585e2..e74bfae026 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -41,7 +41,7 @@ #include "llglheaders.h" // Viewer includes -#include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "llnetmap.h" #include "lltracker.h" @@ -54,7 +54,10 @@ // Constants // const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f; - +const S32 MAP_PADDING_LEFT = 0; +const S32 MAP_PADDING_TOP = 2; +const S32 MAP_PADDING_RIGHT = 2; +const S32 MAP_PADDING_BOTTOM = 0; // // Member functions // @@ -106,6 +109,9 @@ BOOL LLFloaterMap::postBuild() mPopupMenu->setItemEnabled ("Stop Tracking", false); } + stretchMiniMap(getRect().getWidth() - MAP_PADDING_LEFT - MAP_PADDING_RIGHT + ,getRect().getHeight() - MAP_PADDING_TOP - MAP_PADDING_BOTTOM); + updateMinorDirections(); // Get the drag handle all the way in back @@ -196,7 +202,7 @@ void LLFloaterMap::draw() setDirectionPos( mTextBoxSouthEast, rotation + F_PI + F_PI_BY_TWO + F_PI_BY_TWO / 2); // Note: we can't just gAgent.check cameraMouselook() because the transition states are wrong. - if( gAgent.cameraMouselook()) + if(gAgentCamera.cameraMouselook()) { setMouseOpaque(FALSE); getDragHandle()->setMouseOpaque(FALSE); @@ -215,9 +221,40 @@ void LLFloaterMap::draw() LLFloater::draw(); } +// virtual +void LLFloaterMap::onFocusReceived() +{ + setBackgroundOpaque(true); + LLPanel::onFocusReceived(); +} + +// virtual +void LLFloaterMap::onFocusLost() +{ + setBackgroundOpaque(false); + LLPanel::onFocusLost(); +} + +void LLFloaterMap::stretchMiniMap(S32 width,S32 height) +{ + //fix for ext-7112 + //by default ctrl can't overlap caption area + if(mMap) + { + LLRect map_rect; + map_rect.setLeftTopAndSize( MAP_PADDING_LEFT, getRect().getHeight() - MAP_PADDING_TOP, width, height); + mMap->reshape( width, height, 1); + mMap->setRect(map_rect); + } +} + void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) { LLFloater::reshape(width, height, called_from_parent); + + stretchMiniMap(width - MAP_PADDING_LEFT - MAP_PADDING_RIGHT + ,height - MAP_PADDING_TOP - MAP_PADDING_BOTTOM); + updateMinorDirections(); } |