diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llchathistory.cpp | 27 | ||||
-rw-r--r-- | indra/newview/llpanelteleporthistory.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llpanelteleporthistory.h | 1 | ||||
-rw-r--r-- | indra/newview/llscreenchannel.cpp | 20 | ||||
-rw-r--r-- | indra/newview/lltoast.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 27 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_chat_header.xml | 4 |
8 files changed, 71 insertions, 18 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 422aae3c25..533940943e 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -202,10 +202,8 @@ public: userName->setValue(SL); } + setTimeField(chat.mTimeStr); - LLTextBox* timeBox = getChild<LLTextBox>("time_box"); - timeBox->setValue(chat.mTimeStr); - LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon"); if(mSourceType != CHAT_SOURCE_AGENT) @@ -271,7 +269,28 @@ protected: } } - +private: + void setTimeField(const std::string& time_value) + { + LLTextBox* time_box = getChild<LLTextBox>("time_box"); + + LLRect rect_before = time_box->getRect(); + time_box->setValue(time_value); + + // set necessary textbox width to fit all text + time_box->reshapeToFitText(); + LLRect rect_after = time_box->getRect(); + + // move rect to the left to correct position... + S32 delta_pos_x = rect_before.getWidth() - rect_after.getWidth(); + S32 delta_pos_y = rect_before.getHeight() - rect_after.getHeight(); + time_box->translate(delta_pos_x, delta_pos_y); + + //... & change width of the name control + LLTextBox* user_name = getChild<LLTextBox>("user_name"); + const LLRect& user_rect = user_name->getRect(); + user_name->reshape(user_rect.getWidth() + delta_pos_x, user_rect.getHeight()); + } protected: LLHandle<LLView> mPopupMenuHandleAvatar; diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 057cdde6f0..67d0e13786 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -262,6 +262,7 @@ BOOL LLTeleportHistoryPanel::postBuild() fl->setCommitOnSelectionChange(true); fl->setDoubleClickCallback(boost::bind(&LLTeleportHistoryPanel::onDoubleClickItem, this)); fl->setCommitCallback(boost::bind(&LLTeleportHistoryPanel::handleItemSelect, this, fl)); + fl->setReturnCallback(boost::bind(&LLTeleportHistoryPanel::onReturnKeyPressed, this)); } } } @@ -636,6 +637,12 @@ void LLTeleportHistoryPanel::handleItemSelect(LLFlatListView* selected) updateVerbs(); } +void LLTeleportHistoryPanel::onReturnKeyPressed() +{ + // Teleport to selected region as default action on return key pressed + onTeleport(); +} + void LLTeleportHistoryPanel::onDoubleClickItem() { // If item got doubleclick, then that item is already selected diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index b34d9e876c..a31ff34cb6 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -80,6 +80,7 @@ public: private: void onDoubleClickItem(); + void onReturnKeyPressed(); void onAccordionTabRightClick(LLView *view, S32 x, S32 y, MASK mask); void onAccordionTabOpen(LLAccordionCtrlTab *tab); void onAccordionTabClose(LLAccordionCtrlTab *tab); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index fb9db42cf6..ce89866b41 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -358,8 +358,6 @@ void LLScreenChannel::redrawToasts() if(mToastList.size() == 0 || isHovering()) return; - hideToastsFromScreen(); - switch(mToastAlignment) { case NA_TOP : @@ -383,6 +381,8 @@ void LLScreenChannel::showToastsBottom() S32 toast_margin = 0; std::vector<ToastElem>::reverse_iterator it; + closeOverflowToastPanel(); + for(it = mToastList.rbegin(); it != mToastList.rend(); ++it) { if(it != mToastList.rbegin()) @@ -408,7 +408,20 @@ void LLScreenChannel::showToastsBottom() if(stop_showing_toasts) break; - (*it).toast->setVisible(TRUE); + if( !(*it).toast->getVisible() ) + { + if((*it).toast->isFirstLook()) + { + (*it).toast->setVisible(TRUE); + } + else + { + // HACK + // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts + (*it).toast->setVisible(TRUE); + gFloaterView->sendChildToBack((*it).toast); + } + } } if(it != mToastList.rend() && !mOverflowToastHidden) @@ -417,6 +430,7 @@ void LLScreenChannel::showToastsBottom() for(; it != mToastList.rend(); it++) { (*it).toast->stopTimer(); + (*it).toast->setVisible(FALSE); mHiddenToastsNum++; } createOverflowToast(bottom, gSavedSettings.getS32("NotificationTipToastLifeTime")); diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index ed2cedbd10..f9cbdc20d6 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -227,7 +227,7 @@ void LLToast::setVisible(BOOL show) } LLModalDialog::setFrontmost(FALSE); } - LLPanel::setVisible(show); + LLFloater::setVisible(show); if(mPanel) { if(!mPanel->isDead()) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index db66faef81..3840f337d4 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1347,6 +1347,7 @@ LLViewerWindow::LLViewerWindow( mDebugText = new LLDebugText(this); + mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale); } void LLViewerWindow::initGLDefaults() @@ -2867,19 +2868,17 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window) if (mWorldViewRectRaw != new_world_rect) { - // sending a signal with a new WorldView rect - mOnWorldViewRectUpdated(mWorldViewRectRaw, new_world_rect); - + LLRect old_world_rect = mWorldViewRectRaw; mWorldViewRectRaw = new_world_rect; 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]); + mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale); + + // sending a signal with a new WorldView rect + old_world_rect = calcScaledRect(old_world_rect, mDisplayScale); + mOnWorldViewRectUpdated(old_world_rect, mWorldViewRectScaled); } } @@ -4794,6 +4793,18 @@ void LLViewerWindow::calcDisplayScale() } } +//static +LLRect LLViewerWindow::calcScaledRect(const LLRect & rect, const LLVector2& display_scale) +{ + LLRect res = rect; + res.mLeft = llround((F32)res.mLeft / display_scale.mV[VX]); + res.mRight = llround((F32)res.mRight / display_scale.mV[VX]); + res.mBottom = llround((F32)res.mBottom / display_scale.mV[VY]); + res.mTop = llround((F32)res.mTop / display_scale.mV[VY]); + + return res; +} + S32 LLViewerWindow::getChatConsoleBottomPad() { S32 offset = 0; diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 517993182b..747fd3b253 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -391,6 +391,7 @@ public: F32 getWorldViewAspectRatio() const; const LLVector2& getDisplayScale() const { return mDisplayScale; } void calcDisplayScale(); + static LLRect calcScaledRect(const LLRect & rect, const LLVector2& display_scale); private: bool shouldShowToolTipFor(LLMouseHandler *mh); diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index 7a3eae35a9..96e5b4d413 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -25,7 +25,7 @@ height="12" layout="topleft" left_pad="5" - right="-50" + right="-60" name="user_name" text_color="white" top="8" @@ -39,7 +39,7 @@ layout="topleft" left_pad="5" name="time_box" - right="-10" + right="-5" top="8" value="23:30" width="50" /> |