diff options
-rw-r--r-- | indra/llui/llfloater.cpp | 5 | ||||
-rw-r--r-- | indra/llui/llpanel.cpp | 10 | ||||
-rw-r--r-- | indra/llui/llpanel.h | 8 | ||||
-rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 20 | ||||
-rw-r--r-- | indra/newview/lllocationinputctrl.h | 2 | ||||
-rw-r--r-- | indra/newview/llnotificationtiphandler.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_nearby_chat.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 18 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_chat_header.xml | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/panel.xml | 2 |
11 files changed, 68 insertions, 15 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 3e0c5ced1a..b6d73cda3c 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1574,22 +1574,25 @@ void LLFloater::draw() LLUIImage* image = NULL; LLColor4 color; + LLColor4 overlay_color; if (isBackgroundOpaque()) { // NOTE: image may not be set image = getBackgroundImage(); color = getBackgroundColor(); + overlay_color = getBackgroundImageOverlay(); } else { image = getTransparentImage(); color = getTransparentColor(); + overlay_color = getTransparentImageOverlay(); } if (image) { // We're using images for this floater's backgrounds - image->draw(getLocalRect(), UI_VERTEX_COLOR % alpha); + image->draw(getLocalRect(), overlay_color % alpha); } else { diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index d963cf4c98..0cd052eefa 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -80,6 +80,8 @@ LLPanel::Params::Params() background_opaque("background_opaque", false), bg_opaque_color("bg_opaque_color"), bg_alpha_color("bg_alpha_color"), + bg_opaque_image_overlay("bg_opaque_image_overlay"), + bg_alpha_image_overlay("bg_alpha_image_overlay"), bg_opaque_image("bg_opaque_image"), bg_alpha_image("bg_alpha_image"), min_width("min_width", 100), @@ -103,6 +105,8 @@ LLPanel::LLPanel(const LLPanel::Params& p) mBgOpaque(p.background_opaque), mBgOpaqueColor(p.bg_opaque_color()), mBgAlphaColor(p.bg_alpha_color()), + mBgOpaqueImageOverlay(p.bg_opaque_image_overlay), + mBgAlphaImageOverlay(p.bg_alpha_image_overlay), mBgOpaqueImage(p.bg_opaque_image()), mBgAlphaImage(p.bg_alpha_image()), mDefaultBtn(NULL), @@ -199,7 +203,7 @@ void LLPanel::draw() // opaque, in-front look if (mBgOpaqueImage.notNull()) { - mBgOpaqueImage->draw( local_rect, UI_VERTEX_COLOR % alpha ); + mBgOpaqueImage->draw( local_rect, mBgOpaqueImageOverlay % alpha ); } else { @@ -212,7 +216,7 @@ void LLPanel::draw() // transparent, in-back look if (mBgAlphaImage.notNull()) { - mBgAlphaImage->draw( local_rect, UI_VERTEX_COLOR % alpha ); + mBgAlphaImage->draw( local_rect, mBgAlphaImageOverlay % alpha ); } else { @@ -481,6 +485,8 @@ void LLPanel::initFromParams(const LLPanel::Params& p) setTransparentColor(p.bg_alpha_color().get()); mBgOpaqueImage = p.bg_opaque_image(); mBgAlphaImage = p.bg_alpha_image(); + mBgOpaqueImageOverlay = p.bg_opaque_image_overlay; + mBgAlphaImageOverlay = p.bg_alpha_image_overlay; } static LLFastTimer::DeclareTimer FTM_PANEL_SETUP("Panel Setup"); diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index 4e53fd7ea3..03e3dc0c0e 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -77,7 +77,9 @@ public: background_opaque; Optional<LLUIColor> bg_opaque_color, - bg_alpha_color; + bg_alpha_color, + bg_opaque_image_overlay, + bg_alpha_image_overlay; // opaque image is for "panel in foreground" look Optional<LLUIImage*> bg_opaque_image, bg_alpha_image; @@ -137,6 +139,8 @@ public: const LLColor4& getTransparentColor() const { return mBgAlphaColor; } LLPointer<LLUIImage> getBackgroundImage() const { return mBgOpaqueImage; } LLPointer<LLUIImage> getTransparentImage() const { return mBgAlphaImage; } + LLColor4 getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; } + LLColor4 getTransparentImageOverlay() { return mBgAlphaImageOverlay; } void setBackgroundVisible( BOOL b ) { mBgVisible = b; } BOOL isBackgroundVisible() const { return mBgVisible; } void setBackgroundOpaque(BOOL b) { mBgOpaque = b; } @@ -262,6 +266,8 @@ private: BOOL mBgOpaque; // use opaque color or image LLUIColor mBgOpaqueColor; LLUIColor mBgAlphaColor; + LLUIColor mBgOpaqueImageOverlay; + LLUIColor mBgAlphaImageOverlay; LLPointer<LLUIImage> mBgOpaqueImage; // "panel in front" look LLPointer<LLUIImage> mBgAlphaImage; // "panel in back" look LLViewBorder* mBorder; diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index c66d067779..e493c4bf9c 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -358,6 +358,20 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) getTextEntry()->setRightMouseUpCallback(boost::bind(&LLLocationInputCtrl::onTextEditorRightClicked,this,_2,_3,_4)); updateWidgetlayout(); + // Connecting signal for updating location on "Show Coordinates" setting change. + LLControlVariable* coordinates_control = gSavedSettings.getControl("NavBarShowCoordinates").get(); + if (coordinates_control) + { + mCoordinatesControlConnection = coordinates_control->getSignal()->connect(boost::bind(&LLLocationInputCtrl::refreshLocation, this)); + } + + // Connecting signal for updating parcel icons on "Show Parcel Properties" setting change. + LLControlVariable* parcel_properties_control = gSavedSettings.getControl("NavBarShowParcelProperties").get(); + if (parcel_properties_control) + { + mParcelPropertiesControlConnection = parcel_properties_control->getSignal()->connect(boost::bind(&LLLocationInputCtrl::refreshParcelIcons, this)); + } + // - Make the "Add landmark" button updated when either current parcel gets changed // or a landmark gets created or removed from the inventory. // - Update the location string on parcel change. @@ -391,6 +405,8 @@ LLLocationInputCtrl::~LLLocationInputCtrl() LLViewerParcelMgr::getInstance()->removeObserver(mParcelChangeObserver); delete mParcelChangeObserver; + mCoordinatesControlConnection.disconnect(); + mParcelPropertiesControlConnection.disconnect(); mParcelMgrConnection.disconnect(); mLocationHistoryConnection.disconnect(); } @@ -763,8 +779,7 @@ void LLLocationInputCtrl::refreshParcelIcons() // Our "cursor" moving right to left S32 x = mAddLandmarkBtn->getRect().mLeft; - static LLUICachedControl<bool> show_properties("NavBarShowParcelProperties", false); - if (show_properties) + if (gSavedSettings.getBOOL("NavBarShowParcelProperties")) { LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance(); @@ -1008,7 +1023,6 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata) { gSavedSettings.setBOOL("NavBarShowParcelProperties", !gSavedSettings.getBOOL("NavBarShowParcelProperties")); - refreshParcelIcons(); } else if (item == "landmark") { diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index caa62daa1b..4bb41f3bf4 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -174,6 +174,8 @@ private: LLRemoveLandmarkObserver* mRemoveLandmarkObserver; LLParcelChangeObserver* mParcelChangeObserver; + boost::signals2::connection mCoordinatesControlConnection; + boost::signals2::connection mParcelPropertiesControlConnection; boost::signals2::connection mParcelMgrConnection; boost::signals2::connection mLocationHistoryConnection; LLUIImage* mLandmarkImageOn; diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index c55c8d6221..be76959d07 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -43,7 +43,7 @@ using namespace LLNotificationsUI; -class LLOnalineStatusToast : public LLToastPanel +class LLOnlineStatusToast : public LLToastPanel { public: @@ -56,9 +56,9 @@ public: Params() {} }; - LLOnalineStatusToast(Params& p) : LLToastPanel(p.notification) + LLOnlineStatusToast(Params& p) : LLToastPanel(p.notification) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_online_status.xml"); + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_online_status_toast.xml"); childSetValue("avatar_icon", p.avatar_id); childSetValue("message", p.message); @@ -148,11 +148,11 @@ bool LLTipHandler::processNotification(const LLSD& notify) LLToastPanel* notify_box = NULL; if("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) { - LLOnalineStatusToast::Params p; + LLOnlineStatusToast::Params p; p.notification = notification; p.message = notification->getMessage(); p.avatar_id = notification->getPayload()["FROM_ID"]; - notify_box = new LLOnalineStatusToast(p); + notify_box = new LLOnlineStatusToast(p); } else { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8aa642bdb6..cf7fb8d7eb 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2212,7 +2212,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["owner_id"] = from_id; args["slurl"] = location; - nearby_chat->addMessage(chat, true, args); + args["type"] = LLNotificationsUI::NT_NEARBYCHAT; + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); } diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index ae686d9ab7..28616d503b 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -6,7 +6,7 @@ border="false" bg_opaque_image="Window_Foreground" bg_alpha_image="Window_Background" - bg_alpha_color="0 0 0 0" + bg_alpha_image_overlay="DkGray_66" legacy_header_height="18" can_minimize="true" can_tear_off="false" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 61ff66b407..4c4867b862 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -354,6 +354,24 @@ function="ToggleControl" parameter="ShowParcelOwners" /> </menu_item_check> + <menu_item_check + label="Coordinates" + name="Coordinates"> + <menu_item_check.on_click + function="ToggleControl" + parameter="NavBarShowCoordinates" /> + <menu_item_check.on_check + control="NavBarShowCoordinates" /> + </menu_item_check> + <menu_item_check + label="Parcel Properties" + name="Parcel Properties"> + <menu_item_check.on_click + function="ToggleControl" + parameter="NavBarShowParcelProperties" /> + <menu_item_check.on_check + control="NavBarShowParcelProperties" /> + </menu_item_check> </menu> <menu_item_separator layout="topleft" /> 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 51e2256a7d..250dadd390 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -2,7 +2,8 @@ <panel background_visible="true" bevel_style="in" - bg_alpha_color="black" + bg_opaque_color="Black" + bg_alpha_color="DkGray_66" follows="top|left|right" height="24" label="im_header" diff --git a/indra/newview/skins/default/xui/en/widgets/panel.xml b/indra/newview/skins/default/xui/en/widgets/panel.xml index 7262c0dc5c..9bf99fa363 100644 --- a/indra/newview/skins/default/xui/en/widgets/panel.xml +++ b/indra/newview/skins/default/xui/en/widgets/panel.xml @@ -6,6 +6,8 @@ --> <panel bg_opaque_color="PanelFocusBackgroundColor" bg_alpha_color="PanelDefaultBackgroundColor" + bg_opaque_image_overlay="White" + bg_alpha_image_overlay="White" background_visible="false" background_opaque="false" chrome="false"/>
\ No newline at end of file |