From 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Sun, 21 Jun 2009 08:04:56 +0000 Subject: merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3 ignore-dead-branch --- indra/newview/lllocationinputctrl.cpp | 513 ++++++++++++++++++++++++++++++++++ 1 file changed, 513 insertions(+) create mode 100644 indra/newview/lllocationinputctrl.cpp (limited to 'indra/newview/lllocationinputctrl.cpp') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp new file mode 100644 index 0000000000..4aaa7ca6cb --- /dev/null +++ b/indra/newview/lllocationinputctrl.cpp @@ -0,0 +1,513 @@ +/** + * @file lllocationinputctrl.cpp + * @brief Combobox-like location input control + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +// file includes +#include "lllocationinputctrl.h" + +// common includes +#include "llbutton.h" +#include "llfloaterreg.h" +#include "llfocusmgr.h" +#include "llkeyboard.h" +#include "llstring.h" +#include "lluictrlfactory.h" +#include "v2math.h" + +// newview includes +#include "llagent.h" +#include "llfloaterland.h" +#include "llinventorymodel.h" +#include "lllandmarklist.h" +#include "lllocationhistory.h" +#include "llpanelplaces.h" +#include "llsidetray.h" +#include "llviewerinventory.h" +#include "llviewerparcelmgr.h" + +//============================================================================ +/* + * "ADD LANDMARK" BUTTON UPDATING LOGIC + * + * If the current parcel has been landmarked, we should draw + * a special image on the button. + * + * To avoid determining the appropriate image on every draw() we do that + * only in the following cases: + * 1) Navbar is shown for the first time after login. + * 2) Agent moves to another parcel. + * 3) A landmark is created or removed. + * + * The first case is handled by the handleLoginComplete() method. + * + * The second case is handled by setting the "agent parcel changed" callback + * on LLViewerParcelMgr. + * + * The third case is the most complex one. We have two inventory observers for that: + * one is designated to handle adding landmarks, the other handles removal. + * Let's see how the former works. + * + * When we get notified about landmark addition, the landmark position is unknown yet. What we can + * do at that point is initiate loading the landmark data by LLLandmarkList and set the + * "loading finished" callback on it. Finally, when the callback is triggered, + * we can determine whether the landmark refers to a point within the current parcel + * and choose the appropriate image for the "Add landmark" button. + */ + +// Returns true if the given inventory item is a landmark pointing to the current parcel. +// Used to filter inventory items. +class LLIsAgentParcelLandmark : public LLInventoryCollectFunctor +{ +public: + /*virtual*/ bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) + { + if (!item || item->getType() != LLAssetType::AT_LANDMARK) + return false; + + LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID()); + if (!landmark) // the landmark not been loaded yet + return false; + + LLVector3d landmark_global_pos; + if (!landmark->getGlobalPos(landmark_global_pos)) + return false; + + return LLViewerParcelMgr::getInstance()->inAgentParcel(landmark_global_pos); + } +}; + +/** + * Initiates loading the landmarks that have been just added. + * + * Once the loading is complete we'll be notified + * with the callback we set for LLLandmarkList. + */ +class LLAddLandmarkObserver : public LLInventoryAddedObserver +{ +public: + LLAddLandmarkObserver(LLLocationInputCtrl* input) : mInput(input) {} + +private: + /*virtual*/ void done() + { + std::vector::const_iterator it = mAdded.begin(), end = mAdded.end(); + for(; it != end; ++it) + { + LLInventoryItem* item = gInventory.getItem(*it); + if (!item || item->getType() != LLAssetType::AT_LANDMARK) + continue; + + // Start loading the landmark. + LLLandmark* lm = gLandmarkList.getAsset( + item->getAssetUUID(), + boost::bind(&LLLocationInputCtrl::onLandmarkLoaded, mInput, _1)); + if (lm) + { + // Already loaded? Great, handle it immediately (the callback won't be called). + mInput->onLandmarkLoaded(lm); + } + } + + mAdded.clear(); + } + + LLLocationInputCtrl* mInput; +}; + +/** + * Updates the "Add landmark" button once a landmark gets removed. + */ +class LLRemoveLandmarkObserver : public LLInventoryObserver +{ +public: + LLRemoveLandmarkObserver(LLLocationInputCtrl* input) : mInput(input) {} + +private: + /*virtual*/ void changed(U32 mask) + { + if (mask & (~(LLInventoryObserver::LABEL|LLInventoryObserver::INTERNAL|LLInventoryObserver::ADD))) + { + mInput->updateAddLandmarkButton(); + } + } + + LLLocationInputCtrl* mInput; +}; + +//============================================================================ + + +static LLDefaultWidgetRegistry::Register r("location_input"); + +LLLocationInputCtrl::Params::Params() +: add_landmark_image_enabled("add_landmark_image_enabled"), + add_landmark_image_disabled("add_landmark_image_disabled"), + add_landmark_button("add_landmark_button"), + add_landmark_hpad("add_landmark_hpad", 0), + info_button("info_button"), + background("background") +{ +} + +LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) +: LLComboBox(p), + mAddLandmarkHPad(p.add_landmark_hpad), + mInfoBtn(NULL), + mAddLandmarkBtn(NULL) +{ + // Background image. + LLButton::Params bg_params = p.background; + mBackground = LLUICtrlFactory::create(bg_params); + addChildInBack(mBackground); + + // "Place information" button. + LLButton::Params info_params = p.info_button; + mInfoBtn = LLUICtrlFactory::create(info_params); + mInfoBtn->setClickedCallback(boost::bind(&LLLocationInputCtrl::onInfoButtonClicked, this)); + addChild(mInfoBtn); + + // "Add landmark" button. + LLButton::Params al_params = p.add_landmark_button; + if (p.add_landmark_image_enabled()) + { + al_params.image_unselected = p.add_landmark_image_enabled; + al_params.image_selected = p.add_landmark_image_enabled; + } + if (p.add_landmark_image_disabled()) + { + al_params.image_disabled = p.add_landmark_image_disabled; + al_params.image_disabled_selected = p.add_landmark_image_disabled; + } + al_params.click_callback.function(boost::bind(&LLLocationInputCtrl::onAddLandmarkButtonClicked, this)); + mAddLandmarkBtn = LLUICtrlFactory::create(al_params); + enableAddLandmarkButton(true); + addChild(mAddLandmarkBtn); + + setFocusReceivedCallback(boost::bind(&LLLocationInputCtrl::onFocusReceived, this)); + setFocusLostCallback(boost::bind(&LLLocationInputCtrl::onFocusLost, this)); + setPrearrangeCallback(boost::bind(&LLLocationInputCtrl::onLocationPrearrange, this, _2)); + + updateWidgetlayout(); + + // - 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. + LLViewerParcelMgr::getInstance()->setAgentParcelChangedCallback( + boost::bind(&LLLocationInputCtrl::onAgentParcelChange, this)); + + LLLocationHistory::getInstance()->setLoadedCallback( + boost::bind(&LLLocationInputCtrl::onLocationHistoryLoaded, this)); + + mRemoveLandmarkObserver = new LLRemoveLandmarkObserver(this); + mAddLandmarkObserver = new LLAddLandmarkObserver(this); + gInventory.addObserver(mRemoveLandmarkObserver); + gInventory.addObserver(mAddLandmarkObserver); +} + +LLLocationInputCtrl::~LLLocationInputCtrl() +{ + gInventory.removeObserver(mRemoveLandmarkObserver); + gInventory.removeObserver(mAddLandmarkObserver); + delete mRemoveLandmarkObserver; + delete mAddLandmarkObserver; +} + +void LLLocationInputCtrl::setEnabled(BOOL enabled) +{ + LLComboBox::setEnabled(enabled); + mAddLandmarkBtn->setEnabled(enabled); +} + +void LLLocationInputCtrl::hideList() +{ + LLComboBox::hideList(); + if (mTextEntry && hasFocus()) + focusTextEntry(); +} + +BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) +{ + // Let the buttons show their tooltips. + if (LLUICtrl::handleToolTip(x, y, msg, sticky_rect_screen) && !msg.empty()) + { + return TRUE; + } + + // Cursor is above the text entry. + msg = LLUI::sShowXUINames ? getShowNamesToolTip() : gAgent.getSLURL(); + if (mTextEntry && sticky_rect_screen) + { + *sticky_rect_screen = mTextEntry->calcScreenRect(); + } + + return TRUE; +} + +BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask) +{ + BOOL result = LLComboBox::handleKeyHere(key, mask); + + if (key == KEY_DOWN && hasFocus() && mList->getItemCount() != 0) + { + showList(); + } + + return result; +} + +void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor) +{ + KEY key = gKeyboard->currentKey(); + + if (line_editor->getText().empty()) + { + prearrangeList(); // resets filter + hideList(); + } + // Typing? (moving cursor should not affect showing the list) + else if (key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END) + { + prearrangeList(line_editor->getText()); + if (mList->getItemCount() != 0) + { + showList(); + focusTextEntry(); + } + else + { + // Hide the list if it's empty. + hideList(); + } + } + + LLComboBox::onTextEntry(line_editor); +} + +/** + * Useful if we want to just set the text entry value, no matter what the list contains. + * + * This is faster than setTextEntry(). + */ +void LLLocationInputCtrl::setText(const LLStringExplicit& text) +{ + if (mTextEntry) + { + mTextEntry->setText(text); + mHasAutocompletedText = FALSE; + } +} + +void LLLocationInputCtrl::setFocus(BOOL b) +{ + LLComboBox::setFocus(b); + + if (mTextEntry && b && !mList->getVisible()) + mTextEntry->setFocus(TRUE); +} + +void LLLocationInputCtrl::handleLoginComplete() +{ + // An agent parcel update hasn't occurred yet, so we have to + // manually set location and the appropriate "Add landmark" icon. + refresh(); +} + +//== private methods ========================================================= + +void LLLocationInputCtrl::onFocusReceived() +{ + prearrangeList(); + setText(gAgent.getSLURL()); + if (mTextEntry) + mTextEntry->endSelection(); // we don't want handleMouseUp() to "finish" the selection +} + +void LLLocationInputCtrl::onFocusLost() +{ + refreshLocation(); +} + +void LLLocationInputCtrl::onInfoButtonClicked() +{ + LLSD key; + key["type"] = LLPanelPlaces::AGENT; + + LLSideTray::getInstance()->showPanel("panel_places", key); +} + +void LLLocationInputCtrl::onAddLandmarkButtonClicked() +{ + LLFloaterReg::showInstance("add_landmark"); +} + +void LLLocationInputCtrl::onAgentParcelChange() +{ + refresh(); +} + +void LLLocationInputCtrl::onLandmarkLoaded(LLLandmark* lm) +{ + (void) lm; + updateAddLandmarkButton(); +} + +void LLLocationInputCtrl::onLocationHistoryLoaded() +{ + rebuildLocationHistory(); +} + +void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data) +{ + std::string filter = data.asString(); + rebuildLocationHistory(filter); + mList->mouseOverHighlightNthItem(-1); // Clear highlight on the last selected item. +} + +void LLLocationInputCtrl::refresh() +{ + refreshLocation(); // update location string + updateAddLandmarkButton(); // indicate whether current parcel has been landmarked +} + +void LLLocationInputCtrl::refreshLocation() +{ + // Is one of our children focused? + if (LLUICtrl::hasFocus() || mButton->hasFocus() || mList->hasFocus() || + (mTextEntry && mTextEntry->hasFocus()) || (mAddLandmarkBtn->hasFocus())) + + { + llwarns << "Location input should not be refreshed when having focus" << llendl; + return; + } + + // Update location field. + std::string location_name; + + if (!gAgent.buildLocationString(location_name, LLAgent::LOCATION_FORMAT_NORMAL)) + location_name = "Unknown"; + + setText(location_name); +} + +void LLLocationInputCtrl::rebuildLocationHistory(std::string filter) +{ + LLLocationHistory::location_list_t filtered_items; + const LLLocationHistory::location_list_t* itemsp = NULL; + LLLocationHistory* lh = LLLocationHistory::getInstance(); + + if (filter.empty()) + itemsp = &lh->getItems(); + else + { + lh->getMatchingItems(filter, filtered_items); + itemsp = &filtered_items; + } + + removeall(); + for (LLLocationHistory::location_list_t::const_reverse_iterator it = itemsp->rbegin(); it != itemsp->rend(); it++) + add(*it); +} + +void LLLocationInputCtrl::focusTextEntry() +{ + // We can't use "mTextEntry->setFocus(TRUE)" instead because + // if the "select_on_focus" parameter is true it places the cursor + // at the beginning (after selecting text), thus screwing up updateSelection(). + if (mTextEntry) + gFocusMgr.setKeyboardFocus(mTextEntry); +} + +void LLLocationInputCtrl::enableAddLandmarkButton(bool val) +{ + // Enable/disable the button. + mAddLandmarkBtn->setEnabled(val); +} + +// Change the "Add landmark" button image +// depending on whether current parcel has been landmarked. +void LLLocationInputCtrl::updateAddLandmarkButton() +{ + bool cur_parcel_landmarked = false; + + // Determine whether there are landmarks pointing to the current parcel. + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLIsAgentParcelLandmark is_current_parcel_landmark; + gInventory.collectDescendentsIf(gAgent.getInventoryRootID(), + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + is_current_parcel_landmark); + cur_parcel_landmarked = !items.empty(); + + enableAddLandmarkButton(!cur_parcel_landmarked); +} + +void LLLocationInputCtrl::updateWidgetlayout() +{ + const LLRect& rect = getLocalRect(); + const LLRect& hist_btn_rect = mButton->getRect(); + LLRect info_btn_rect = mButton->getRect(); + + // info button + info_btn_rect.setOriginAndSize( + 0, (rect.getHeight() - info_btn_rect.getHeight()) / 2, + info_btn_rect.getWidth(), info_btn_rect.getHeight()); + mInfoBtn->setRect(info_btn_rect); + + // background + mBackground->setRect(LLRect(info_btn_rect.getWidth(), rect.mTop, + rect.mRight - hist_btn_rect.getWidth(), rect.mBottom)); + + // history button + mButton->setRightHPad(0); + + // "Add Landmark" button + { + LLRect al_btn_rect = mAddLandmarkBtn->getRect(); + al_btn_rect.translate( + hist_btn_rect.mLeft - mAddLandmarkHPad - al_btn_rect.getWidth(), + (rect.getHeight() - al_btn_rect.getHeight()) / 2); + mAddLandmarkBtn->setRect(al_btn_rect); + } + + // text entry + if (mTextEntry) + { + LLRect text_entry_rect(rect); + text_entry_rect.mLeft = info_btn_rect.getWidth(); + text_entry_rect.mRight = mAddLandmarkBtn->getRect().mLeft; + text_entry_rect.stretch(0, -1); // make space for border + mTextEntry->setRect(text_entry_rect); + } +} -- cgit v1.3 From ade6bbb06c6a842f39a3fe32decf7c66682df092 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Sun, 21 Jun 2009 17:16:27 +0000 Subject: merge -r 124105-124625 skinning-13 -> viewer-2.0.0-3 --- indra/llmath/llrect.h | 8 +- indra/llmath/v3dmath.h | 8 +- indra/llmath/v3math.cpp | 6 - indra/llmath/v3math.h | 4 +- indra/llmath/v4color.h | 10 +- indra/llmath/v4coloru.h | 8 +- indra/llui/llbutton.cpp | 2 +- indra/llui/llcheckboxctrl.h | 2 +- indra/llui/llcombobox.cpp | 8 +- indra/llui/llfloater.cpp | 7 + indra/llui/llfloater.h | 5 +- indra/llui/llflyoutbutton.cpp | 2 +- indra/llui/lliconctrl.h | 2 +- indra/llui/lllineeditor.h | 2 +- indra/llui/llmenugl.h | 2 +- indra/llui/llmultifloater.h | 2 +- indra/llui/llnotifications.h | 4 +- indra/llui/llpanel.cpp | 18 +- indra/llui/llpanel.h | 6 +- indra/llui/llradiogroup.h | 4 +- indra/llui/llscrolllistcolumn.cpp | 10 + indra/llui/llscrolllistcolumn.h | 14 +- indra/llui/llscrolllistctrl.cpp | 4 +- indra/llui/llscrolllistctrl.h | 2 +- indra/llui/llscrolllistitem.h | 6 +- indra/llui/llsearcheditor.cpp | 2 +- indra/llui/lltextbox.h | 2 +- indra/llui/lltexteditor.h | 2 +- indra/llui/llui.cpp | 8 + indra/llui/llui.h | 4 +- indra/llui/lluicolortable.h | 4 +- indra/llui/lluictrl.cpp | 7 + indra/llui/lluictrl.h | 13 +- indra/llui/lluictrlfactory.h | 24 +- indra/llui/llview.cpp | 22 +- indra/llui/llview.h | 24 +- indra/llxml/llcontrol.cpp | 6 +- indra/newview/CMakeLists.txt | 2 - indra/newview/llappviewer.cpp | 2 +- indra/newview/llfavoritesbar.cpp | 2 +- indra/newview/llfloaterauction.cpp | 9 +- indra/newview/llfloaterauction.h | 2 +- indra/newview/llfloaterbuildoptions.cpp | 2 +- indra/newview/llfloaterbuildoptions.h | 2 +- indra/newview/llfloaterbump.cpp | 2 +- indra/newview/llfloaterbump.h | 5 +- indra/newview/llfloatercamera.cpp | 15 +- indra/newview/llfloatercamera.h | 2 +- indra/newview/llfloaterlagmeter.cpp | 90 ++-- indra/newview/llfloaterlagmeter.h | 7 +- indra/newview/llfloaterland.cpp | 7 +- indra/newview/llfloaternotificationsconsole.cpp | 12 +- indra/newview/llfloaternotificationsconsole.h | 2 +- indra/newview/llfloaterpreference.cpp | 587 +++++++++++++++++++-- indra/newview/llfloaterpreference.h | 36 +- indra/newview/llfloaterreporter.cpp | 2 +- indra/newview/llfloatersettingsdebug.cpp | 73 ++- indra/newview/llfloatersettingsdebug.h | 6 +- indra/newview/llfloatertools.cpp | 3 +- indra/newview/llfolderview.cpp | 49 +- indra/newview/llfolderview.h | 3 + indra/newview/lllocationinputctrl.cpp | 4 + indra/newview/llnamelistctrl.h | 4 +- indra/newview/llpanelprofileview.cpp | 4 +- indra/newview/llpanelprofileview.h | 2 +- indra/newview/llpanelteleporthistory.cpp | 11 +- indra/newview/llstatusbar.cpp | 2 +- indra/newview/llviewerfloaterreg.cpp | 15 +- indra/newview/llviewermenu.cpp | 14 +- indra/newview/llviewermessage.cpp | 4 +- indra/newview/llviewerwindow.cpp | 91 ++-- .../skins/default/xui/en/floater_auction.xml | 11 +- .../skins/default/xui/en/floater_avatar_picker.xml | 10 +- .../skins/default/xui/en/floater_lagmeter.xml | 11 +- .../xui/en/floater_notifications_console.xml | 5 +- .../skins/default/xui/en/floater_preferences.xml | 1 + .../default/xui/en/floater_settings_debug.xml | 43 +- .../default/xui/en/panel_preferences_graphics1.xml | 8 +- 78 files changed, 1058 insertions(+), 368 deletions(-) (limited to 'indra/newview/lllocationinputctrl.cpp') diff --git a/indra/llmath/llrect.h b/indra/llmath/llrect.h index 98aceb0597..16bfdde658 100644 --- a/indra/llmath/llrect.h +++ b/indra/llmath/llrect.h @@ -64,17 +64,11 @@ public: mLeft(left), mTop(top), mRight(right), mBottom(bottom) {} - LLRectBase(const LLSD& sd) + explicit LLRectBase(const LLSD& sd) { setValue(sd); } - const LLRectBase& operator=(const LLSD& sd) - { - setValue(sd); - return *this; - } - void setValue(const LLSD& sd) { mLeft = sd[0].asInteger(); diff --git a/indra/llmath/v3dmath.h b/indra/llmath/v3dmath.h index a99bf5b4a6..6ab31e8a41 100644 --- a/indra/llmath/v3dmath.h +++ b/indra/llmath/v3dmath.h @@ -53,7 +53,7 @@ class LLVector3d inline LLVector3d(const F64 x, const F64 y, const F64 z); // Initializes LLVector3d to (x. y, z) inline explicit LLVector3d(const F64 *vec); // Initializes LLVector3d to (vec[0]. vec[1], vec[2]) inline explicit LLVector3d(const LLVector3 &vec); - LLVector3d(const LLSD& sd) + explicit LLVector3d(const LLSD& sd) { setValue(sd); } @@ -65,12 +65,6 @@ class LLVector3d mdV[2] = sd[2].asReal(); } - const LLVector3d& operator=(const LLSD& sd) - { - setValue(sd); - return *this; - } - LLSD getValue() const { LLSD ret; diff --git a/indra/llmath/v3math.cpp b/indra/llmath/v3math.cpp index 101e9d075a..f392ac448b 100644 --- a/indra/llmath/v3math.cpp +++ b/indra/llmath/v3math.cpp @@ -314,12 +314,6 @@ void LLVector3::setValue(const LLSD& sd) mV[2] = (F32) sd[2].asReal(); } -const LLVector3& LLVector3::operator=(const LLSD& sd) -{ - setValue(sd); - return *this; -} - const LLVector3& operator*=(LLVector3 &a, const LLQuaternion &rot) { const F32 rw = - rot.mQ[VX] * a.mV[VX] - rot.mQ[VY] * a.mV[VY] - rot.mQ[VZ] * a.mV[VZ]; diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h index 7f96800e21..805d7e6384 100644 --- a/indra/llmath/v3math.h +++ b/indra/llmath/v3math.h @@ -67,14 +67,12 @@ class LLVector3 explicit LLVector3(const LLVector2 &vec); // Initializes LLVector3 to (vec[0]. vec[1], 0) explicit LLVector3(const LLVector3d &vec); // Initializes LLVector3 to (vec[0]. vec[1], vec[2]) explicit LLVector3(const LLVector4 &vec); // Initializes LLVector4 to (vec[0]. vec[1], vec[2]) - LLVector3(const LLSD& sd); + explicit LLVector3(const LLSD& sd); LLSD getValue() const; void setValue(const LLSD& sd); - const LLVector3& operator=(const LLSD& sd); - inline BOOL isFinite() const; // checks to see if all values of LLVector3 are finite BOOL clamp(F32 min, F32 max); // Clamps all values to (min,max), returns TRUE if data changed BOOL clampLength( F32 length_limit ); // Scales vector to limit length to a value diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h index 7414c38847..d6fbdec61e 100644 --- a/indra/llmath/v4color.h +++ b/indra/llmath/v4color.h @@ -58,7 +58,7 @@ class LLColor4 LLColor4(U32 clr); // Initializes LLColor4 to (r=clr>>24, etc)) LLColor4(const F32 *vec); // Initializes LLColor4 to (vec[0]. vec[1], vec[2], 1) LLColor4(const LLColor3 &vec, F32 a = 1.f); // Initializes LLColor4 to (vec, a) - LLColor4(const LLSD& sd); + explicit LLColor4(const LLSD& sd); explicit LLColor4(const LLColor4U& color4u); // "explicit" to avoid automatic conversion explicit LLColor4(const LLVector4& vector4); // "explicit" to avoid automatic conversion @@ -113,7 +113,6 @@ class LLColor4 F32 &operator[](int idx) { return mV[idx]; } const LLColor4& operator=(const LLColor3 &a); // Assigns vec3 to vec4 and returns vec4 - const LLColor4& operator=(const LLSD& sd); friend std::ostream& operator<<(std::ostream& s, const LLColor4 &a); // Print a friend LLColor4 operator+(const LLColor4 &a, const LLColor4 &b); // Return vector a + b @@ -634,12 +633,5 @@ void LLColor4::clamp() } } -inline const LLColor4& LLColor4::operator=(const LLSD& sd) -{ - setValue(sd); - - return *this; -} - #endif diff --git a/indra/llmath/v4coloru.h b/indra/llmath/v4coloru.h index c0390fa0b2..4ec5a345eb 100644 --- a/indra/llmath/v4coloru.h +++ b/indra/llmath/v4coloru.h @@ -66,7 +66,7 @@ public: LLColor4U(U8 r, U8 g, U8 b); // Initializes LLColor4U to (r, g, b, 1) LLColor4U(U8 r, U8 g, U8 b, U8 a); // Initializes LLColor4U to (r. g, b, a) LLColor4U(const U8 *vec); // Initializes LLColor4U to (vec[0]. vec[1], vec[2], 1) - LLColor4U(const LLSD& sd) + explicit LLColor4U(const LLSD& sd) { setValue(sd); } @@ -79,12 +79,6 @@ public: mV[3] = sd[3].asInteger(); } - const LLColor4U& operator=(const LLSD& sd) - { - setValue(sd); - return *this; - } - LLSD getValue() const { LLSD ret; diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 110ad82763..4d340b3ddd 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -146,7 +146,7 @@ LLButton::LLButton(const LLButton::Params& p) mFadeWhenDisabled(FALSE) { static LLUICachedControl llbutton_orig_h_pad ("UIButtonOrigHPad", 0); - static LLButton::Params default_params(LLUICtrlFactory::getDefaultParams()); + static Params default_params(LLUICtrlFactory::getDefaultParams()); //if we aren't a picture_style button set label as name if not provided if (!p.picture_style.isProvided() || !p.picture_style) diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h index fe719e3b6a..2f8f088a3e 100644 --- a/indra/llui/llcheckboxctrl.h +++ b/indra/llui/llcheckboxctrl.h @@ -65,7 +65,7 @@ public: Optional label_text; Optional check_button; - Deprecated radio_style; + Ignored radio_style; Params(); }; diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 2197d5432b..51ab3326fe 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -640,15 +640,17 @@ void LLComboBox::onButtonDown() { if (!mList->getVisible()) { + // this might change selection, so do it first + prearrangeList(); + + // highlight the last selected item from the original selection before potentially selecting a new item + // as visual cue to original value of combo box LLScrollListItem* last_selected_item = mList->getLastSelectedItem(); if (last_selected_item) { - // highlight the original selection before potentially selecting a new item mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item)); } - prearrangeList(); - if (mList->getItemCount() != 0) { showList(); diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a14b99eeb7..8932a7ccf2 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -188,6 +188,13 @@ bool LLFloater::KeyCompare::equate(const LLSD& a, const LLSD& b) //************************************ +//static +const LLFloater::Params& LLFloater::getDefaultParams() +{ + return LLUICtrlFactory::getDefaultParams(); +} + + LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) : LLPanel(), mDragHandle(NULL), diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 421b7f3ec1..3e80f1b284 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -141,7 +141,10 @@ public: } }; - LLFloater(const LLSD& key = LLSD(), const LLFloater::Params& params = LLFloater::Params()); + // use this to avoid creating your own default LLFloater::Param instance + static const Params& getDefaultParams(); + + LLFloater(const LLSD& key = LLSD(), const Params& params = getDefaultParams()); virtual ~LLFloater(); diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp index 62a321dc02..8846f2a8c4 100644 --- a/indra/llui/llflyoutbutton.cpp +++ b/indra/llui/llflyoutbutton.cpp @@ -35,7 +35,7 @@ // file includes #include "llflyoutbutton.h" -static LLDefaultWidgetRegistry::Register r2("flyout_button"); +//static LLDefaultWidgetRegistry::Register r2("flyout_button"); const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24; diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h index ad0f6f563f..a6cab0e9ee 100644 --- a/indra/llui/lliconctrl.h +++ b/indra/llui/lliconctrl.h @@ -55,7 +55,7 @@ public: { Optional image; Optional color; - Deprecated scale_image; + Ignored scale_image; Params(); }; protected: diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 78df791334..eb021bace9 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -103,7 +103,7 @@ public: Optional text_pad_left, text_pad_right; - Deprecated is_unicode, + Ignored is_unicode, drop_shadow_visible, border_drop_shadow_visible, bg_visible; diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 7d889c291c..0d7d1ae746 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -63,7 +63,7 @@ public: Optional jump_key; Optional use_mac_ctrl; - Deprecated rect, + Ignored rect, left, top, right, diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h index ea8a9841e3..7f4c1c040a 100644 --- a/indra/llui/llmultifloater.h +++ b/indra/llui/llmultifloater.h @@ -44,7 +44,7 @@ class LLMultiFloater : public LLFloater { public: - LLMultiFloater(const LLFloater::Params& params = LLFloater::Params()); + LLMultiFloater(const LLFloater::Params& params = LLFloater::getDefaultParams()); virtual ~LLMultiFloater() {}; void buildTabContainer(); diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 5c8d146e0c..b749724b4e 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -299,8 +299,8 @@ public: struct Functor : public LLInitParam::Choice { - Option name; - Option function; + Alternative name; + Alternative function; Functor() : name("functor_name"), diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index ad5cdca5cc..0136a41d61 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -58,6 +58,11 @@ static LLDefaultWidgetRegistry::Register r1("panel", &LLPanel::fromXML); +const LLPanel::Params& LLPanel::getDefaultParams() +{ + return LLUICtrlFactory::getDefaultParams(); +} + LLPanel::Params::Params() : has_border("border", false), bg_opaque_color("bg_opaque_color"), @@ -114,6 +119,14 @@ void LLPanel::addBorder(LLViewBorder::Params p) addChild( mBorder ); } +void LLPanel::addBorder() +{ + LLViewBorder::Params p; + p.border_thickness(LLPANEL_BORDER_WIDTH); + addBorder(p); +} + + void LLPanel::removeBorder() { if (mBorder) @@ -885,10 +898,11 @@ LLView* LLPanel::getChildView(const std::string& name, BOOL recurse, BOOL create } if (!view && create_if_missing) { - view = getDummyWidget(name); + view = getDefaultWidget(name); if (!view) { - view = LLUICtrlFactory::createDummyWidget(name); + // create LLViews explicitly, as they are not registered widget types + view = LLUICtrlFactory::createDefaultWidget(name); } } return view; diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index b3ccdd0f00..fc40cd77eb 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -96,10 +96,10 @@ public: protected: friend class LLUICtrlFactory; // RN: for some reason you can't just use LLUICtrlFactory::getDefaultParams as a default argument in VC8 - static const Params& defaultParams() { return LLUICtrlFactory::getDefaultParams(); } + static const LLPanel::Params& getDefaultParams(); // Panels can get constructed directly - LLPanel(const Params& params = defaultParams()); + LLPanel(const LLPanel::Params& params = getDefaultParams()); public: // LLPanel(const std::string& name, const LLRect& rect = LLRect(), BOOL bordered = TRUE); @@ -122,7 +122,7 @@ public: // Border controls void addBorder( LLViewBorder::Params p); - void addBorder() { LLViewBorder::Params p; p.border_thickness(LLPANEL_BORDER_WIDTH); addBorder(p); } + void addBorder(); void removeBorder(); BOOL hasBorder() const { return mBorder != NULL; } void setBorderVisible( BOOL b ); diff --git a/indra/llui/llradiogroup.h b/indra/llui/llradiogroup.h index d3cb8a628e..850d896e29 100644 --- a/indra/llui/llradiogroup.h +++ b/indra/llui/llradiogroup.h @@ -48,8 +48,8 @@ class LLRadioCtrl : public LLCheckBoxCtrl public: struct Params : public LLInitParam::Block { - Deprecated length; - Deprecated type; + Ignored length; + Ignored type; Params() : length("length"), diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp index 48fddbfb71..02f09bd9b4 100644 --- a/indra/llui/llscrolllistcolumn.cpp +++ b/indra/llui/llscrolllistcolumn.cpp @@ -285,6 +285,16 @@ void LLScrollListColumn::SortNames::declareValues() declare("descending", LLScrollListColumn::DESCENDING); } +// +// LLScrollListColumn +// +//static +const LLScrollListColumn::Params& LLScrollListColumn::getDefaultParams() +{ + return LLUICtrlFactory::getDefaultParams(); +} + + LLScrollListColumn::LLScrollListColumn(const Params& p, LLScrollListCtrl* parent) : mWidth(0), mIndex (-1), diff --git a/indra/llui/llscrolllistcolumn.h b/indra/llui/llscrolllistcolumn.h index c1bb86577f..712ea56454 100644 --- a/indra/llui/llscrolllistcolumn.h +++ b/indra/llui/llscrolllistcolumn.h @@ -116,9 +116,9 @@ public: struct Width : public LLInitParam::Choice { - Option dynamic_width; - Option pixel_width; - Option relative_width; + Alternative dynamic_width; + Alternative pixel_width; + Alternative relative_width; Width() : dynamic_width("dynamicwidth", false), @@ -133,8 +133,8 @@ public: // either an image or label is used in column header struct Header : public LLInitParam::Choice
{ - Option label; - Option image; + Alternative label; + Alternative image; Header() : label("label"), @@ -160,8 +160,10 @@ public: } }; + static const Params& getDefaultParams(); + //NOTE: this is default constructible so we can store it in a map. - LLScrollListColumn(const Params& p = Params(), LLScrollListCtrl* = NULL); + LLScrollListColumn(const Params& p = getDefaultParams(), LLScrollListCtrl* = NULL); void setWidth(S32 width); S32 getWidth() const { return mWidth; } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 42c7c892c8..6d91c784f7 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1246,14 +1246,14 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const // "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which // has an associated, unique UUID, and only one of which can be selected at a time. -LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled, S32 column_width) +LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled) { if (getItemCount() < mMaxItemCount) { LLScrollListItem::Params item_p; item_p.enabled(enabled); item_p.value(id); - item_p.cells.add().value(item_text).width(column_width).type("text"); + item_p.cells.add().value(item_text).type("text"); return addRow( item_p, pos ); } diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 461df6760f..8d200fb73f 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -222,7 +222,7 @@ public: // DEPRECATED: Use LLSD versions of setCommentText() and getSelectedValue(). // "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which // has an associated, unique UUID, and only one of which can be selected at a time. - LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE, S32 column_width = 0); + LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); LLUUID getStringUUIDSelectedItem() const; LLScrollListItem* getFirstSelected() const; diff --git a/indra/llui/llscrolllistitem.h b/indra/llui/llscrolllistitem.h index 8d87137c3a..4237d5b304 100644 --- a/indra/llui/llscrolllistitem.h +++ b/indra/llui/llscrolllistitem.h @@ -64,9 +64,9 @@ public: Optional userdata; Optional value; - Deprecated name; // use for localization tools - Deprecated type; - Deprecated length; + Ignored name; // use for localization tools + Ignored type; + Ignored length; Multiple cells; diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index 3171f96fcf..9522d32a8b 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -36,7 +36,7 @@ #include "llsearcheditor.h" -static LLDefaultWidgetRegistry::Register r2("search_editor"); +//static LLDefaultWidgetRegistry::Register r2("search_editor"); LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) : LLUICtrl(p) diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h index aae538a221..dca906decc 100644 --- a/indra/llui/lltextbox.h +++ b/indra/llui/lltextbox.h @@ -60,7 +60,7 @@ public: Optional font_shadow; - Deprecated drop_shadow_visible, + Ignored drop_shadow_visible, type, length; diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index efedb30f47..f64353555e 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -82,7 +82,7 @@ public: Optional border; - Deprecated type, + Ignored type, length, is_unicode; diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 3c9759695d..1d3e5d7a15 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -58,6 +58,10 @@ #include "llmenugl.h" #include "llwindow.h" +// for registration +#include "llsearcheditor.h" +#include "llflyoutbutton.h" + // for XUIParse #include "llquaternion.h" #include @@ -85,6 +89,10 @@ std::list gUntranslated; /*static*/ std::vector LLUI::sXUIPaths; +// register searcheditor here +static LLDefaultWidgetRegistry::Register register_search_editor("search_editor"); +static LLDefaultWidgetRegistry::Register register_flyout_button("flyout_button"); + // // Functions diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 35c0bb478e..dbd295d4e8 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -665,8 +665,8 @@ template LLRegisterWith LLDestroyClass::sReg // useful parameter blocks struct TimeIntervalParam : public LLInitParam::Choice { - Option seconds; - Option frames; + Alternative seconds; + Alternative frames; TimeIntervalParam() : seconds("seconds"), frames("frames") diff --git a/indra/llui/lluicolortable.h b/indra/llui/lluicolortable.h index 8900875813..dcbb1ee5cb 100644 --- a/indra/llui/lluicolortable.h +++ b/indra/llui/lluicolortable.h @@ -22,8 +22,8 @@ class LLUIColorTable : public LLSingleton public: struct ColorParams : LLInitParam::Choice { - Option value; - Option reference; + Alternative value; + Alternative reference; ColorParams(); }; diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 80ef7ebdf1..8aba122e39 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -111,6 +111,13 @@ void LLFocusableElement::setFocus(BOOL b) { } +//static +const LLUICtrl::Params& LLUICtrl::getDefaultParams() +{ + return LLUICtrlFactory::getDefaultParams(); +} + + LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel) : LLView(p), mTentative(FALSE), diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 71f0a47f45..686f1e966d 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -87,7 +87,7 @@ public: struct CallbackParam : public LLInitParam::Block { - Deprecated name; + Ignored name; Optional function_name; Optional parameter; @@ -116,8 +116,8 @@ public: struct EnableControls : public LLInitParam::Choice { - Option enabled; - Option disabled; + Alternative enabled; + Alternative disabled; EnableControls() : enabled("enabled_control"), @@ -126,8 +126,8 @@ public: }; struct ControlVisibility : public LLInitParam::Choice { - Option visible; - Option invisible; + Alternative visible; + Alternative invisible; ControlVisibility() : visible("make_visible_control"), @@ -160,7 +160,8 @@ public: void initFromParams(const Params& p); protected: friend class LLUICtrlFactory; - LLUICtrl(const Params& p = LLUICtrl::Params(), + static const Params& getDefaultParams(); + LLUICtrl(const Params& p = getDefaultParams(), const LLViewModelPtr& viewmodel=LLViewModelPtr(new LLViewModel)); void initCommitCallback(const CommitCallbackParam& cb, commit_signal_t& sig); diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 4045022c8e..b9c61b1fed 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -154,9 +154,15 @@ struct LLCompareTypeID class LLWidgetTemplateRegistry : public LLRegistrySingleton -{ +{}; -}; +// function used to create new default widgets via LLView::getChild +typedef LLView* (*dummy_widget_creator_func_t)(const std::string&); + +// used to register factory functions for default widget instances +class LLDummyWidgetRegistry +: public LLRegistrySingleton +{}; extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP; extern LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION; @@ -295,10 +301,16 @@ fail: return widget; } + template + static T* getDefaultWidget(const std::string& name) + { + dummy_widget_creator_func_t* dummy_func = LLDummyWidgetRegistry::instance().getValue(&typeid(T)); + return dynamic_cast((*dummy_func)(name)); + } + template - static T* createDummyWidget(const std::string& name) + static LLView* createDefaultWidget(const std::string& name) { - //#pragma message("Generating LLUICtrlFactory::createDummyWidget") typename T::Params params; params.name(name); @@ -389,8 +401,10 @@ template LLWidgetRegistry::Register::Register(const char* tag, LLWidgetCreatorFunc func) : LLWidgetRegistry::StaticRegistrar(tag, func.empty() ? (LLWidgetCreatorFunc)&LLUICtrlFactory::defaultBuilder : func) { - //FIXME: inventory_panel will register itself with LLPanel::Params but it does have its own params...:( + // associate parameter block type with template .xml file LLWidgetTemplateRegistry::instance().defaultRegistrar().add(&typeid(PARAM_BLOCK), tag); + // associate widget type with factory function + LLDummyWidgetRegistry::instance().defaultRegistrar().add(&typeid(T), &LLUICtrlFactory::createDefaultWidget); } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 2e2ef4d79f..d225ad2767 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -124,7 +124,7 @@ LLView::LLView(const LLView::Params& p) mDefaultTabGroup(p.default_tab_group), mLastTabGroup(0), mToolTipMsg((LLStringExplicit)p.tool_tip()), - mDummyWidgets(NULL) + mDefaultWidgets(NULL) { // create rect first, as this will supply initial follows flags setShape(p.rect); @@ -157,12 +157,12 @@ LLView::~LLView() mParentView->removeChild(this); } - if (mDummyWidgets) + if (mDefaultWidgets) { - std::for_each(mDummyWidgets->begin(), mDummyWidgets->end(), + std::for_each(mDefaultWidgets->begin(), mDefaultWidgets->end(), DeletePairedPointer()); - delete mDummyWidgets; - mDummyWidgets = NULL; + delete mDefaultWidgets; + mDefaultWidgets = NULL; } } @@ -1710,10 +1710,10 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse, BOOL create_ if (create_if_missing) { - LLView* view = getDummyWidget(name); + LLView* view = getDefaultWidget(name); if (!view) { - view = LLUICtrlFactory::createDummyWidget(name); + view = LLUICtrlFactory::createDefaultWidget(name); } return view; } @@ -2750,11 +2750,11 @@ LLView::tree_iterator_t LLView::endTree() // only create maps on demand, as they incur heap allocation/deallocation cost // when a view is constructed/deconstructed -LLView::dummy_widget_map_t& LLView::getDummyWidgetMap() const +LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const { - if (!mDummyWidgets) + if (!mDefaultWidgets) { - mDummyWidgets = new dummy_widget_map_t(); + mDefaultWidgets = new default_widget_map_t(); } - return *mDummyWidgets; + return *mDefaultWidgets; } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 458d02d001..422f62f602 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -143,8 +143,8 @@ class LLView : public LLMouseHandler, public LLMortician public: struct Follows : public LLInitParam::Choice { - Option string; - Option flags; + Alternative string; + Alternative flags; Follows() : string(""), @@ -190,7 +190,7 @@ public: // these are nested attributes for LLLayoutPanel //FIXME: get parent context involved in parsing traversal - Deprecated user_resize, + Ignored user_resize, auto_resize, needs_translate; @@ -486,10 +486,10 @@ public: virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; - template T* getDummyWidget(const std::string& name) const + template T* getDefaultWidget(const std::string& name) const { - dummy_widget_map_t::const_iterator found_it = getDummyWidgetMap().find(name); - if (found_it == getDummyWidgetMap().end()) + default_widget_map_t::const_iterator found_it = getDefaultWidgetMap().find(name); + if (found_it == getDefaultWidgetMap().end()) { return NULL; } @@ -592,11 +592,11 @@ private: static LLWindow* sWindow; // All root views must know about their window. - typedef std::map dummy_widget_map_t; + typedef std::map default_widget_map_t; // allocate this map no demand, as it is rarely needed - mutable dummy_widget_map_t* mDummyWidgets; + mutable default_widget_map_t* mDefaultWidgets; - dummy_widget_map_t& getDummyWidgetMap() const; + default_widget_map_t& getDefaultWidgetMap() const; public: static BOOL sDebugRects; // Draw debug rects behind everything. @@ -640,10 +640,10 @@ template T* LLView::getChild(const std::string& name, BOOL recurse, BO } if (create_if_missing) { - result = getDummyWidget(name); + result = getDefaultWidget(name); if (!result) { - result = LLUICtrlFactory::createDummyWidget(name); + result = LLUICtrlFactory::getDefaultWidget(name); if (result) { @@ -655,7 +655,7 @@ template T* LLView::getChild(const std::string& name, BOOL recurse, BO return NULL; } - getDummyWidgetMap()[name] = result; + getDefaultWidgetMap()[name] = result; } } } diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 2271c02cd0..9d0cdacb1d 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -1176,7 +1176,7 @@ template<> LLVector3 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) { if (type == TYPE_VEC3) - return sd; + return (LLVector3)sd; else { CONTROL_ERRS << "Invalid LLVector3 value" << llendl; @@ -1188,7 +1188,7 @@ template<> LLVector3d convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) { if (type == TYPE_VEC3D) - return sd; + return (LLVector3d)sd; else { CONTROL_ERRS << "Invalid LLVector3d value" << llendl; @@ -1200,7 +1200,7 @@ template<> LLRect convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) { if (type == TYPE_RECT) - return sd; + return LLRect(sd); else { CONTROL_ERRS << "Invalid rect value" << llendl; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0cbacd5b2e..f96c8fdca0 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -278,7 +278,6 @@ set(viewer_SOURCE_FILES llpaneldirland.cpp llpaneldirpeople.cpp llpaneldirplaces.cpp - llpaneldisplay.cpp llpanelevent.cpp llpanelface.cpp llpanelgroup.cpp @@ -694,7 +693,6 @@ set(viewer_HEADER_FILES llpaneldirland.h llpaneldirpeople.h llpaneldirplaces.h - llpaneldisplay.h llpanelevent.h llpanelface.h llpanelgroup.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ce66bb6180..d0d6a118b3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1715,7 +1715,7 @@ void LLAppViewer::loadColorSettings() if(control->isType(TYPE_COL4)) { LLUIColorTable::ColorParams color; - color.value = control->getValue(); + color.value = (LLColor4)control->getValue(); LLUIColorTable::ColorEntryParams color_entry; color_entry.name = name; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 7719af2bd7..0e5b943dd3 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -367,7 +367,7 @@ BOOL LLFavoritesBarCtrl::postBuild() LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile("menu_favorites.xml", gMenuHolder); if (!menu) { - menu = LLUICtrlFactory::createDummyWidget("inventory_menu"); + menu = LLUICtrlFactory::getDefaultWidget("inventory_menu"); } menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor")); mInventoryItemsPopupMenuHandle = menu->getHandle(); diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index e1974bba84..8ad5a19d02 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -75,7 +75,9 @@ LLFloaterAuction::LLFloaterAuction(const LLSD& key) : LLFloater(), mParcelID(-1) { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml"); +// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml"); + mCommitCallbackRegistrar.add("ClickSnapshot", boost::bind(&LLFloaterAuction::onClickSnapshot, this)); + mCommitCallbackRegistrar.add("ClickOK", boost::bind(&LLFloaterAuction::onClickOK, this)); } // Destroys the object @@ -85,11 +87,6 @@ LLFloaterAuction::~LLFloaterAuction() BOOL LLFloaterAuction::postBuild() { - childSetValue("fence_check", LLSD( gSavedSettings.getBOOL("AuctionShowFence") ) ); - getChild("fence_check")->setCommitCallback(boost::bind(LLSavedSettingsGlue::setBOOL, _1, "AuctionShowFence")); - - childSetAction("snapshot_btn", onClickSnapshot, this); - childSetAction("ok_btn", onClickOK, this); return TRUE; } diff --git a/indra/newview/llfloaterauction.h b/indra/newview/llfloaterauction.h index d71fd3c653..b018316c64 100644 --- a/indra/newview/llfloaterauction.h +++ b/indra/newview/llfloaterauction.h @@ -55,9 +55,9 @@ public: /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void draw(); -private: LLFloaterAuction(const LLSD& key); ~LLFloaterAuction(); +private: void initialize(); static void onClickSnapshot(void* data); diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp index 2507a72caa..9dbd1db38e 100644 --- a/indra/newview/llfloaterbuildoptions.cpp +++ b/indra/newview/llfloaterbuildoptions.cpp @@ -46,7 +46,7 @@ LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key) : LLFloater() { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_build_options.xml"); + //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_build_options.xml"); } LLFloaterBuildOptions::~LLFloaterBuildOptions() diff --git a/indra/newview/llfloaterbuildoptions.h b/indra/newview/llfloaterbuildoptions.h index da72520486..61db303ba2 100644 --- a/indra/newview/llfloaterbuildoptions.h +++ b/indra/newview/llfloaterbuildoptions.h @@ -45,7 +45,7 @@ class LLFloaterBuildOptions : public LLFloater, public LLFloaterSingleton { friend class LLUISingleton >; -protected: +public: LLFloaterBuildOptions(const LLSD& key); ~LLFloaterBuildOptions(); }; diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 5cf4d90ece..e4e1c7efa2 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -50,7 +50,7 @@ LLFloaterBump::LLFloaterBump(const LLSD& key) : LLFloater() { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_bumps.xml"); + //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_bumps.xml"); } diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h index f55a9e6bc5..b56817436c 100644 --- a/indra/newview/llfloaterbump.h +++ b/indra/newview/llfloaterbump.h @@ -44,13 +44,12 @@ class LLFloaterBump { friend class LLUISingleton >; protected: - LLFloaterBump(const LLSD& key); - virtual ~LLFloaterBump(); - void add(LLScrollListCtrl* list, LLMeanCollisionData *mcd); public: /*virtual*/ void onOpen(const LLSD& key); + LLFloaterBump(const LLSD& key); + virtual ~LLFloaterBump(); }; #endif diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 6ca8944a19..e79142513b 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -47,20 +47,24 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f; // // Member functions // - - LLFloaterCamera::LLFloaterCamera(const LLSD& val) : LLFloater() { - setIsChrome(TRUE); - // For now, only used for size and tooltip strings const BOOL DONT_OPEN = FALSE; LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", DONT_OPEN); - +} + +// virtual +BOOL LLFloaterCamera::postBuild() +{ + setIsChrome(TRUE); + mRotate = getChild("cam_rotate_stick"); mZoom = getChild("zoom"); mTrack = getChild("cam_track_stick"); + + return TRUE; } // virtual @@ -79,3 +83,4 @@ void LLFloaterCamera::onClose(bool app_quitting) gSavedSettings.setBOOL("ShowCameraControls", FALSE); } } + diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index 871e5c8ed1..f954e329eb 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -51,7 +51,7 @@ private: /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); - + /*virtual*/ BOOL postBuild(); public: LLJoystickCameraRotate* mRotate; LLJoystickCameraZoom* mZoom; diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp index a97b270c44..82deaef4a9 100644 --- a/indra/newview/llfloaterlagmeter.cpp +++ b/indra/newview/llfloaterlagmeter.cpp @@ -53,21 +53,22 @@ const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga"; LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key) : LLFloater() { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml"); +// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml"); + mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this)); +} +BOOL LLFloaterLagMeter::postBuild() +{ // Don't let this window take keyboard focus -- it's confusing to // lose arrow-key driving when testing lag. setIsChrome(TRUE); - + // were we shrunk last time? if (gSavedSettings.getBOOL("LagMeterShrunk")) { - onClickShrink(this); + onClickShrink(); } -} - -BOOL LLFloaterLagMeter::postBuild() -{ + mClientButton = getChild("client_lagmeter"); mClientText = getChild("client_text"); mClientCause = getChild("client_lag_cause"); @@ -102,7 +103,7 @@ BOOL LLFloaterLagMeter::postBuild() config_string = getString("server_single_process_max_time_ms", mStringArgs); mServerSingleProcessMaxTime = (float)atof( config_string.c_str() ); - mShrunk = false; +// mShrunk = false; config_string = getString("max_width_px", mStringArgs); mMaxWidth = atoi( config_string.c_str() ); config_string = getString("min_width_px", mStringArgs); @@ -120,18 +121,18 @@ BOOL LLFloaterLagMeter::postBuild() mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps"); mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps"); - childSetAction("minimize", onClickShrink, this); +// childSetAction("minimize", onClickShrink, this); return TRUE; } LLFloaterLagMeter::~LLFloaterLagMeter() { // save shrunk status for next time - gSavedSettings.setBOOL("LagMeterShrunk", mShrunk); +// gSavedSettings.setBOOL("LagMeterShrunk", mShrunk); // expand so we save the large window rectangle - if (mShrunk) + if (gSavedSettings.getBOOL("LagMeterShrunk")) { - onClickShrink(this); + onClickShrink(); } } @@ -311,58 +312,61 @@ void LLFloaterLagMeter::determineServer() } } -//static -void LLFloaterLagMeter::onClickShrink(void * data) + +void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk" { - LLFloaterLagMeter * self = (LLFloaterLagMeter*)data; +// LLFloaterLagMeter * self = (LLFloaterLagMeter*)data; + + LLButton * button = getChild("minimize"); + S32 delta_width = mMaxWidth -mMinWidth; + LLRect r = getRect(); + bool shrunk = gSavedSettings.getBOOL("LagMeterShrunk"); - LLButton * button = self->getChild("minimize"); - S32 delta_width = self->mMaxWidth - self->mMinWidth; - LLRect r = self->getRect(); - if(self->mShrunk) + if(shrunk) { - self->setTitle( self->getString("max_title_msg", self->mStringArgs) ); + setTitle(getString("max_title_msg", mStringArgs) ); // make left edge appear to expand r.translate(-delta_width, 0); - self->setRect(r); - self->reshape(self->mMaxWidth, self->getRect().getHeight()); + setRect(r); + reshape(mMaxWidth, getRect().getHeight()); - self->childSetText("client", self->getString("client_text_msg", self->mStringArgs) + ":"); - self->childSetText("network", self->getString("network_text_msg", self->mStringArgs) + ":"); - self->childSetText("server", self->getString("server_text_msg", self->mStringArgs) + ":"); + childSetText("client", getString("client_text_msg", mStringArgs) + ":"); + childSetText("network", getString("network_text_msg",mStringArgs) + ":"); + childSetText("server", getString("server_text_msg", mStringArgs) + ":"); // usually "<<" - button->setLabel( self->getString("smaller_label", self->mStringArgs) ); + button->setLabel( getString("smaller_label", mStringArgs) ); } else { - self->setTitle( self->getString("min_title_msg", self->mStringArgs) ); + setTitle( getString("min_title_msg", mStringArgs) ); // make left edge appear to collapse r.translate(delta_width, 0); - self->setRect(r); - self->reshape(self->mMinWidth, self->getRect().getHeight()); + setRect(r); + reshape(mMinWidth, getRect().getHeight()); - self->childSetText("client", self->getString("client_text_msg", self->mStringArgs) ); - self->childSetText("network", self->getString("network_text_msg", self->mStringArgs) ); - self->childSetText("server", self->getString("server_text_msg", self->mStringArgs) ); + childSetText("client", getString("client_text_msg", mStringArgs) ); + childSetText("network",getString("network_text_msg",mStringArgs) ); + childSetText("server", getString("server_text_msg", mStringArgs) ); // usually ">>" - button->setLabel( self->getString("bigger_label", self->mStringArgs) ); + button->setLabel( getString("bigger_label", mStringArgs) ); } // Don't put keyboard focus on the button button->setFocus(FALSE); - self->mClientText->setVisible(self->mShrunk); - self->mClientCause->setVisible(self->mShrunk); - self->childSetVisible("client_help", self->mShrunk); +// self->mClientText->setVisible(self->mShrunk); +// self->mClientCause->setVisible(self->mShrunk); +// self->childSetVisible("client_help", self->mShrunk); - self->mNetworkText->setVisible(self->mShrunk); - self->mNetworkCause->setVisible(self->mShrunk); - self->childSetVisible("network_help", self->mShrunk); +// self->mNetworkText->setVisible(self->mShrunk); +// self->mNetworkCause->setVisible(self->mShrunk); +// self->childSetVisible("network_help", self->mShrunk); - self->mServerText->setVisible(self->mShrunk); - self->mServerCause->setVisible(self->mShrunk); - self->childSetVisible("server_help", self->mShrunk); +// self->mServerText->setVisible(self->mShrunk); +// self->mServerCause->setVisible(self->mShrunk); +// self->childSetVisible("server_help", self->mShrunk); - self->mShrunk = !self->mShrunk; +// self->mShrunk = !self->mShrunk; + gSavedSettings.setBOOL("LagMeterShrunk", !gSavedSettings.getBOOL("LagMeterShrunk")); } diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h index e8af68ac7a..6d2086839e 100644 --- a/indra/newview/llfloaterlagmeter.h +++ b/indra/newview/llfloaterlagmeter.h @@ -42,17 +42,18 @@ class LLFloaterLagMeter : public LLFloater, public LLFloaterSingleton >; public: + LLFloaterLagMeter(const LLSD& key); + /*virtual*/ ~LLFloaterLagMeter(); + /*virtual*/ void draw(); /*virtual*/ BOOL postBuild(); private: - LLFloaterLagMeter(const LLSD& key); - /*virtual*/ ~LLFloaterLagMeter(); void determineClient(); void determineNetwork(); void determineServer(); - static void onClickShrink(void * data); + void onClickShrink(); bool mShrunk; S32 mMaxWidth, mMinWidth; diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 6f5bd5f27b..f3275913e4 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -44,11 +44,11 @@ #include "lluserauth.h" #include "llagent.h" -#include "llfloateravatarpicker.h" #include "llbutton.h" #include "llcheckboxctrl.h" -#include "llradiogroup.h" #include "llcombobox.h" +#include "llfloaterreg.h" +#include "llfloateravatarpicker.h" #include "llfloaterauction.h" #include "llfloatergroups.h" #include "llfloatergroupinfo.h" @@ -889,7 +889,8 @@ void LLPanelLandGeneral::onClickStartAuction(void* data) } else { - LLFloaterAuction::showInstance(); + //LLFloaterAuction::showInstance(); + LLFloaterReg::showInstance("auction"); } } } diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 11842b8b0e..3d5d2b733f 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -163,7 +163,9 @@ bool LLNotificationChannelPanel::update(const LLSD& payload, bool passed_filter) LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key) : LLFloater() { - LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml"); + mCommitCallbackRegistrar.add("ClickAdd", boost::bind(&LLFloaterNotificationConsole::onClickAdd, this)); + + //LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml"); } void LLFloaterNotificationConsole::onClose(bool app_quitting) @@ -187,7 +189,7 @@ BOOL LLFloaterNotificationConsole::postBuild() addChannel("Notifications"); addChannel("NotificationTips"); - getChild("add_notification")->setClickedCallback(onClickAdd, this); +// getChild("add_notification")->setClickedCallback(onClickAdd, this); LLComboBox* notifications = getChild("notification_types"); LLNotifications::TemplateNames names = LLNotifications::instance().getTemplateNames(); @@ -236,11 +238,9 @@ void LLFloaterNotificationConsole::updateResizeLimits() setResizeLimits(getMinWidth(), floater_header_size + HEADER_PADDING + ((NOTIFICATION_PANEL_HEADER_HEIGHT + 3) * stack.getNumPanels())); } -void LLFloaterNotificationConsole::onClickAdd(void* user_data) +void LLFloaterNotificationConsole::onClickAdd() { - LLFloaterNotificationConsole* floater = (LLFloaterNotificationConsole*)user_data; - - std::string message_name = floater->getChild("notification_types")->getValue().asString(); + std::string message_name = getChild("notification_types")->getValue().asString(); if (!message_name.empty()) { LLNotifications::instance().add(message_name, LLSD()); diff --git a/indra/newview/llfloaternotificationsconsole.h b/indra/newview/llfloaternotificationsconsole.h index 0372553182..b85437c3c5 100644 --- a/indra/newview/llfloaternotificationsconsole.h +++ b/indra/newview/llfloaternotificationsconsole.h @@ -55,7 +55,7 @@ public: void updateResizeLimits(); private: - static void onClickAdd(void* user_data); + void onClickAdd(); }; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index d0df2617b3..15d57ebbcc 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -57,18 +57,61 @@ #include "llfloatervoicedevicesettings.h" #include "llkeyboard.h" #include "llmodaldialog.h" -#include "llpaneldisplay.h" #include "llpanellogin.h" #include "llradiogroup.h" +#include "llsky.h" #include "llstylemap.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" #include "llsliderctrl.h" #include "lltabcontainer.h" +#include "lltrans.h" #include "lltexteditor.h" #include "llviewercontrol.h" #include "llviewercamera.h" #include "llviewerwindow.h" +#include "llviewermessage.h" +#include "llviewershadermgr.h" +#include "llvotree.h" +#include "llvosky.h" + +// linden library includes +#include "llerror.h" +#include "llfontgl.h" +#include "llrect.h" +#include "llstring.h" + +// project includes + +#include "llbutton.h" +#include "llflexibleobject.h" +#include "lllineeditor.h" +#include "llresmgr.h" +#include "llspinctrl.h" +#include "llstartup.h" +#include "lltextbox.h" + +#include "llui.h" + +#include "llviewerimage.h" +#include "llviewerimagelist.h" +#include "llviewerobjectlist.h" + +#include "llvoavatar.h" +#include "llvovolume.h" +#include "llwindow.h" +#include "llworld.h" +#include "pipeline.h" +#include "lluictrlfactory.h" +#include "llboost.h" + + +//RN temporary includes for resolution switching +#include "llglheaders.h" +const F32 MAX_USER_FAR_CLIP = 512.f; +const F32 MIN_USER_FAR_CLIP = 64.f; + +const S32 ASPECT_RATIO_STR_LEN = 100; class LLVoiceSetKeyDialog : public LLModalDialog { @@ -136,6 +179,9 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater); bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater); +bool extractWindowSizeFromString(const std::string& instr, U32 &width, U32 &height); +void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator); + LLMediaBase *get_web_media() { LLMediaBase *media_source; @@ -223,8 +269,41 @@ bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFl return false; } + +// Extract from strings of the form " x ", e.g. "640 x 480". +bool extractWindowSizeFromString(const std::string& instr, U32 &width, U32 &height) +{ + using namespace boost; + cmatch what; + const regex expression("([0-9]+) x ([0-9]+)"); + if (regex_match(instr.c_str(), what, expression)) + { + width = atoi(what[1].first); + height = atoi(what[2].first); + return true; + } + + width = height = 0; + return false; +} + +void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator) +{ + numerator = 0; + denominator = 0; + for (F32 test_denominator = 1.f; test_denominator < 30.f; test_denominator += 1.f) + { + if (fmodf((decimal_val * test_denominator) + 0.01f, 1.f) < 0.02f) + { + numerator = llround(decimal_val * test_denominator); + denominator = llround(test_denominator); + break; + } + } +} // static std::string LLFloaterPreference::sSkin = ""; +F32 LLFloaterPreference::sAspectRatio = 0.0; ////////////////////////////////////////////// // LLFloaterPreference @@ -235,9 +314,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) { //Build Floater is now Called from LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - mFactoryMap["display"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel); /// done fixing the callbacks - - mCommitCallbackRegistrar.add("Pref.Apply", boost::bind(&LLFloaterPreference::onBtnApply, this)); mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreference::onBtnCancel, this)); mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreference::onBtnOK, this)); @@ -261,9 +337,14 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.HardwareSettings", boost::bind(&LLFloaterPreference::onOpenHardwareSettings, this)); mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this)); mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this)); - gSavedSkinSettings.getControl("HTMLLinkColor")->getCommitSignal()->connect(boost::bind(&handleHTMLLinkColorChanged, _2)); - //gSavedSettings.getControl("UseExternalBrowser")->getCommitSignal()->connect(boost::bind(&LLPanelPreference::handleUseExternalBrowserChanged, this)); + mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this)); + mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2)); + mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this)); + mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this)); + mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2)); + gSavedSkinSettings.getControl("HTMLLinkColor")->getCommitSignal()->connect(boost::bind(&handleHTMLLinkColorChanged, _2)); + } BOOL LLFloaterPreference::postBuild() @@ -271,20 +352,27 @@ BOOL LLFloaterPreference::postBuild() LLTabContainer* tabcontainer = getChild("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); - - return TRUE; } LLFloaterPreference::~LLFloaterPreference() { + // clean up user data + LLComboBox* ctrl_aspect_ratio = getChild( "aspect_ratio"); + LLComboBox* ctrl_window_size = getChild("windowsize combo"); + for (S32 i = 0; i < ctrl_aspect_ratio->getItemCount(); i++) + { + ctrl_aspect_ratio->setCurrentByIndex(i); + } + for (S32 i = 0; i < ctrl_window_size->getItemCount(); i++) + { + ctrl_window_size->setCurrentByIndex(i); + } } void LLFloaterPreference::draw() { BOOL has_first_selected = (getChildRef("disabled_popups").getFirstSelected()!=NULL); gSavedSettings.setBOOL("FirstSelectedDisabledPopups", has_first_selected); - - LLFloater::draw(); } @@ -368,6 +456,14 @@ void LLFloaterPreference::apply() } } + applyResolution(); + + // Only set window size if we're not in fullscreen mode + if(gSavedSettings.getBOOL("NotFullScreen")) + { + applyWindowSize(); + } + } void LLFloaterPreference::cancel() @@ -396,7 +492,11 @@ void LLFloaterPreference::cancel() { voice_device_settings ->cancel(); } + LLFloaterReg::hideInstance("pref_voicedevicesettings"); + + gSavedSettings.setF32("FullScreenAspectRatio", sAspectRatio); + } void LLFloaterPreference::onOpen(const LLSD& key) @@ -517,32 +617,17 @@ void LLFloaterPreference::onChangeCustom() refreshEnabledGraphics(); } -////////////////////////////////////////////////////////////////////////// -// static Note:(angela) NOT touching LLPanelDisplay for this milestone (skinning-11) + void LLFloaterPreference::refreshEnabledGraphics() { LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); if(instance) { LLFloaterHardwareSettings::instance()->refreshEnabledState(); - - LLTabContainer* tabcontainer = instance->getChild("pref core"); - for (child_list_t::const_iterator iter = tabcontainer->getChildList()->begin(); - iter != tabcontainer->getChildList()->end(); ++iter) - { - LLView* view = *iter; - if(!view) - return; - if(view->getName()=="display") - { - LLPanelDisplay* display_panel = dynamic_cast(view); - if(!display_panel) - return; - display_panel->refreshEnabledState(); - } - } + instance->refreshEnabledState(); } } + void LLFloaterPreference::updateMeterText(LLUICtrl* ctrl) { // get our UI widgets @@ -693,6 +778,208 @@ void LLFloaterPreference::buildLists(void* data) } } +void LLFloaterPreference::refreshEnabledState() +{ + + // disable graphics settings and exit if it's not set to custom + if(!gSavedSettings.getBOOL("RenderCustomSettings")) + { + return; + } + + LLCheckBoxCtrl* ctrl_reflections = getChild("Reflections"); + LLRadioGroup* radio_reflection_detail = getChild("ReflectionDetailRadio"); + + // Reflections + BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable") + && gGLManager.mHasCubeMap + && LLCubeMap::sUseCubeMaps; + ctrl_reflections->setEnabled(reflections); + + // Bump & Shiny + bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump"); + getChild("BumpShiny")->setEnabled(bumpshiny ? TRUE : FALSE); + + for (S32 i = 0; i < radio_reflection_detail->getItemCount(); ++i) + { + radio_reflection_detail->setIndexEnabled(i, ctrl_reflections->get() && reflections); + } + + // Avatar Mode + // Enable Avatar Shaders + LLCheckBoxCtrl* ctrl_avatar_vp = getChild("AvatarVertexProgram"); + // Avatar Render Mode + LLCheckBoxCtrl* ctrl_avatar_cloth = getChild("AvatarCloth"); + + S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel; + ctrl_avatar_vp->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE); + + if (gSavedSettings.getBOOL("VertexShaderEnable") == FALSE || + gSavedSettings.getBOOL("RenderAvatarVP") == FALSE) + { + ctrl_avatar_cloth->setEnabled(false); + } + else + { + ctrl_avatar_cloth->setEnabled(true); + } + + // Vertex Shaders + // Global Shader Enable + LLCheckBoxCtrl* ctrl_shader_enable = getChild("BasicShaders"); + // radio set for terrain detail mode + LLRadioGroup* mRadioTerrainDetail = getChild("TerrainDetailRadio"); // can be linked with control var + + ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")); + + BOOL shaders = ctrl_shader_enable->get(); + if (shaders) + { + mRadioTerrainDetail->setValue(1); + mRadioTerrainDetail->setEnabled(FALSE); + } + else + { + mRadioTerrainDetail->setEnabled(TRUE); + } + + // WindLight + LLCheckBoxCtrl* ctrl_wind_light = getChild("WindLightUseAtmosShaders"); + + // *HACK just checks to see if we can use shaders... + // maybe some cards that use shaders, but don't support windlight + ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders); + // now turn off any features that are unavailable + disableUnavailableSettings(); +} + +void LLFloaterPreference::disableUnavailableSettings() +{ + LLCheckBoxCtrl* ctrl_reflections = getChild("Reflections"); + LLCheckBoxCtrl* ctrl_avatar_vp = getChild("AvatarVertexProgram"); + LLCheckBoxCtrl* ctrl_avatar_cloth = getChild("AvatarCloth"); + LLCheckBoxCtrl* ctrl_shader_enable = getChild("BasicShaders"); + LLCheckBoxCtrl* ctrl_wind_light = getChild("WindLightUseAtmosShaders"); + LLCheckBoxCtrl* ctrl_avatar_impostors = getChild("AvatarImpostors"); + + // if vertex shaders off, disable all shader related products + if(!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")) + { + ctrl_shader_enable->setEnabled(FALSE); + ctrl_shader_enable->setValue(FALSE); + + ctrl_wind_light->setEnabled(FALSE); + ctrl_wind_light->setValue(FALSE); + + ctrl_reflections->setEnabled(FALSE); + ctrl_reflections->setValue(FALSE); + + ctrl_avatar_vp->setEnabled(FALSE); + ctrl_avatar_vp->setValue(FALSE); + + ctrl_avatar_cloth->setEnabled(FALSE); + ctrl_avatar_cloth->setValue(FALSE); + } + + // disabled windlight + if(!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders")) + { + ctrl_wind_light->setEnabled(FALSE); + ctrl_wind_light->setValue(FALSE); + } + + // disabled reflections + if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderWaterReflections")) + { + ctrl_reflections->setEnabled(FALSE); + ctrl_reflections->setValue(FALSE); + } + + // disabled av + if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP")) + { + ctrl_avatar_vp->setEnabled(FALSE); + ctrl_avatar_vp->setValue(FALSE); + + ctrl_avatar_cloth->setEnabled(FALSE); + ctrl_avatar_cloth->setValue(FALSE); + } + // disabled cloth + if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth")) + { + ctrl_avatar_cloth->setEnabled(FALSE); + ctrl_avatar_cloth->setValue(FALSE); + } + // disabled impostors + if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors")) + { + ctrl_avatar_impostors->setEnabled(FALSE); + ctrl_avatar_impostors->setValue(FALSE); + } +} + +void LLFloaterPreference::onCommitAutoDetectAspect() +{ + BOOL auto_detect = getChild("aspect_auto_detect")->get(); + F32 ratio; + + if (auto_detect) + { + S32 numerator = 0; + S32 denominator = 0; + + // clear any aspect ratio override + gViewerWindow->mWindow->setNativeAspectRatio(0.f); + fractionFromDecimal(gViewerWindow->mWindow->getNativeAspectRatio(), numerator, denominator); + + std::string aspect; + if (numerator != 0) + { + aspect = llformat("%d:%d", numerator, denominator); + } + else + { + aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio()); + } + + getChild( "aspect_ratio")->setLabel(aspect); + + ratio = gViewerWindow->mWindow->getNativeAspectRatio(); + gSavedSettings.setF32("FullScreenAspectRatio", ratio); + } +} + +void LLFloaterPreference::refresh() +{ + LLPanel::refresh(); + + // sliders and their text boxes + // mPostProcess = gSavedSettings.getS32("RenderGlowResolutionPow"); + // slider text boxes + updateSliderText(getChild("ObjectMeshDetail"), getChild("ObjectMeshDetailText")); + updateSliderText(getChild("FlexibleMeshDetail"), getChild("FlexibleMeshDetailText")); + updateSliderText(getChild("TreeMeshDetail"), getChild("TreeMeshDetailText")); + updateSliderText(getChild("AvatarMeshDetail"), getChild("AvatarMeshDetailText")); + updateSliderText(getChild("TerrainMeshDetail"), getChild("TerrainMeshDetailText")); + updateSliderText(getChild("RenderPostProcess"), getChild("PostProcessText")); + updateSliderText(getChild("SkyMeshDetail"), getChild("SkyMeshDetailText")); + + refreshEnabledState(); +} + +void LLFloaterPreference::onCommitWindowedMode() +{ + refresh(); +} + +void LLFloaterPreference::onChangeQuality(const LLSD& data) +{ + U32 level = (U32)(data.asReal()); + LLFeatureManager::getInstance()->setGraphicsLevel(level, true); + refreshEnabledGraphics(); + refresh(); +} + // static // DEV-24146 - needs to be removed at a later date. jan-2009 void LLFloaterPreference::cleanupBadSetting() @@ -790,9 +1077,9 @@ void LLFloaterPreference::onCommitLogging() { enableHistory(); } + void LLFloaterPreference::enableHistory() { - if (childGetValue("log_instant_messages").asBoolean() || childGetValue("log_chat").asBoolean()) { childEnable("log_show_history"); @@ -850,6 +1137,158 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im } +void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name) +{ + if(name.asString() =="" || !hasChild("name")) + return; + + LLTextBox* text_box = getChild(name.asString()); + LLSliderCtrl* slider = dynamic_cast(ctrl); + updateSliderText(slider, text_box); +} + +void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box) +{ + if(text_box == NULL || ctrl== NULL) + return; + + // get range and points when text should change + F32 value = (F32)ctrl->getValue().asReal(); + F32 min = ctrl->getMinValue(); + F32 max = ctrl->getMaxValue(); + F32 range = max - min; + llassert(range > 0); + F32 midPoint = min + range / 3.0f; + F32 highPoint = min + (2.0f * range / 3.0f); + + // choose the right text + if(value < midPoint) + { + text_box->setText(LLTrans::getString("GraphicsQualityLow")); + } + else if (value < highPoint) + { + text_box->setText(LLTrans::getString("GraphicsQualityMid")); + } + else + { + text_box->setText(LLTrans::getString("GraphicsQualityHigh")); + } +} + +void LLFloaterPreference::onKeystrokeAspectRatio() +{ + getChild("aspect_auto_detect")->set(FALSE); +} + +void LLFloaterPreference::applyWindowSize() +{ + LLComboBox* ctrl_windowSize = getChild("windowsize combo"); + if (ctrl_windowSize->getVisible() && (ctrl_windowSize->getCurrentIndex() != -1)) + { + U32 width = 0; + U32 height = 0; + if (extractWindowSizeFromString(ctrl_windowSize->getValue().asString().c_str(), width,height)) + { + LLViewerWindow::movieSize(width, height); + } + } +} + +void LLFloaterPreference::applyResolution() +{ + LLComboBox* ctrl_aspect_ratio = getChild( "aspect_ratio"); + gGL.flush(); + char aspect_ratio_text[ASPECT_RATIO_STR_LEN]; /*Flawfinder: ignore*/ + if (ctrl_aspect_ratio->getCurrentIndex() == -1) + { + // *Can't pass const char* from c_str() into strtok + strncpy(aspect_ratio_text, ctrl_aspect_ratio->getSimple().c_str(), sizeof(aspect_ratio_text) -1); /*Flawfinder: ignore*/ + aspect_ratio_text[sizeof(aspect_ratio_text) -1] = '\0'; + char *element = strtok(aspect_ratio_text, ":/\\"); + if (!element) + { + sAspectRatio = 0.f; // will be clamped later + } + else + { + LLLocale locale(LLLocale::USER_LOCALE); + sAspectRatio = (F32)atof(element); + } + + // look for denominator + element = strtok(NULL, ":/\\"); + if (element) + { + LLLocale locale(LLLocale::USER_LOCALE); + + F32 denominator = (F32)atof(element); + if (denominator != 0.f) + { + sAspectRatio /= denominator; + } + } + } + else + { + sAspectRatio = (F32)ctrl_aspect_ratio->getValue().asReal(); + } + + // presumably, user entered a non-numeric value if aspect_ratio == 0.f + if (sAspectRatio != 0.f) + { + sAspectRatio = llclamp(sAspectRatio, 0.2f, 5.f); + gSavedSettings.setF32("FullScreenAspectRatio", sAspectRatio); + } + + // Screen resolution + S32 num_resolutions; + LLWindow::LLWindowResolution* supported_resolutions = + gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions); + U32 resIndex = getChild("fullscreen combo")->getCurrentIndex(); + gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth); + gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight); + + gViewerWindow->requestResolutionUpdate(!gSavedSettings.getBOOL("NotFullScreen")); + + send_agent_update(TRUE); + + // Update enable/disable + refresh(); +} + +void LLFloaterPreference::initWindowSizeControls(LLPanel* panelp) +{ + // Window size + // mWindowSizeLabel = getChild("WindowSizeLabel"); + LLComboBox* ctrl_window_size = panelp->getChild("windowsize combo"); + + // Look to see if current window size matches existing window sizes, if so then + // just set the selection value... + const U32 height = gViewerWindow->getWindowDisplayHeight(); + const U32 width = gViewerWindow->getWindowDisplayWidth(); + for (S32 i=0; i < ctrl_window_size->getItemCount(); i++) + { + U32 height_test = 0; + U32 width_test = 0; + ctrl_window_size->setCurrentByIndex(i); + if (extractWindowSizeFromString(ctrl_window_size->getValue().asString(), width_test, height_test)) + { + if ((height_test == height) && (width_test == width)) + { + return; + } + } + } + // ...otherwise, add a new entry with the current window height/width. + LLUIString resolution_label = panelp->getString("resolution_format"); + resolution_label.setArg("[RES_X]", llformat("%d", width)); + resolution_label.setArg("[RES_Y]", llformat("%d", height)); + ctrl_window_size->add(resolution_label, ADD_TOP); + ctrl_window_size->setCurrentByIndex(0); +} + + //---------------------------------------------------------------------------- static LLRegisterPanelClassWrapper t_places("panel_preference"); @@ -858,14 +1297,12 @@ LLPanelPreference::LLPanelPreference() { // mCommitCallbackRegistrar.add("setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2)); - } //virtual BOOL LLPanelPreference::postBuild() { if (hasChild("maturity_desired_combobox")) { - /////////////////////////// From LLPanelGeneral ////////////////////////// // if we have no agent, we can't let them choose anything // if we have an agent, then we only let them choose if they have a choice @@ -935,6 +1372,94 @@ BOOL LLPanelPreference::postBuild() childSetText("busy_response", getString("log_in_to_change")); } + + + if(hasChild("fullscreen combo")) + { + //============================================================================ + // Resolution + + S32 num_resolutions = 0; + LLWindow::LLWindowResolution* supported_resolutions = gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions); + + S32 fullscreen_mode = num_resolutions - 1; + + LLComboBox*ctrl_full_screen = getChild( "fullscreen combo"); + LLUIString resolution_label = getString("resolution_format"); + + for (S32 i = 0; i < num_resolutions; i++) + { + resolution_label.setArg("[RES_X]", llformat("%d", supported_resolutions[i].mWidth)); + resolution_label.setArg("[RES_Y]", llformat("%d", supported_resolutions[i].mHeight)); + ctrl_full_screen->add( resolution_label, ADD_BOTTOM ); + } + + { + BOOL targetFullscreen; + S32 targetWidth; + S32 targetHeight; + + gViewerWindow->getTargetWindow(targetFullscreen, targetWidth, targetHeight); + + if (targetFullscreen) + { + fullscreen_mode = 0; // default to 800x600 + for (S32 i = 0; i < num_resolutions; i++) + { + if (targetWidth == supported_resolutions[i].mWidth + && targetHeight == supported_resolutions[i].mHeight) + { + fullscreen_mode = i; + } + } + ctrl_full_screen->setCurrentByIndex(fullscreen_mode); + } + else + { + // set to windowed mode + //fullscreen_mode = mCtrlFullScreen->getItemCount() - 1; + ctrl_full_screen->setCurrentByIndex(0); + } + } + + LLFloaterPreference::initWindowSizeControls(this); + + if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio")) + { + LLFloaterPreference::sAspectRatio = gViewerWindow->getDisplayAspectRatio(); + } + else + { + LLFloaterPreference::sAspectRatio = gSavedSettings.getF32("FullScreenAspectRatio"); + } + + getChild("aspect_ratio")->setTextEntryCallback(boost::bind(&LLPanelPreference::setControlFalse, this, LLSD("FullScreenAutoDetectAspectRatio") )); + + + S32 numerator = 0; + S32 denominator = 0; + fractionFromDecimal(LLFloaterPreference::sAspectRatio, numerator, denominator); + + LLUIString aspect_ratio_text = getString("aspect_ratio_text"); + if (numerator != 0) + { + aspect_ratio_text.setArg("[NUM]", llformat("%d", numerator)); + aspect_ratio_text.setArg("[DEN]", llformat("%d", denominator)); + } + else + { + aspect_ratio_text = llformat("%.3f", LLFloaterPreference::sAspectRatio); + } + + LLComboBox* ctrl_aspect_ratio = getChild( "aspect_ratio"); + //mCtrlAspectRatio->setCommitCallback(onSelectAspectRatio, this); + // add default aspect ratios + ctrl_aspect_ratio->add(aspect_ratio_text, &LLFloaterPreference::sAspectRatio, ADD_TOP); + ctrl_aspect_ratio->setCurrentByIndex(0); + + refresh(); + } + apply(); return true; } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 000bff4dea..afff610c69 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -43,12 +43,22 @@ class LLPanelPreference; class LLPanelLCD; -class LLPanelDisplay; class LLPanelDebug; class LLMessageSystem; class LLScrollListCtrl; - +class LLSliderCtrl; class LLSD; +class LLTextBox; + +typedef enum + { + GS_LOW_GRAPHICS, + GS_MID_GRAPHICS, + GS_HIGH_GRAPHICS, + GS_ULTRA_GRAPHICS + + } EGraphicsSettings; + // Floater to control preferences (display, audio, bandwidth, general. class LLFloaterPreference : public LLFloater @@ -88,6 +98,8 @@ protected: void setHardwareDefaults(); // callback for when client turns on shaders void onVertexShaderEnable(); + + public: void onClickSetCache(); @@ -106,11 +118,29 @@ public: void enableHistory(); void onCommitLogging(); void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); + void refreshEnabledState(); + void disableUnavailableSettings(); + void onCommitWindowedMode(); + void refresh(); // Refresh enable/disable + // if the quality radio buttons are changed + void onChangeQuality(const LLSD& data); + + void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box); + void onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name); + void onKeystrokeAspectRatio(); +// void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator); +// bool extractWindowSizeFromString(const std::string& instr, U32 &width, U32 &height); + + void onCommitAutoDetectAspect(); + void applyResolution(); + void applyWindowSize(); + + static void initWindowSizeControls(LLPanel* panelp); static void buildLists(void* data); static void refreshSkin(void* data); static void cleanupBadSetting(); - + static F32 sAspectRatio; private: static std::string sSkin; bool mGotPersonalInfo; diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 8ddc929019..4b175cdc27 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -188,7 +188,7 @@ BOOL LLFloaterReporter::postBuild() LLLineEditor* le = getChild("abuser_name_edit"); le->setEnabled( FALSE ); - setPosBox(mPosition.getValue()); + setPosBox((LLVector3d)mPosition.getValue()); LLButton* pick_btn = getChild("pick_btn"); pick_btn->setImages(std::string("tool_face.tga"), std::string("tool_face_active.tga") ); diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 339b90a0f5..8b6102c67f 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -44,7 +44,11 @@ LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) : LLFloater(key) { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml"); + //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml"); + mCommitCallbackRegistrar.add("SettingSelect", boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this,_1)); + mCommitCallbackRegistrar.add("CommitSettings", boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); + mCommitCallbackRegistrar.add("ClickDefault", boost::bind(&LLFloaterSettingsDebug::onClickDefault, this)); + } LLFloaterSettingsDebug::~LLFloaterSettingsDebug() @@ -82,17 +86,7 @@ BOOL LLFloaterSettingsDebug::postBuild() } settings_combo->sortByName(); - settings_combo->setCommitCallback(onSettingSelect, this); settings_combo->updateSelection(); - - childSetCommitCallback("val_spinner_1", onCommitSettings, this); - childSetCommitCallback("val_spinner_2", onCommitSettings, this); - childSetCommitCallback("val_spinner_3", onCommitSettings, this); - childSetCommitCallback("val_spinner_4", onCommitSettings, this); - childSetCommitCallback("val_text", onCommitSettings, this); - childSetCommitCallback("boolean_combo", onCommitSettings, this); - childSetCommitCallback("color_swatch", onCommitSettings, this); - childSetAction("default_btn", onClickDefault, this); mComment = getChild("comment_text"); return TRUE; } @@ -107,21 +101,17 @@ void LLFloaterSettingsDebug::draw() } //static -void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data) +void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl) { - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; LLComboBox* combo_box = (LLComboBox*)ctrl; LLControlVariable* controlp = (LLControlVariable*)combo_box->getCurrentUserdata(); - floaterp->updateControl(controlp); + updateControl(controlp); } -//static -void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) +void LLFloaterSettingsDebug::onCommitSettings() { - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; - - LLComboBox* settings_combo = floaterp->getChild("settings_combo"); + LLComboBox* settings_combo = getChild("settings_combo"); LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); LLVector3 vector; @@ -135,46 +125,46 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) switch(controlp->type()) { case TYPE_U32: - controlp->set(floaterp->childGetValue("val_spinner_1")); + controlp->set(childGetValue("val_spinner_1")); break; case TYPE_S32: - controlp->set(floaterp->childGetValue("val_spinner_1")); + controlp->set(childGetValue("val_spinner_1")); break; case TYPE_F32: - controlp->set(LLSD(floaterp->childGetValue("val_spinner_1").asReal())); + controlp->set(LLSD(childGetValue("val_spinner_1").asReal())); break; case TYPE_BOOLEAN: - controlp->set(floaterp->childGetValue("boolean_combo")); + controlp->set(childGetValue("boolean_combo")); break; case TYPE_STRING: - controlp->set(LLSD(floaterp->childGetValue("val_text").asString())); + controlp->set(LLSD(childGetValue("val_text").asString())); break; case TYPE_VEC3: - vector.mV[VX] = (F32)floaterp->childGetValue("val_spinner_1").asReal(); - vector.mV[VY] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); - vector.mV[VZ] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); + vector.mV[VX] = (F32)childGetValue("val_spinner_1").asReal(); + vector.mV[VY] = (F32)childGetValue("val_spinner_2").asReal(); + vector.mV[VZ] = (F32)childGetValue("val_spinner_3").asReal(); controlp->set(vector.getValue()); break; case TYPE_VEC3D: - vectord.mdV[VX] = floaterp->childGetValue("val_spinner_1").asReal(); - vectord.mdV[VY] = floaterp->childGetValue("val_spinner_2").asReal(); - vectord.mdV[VZ] = floaterp->childGetValue("val_spinner_3").asReal(); + vectord.mdV[VX] = childGetValue("val_spinner_1").asReal(); + vectord.mdV[VY] = childGetValue("val_spinner_2").asReal(); + vectord.mdV[VZ] = childGetValue("val_spinner_3").asReal(); controlp->set(vectord.getValue()); break; case TYPE_RECT: - rect.mLeft = floaterp->childGetValue("val_spinner_1").asInteger(); - rect.mRight = floaterp->childGetValue("val_spinner_2").asInteger(); - rect.mBottom = floaterp->childGetValue("val_spinner_3").asInteger(); - rect.mTop = floaterp->childGetValue("val_spinner_4").asInteger(); + rect.mLeft = childGetValue("val_spinner_1").asInteger(); + rect.mRight = childGetValue("val_spinner_2").asInteger(); + rect.mBottom = childGetValue("val_spinner_3").asInteger(); + rect.mTop = childGetValue("val_spinner_4").asInteger(); controlp->set(rect.getValue()); break; case TYPE_COL4: - col3.setValue(floaterp->childGetValue("color_swatch")); - col4 = LLColor4(col3, (F32)floaterp->childGetValue("val_spinner_4").asReal()); + col3.setValue(childGetValue("val_color_swatch")); + col4 = LLColor4(col3, (F32)childGetValue("val_spinner_4").asReal()); controlp->set(col4.getValue()); break; case TYPE_COL3: - controlp->set(floaterp->childGetValue("color_swatch")); + controlp->set(childGetValue("val_color_swatch")); //col3.mV[VRED] = (F32)floaterp->childGetValue("val_spinner_1").asC(); //col3.mV[VGREEN] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); //col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); @@ -186,16 +176,15 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) } // static -void LLFloaterSettingsDebug::onClickDefault(void* user_data) +void LLFloaterSettingsDebug::onClickDefault() { - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; - LLComboBox* settings_combo = floaterp->getChild("settings_combo"); + LLComboBox* settings_combo = getChild("settings_combo"); LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); if (controlp) { controlp->resetToDefault(); - floaterp->updateControl(controlp); + updateControl(controlp); } } @@ -206,7 +195,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) LLSpinCtrl* spinner2 = getChild("val_spinner_2"); LLSpinCtrl* spinner3 = getChild("val_spinner_3"); LLSpinCtrl* spinner4 = getChild("val_spinner_4"); - LLColorSwatchCtrl* color_swatch = getChild("color_swatch"); + LLColorSwatchCtrl* color_swatch = getChild("val_color_swatch"); if (!spinner1 || !spinner2 || !spinner3 || !spinner4 || !color_swatch) { diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h index 0a98021c79..87833793af 100644 --- a/indra/newview/llfloatersettingsdebug.h +++ b/indra/newview/llfloatersettingsdebug.h @@ -52,9 +52,9 @@ public: void updateControl(LLControlVariable* control); - static void onSettingSelect(LLUICtrl* ctrl, void* user_data); - static void onCommitSettings(LLUICtrl* ctrl, void* user_data); - static void onClickDefault(void* user_data); + void onSettingSelect(LLUICtrl* ctrl); + void onCommitSettings(); + void onClickDefault(); protected: LLTextEditor* mComment; diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 62a8c0d27e..4bcf470317 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -45,6 +45,7 @@ #include "lldraghandle.h" #include "llfloaterbuildoptions.h" #include "llfloateropenobject.h" +#include "llfloaterreg.h" #include "llfocusmgr.h" #include "llmenugl.h" #include "llpanelcontents.h" @@ -952,7 +953,7 @@ void LLFloaterTools::setObjectType( LLPCode pcode ) void LLFloaterTools::onClickGridOptions(void* data) { //LLFloaterTools* floaterp = (LLFloaterTools*)data; - LLFloaterBuildOptions::showInstance(); + LLFloaterReg::showInstance("build_options"); // RN: this makes grid options dependent on build tools window //floaterp->addDependentFloater(LLFloaterBuildOptions::getInstance(), FALSE); } diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 5b17c98ef0..fd8c22b8e5 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -82,7 +82,7 @@ const S32 ICON_WIDTH = 16; const S32 TEXT_PAD = 1; const S32 ARROW_SIZE = 12; const S32 RENAME_WIDTH_PAD = 4; -const S32 RENAME_HEIGHT_PAD = 6; +const S32 RENAME_HEIGHT_PAD = 2; const S32 AUTO_OPEN_STACK_DEPTH = 16; const S32 MIN_ITEM_WIDTH_VISIBLE = ICON_WIDTH + ICON_PAD + ARROW_SIZE + TEXT_PAD + /*first few characters*/ 40; const S32 MINIMUM_RENAMER_WIDTH = 80; @@ -2560,7 +2560,7 @@ LLFolderView::LLFolderView(const Params& p) LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory.xml", gMenuHolder); if (!menu) { - menu = LLUICtrlFactory::createDummyWidget("inventory_menu"); + menu = LLUICtrlFactory::getDefaultWidget("inventory_menu"); } menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor")); mPopupMenuHandle = menu->getHandle(); @@ -2772,6 +2772,9 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen reshape( llmax(min_width, total_width), running_height ); } + // move item renamer text field to item's new position + updateRenamerPosition(); + mTargetHeight = (F32)target_height; return llround(mTargetHeight); } @@ -3620,23 +3623,8 @@ void LLFolderView::startRenamingSelectedItem( void ) { mRenameItem = item; - S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD - 1 + item->getIndentation(); - S32 y = llfloor(item->getRect().getHeight()-sFont->getLineHeight()-2); - item->localPointToScreen( x, y, &x, &y ); - screenPointToLocal( x, y, &x, &y ); - mRenamer->setOrigin( x, y ); - - S32 scroller_height = 0; - S32 scroller_width = gViewerWindow->getWindowWidth(); - BOOL dummy_bool; - if (mScrollContainer) - { - mScrollContainer->calcVisibleSize( &scroller_width, &scroller_height, &dummy_bool, &dummy_bool); - } + updateRenamerPosition(); - S32 width = llmax(llmin(item->getRect().getWidth() - x, scroller_width - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH); - S32 height = llfloor(sFont->getLineHeight() + RENAME_HEIGHT_PAD); - mRenamer->reshape( width, height, TRUE ); mRenamer->setText(item->getName()); mRenamer->selectAll(); @@ -4386,6 +4374,31 @@ void LLFolderView::dumpSelectionInformation() llinfos << "****************************************" << llendl; } +void LLFolderView::updateRenamerPosition() +{ + if(mRenameItem) + { + S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD - 1 + mRenameItem->getIndentation(); + S32 y = llfloor(mRenameItem->getRect().getHeight()-sFont->getLineHeight()-2); + mRenameItem->localPointToScreen( x, y, &x, &y ); + screenPointToLocal( x, y, &x, &y ); + mRenamer->setOrigin( x, y ); + + S32 scroller_height = 0; + S32 scroller_width = gViewerWindow->getWindowWidth(); + BOOL dummy_bool; + if (mScrollContainer) + { + mScrollContainer->calcVisibleSize( &scroller_width, &scroller_height, &dummy_bool, &dummy_bool); + } + + S32 width = llmax(llmin(mRenameItem->getRect().getWidth() - x, scroller_width - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH); + S32 height = llfloor(sFont->getLineHeight() + RENAME_HEIGHT_PAD); + mRenamer->reshape( width, height, TRUE ); + } +} + + ///---------------------------------------------------------------------------- /// Local function definitions ///---------------------------------------------------------------------------- diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 2393aa627c..848d289bb9 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -915,6 +915,9 @@ public: // DEBUG only void dumpSelectionInformation(); +private: + void updateRenamerPosition(); + protected: LLScrollContainer* mScrollContainer; // NULL if this is not a child of a scroll container. diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 4aaa7ca6cb..fac0de0f33 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -426,7 +426,9 @@ void LLLocationInputCtrl::rebuildLocationHistory(std::string filter) LLLocationHistory* lh = LLLocationHistory::getInstance(); if (filter.empty()) + { itemsp = &lh->getItems(); + } else { lh->getMatchingItems(filter, filtered_items); @@ -435,7 +437,9 @@ void LLLocationInputCtrl::rebuildLocationHistory(std::string filter) removeall(); for (LLLocationHistory::location_list_t::const_reverse_iterator it = itemsp->rbegin(); it != itemsp->rend(); it++) + { add(*it); + } } void LLLocationInputCtrl::focusTextEntry() diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 379cd48a6a..6f64aa68ad 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -68,8 +68,8 @@ public: struct NameColumn : public LLInitParam::Choice { - Option column_index; - Option column_name; + Alternative column_index; + Alternative column_name; NameColumn() : column_name("name_column"), column_index("name_column_index", 0) diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 457397a379..0d25272f88 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -45,8 +45,8 @@ static std::string PANEL_PROFILE = "panel_profile"; static std::string PANEL_PICKS = "panel_picks"; static std::string PANEL_NOTES = "panel_notes"; -LLPanelProfileView::LLPanelProfileView(const LLPanel::Params& p) -: LLPanel(p) +LLPanelProfileView::LLPanelProfileView() +: LLPanel() { } diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h index 4d81704522..2d89f15fe4 100644 --- a/indra/newview/llpanelprofileview.h +++ b/indra/newview/llpanelprofileview.h @@ -44,7 +44,7 @@ class LLPanelProfileView : public LLPanel friend class LLUICtrlFactory; public: - LLPanelProfileView(const LLPanel::Params& p = defaultParams()); + LLPanelProfileView(); ~LLPanelProfileView(void); diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 22e8ada2ea..eb35834dc0 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -92,15 +92,8 @@ void LLTeleportHistoryPanel::onShowOnMap() S32 index = itemp->getColumn(LIST_INDEX)->getValue().asInteger(); - const LLTeleportHistory::slurl_list_t& hist_items = mTeleportHistory->getItems(); - - LLVector3d global_pos = hist_items[index].mGlobalPos; - - if (!global_pos.isExactlyZero()) - { - LLFloaterWorldMap::getInstance()->trackLocation(global_pos); - LLFloaterReg::showInstance("world_map", "center"); - } + // teleport to existing item in history, so we don't add it again + mTeleportHistory->goToItem(index); } // virtual diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 981a843d94..8c2372ee74 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -732,7 +732,7 @@ void LLStatusBar::onClickSearch(void* data) // static void LLStatusBar::onClickStatGraph(void* data) { - LLFloaterLagMeter::showInstance(); + LLFloaterReg::showInstance("lagmeter"); } BOOL can_afford_transaction(S32 cost) diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 950d5ba20c..03c4915e66 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -39,20 +39,26 @@ #include "llcompilequeue.h" #include "llfloaterabout.h" +#include "llfloaterauction.h" #include "llfloateraddlandmark.h" #include "llfloateravatarinfo.h" +#include "llfloaterbuildoptions.h" +#include "llfloaterbump.h" #include "llfloaterchat.h" #include "llfloaterchatterbox.h" #include "llfloaterdirectory.h" #include "llfloaterjoystick.h" -#include "llfloatervoicedevicesettings.h" +#include "llfloaternotificationsconsole.h" +#include "llfloaterlagmeter.h" #include "llfloatermap.h" #include "llfloatermemleak.h" #include "llfloatermute.h" #include "llfloaterpreference.h" #include "llfloatersnapshot.h" +#include "llfloatersettingsdebug.h" #include "llfloatertools.h" #include "llfloateruipreview.h" +#include "llfloatervoicedevicesettings.h" #include "llfloaterworldmap.h" #include "llinventoryview.h" #include "llnearbychathistory.h" @@ -80,6 +86,13 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("add_landmark", "floater_add_landmark.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mute", "floater_mute.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("build_options", "floater_build_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("ui_preview", "floater_ui_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("test_widgets", "floater_test_widgets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index bdc86a3a69..826aca5e64 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -121,6 +121,7 @@ #include "llfloaterperms.h" #include "llfloaterpostprocess.h" #include "llfloaterpreference.h" +#include "llfloaterreg.h" #include "llfloaterregioninfo.h" #include "llfloaterreporter.h" #include "llfloaterscriptdebug.h" @@ -613,7 +614,8 @@ class LLAdvancedToggleConsole : public view_listener_t #endif else if ("notifications" == console_type) { - LLFloaterNotificationConsole::showInstance(); + //LLFloaterNotificationConsole::showInstance(); + LLFloaterReg::showInstance("notifications_console"); } return true; } @@ -2145,7 +2147,8 @@ class LLAdvancedShowDebugSettings : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLFloaterSettingsDebug::showInstance(userdata); + // LLFloaterSettingsDebug::showInstance(userdata); + LLFloaterReg::showInstance("settings_debug",userdata); return true; } }; @@ -5649,7 +5652,7 @@ class LLShowFloater : public view_listener_t } else if (floater_name == "grid options") { - LLFloaterBuildOptions::showInstance(); + LLFloaterReg::showInstance("build_options"); } else if (floater_name == "script errors") { @@ -5673,12 +5676,13 @@ class LLShowFloater : public view_listener_t { if (!gNoRender) { - LLFloaterBump::showInstance(); + //LLFloaterBump::showInstance(); + LLFloaterReg::showInstance("bumps"); } } else if (floater_name == "lag meter") { - LLFloaterLagMeter::showInstance(); + LLFloaterReg::showInstance("lagmeter"); } else if (floater_name == "buy currency") { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a62e59bc10..a05bd30600 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4395,8 +4395,8 @@ void handle_show_mean_events(void *) { return; } - - LLFloaterBump::showInstance(); + LLFloaterReg::showInstance("bumps"); + //LLFloaterBump::showInstance(); } void mean_name_callback(const LLUUID &id, const std::string& first, const std::string& last, BOOL always_false) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index cb2a8771fa..46aa284258 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2131,7 +2131,8 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) && (MASK_CONTROL & mask) && ('5' == key)) { - LLFloaterNotificationConsole::showInstance(); + //LLFloaterNotificationConsole::showInstance(); + LLFloaterReg::showInstance("notifications_console"); return TRUE; } @@ -2428,51 +2429,59 @@ void LLViewerWindow::updateUI() root_view = mRootView; } - // walk UI tree in depth-first order - LLView::tree_iterator_t end_it; - for (LLView::tree_iterator_t it = root_view->beginTree(); - it != end_it; - ++it) - { - LLView* viewp = *it; - // calculating the screen rect involves traversing the parent, so this is less than optimal - if (!viewp->getVisible() - || !viewp->calcScreenBoundingRect().pointInRect(x, y)) - { - // skip this view and all of its children - it.skipDescendants(); - continue; - } + // aggregate visible views that contain mouse cursor in display order - // if this view is mouse opaque, nothing behind it should be in mouse_hover_set - if (viewp->getMouseOpaque()) + // while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events + if (top_ctrl && top_ctrl->calcScreenBoundingRect().pointInRect(x, y)) + { + // iterator over contents of top_ctrl, and throw into mouse_hover_set + for (LLView::tree_iterator_t it = top_ctrl->beginTree(); + it != top_ctrl->endTree(); + ++it) { - // constrain further iteration to children of this widget - it = viewp->beginTree(); + LLView* viewp = *it; + if (viewp->getVisible() + && viewp->calcScreenBoundingRect().pointInRect(x, y)) + { + // we have a view that contains the mouse, add it to the set + mouse_hover_set.insert(viewp->getHandle()); + } + else + { + // skip this view and all of its children + it.skipDescendants(); + } } - - // we have a view that contains the mouse, add it to the set - mouse_hover_set.insert(viewp->getHandle()); } - - // now do the same aggregation for the "top" ctrl, whose parent does not necessarily contain the mouse - if (top_ctrl) + else { - for (LLView::tree_iterator_t it = top_ctrl->beginTree(); - it != root_view->endTree(); + // walk UI tree in depth-first order + LLView::tree_iterator_t end_it; + for (LLView::tree_iterator_t it = root_view->beginTree(); + it != end_it; ++it) { LLView* viewp = *it; - if (!viewp->getVisible() - || !viewp->calcScreenBoundingRect().pointInRect(x, y)) + // calculating the screen rect involves traversing the parent, so this is less than optimal + if (viewp->getVisible() + && viewp->calcScreenBoundingRect().pointInRect(x, y)) + { + + // if this view is mouse opaque, nothing behind it should be in mouse_hover_set + if (viewp->getMouseOpaque()) + { + // constrain further iteration to children of this widget + it = viewp->beginTree(); + } + + // we have a view that contains the mouse, add it to the set + mouse_hover_set.insert(viewp->getHandle()); + } + else { // skip this view and all of its children it.skipDescendants(); - continue; } - - // we have a view that contains the mouse, add it to the set - mouse_hover_set.insert(viewp->getHandle()); } } @@ -2898,11 +2907,25 @@ void LLViewerWindow::updateWorldViewRect() if (!LLSideTray::instanceCreated()) return; LLRect new_world_rect = mWindowRect; + + // pull in right side of world view based on sidetray LLSideTray* sidetray = LLSideTray::getInstance(); if (sidetray->getVisible()) { new_world_rect.mRight -= llround((F32)sidetray->getTrayWidth() * mDisplayScale.mV[VX]); } + + // push top of world view below nav bar + if (LLNavigationBar::getInstance()->getVisible()) + { + LLNavigationBar* barp = LLNavigationBar::getInstance(); + LLRect nav_bar_rect; + if(barp->localRectToOtherView(barp->getLocalRect(), &nav_bar_rect, mRootView)) + { + new_world_rect.mTop = llround((F32)LLNavigationBar::getInstance()->getRect().mBottom * mDisplayScale.mV[VY]); + } + } + if (mWorldViewRect != new_world_rect) { mWorldViewRect = new_world_rect; diff --git a/indra/newview/skins/default/xui/en/floater_auction.xml b/indra/newview/skins/default/xui/en/floater_auction.xml index 21d060fdda..076332e062 100644 --- a/indra/newview/skins/default/xui/en/floater_auction.xml +++ b/indra/newview/skins/default/xui/en/floater_auction.xml @@ -29,6 +29,7 @@ top_pad="12" width="400" /> + width="96" > + + diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml index 0e29046500..0012294160 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml @@ -64,17 +64,17 @@ left_delta="0" name="Edit" top_pad="4" - width="132" /> + width="50" /> diff --git a/indra/newview/skins/default/xui/en/floater_notifications_console.xml b/indra/newview/skins/default/xui/en/floater_notifications_console.xml index 92ecb5908e..14aa12aed7 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_console.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_console.xml @@ -24,7 +24,10 @@ left_pad="3" name="add_notification" top_delta="0" - width="50" /> + width="50" > + + + width="200"> + + + + width="300" > + + + width="37" > + + + width="120" > + + + width="120"> + + + width="120"> + + + width="120" > + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 929f857e90..8db8c8f31d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -165,6 +165,9 @@ enabled="true" label="16:9 (Widescreen)" value="1.7777777" /> + + width="150"> + + Date: Mon, 6 Jul 2009 21:58:04 +0000 Subject: Merge xui-army-5 to viewer-2, includes layout, art, and color changes, also UI color refactoring and new FreeType font library on Linux. svn merge -r126038:126164 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/xui-army-5 --- indra/cmake/00-Common.cmake | 1 - indra/llui/CMakeLists.txt | 2 + indra/llui/llcombobox.cpp | 22 +- indra/llui/llcombobox.h | 3 +- indra/llui/llconsole.cpp | 4 +- indra/llui/lldraghandle.h | 4 +- indra/llui/llfloater.cpp | 19 +- indra/llui/llflyoutbutton.cpp | 7 +- indra/llui/llflyoutbutton.h | 8 +- indra/llui/llfocusmgr.cpp | 2 +- indra/llui/lllineeditor.cpp | 11 +- indra/llui/llmenugl.cpp | 26 +- indra/llui/llmenugl.h | 2 +- indra/llui/llmodaldialog.cpp | 2 +- indra/llui/llpanel.cpp | 4 - indra/llui/llresizehandle.cpp | 2 +- indra/llui/llspinctrl.cpp | 8 +- indra/llui/llstatgraph.cpp | 4 +- indra/llui/llstyle.h | 2 +- indra/llui/lltextbox.cpp | 2 +- indra/llui/lltexteditor.cpp | 6 +- indra/llui/lltexteditor.h | 2 +- indra/llui/llui.cpp | 10 +- indra/llui/llui.h | 12 +- indra/llui/lluicolortable.cpp | 169 ++- indra/llui/lluicolortable.h | 33 +- indra/llui/lluictrl.cpp | 8 - indra/llui/lluictrlfactory.cpp | 8 +- indra/llui/lluictrlfactory.h | 2 +- indra/llui/lluiimage.cpp | 2 +- indra/llui/lluiimage.h | 4 +- indra/llui/llview.cpp | 16 +- indra/llvfs/lldir_mac.cpp | 21 +- indra/llwindow/CMakeLists.txt | 4 +- indra/newview/app_settings/settings.xml | 89 +- indra/newview/llagent.cpp | 4 +- indra/newview/llagent.h | 3 +- indra/newview/llappviewer.cpp | 57 +- indra/newview/llbottomtray.cpp | 6 +- indra/newview/llcallingcard.cpp | 2 +- indra/newview/llchiclet.cpp | 10 +- indra/newview/llfavoritesbar.cpp | 2 +- indra/newview/llfeaturemanager.cpp | 1 - indra/newview/llfloaterabout.cpp | 10 +- indra/newview/llfloaterchat.cpp | 18 +- indra/newview/llfloatercolorpicker.cpp | 4 +- indra/newview/llfloaterpreference.cpp | 116 +- indra/newview/llfloaterpreference.h | 3 + indra/newview/llfloatersettingsdebug.cpp | 4 - indra/newview/llfloatersnapshot.cpp | 2 +- indra/newview/llfloatervoicedevicesettings.cpp | 2 +- indra/newview/llfloaterworldmap.cpp | 4 +- indra/newview/llfolderview.cpp | 18 +- indra/newview/llhudmanager.cpp | 5 +- indra/newview/llhudtext.cpp | 2 +- indra/newview/llimpanel.cpp | 8 +- indra/newview/llimview.cpp | 10 +- indra/newview/lllocationinputctrl.cpp | 33 +- indra/newview/lllocationinputctrl.h | 8 +- indra/newview/llmanip.cpp | 6 +- indra/newview/llmaniprotate.cpp | 10 +- indra/newview/llmanipscale.cpp | 8 +- indra/newview/llmaniptranslate.cpp | 14 +- indra/newview/llmemoryview.cpp | 2 +- indra/newview/llnetmap.cpp | 12 +- indra/newview/lloutputmonitorctrl.cpp | 8 +- indra/newview/llselectmgr.cpp | 12 +- indra/newview/llsidetray.cpp | 4 +- indra/newview/llstartup.cpp | 25 +- indra/newview/llstatusbar.cpp | 2 +- indra/newview/llstylemap.cpp | 6 +- indra/newview/lltoolfocus.cpp | 6 +- indra/newview/lltoolgrab.cpp | 16 +- indra/newview/lltoolgun.cpp | 4 +- indra/newview/lltoolmgr.cpp | 2 + indra/newview/lltracker.cpp | 4 +- indra/newview/lluploaddialog.cpp | 2 +- indra/newview/llviewercontrol.cpp | 65 +- indra/newview/llviewercontrol.h | 5 +- indra/newview/llviewermenu.cpp | 9 +- indra/newview/llviewerobjectlist.cpp | 12 +- indra/newview/llviewerparceloverlay.cpp | 22 +- indra/newview/llviewerwindow.cpp | 41 +- indra/newview/llvoavatar.cpp | 4 +- indra/newview/llvosky.cpp | 2 +- indra/newview/llworldmapview.cpp | 6 +- indra/newview/pipeline.cpp | 4 +- indra/newview/skins/default/colors.xml | 207 ++- .../containers/Accordion_ArrowClosed_Off.png | Bin 0 -> 175 bytes .../containers/Accordion_ArrowClosed_Over.png | Bin 0 -> 170 bytes .../containers/Accordion_ArrowClosed_Press.png | Bin 0 -> 175 bytes .../containers/Accordion_ArrowOpened_Over.png | Bin 0 -> 162 bytes .../containers/Accordion_ArrowOpened_Press.png | Bin 0 -> 169 bytes .../default/textures/containers/Accordion_Off.png | Bin 0 -> 239 bytes .../default/textures/containers/Accordion_Over.png | Bin 0 -> 206 bytes .../textures/containers/Accordion_Press.png | Bin 0 -> 200 bytes .../default/textures/containers/Container.png | Bin 0 -> 673 bytes .../textures/containers/TabTop_Left_Off.png | Bin 0 -> 339 bytes .../textures/containers/TabTop_Left_Over.png | Bin 0 -> 337 bytes .../textures/containers/TabTop_Left_Selected.png | Bin 0 -> 458 bytes .../textures/containers/TabTop_Middle_Off.png | Bin 0 -> 258 bytes .../textures/containers/TabTop_Middle_Over.png | Bin 0 -> 285 bytes .../textures/containers/TabTop_Middle_Selected.png | Bin 0 -> 367 bytes .../textures/containers/TabTop_Right_Off.png | Bin 0 -> 357 bytes .../textures/containers/TabTop_Right_Over.png | Bin 0 -> 362 bytes .../textures/containers/TabTop_Right_Selected.png | Bin 0 -> 474 bytes .../textures/containers/Toolbar_Left_Off.png | Bin 0 -> 306 bytes .../textures/containers/Toolbar_Left_Over.png | Bin 0 -> 310 bytes .../textures/containers/Toolbar_Left_Selected.png | Bin 0 -> 380 bytes .../textures/containers/Toolbar_Middle_Off.png | Bin 0 -> 224 bytes .../textures/containers/Toolbar_Middle_Over.png | Bin 0 -> 228 bytes .../containers/Toolbar_Middle_Selected.png | Bin 0 -> 296 bytes .../textures/containers/Toolbar_Right_Off.png | Bin 0 -> 302 bytes .../textures/containers/Toolbar_Right_Over.png | Bin 0 -> 297 bytes .../textures/containers/Toolbar_Right_Selected.png | Bin 0 -> 377 bytes .../default/textures/navbar/Arrow_Left_Off.png | Bin 0 -> 382 bytes .../default/textures/navbar/Arrow_Left_Over.png | Bin 0 -> 381 bytes .../default/textures/navbar/Arrow_Right_Off.png | Bin 0 -> 380 bytes .../default/textures/navbar/Arrow_Right_Over.png | Bin 0 -> 379 bytes .../textures/navbar/Favorite_Star_Active.png | Bin 0 -> 641 bytes .../default/textures/navbar/Favorite_Star_Off.png | Bin 0 -> 573 bytes .../default/textures/navbar/Favorite_Star_Over.png | Bin 0 -> 579 bytes .../textures/navbar/Favorite_Star_Press.png | Bin 0 -> 551 bytes .../default/textures/navbar/FileMenu_Divider.png | Bin 0 -> 116 bytes .../skins/default/textures/navbar/Help_Over.png | Bin 0 -> 348 bytes .../skins/default/textures/navbar/Help_Press.png | Bin 0 -> 384 bytes .../skins/default/textures/navbar/Home_Off.png | Bin 0 -> 379 bytes .../skins/default/textures/navbar/Home_Over.png | Bin 0 -> 330 bytes .../skins/default/textures/navbar/Info_Off.png | Bin 0 -> 608 bytes .../skins/default/textures/navbar/Info_Over.png | Bin 0 -> 622 bytes .../skins/default/textures/navbar/Info_Press.png | Bin 0 -> 605 bytes .../skins/default/textures/navbar/NavBar_BG.png | Bin 0 -> 210 bytes .../default/textures/navbar/Row_Selection.png | Bin 0 -> 231 bytes .../skins/default/textures/navbar/Search.png | Bin 0 -> 467 bytes .../textures/taskpanel/TaskPanel_Tab_Off.png | Bin 0 -> 219 bytes .../textures/taskpanel/TaskPanel_Tab_Selected.png | Bin 0 -> 325 bytes indra/newview/skins/default/textures/textures.xml | 229 ++-- .../default/textures/widgets/Checkbox_Disabled.png | Bin 0 -> 306 bytes .../default/textures/widgets/Checkbox_Off.png | Bin 0 -> 322 bytes .../skins/default/textures/widgets/Checkbox_On.png | Bin 0 -> 577 bytes .../textures/widgets/Checkbox_On_Disabled.png | Bin 0 -> 558 bytes .../default/textures/widgets/Checkbox_On_Over.png | Bin 0 -> 547 bytes .../default/textures/widgets/Checkbox_On_Press.png | Bin 0 -> 612 bytes .../default/textures/widgets/Checkbox_Over.png | Bin 0 -> 318 bytes .../default/textures/widgets/Checkbox_Press.png | Bin 0 -> 373 bytes .../textures/widgets/ComboButton_Disabled.png | Bin 0 -> 450 bytes .../default/textures/widgets/ComboButton_Off.png | Bin 0 -> 470 bytes .../default/textures/widgets/ComboButton_On.png | Bin 0 -> 486 bytes .../textures/widgets/ComboButton_Selected.png | Bin 0 -> 539 bytes .../default/textures/widgets/DropDown_Disabled.png | Bin 0 -> 600 bytes .../default/textures/widgets/DropDown_Off.png | Bin 0 -> 603 bytes .../skins/default/textures/widgets/DropDown_On.png | Bin 0 -> 638 bytes .../default/textures/widgets/DropDown_Press.png | Bin 0 -> 679 bytes .../skins/default/textures/widgets/ProgressBar.png | Bin 0 -> 220 bytes .../default/textures/widgets/ProgressTrack.png | Bin 0 -> 192 bytes .../textures/widgets/PushButton_Disabled.png | Bin 0 -> 461 bytes .../default/textures/widgets/PushButton_Off.png | Bin 0 -> 464 bytes .../default/textures/widgets/PushButton_On.png | Bin 0 -> 490 bytes .../textures/widgets/PushButton_On_Over.png | Bin 0 -> 498 bytes .../textures/widgets/PushButton_On_Selected.png | Bin 0 -> 572 bytes .../default/textures/widgets/PushButton_Over.png | Bin 0 -> 457 bytes .../default/textures/widgets/PushButton_Press.png | Bin 0 -> 520 bytes .../textures/widgets/PushButton_Selected.png | Bin 0 -> 520 bytes .../widgets/PushButton_Selected_Disabled.png | Bin 0 -> 490 bytes .../textures/widgets/PushButton_Selected_Over.png | Bin 0 -> 498 bytes .../textures/widgets/PushButton_Selected_Press.png | Bin 0 -> 572 bytes .../textures/widgets/RadioButton_Disabled.png | Bin 0 -> 541 bytes .../default/textures/widgets/RadioButton_Off.png | Bin 0 -> 563 bytes .../default/textures/widgets/RadioButton_On.png | Bin 0 -> 627 bytes .../textures/widgets/RadioButton_On_Disabled.png | Bin 0 -> 605 bytes .../textures/widgets/RadioButton_On_Over.png | Bin 0 -> 635 bytes .../textures/widgets/RadioButton_On_Press.png | Bin 0 -> 641 bytes .../default/textures/widgets/RadioButton_Over.png | Bin 0 -> 575 bytes .../default/textures/widgets/RadioButton_Press.png | Bin 0 -> 589 bytes .../default/textures/widgets/ScrollArrow_Down.png | Bin 0 -> 239 bytes .../textures/widgets/ScrollArrow_Down_Over.png | Bin 0 -> 257 bytes .../default/textures/widgets/ScrollArrow_Left.png | Bin 0 -> 271 bytes .../textures/widgets/ScrollArrow_Left_Over.png | Bin 0 -> 295 bytes .../default/textures/widgets/ScrollArrow_Right.png | Bin 0 -> 260 bytes .../textures/widgets/ScrollArrow_Right_Over.png | Bin 0 -> 283 bytes .../default/textures/widgets/ScrollArrow_Up.png | Bin 0 -> 262 bytes .../textures/widgets/ScrollArrow_Up_Over.png | Bin 0 -> 276 bytes .../default/textures/widgets/ScrollThumb_Horiz.png | Bin 0 -> 364 bytes .../textures/widgets/ScrollThumb_Horiz_Over.png | Bin 0 -> 311 bytes .../default/textures/widgets/ScrollThumb_Vert.png | Bin 0 -> 323 bytes .../textures/widgets/ScrollThumb_Vert_Over.png | Bin 0 -> 311 bytes .../default/textures/widgets/ScrollTrack_Horiz.png | Bin 0 -> 153 bytes .../default/textures/widgets/ScrollTrack_Vert.png | Bin 0 -> 150 bytes .../widgets/SegmentedBtn_Left_Disabled.png | Bin 0 -> 378 bytes .../textures/widgets/SegmentedBtn_Left_Off.png | Bin 0 -> 386 bytes .../textures/widgets/SegmentedBtn_Left_On.png | Bin 0 -> 404 bytes .../widgets/SegmentedBtn_Left_On_Disabled.png | Bin 0 -> 404 bytes .../textures/widgets/SegmentedBtn_Left_On_Over.png | Bin 0 -> 394 bytes .../widgets/SegmentedBtn_Left_On_Selected.png | Bin 0 -> 495 bytes .../textures/widgets/SegmentedBtn_Left_Over.png | Bin 0 -> 384 bytes .../textures/widgets/SegmentedBtn_Left_Press.png | Bin 0 -> 455 bytes .../widgets/SegmentedBtn_Left_Selected.png | Bin 0 -> 455 bytes .../SegmentedBtn_Left_Selected_Disabled.png | Bin 0 -> 404 bytes .../widgets/SegmentedBtn_Left_Selected_Over.png | Bin 0 -> 394 bytes .../widgets/SegmentedBtn_Left_Selected_Press.png | Bin 0 -> 495 bytes .../widgets/SegmentedBtn_Middle_Disabled.png | Bin 0 -> 277 bytes .../textures/widgets/SegmentedBtn_Middle_On.png | Bin 0 -> 308 bytes .../widgets/SegmentedBtn_Middle_On_Over.png | Bin 0 -> 300 bytes .../widgets/SegmentedBtn_Middle_On_Press.png | Bin 0 -> 393 bytes .../textures/widgets/SegmentedBtn_Middle_Over.png | Bin 0 -> 286 bytes .../widgets/SegmentedBtn_Middle_Selected.png | Bin 0 -> 359 bytes .../SegmentedBtn_Middle_Selected_Disabled.png | Bin 0 -> 308 bytes .../widgets/SegmentedBtn_Middle_Selected_Over.png | Bin 0 -> 300 bytes .../widgets/SegmentedBtn_Middle_Selected_Press.png | Bin 0 -> 393 bytes .../widgets/SegmentedBtn_Right_Disabled.png | Bin 0 -> 380 bytes .../textures/widgets/SegmentedBtn_Right_Off.png | Bin 0 -> 391 bytes .../textures/widgets/SegmentedBtn_Right_On.png | Bin 0 -> 420 bytes .../widgets/SegmentedBtn_Right_On_Over.png | Bin 0 -> 416 bytes .../widgets/SegmentedBtn_Right_On_Selected.png | Bin 0 -> 502 bytes .../textures/widgets/SegmentedBtn_Right_Over.png | Bin 0 -> 398 bytes .../textures/widgets/SegmentedBtn_Right_Press.png | Bin 0 -> 459 bytes .../widgets/SegmentedBtn_Right_Selected.png | Bin 0 -> 459 bytes .../SegmentedBtn_Right_Selected_Disabled.png | Bin 0 -> 420 bytes .../widgets/SegmentedBtn_Right_Selected_Over.png | Bin 0 -> 416 bytes .../widgets/SegmentedBtn_Right_Selected_Press.png | Bin 0 -> 502 bytes .../textures/widgets/SliderThumb_Disabled.png | Bin 0 -> 475 bytes .../default/textures/widgets/SliderThumb_Off.png | Bin 0 -> 475 bytes .../default/textures/widgets/SliderThumb_Over.png | Bin 0 -> 482 bytes .../default/textures/widgets/SliderThumb_Press.png | Bin 0 -> 470 bytes .../default/textures/widgets/SliderTrack_Horiz.png | Bin 0 -> 225 bytes .../default/textures/widgets/SliderTrack_Vert.png | Bin 0 -> 232 bytes .../default/textures/widgets/TextField_Active.png | Bin 0 -> 225 bytes .../textures/widgets/TextField_Disabled.png | Bin 0 -> 225 bytes .../default/textures/widgets/TextField_Off.png | Bin 0 -> 224 bytes .../textures/widgets/TextField_Search_Active.png | Bin 0 -> 923 bytes .../textures/widgets/TextField_Search_Disabled.png | Bin 0 -> 943 bytes .../textures/widgets/TextField_Search_Off.png | Bin 0 -> 958 bytes .../skins/default/textures/windows/Flyout.png | Bin 0 -> 820 bytes .../default/textures/windows/Flyout_Pointer.png | Bin 0 -> 236 bytes .../textures/windows/Icon_Close_Foreground.png | Bin 0 -> 226 bytes .../default/textures/windows/Icon_Close_Press.png | Bin 0 -> 217 bytes .../default/textures/windows/Icon_Close_Toast.png | Bin 0 -> 460 bytes .../textures/windows/Icon_Dock_Foreground.png | Bin 0 -> 240 bytes .../default/textures/windows/Icon_Dock_Press.png | Bin 0 -> 241 bytes .../textures/windows/Icon_Gear_Background.png | Bin 0 -> 373 bytes .../textures/windows/Icon_Gear_Foreground.png | Bin 0 -> 373 bytes .../default/textures/windows/Icon_Gear_Over.png | Bin 0 -> 279 bytes .../default/textures/windows/Icon_Gear_Press.png | Bin 0 -> 396 bytes .../textures/windows/Icon_Undock_Foreground.png | Bin 0 -> 238 bytes .../default/textures/windows/Icon_Undock_Press.png | Bin 0 -> 260 bytes .../default/textures/windows/Resize_Corner.png | Bin 0 -> 137 bytes .../default/textures/windows/Toast_CloseBtn.png | Bin 0 -> 471 bytes .../skins/default/textures/windows/Toast_Over.png | Bin 0 -> 400 bytes .../default/textures/windows/Window_Background.png | Bin 0 -> 950 bytes .../default/textures/windows/Window_Foreground.png | Bin 0 -> 959 bytes .../newview/skins/default/xui/de/floater_tools.xml | 632 ++++++++- .../skins/default/xui/de/panel_group_general.xml | 85 ++ .../default/xui/de/panel_group_land_money.xml | 86 ++ .../skins/default/xui/de/panel_group_notices.xml | 80 ++ .../skins/default/xui/de/panel_group_roles.xml | 163 ++- .../default/xui/en/floater_animation_preview.xml | 14 +- .../skins/default/xui/en/floater_bulk_perms.xml | 22 +- .../skins/default/xui/en/floater_buy_contents.xml | 6 +- .../skins/default/xui/en/floater_buy_object.xml | 14 +- .../skins/default/xui/en/floater_gesture.xml | 23 +- indra/newview/skins/default/xui/en/floater_im.xml | 2 +- .../xui/en/floater_inventory_view_finder.xml | 2 +- .../skins/default/xui/en/floater_land_holdings.xml | 52 +- .../skins/default/xui/en/floater_mute_object.xml | 4 +- .../skins/default/xui/en/floater_preferences.xml | 131 +- .../default/xui/en/floater_preview_animation.xml | 10 +- .../default/xui/en/floater_preview_gesture.xml | 90 +- .../skins/default/xui/en/floater_preview_sound.xml | 11 +- .../skins/default/xui/en/floater_region_info.xml | 2 +- .../skins/default/xui/en/floater_sell_land.xml | 65 +- .../skins/default/xui/en/floater_telehub.xml | 2 +- .../skins/default/xui/en/floater_test_checkbox.xml | 11 - .../default/xui/en/floater_test_navigation_bar.xml | 17 + .../newview/skins/default/xui/en/floater_tools.xml | 1361 ++++++++++---------- .../skins/default/xui/en/floater_url_entry.xml | 20 +- indra/newview/skins/default/xui/en/fonts.xml | 16 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 13 +- .../newview/skins/default/xui/en/notifications.xml | 36 +- .../skins/default/xui/en/panel_bottomtray.xml | 2 +- .../skins/default/xui/en/panel_group_general.xml | 119 +- .../default/xui/en/panel_group_land_money.xml | 143 +- .../skins/default/xui/en/panel_group_notices.xml | 160 ++- .../skins/default/xui/en/panel_group_roles.xml | 176 +-- .../skins/default/xui/en/panel_navigation_bar.xml | 129 +- .../newview/skins/default/xui/en/panel_people.xml | 8 +- .../default/xui/en/panel_preferences_advanced.xml | 305 +++++ .../default/xui/en/panel_preferences_chat.xml | 362 +++--- .../default/xui/en/panel_preferences_general.xml | 497 +++---- .../default/xui/en/panel_preferences_graphics1.xml | 334 ++--- .../newview/skins/default/xui/en/panel_profile.xml | 4 +- .../skins/default/xui/en/panel_progress.xml | 28 +- .../skins/default/xui/en/panel_region_covenant.xml | 72 +- .../skins/default/xui/en/panel_region_debug.xml | 43 +- .../skins/default/xui/en/panel_region_estate.xml | 95 +- .../skins/default/xui/en/panel_region_general.xml | 18 +- .../skins/default/xui/en/panel_region_terrain.xml | 40 +- .../skins/default/xui/en/panel_region_texture.xml | 140 +- .../skins/default/xui/en/panel_scrolling_param.xml | 16 +- .../skins/default/xui/en/panel_side_tray.xml | 570 ++++++++ indra/newview/skins/default/xui/en/strings.xml | 2 +- .../skins/default/xui/en/widgets/button.xml | 8 +- .../skins/default/xui/en/widgets/check_box.xml | 13 +- .../skins/default/xui/en/widgets/color_swatch.xml | 2 - .../skins/default/xui/en/widgets/combo_box.xml | 33 +- .../skins/default/xui/en/widgets/drop_down.xml | 18 +- .../skins/default/xui/en/widgets/flyout_button.xml | 15 +- .../skins/default/xui/en/widgets/line_editor.xml | 3 +- .../default/xui/en/widgets/location_input.xml | 84 +- .../skins/default/xui/en/widgets/progress_bar.xml | 4 +- .../skins/default/xui/en/widgets/radio_group.xml | 4 +- .../skins/default/xui/en/widgets/radio_item.xml | 9 +- .../skins/default/xui/en/widgets/scroll_bar.xml | 36 +- .../skins/default/xui/en/widgets/search_editor.xml | 5 +- .../skins/default/xui/en/widgets/side_tray.xml | 10 +- .../default/xui/en/widgets/simple_text_editor.xml | 4 +- .../skins/default/xui/en/widgets/slider_bar.xml | 7 +- .../skins/default/xui/en/widgets/tab_container.xml | 8 +- .../skins/default/xui/en/widgets/text_editor.xml | 4 +- indra/newview/viewer_manifest.py | 4 + install.xml | 4 +- 320 files changed, 5031 insertions(+), 3079 deletions(-) create mode 100644 indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Off.png create mode 100644 indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.png create mode 100644 indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Press.png create mode 100644 indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.png create mode 100644 indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Press.png create mode 100644 indra/newview/skins/default/textures/containers/Accordion_Off.png create mode 100644 indra/newview/skins/default/textures/containers/Accordion_Over.png create mode 100644 indra/newview/skins/default/textures/containers/Accordion_Press.png create mode 100644 indra/newview/skins/default/textures/containers/Container.png create mode 100644 indra/newview/skins/default/textures/containers/TabTop_Left_Off.png create mode 100644 indra/newview/skins/default/textures/containers/TabTop_Left_Over.png create mode 100644 indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png create mode 100644 indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png create mode 100644 indra/newview/skins/default/textures/containers/TabTop_Middle_Over.png create mode 100644 indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png create mode 100644 indra/newview/skins/default/textures/containers/TabTop_Right_Off.png create mode 100644 indra/newview/skins/default/textures/containers/TabTop_Right_Over.png create mode 100644 indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png create mode 100644 indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png create mode 100644 indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png create mode 100644 indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png create mode 100644 indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png create mode 100644 indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png create mode 100644 indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png create mode 100644 indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png create mode 100644 indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png create mode 100644 indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png create mode 100644 indra/newview/skins/default/textures/navbar/Arrow_Left_Off.png create mode 100644 indra/newview/skins/default/textures/navbar/Arrow_Left_Over.png create mode 100644 indra/newview/skins/default/textures/navbar/Arrow_Right_Off.png create mode 100644 indra/newview/skins/default/textures/navbar/Arrow_Right_Over.png create mode 100644 indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png create mode 100644 indra/newview/skins/default/textures/navbar/Favorite_Star_Off.png create mode 100644 indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png create mode 100644 indra/newview/skins/default/textures/navbar/Favorite_Star_Press.png create mode 100644 indra/newview/skins/default/textures/navbar/FileMenu_Divider.png create mode 100644 indra/newview/skins/default/textures/navbar/Help_Over.png create mode 100644 indra/newview/skins/default/textures/navbar/Help_Press.png create mode 100644 indra/newview/skins/default/textures/navbar/Home_Off.png create mode 100644 indra/newview/skins/default/textures/navbar/Home_Over.png create mode 100644 indra/newview/skins/default/textures/navbar/Info_Off.png create mode 100644 indra/newview/skins/default/textures/navbar/Info_Over.png create mode 100644 indra/newview/skins/default/textures/navbar/Info_Press.png create mode 100644 indra/newview/skins/default/textures/navbar/NavBar_BG.png create mode 100644 indra/newview/skins/default/textures/navbar/Row_Selection.png create mode 100644 indra/newview/skins/default/textures/navbar/Search.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Off.png create mode 100644 indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Selected.png create mode 100644 indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/Checkbox_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/Checkbox_On.png create mode 100644 indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/Checkbox_On_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/Checkbox_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/Checkbox_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/ComboButton_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/ComboButton_On.png create mode 100644 indra/newview/skins/default/textures/widgets/ComboButton_Selected.png create mode 100644 indra/newview/skins/default/textures/widgets/DropDown_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/DropDown_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/DropDown_On.png create mode 100644 indra/newview/skins/default/textures/widgets/DropDown_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/ProgressBar.png create mode 100644 indra/newview/skins/default/textures/widgets/ProgressTrack.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_On.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_On_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_Selected.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/RadioButton_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/RadioButton_On.png create mode 100644 indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/RadioButton_On_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/RadioButton_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/RadioButton_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png create mode 100644 indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/SliderThumb_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/SliderThumb_Over.png create mode 100644 indra/newview/skins/default/textures/widgets/SliderThumb_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png create mode 100644 indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png create mode 100644 indra/newview/skins/default/textures/widgets/TextField_Active.png create mode 100644 indra/newview/skins/default/textures/widgets/TextField_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/TextField_Off.png create mode 100644 indra/newview/skins/default/textures/widgets/TextField_Search_Active.png create mode 100644 indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png create mode 100644 indra/newview/skins/default/textures/widgets/TextField_Search_Off.png create mode 100644 indra/newview/skins/default/textures/windows/Flyout.png create mode 100644 indra/newview/skins/default/textures/windows/Flyout_Pointer.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Close_Press.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Close_Toast.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Dock_Press.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Gear_Background.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Gear_Over.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Gear_Press.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png create mode 100644 indra/newview/skins/default/textures/windows/Icon_Undock_Press.png create mode 100644 indra/newview/skins/default/textures/windows/Resize_Corner.png create mode 100644 indra/newview/skins/default/textures/windows/Toast_CloseBtn.png create mode 100644 indra/newview/skins/default/textures/windows/Toast_Over.png create mode 100644 indra/newview/skins/default/textures/windows/Window_Background.png create mode 100644 indra/newview/skins/default/textures/windows/Window_Foreground.png create mode 100644 indra/newview/skins/default/xui/en/floater_test_navigation_bar.xml create mode 100644 indra/newview/skins/default/xui/en/panel_preferences_advanced.xml (limited to 'indra/newview/lllocationinputctrl.cpp') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index ad7529ea0a..977251f807 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -227,7 +227,6 @@ else (STANDALONE) glib-2.0 gstreamer-0.10 gtk-2.0 - llfreetype2 pango-1.0 ) endif (STANDALONE) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 117e8e28ab..e62d875a01 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -81,6 +81,7 @@ set(llui_SOURCE_FILES lltextparser.cpp lltrans.cpp llui.cpp + lluicolor.cpp lluicolortable.cpp lluictrl.cpp lluictrlfactory.cpp @@ -154,6 +155,7 @@ set(llui_HEADER_FILES lltexteditor.h lltextparser.h lltrans.h + lluicolor.h lluicolortable.h lluiconstants.h lluictrlfactory.h diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 51ab3326fe..e19eacb774 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -83,12 +83,12 @@ LLComboBox::Params::Params() : allow_text_entry("allow_text_entry", false), show_text_as_tentative("show_text_as_tentative", true), max_chars("max_chars", 20), - arrow_image("arrow_image"), list_position("list_position", BELOW), items("item"), combo_button("combo_button"), combo_list("combo_list"), - combo_editor("combo_editor") + combo_editor("combo_editor"), + drop_down_button("drop_down_button") { addSynonym(items, "combo_item"); } @@ -104,19 +104,29 @@ LLComboBox::LLComboBox(const LLComboBox::Params& p) mPrearrangeCallback(p.prearrange_callback()), mTextEntryCallback(p.text_entry_callback()), mSelectionCallback(p.selection_callback()), - mArrowImage(p.arrow_image), mListPosition(p.list_position) { // Text label button - LLButton::Params button_params = p.combo_button; + LLButton::Params button_params = (mAllowTextEntry ? p.combo_button : p.drop_down_button); button_params.mouse_down_callback.function(boost::bind(&LLComboBox::onButtonDown, this)); button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT); button_params.rect(p.rect); - button_params.pad_right(2); + + if(mAllowTextEntry) + { + button_params.pad_right(2); + } + + mArrowImage = button_params.image_unselected; mButton = LLUICtrlFactory::create(button_params); - mButton->setRightHPad(2); //redo to compensate for button hack that leaves space for a character + if(mAllowTextEntry) + { + //redo to compensate for button hack that leaves space for a character + //unless it is a "minimal combobox"(drop down) + mButton->setRightHPad(2); + } addChild(mButton); LLScrollListCtrl::Params params = p.combo_list; diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h index bc98690a01..cb5f72dcbe 100644 --- a/indra/llui/llcombobox.h +++ b/indra/llui/llcombobox.h @@ -84,7 +84,6 @@ public: Optional prearrange_callback, text_entry_callback, selection_callback; - Optional arrow_image; Optional list_position; @@ -93,6 +92,8 @@ public: Optional combo_list; Optional combo_editor; + Optional drop_down_button; + Multiple items; Params(); diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index f1fc3d8f43..1e8b8a5537 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -177,8 +177,8 @@ void LLConsole::draw() // F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); F32 console_opacity = llclamp(LLUI::sSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); -// LLColor4 color = gSavedSkinSettings.getColor("ConsoleBackground"); - LLColor4 color = LLUI::sSettingGroups["color"]->getColor("ConsoleBackground"); +// LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground"); + LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground"); color.mV[VALPHA] *= console_opacity; F32 line_height = mFont->getLineHeight(); diff --git a/indra/llui/lldraghandle.h b/indra/llui/lldraghandle.h index 8b53c46ae9..0448c20068 100644 --- a/indra/llui/lldraghandle.h +++ b/indra/llui/lldraghandle.h @@ -53,8 +53,8 @@ public: Optional drag_shadow_color; Params() - : drag_highlight_color("", LLUI::getCachedColorFunctor("DefaultHighlightLight")), - drag_shadow_color("", LLUI::getCachedColorFunctor("DefaultShadowDark")) + : drag_highlight_color("", LLUIColorTable::instance().getColor("DefaultHighlightLight")), + drag_shadow_color("", LLUIColorTable::instance().getColor("DefaultShadowDark")) { mouse_opaque(true); follows.flags(FOLLOWS_ALL); diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 8932a7ccf2..d37459c040 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -66,7 +66,7 @@ const S32 TABBED_FLOATER_OFFSET = 0; std::string LLFloater::sButtonActiveImageNames[BUTTON_COUNT] = { - "closebox.tga", //BUTTON_CLOSE + "Icon_Close_Foreground", //BUTTON_CLOSE "restore.tga", //BUTTON_RESTORE "minimize.tga", //BUTTON_MINIMIZE "tearoffbox.tga", //BUTTON_TEAR_OFF @@ -84,7 +84,7 @@ std::string LLFloater::sButtonInactiveImageNames[BUTTON_COUNT] = std::string LLFloater::sButtonPressedImageNames[BUTTON_COUNT] = { - "close_in_blue.tga", //BUTTON_CLOSE + "Icon_Close_Press", //BUTTON_CLOSE "restore_pressed.tga", //BUTTON_RESTORE "minimize_pressed.tga", //BUTTON_MINIMIZE "tearoff_pressed.tga", //BUTTON_TEAR_OFF @@ -221,8 +221,8 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mPreviousMinimizedLeft(0), mNotificationContext(NULL) { - static LLUICachedControl default_background_color ("FloaterDefaultBackgroundColor", *(new LLColor4)); - static LLUICachedControl focus_background_color ("FloaterFocusBackgroundColor", *(new LLColor4)); + static LLUIColor default_background_color = LLUIColorTable::instance().getColor("FloaterDefaultBackgroundColor"); + static LLUIColor focus_background_color = LLUIColorTable::instance().getColor("FloaterFocusBackgroundColor"); for (S32 i = 0; i < BUTTON_COUNT; i++) { @@ -1449,7 +1449,7 @@ void LLFloater::draw() S32 bottom = LLPANEL_BORDER_WIDTH; static LLUICachedControl shadow_offset_S32 ("DropShadowFloater", 0); - static LLUICachedControl shadow_color_cached ("ColorDropShadow", *(new LLColor4)); + static LLUIColor shadow_color_cached = LLUIColorTable::instance().getColor("ColorDropShadow"); LLColor4 shadow_color = shadow_color_cached; F32 shadow_offset = (F32)shadow_offset_S32; @@ -1474,7 +1474,7 @@ void LLFloater::draw() if(gFocusMgr.childHasKeyboardFocus(this) && !getIsChrome() && !getCurrentTitle().empty()) { - static LLUICachedControl titlebar_focus_color ("TitleBarFocusColor", *(new LLColor4)); + static LLUIColor titlebar_focus_color = LLUIColorTable::instance().getColor("TitleBarFocusColor"); // draw highlight on title bar to indicate focus. RDW const LLFontGL* font = LLFontGL::getFontSansSerif(); LLRect r = getRect(); @@ -1533,10 +1533,10 @@ void LLFloater::draw() { // add in a border to improve spacialized visual aclarity ;) // use lines instead of gl_rect_2d so we can round the edges as per james' recommendation - static LLUICachedControl focus_border_color ("FloaterFocusBorderColor", *(new LLColor4)); - static LLUICachedControl unfocus_border_color ("FloaterUnfocusBorderColor", *(new LLColor4)); + static LLUIColor focus_border_color = LLUIColorTable::instance().getColor("FloaterFocusBorderColor"); + static LLUIColor unfocus_border_color = LLUIColorTable::instance().getColor("FloaterUnfocusBorderColor"); LLUI::setLineWidth(1.5f); - LLColor4 outlineColor = gFocusMgr.childHasKeyboardFocus(this) ? focus_border_color() : unfocus_border_color; + LLColor4 outlineColor = gFocusMgr.childHasKeyboardFocus(this) ? focus_border_color : unfocus_border_color; gl_rect_2d_offset_local(0, getRect().getHeight() + 1, getRect().getWidth() + 1, 0, outlineColor, -LLPANEL_BORDER_WIDTH, FALSE); LLUI::setLineWidth(1.f); } @@ -1699,7 +1699,6 @@ void LLFloater::buildButtons() p.tab_stop(false); p.follows.flags(FOLLOWS_TOP|FOLLOWS_RIGHT); p.tool_tip(sButtonToolTips[i]); - p.image_color(LLUI::getCachedColorFunctor("FloaterButtonImageColor")); p.scale_image(true); LLButton* buttonp = LLUICtrlFactory::create(p); diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp index 8846f2a8c4..a99c3a4fe6 100644 --- a/indra/llui/llflyoutbutton.cpp +++ b/indra/llui/llflyoutbutton.cpp @@ -54,11 +54,6 @@ LLFlyoutButton::LLFlyoutButton(const Params& p) mActionButton = LLUICtrlFactory::create(bp); addChild(mActionButton); - - mButton->setOrigin(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH, 0); - mButton->reshape(FLYOUT_BUTTON_ARROW_WIDTH, getRect().getHeight()); - mButton->setFollows(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM); - mButton->setImageOverlay(mListPosition == BELOW ? "down_arrow.tga" : "up_arrow.tga", LLFontGL::RIGHT); } void LLFlyoutButton::onActionButtonClick(const LLSD& data) @@ -75,7 +70,7 @@ void LLFlyoutButton::draw() //FIXME: this should be an attribute of comboboxes, whether they have a distinct label or // the label reflects the last selected item, for now we have to manually remove the label - mButton->setLabel(LLStringUtil::null); + setLabel(LLStringUtil::null); LLComboBox::draw(); } diff --git a/indra/llui/llflyoutbutton.h b/indra/llui/llflyoutbutton.h index f60fe1eb35..1f1716593a 100644 --- a/indra/llui/llflyoutbutton.h +++ b/indra/llui/llflyoutbutton.h @@ -46,10 +46,14 @@ public: struct Params : public LLInitParam::Block { Optional action_button; + Deprecated allow_text_entry; Params() - : action_button("action_button") - {} + : action_button("action_button"), + allow_text_entry("allow_text_entry") + { + LLComboBox::Params::allow_text_entry = false; + } }; protected: diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 9a4ec7627e..a66f147dcc 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -323,7 +323,7 @@ F32 LLFocusMgr::getFocusFlashAmt() const LLColor4 LLFocusMgr::getFocusColor() const { - static LLUICachedControl focus_color_cached ("FocusColor", *(new LLColor4)); + static LLUIColor focus_color_cached = LLUIColorTable::instance().getColor("FocusColor"); LLColor4 focus_color = lerp(focus_color_cached, LLColor4::white, getFocusFlashAmt()); // de-emphasize keyboard focus when app has lost focus (to avoid typing into wrong window problem) if (!mAppHasFocus) diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 5ea45e13cf..925f22d94e 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -184,6 +184,11 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) mBorder = LLUICtrlFactory::create(border_p); addChild( mBorder ); + if(p.background_image.isProvided()) + { + mImage = p.background_image; + } + // clamp text padding to current editor size updateTextPadding(); setCursor(mText.length()); @@ -1525,12 +1530,12 @@ void LLLineEditor::draw() LLColor4 bg_color = mReadOnlyBgColor.get(); -#if 0 // for when we're ready for image art. +#if 1 // for when we're ready for image art. if( hasFocus()) { mImage->drawBorder(0, 0, getRect().getWidth(), getRect().getHeight(), gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); } - mImage->draw(getLocalRect(), mReadOnly ? mReadOnlyBgColor : mWriteableBgColor ); + mImage->draw(getLocalRect()); #else // the old programmer art. // drawing solids requires texturing be disabled { @@ -1691,7 +1696,7 @@ void LLLineEditor::draw() mMaxHPixels - llround(rendered_pixels_right), &rendered_pixels_right); } -#if 0 // for when we're ready for image art. +#if 1 // for when we're ready for image art. mBorder->setVisible(FALSE); // no more programmatic art. #endif diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 95221d5fc6..e79afe76d8 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -2333,10 +2333,10 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu ) p.label = menu->getLabel(); p.branch = menu; p.jump_key = menu->getJumpKey(); - p.enabled_color=LLUI::getCachedColorFunctor("MenuItemEnabledColor"); - p.disabled_color=LLUI::getCachedColorFunctor("MenuItemDisabledColor"); - p.highlight_bg_color=LLUI::getCachedColorFunctor("MenuItemHighlightBgColor"); - p.highlight_fg_color=LLUI::getCachedColorFunctor("MenuItemHighlightFgColor"); + p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor"); + p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor"); + p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor"); + p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor"); LLMenuItemBranchGL* branch = LLUICtrlFactory::create(p); success &= append( branch ); @@ -2743,7 +2743,7 @@ void LLMenuGL::draw( void ) if (mDropShadowed && !mTornOff) { static LLUICachedControl drop_shadow_floater ("DropShadowFloater", 0); - static LLUICachedControl color_drop_shadow ("ColorDropShadow", *(new LLColor4)); + static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow"); gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, color_drop_shadow, drop_shadow_floater ); } @@ -3117,10 +3117,10 @@ BOOL LLMenuBarGL::appendMenu( LLMenuGL* menu ) p.label = menu->getLabel(); p.visible = menu->getVisible(); p.branch = menu; - p.enabled_color=LLUI::getCachedColorFunctor("MenuItemEnabledColor"); - p.disabled_color=LLUI::getCachedColorFunctor("MenuItemDisabledColor"); - p.highlight_bg_color=LLUI::getCachedColorFunctor("MenuItemHighlightBgColor"); - p.highlight_fg_color=LLUI::getCachedColorFunctor("MenuItemHighlightFgColor"); + p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor"); + p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor"); + p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor"); + p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor"); LLMenuItemBranchDownGL* branch = LLUICtrlFactory::create(p); success &= branch->addToAcceleratorList(&mAccelerators); @@ -3804,10 +3804,10 @@ BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu) p.name = menu->getName(); p.label = menu->getLabel(); p.branch = menu; - p.enabled_color=LLUI::getCachedColorFunctor("MenuItemEnabledColor"); - p.disabled_color=LLUI::getCachedColorFunctor("MenuItemDisabledColor"); - p.highlight_bg_color=LLUI::getCachedColorFunctor("MenuItemHighlightBgColor"); - p.highlight_fg_color=LLUI::getCachedColorFunctor("MenuItemHighlightFgColor"); + p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor"); + p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor"); + p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor"); + p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor"); item = LLUICtrlFactory::create(p); LLMenuGL::sMenuContainer->addChild(item->getBranch()); diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 526e1c2583..ad257f46c2 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -379,7 +379,7 @@ public: drop_shadow("drop_shadow", true), bg_visible("bg_visible", true), create_jump_keys("create_jump_keys", false), - bg_color("bg_color", LLUI::getCachedColorFunctor( "MenuDefaultBgColor" )), + bg_color("bg_color", LLUIColorTable::instance().getColor( "MenuDefaultBgColor" )), scrollable("scrollable", false) { addSynonym(bg_visible, "opaque"); diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index 8779eee28d..7557b87b94 100644 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -244,7 +244,7 @@ void LLModalDialog::onClose(bool app_quitting) // virtual void LLModalDialog::draw() { - static LLUICachedControl shadow_color ("ColorDropShadow", *(new LLColor4)); + static LLUIColor shadow_color = LLUIColorTable::instance().getColor("ColorDropShadow"); static LLUICachedControl shadow_lines ("DropShadowFloater", 0); gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0, diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 3a76e72868..6a6e15867b 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -428,14 +428,10 @@ void LLPanel::initFromParams(const LLPanel::Params& p) mUIStrings[it->name] = it->text; } - setName(p.name()); setLabel(p.label()); - setShape(p.rect); parseFollowsFlags(p); - setEnabled(p.enabled); - setVisible(p.visible); setToolTip(p.tool_tip()); setSaveToXML(p.serializable); diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp index 943e2f55f1..90f51b9919 100644 --- a/indra/llui/llresizehandle.cpp +++ b/indra/llui/llresizehandle.cpp @@ -63,7 +63,7 @@ LLResizeHandle::LLResizeHandle(const LLResizeHandle::Params& p) { if( RIGHT_BOTTOM == mCorner) { - mImage = LLUI::getUIImage("resize_handle_bottom_right_blue.tga"); + mImage = LLUI::getUIImage("Resize_Corner"); } switch( p.corner ) { diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 72329a4b32..943891c572 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -111,8 +111,8 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) .right(btn_right) .height(spinctrl_btn_height); up_button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM); - up_button_params.image_unselected.name("spin_up_out_blue.tga"); - up_button_params.image_selected.name("spin_up_in_blue.tga"); + up_button_params.image_unselected.name("ScrollArrow_Up"); + up_button_params.image_selected.name("ScrollArrow_Up"); up_button_params.click_callback.function(boost::bind(&LLSpinCtrl::onUpBtn, this, _2)); up_button_params.mouse_held_callback.function(boost::bind(&LLSpinCtrl::onUpBtn, this, _2)); up_button_params.tab_stop(false); @@ -130,8 +130,8 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) .bottom(bottom) .height(spinctrl_btn_height); down_button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM); - down_button_params.image_unselected.name("spin_down_out_blue.tga"); - down_button_params.image_selected.name("spin_down_in_blue.tga"); + down_button_params.image_unselected.name("ScrollArrow_Down"); + down_button_params.image_selected.name("ScrollArrow_Down"); down_button_params.click_callback.function(boost::bind(&LLSpinCtrl::onDownBtn, this, _2)); down_button_params.mouse_held_callback.function(boost::bind(&LLSpinCtrl::onDownBtn, this, _2)); down_button_params.tab_stop(false); diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index 3bd2c9f9e7..55d6b3159f 100644 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -107,10 +107,10 @@ void LLStatGraph::draw() } //gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, - // gSavedSkinSettings.getColor("ColorDropShadow"), + // LLUIColorTable::instance().getColor("ColorDropShadow"), // (S32) gSavedSettings.getF32("DropShadowFloater") ); - color = LLUI::sSettingGroups["color"]->getColor( "MenuDefaultBgColor" ); + color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" ); gGL.color4fv(color.mV); gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE); diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h index 890abc7d67..1a94fcf2c6 100644 --- a/indra/llui/llstyle.h +++ b/indra/llui/llstyle.h @@ -106,7 +106,7 @@ protected: private: BOOL mVisible; - LLColor4 mColor; + LLUIColor mColor; std::string mFontName; LLFontGL* mFont; // cached for performance std::string mLink; diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 464e4be809..b812e876ef 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -314,7 +314,7 @@ void LLTextBox::draw() if( mBorderDropShadowVisible ) { - static LLUICachedControl color_drop_shadow ("ColorDropShadow", *(new LLColor4)); + static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow"); static LLUICachedControl drop_shadow_tooltip ("DropShadowTooltip", 0); gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, color_drop_shadow, drop_shadow_tooltip); diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 34bced064e..6649264d9a 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -75,7 +75,7 @@ const S32 CURSOR_THICKNESS = 2; const S32 SPACES_PER_TAB = 4; -LLColor4 LLTextEditor::mLinkColor = LLColor4::blue; +LLUIColor LLTextEditor::mLinkColor = LLColor4::blue; void (* LLTextEditor::mURLcallback)(const std::string&) = NULL; bool (* LLTextEditor::mSecondlifeURLcallback)(const std::string&) = NULL; bool (* LLTextEditor::mSecondlifeURLcallbackRightClick)(const std::string&) = NULL; @@ -3083,8 +3083,8 @@ void LLTextEditor::drawClippedSegment(const LLWString &text, S32 seg_start, S32 if (style->getIsEmbeddedItem()) { - static LLUICachedControl text_embedded_item_readonly_color ("TextEmbeddedItemReadOnlyColor", *(new LLColor4)); - static LLUICachedControl text_embedded_item_color ("TextEmbeddedItemColor", *(new LLColor4)); + static LLUIColor text_embedded_item_readonly_color = LLUIColorTable::instance().getColor("TextEmbeddedItemReadOnlyColor"); + static LLUIColor text_embedded_item_color = LLUIColorTable::instance().getColor("TextEmbeddedItemColor"); if (mReadOnly) { color = text_embedded_item_readonly_color; diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index f64353555e..d0769c2a8f 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -512,7 +512,7 @@ private: // Data // LLKeywords mKeywords; - static LLColor4 mLinkColor; + static LLUIColor mLinkColor; static void (*mURLcallback) (const std::string& url); static bool (*mSecondlifeURLcallback) (const std::string& url); static bool (*mSecondlifeURLcallbackRightClick) (const std::string& url); diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 1d3e5d7a15..12875b4ed1 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -1579,7 +1579,6 @@ void LLUI::initClass(const settings_map_t& settings, sSettingGroups = settings; if ((get_ptr_in_map(sSettingGroups, std::string("config")) == NULL) || - (get_ptr_in_map(sSettingGroups, std::string("color")) == NULL) || (get_ptr_in_map(sSettingGroups, std::string("floater")) == NULL) || (get_ptr_in_map(sSettingGroups, std::string("ignores")) == NULL)) { @@ -1590,7 +1589,7 @@ void LLUI::initClass(const settings_map_t& settings, sAudioCallback = audio_callback; sGLScaleFactor = (scale_factor == NULL) ? LLVector2(1.f, 1.f) : *scale_factor; sWindow = NULL; // set later in startup - LLFontGL::sShadowColor = LLUI::sSettingGroups["color"]->getColor("ColorDropShadow"); + LLFontGL::sShadowColor = LLUIColorTable::instance().getColor("ColorDropShadow"); static LLUICachedControl show_xui_names ("ShowXUINames", false); LLUI::sShowXUINames = show_xui_names; @@ -1855,13 +1854,6 @@ void LLUI::setHtmlHelp(LLHtmlHelp* html_help) LLUI::sHtmlHelp = html_help; } -// static -boost::function LLUI::getCachedColorFunctor(const std::string& color_name) -{ - return LLCachedControl(*sSettingGroups["color"], color_name, LLColor4::magenta); -} - -// static LLControlGroup& LLUI::getControlControlGroup (const std::string& controlname) { for (settings_map_t::iterator itor = sSettingGroups.begin(); diff --git a/indra/llui/llui.h b/indra/llui/llui.h index dbd295d4e8..c0873247c0 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -45,6 +45,8 @@ #include "lluiimage.h" // *TODO: break this dependency, need to add #include "lluiimage.h" to all widgets that hold an Optional in their paramblocks #include "llinitparam.h" #include "llregistry.h" +#include "lluicolor.h" +#include "lluicolortable.h" #include #include "lllazyvalue.h" @@ -202,7 +204,6 @@ public: static void screenRectToGL(const LLRect& screen, LLRect *gl); static void glRectToScreen(const LLRect& gl, LLRect *screen); static void setHtmlHelp(LLHtmlHelp* html_help); - static boost::function getCachedColorFunctor(const std::string& color_name); // Returns the control group containing the control name, or the default group static LLControlGroup& getControlControlGroup (const std::string& controlname); @@ -690,8 +691,6 @@ public: {} }; -typedef LLLazyValue LLUIColor; - namespace LLInitParam { template<> @@ -767,11 +766,4 @@ namespace LLInitParam }; } -namespace LLInitParam -{ - template<> - bool ParamCompare >::equals( - const LLLazyValue &a, const LLLazyValue &b); -} - #endif diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp index 27ba6cc8b4..0320e998d0 100644 --- a/indra/llui/lluicolortable.cpp +++ b/indra/llui/lluicolortable.cpp @@ -11,7 +11,10 @@ #include +#include "lldir.h" +#include "llui.h" #include "lluicolortable.h" +#include "lluictrlfactory.h" LLUIColorTable::ColorParams::ColorParams() : value("value"), @@ -26,17 +29,16 @@ LLUIColorTable::ColorEntryParams::ColorEntryParams() } LLUIColorTable::Params::Params() -: color_entries("color_entries") +: color_entries("color") { } -void LLUIColorTable::init(const Params& p) +void LLUIColorTable::insertFromParams(const Params& p) { // this map will contain all color references after the following loop typedef std::map string_string_map_t; string_string_map_t unresolved_refs; - mColors.clear(); for(LLInitParam::ParamIterator::const_iterator it = p.color_entries().begin(); it != p.color_entries().end(); ++it) @@ -44,7 +46,7 @@ void LLUIColorTable::init(const Params& p) ColorEntryParams color_entry = *it; if(color_entry.color.value.isChosen()) { - mColors.insert(string_color_map_t::value_type(color_entry.name, color_entry.color.value)); + setColor(color_entry.name, color_entry.color.value, mLoadedColors); } else { @@ -66,19 +68,21 @@ void LLUIColorTable::init(const Params& p) // we haven't visited any references yet visited_refs.clear(); - string_string_map_t::iterator it = unresolved_refs.begin(); + string_string_map_t::iterator current = unresolved_refs.begin(); + string_string_map_t::iterator previous; + while(true) { - if(it != unresolved_refs.end()) + if(current != unresolved_refs.end()) { // locate the current reference in the previously visited references... - string_color_ref_iter_map_t::iterator visited = visited_refs.lower_bound(it->first); + string_color_ref_iter_map_t::iterator visited = visited_refs.lower_bound(current->first); if(visited != visited_refs.end() - && !(visited_refs.key_comp()(it->first, visited->first))) + && !(visited_refs.key_comp()(current->first, visited->first))) { // ...if we find the current reference in the previously visited references // we know that there is a cycle - std::string ending_ref = it->first; + std::string ending_ref = current->first; std::string warning("The following colors form a cycle: "); // warn about the references in the chain and remove them from @@ -102,17 +106,17 @@ void LLUIColorTable::init(const Params& p) else { // ...continue along the reference chain - ref_chain.push(it->first); - visited_refs.insert(visited, string_color_ref_iter_map_t::value_type(it->first, it)); + ref_chain.push(current->first); + visited_refs.insert(visited, string_color_ref_iter_map_t::value_type(current->first, current)); } } else { // since this reference does not refer to another reference it must refer to an // actual color, lets find it... - string_color_map_t::iterator color_value = mColors.find(it->second); + string_color_map_t::iterator color_value = mLoadedColors.find(previous->second); - if(color_value != mColors.end()) + if(color_value != mLoadedColors.end()) { // ...we found the color, and we now add every reference in the reference chain // to the color map @@ -120,7 +124,7 @@ void LLUIColorTable::init(const Params& p) iter != visited_refs.end(); ++iter) { - mColors.insert(string_color_map_t::value_type(iter->first, color_value->second)); + setColor(iter->first, color_value->second, mLoadedColors); unresolved_refs.erase(iter->second); } @@ -143,13 +147,142 @@ void LLUIColorTable::init(const Params& p) } // find the next color reference in the reference chain - it = unresolved_refs.find(it->second); + previous = current; + current = unresolved_refs.find(current->second); + } + } +} + +void LLUIColorTable::clear() +{ + clearTable(mLoadedColors); + clearTable(mUserSetColors); +} + +LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& default_color) const +{ + string_color_map_t::const_iterator iter = mUserSetColors.find(name); + if(iter != mUserSetColors.end()) + { + return LLUIColor(&iter->second); + } + + iter = mLoadedColors.find(name); + return (iter != mLoadedColors.end() ? LLUIColor(&iter->second) : LLUIColor(default_color)); +} + +// update user color, loaded colors are parsed on initialization +void LLUIColorTable::setColor(const std::string& name, const LLColor4& color) +{ + setColor(name, color, mUserSetColors); +} + +bool LLUIColorTable::loadFromSettings() +{ + bool result = false; + + std::string default_filename = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "colors_def.xml"); + result |= loadFromFilename(default_filename); + + std::string current_filename = gDirUtilp->getExpandedFilename(LL_PATH_TOP_SKIN, "colors_def.xml"); + if(current_filename != default_filename) + { + result |= loadFromFilename(current_filename); + } + + std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors_def.xml"); + loadFromFilename(user_filename); + + return result; +} + +void LLUIColorTable::saveUserSettings() const +{ + Params params; + + for(string_color_map_t::const_iterator it = mUserSetColors.begin(); + it != mUserSetColors.end(); + ++it) + { + ColorEntryParams color_entry; + color_entry.name = it->first; + color_entry.color.value = it->second; + + params.color_entries.add(color_entry); + } + + LLXMLNodePtr output_node = new LLXMLNode("colors", false); + LLXUIParser::instance().writeXUI(output_node, params); + + if(!output_node->isNull()) + { + const std::string& filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors_def.xml"); + LLFILE *fp = LLFile::fopen(filename, "w"); + + if(fp != NULL) + { + LLXMLNode::writeHeaderToFile(fp); + output_node->writeToFile(fp); + + fclose(fp); } } } -const LLColor4& LLUIColorTable::getColor(const std::string& name) const +bool LLUIColorTable::colorExists(const std::string& color_name) const +{ + return ((mLoadedColors.find(color_name) != mLoadedColors.end()) + || (mUserSetColors.find(color_name) != mUserSetColors.end())); +} + +void LLUIColorTable::clearTable(string_color_map_t& table) +{ + for(string_color_map_t::iterator it = table.begin(); + it != table.end(); + ++it) + { + it->second = LLColor4::magenta; + } +} + +// this method inserts a color into the table if it does not exist +// if the color already exists it changes the color +void LLUIColorTable::setColor(const std::string& name, const LLColor4& color, string_color_map_t& table) +{ + string_color_map_t::iterator it = table.lower_bound(name); + if(it != table.end() + && !(table.key_comp()(name, it->first))) + { + it->second = color; + } + else + { + table.insert(it, string_color_map_t::value_type(name, color)); + } +} + +bool LLUIColorTable::loadFromFilename(const std::string& filename) { - string_color_map_t::const_iterator iter = mColors.find(name); - return (iter != mColors.end() ? iter->second : LLColor4::magenta); + LLXMLNodePtr root; + + if(!LLXMLNode::parseFile(filename, root, NULL)) + { + llwarns << "Unable to parse color file " << filename << llendl; + return false; + } + + Params params; + LLXUIParser::instance().readXUI(root, params); + + if(params.validateBlock()) + { + insertFromParams(params); + } + else + { + llwarns << filename << " failed to load" << llendl; + return false; + } + + return true; } diff --git a/indra/llui/lluicolortable.h b/indra/llui/lluicolortable.h index dcbb1ee5cb..f102a573b8 100644 --- a/indra/llui/lluicolortable.h +++ b/indra/llui/lluicolortable.h @@ -17,8 +17,11 @@ #include "v4color.h" +class LLUIColor; + class LLUIColorTable : public LLSingleton { +LOG_CLASS(LLUIColorTable); public: struct ColorParams : LLInitParam::Choice { @@ -44,15 +47,37 @@ public: }; // define colors by passing in a param block that can be generated via XUI file or manually - void init(const Params& p); + void insertFromParams(const Params& p); + + // reset all colors to default magenta color + void clear(); // color lookup - const LLColor4& getColor(const std::string& name) const; + LLUIColor getColor(const std::string& name, const LLColor4& default_color = LLColor4::magenta) const; + + // if the color is in the table, it's value is changed, otherwise it is added + void setColor(const std::string& name, const LLColor4& color); + + // returns true if color_name exists in the table + bool colorExists(const std::string& color_name) const; + + // loads colors from settings files + bool loadFromSettings(); + + // saves colors specified by the user to the users skin directory + void saveUserSettings() const; private: - // consider using sorted vector + bool loadFromFilename(const std::string& filename); + + // consider using sorted vector, can be much faster typedef std::map string_color_map_t; - string_color_map_t mColors; + + void clearTable(string_color_map_t& table); + void setColor(const std::string& name, const LLColor4& color, string_color_map_t& table); + + string_color_map_t mLoadedColors; + string_color_map_t mUserSetColors; }; #endif // LL_LLUICOLORTABLE_H diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 0fbcf24c49..395bed7959 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -918,12 +918,4 @@ namespace LLInitParam { return false; } - - template<> - bool ParamCompare >::equals( - const LLLazyValue &a, - const LLLazyValue &b) - { - return a.get() == b.get(); - } } diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 24e4ad18e6..24caf51159 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -398,11 +398,11 @@ BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const std::string& na { std::string colorstring; BOOL res = node->getAttributeString(name.c_str(), colorstring); - if (res && LLUI::sSettingGroups["color"]) + if (res) { - if (LLUI::sSettingGroups["color"]->controlExists(colorstring)) + if (LLUIColorTable::instance().colorExists(colorstring)) { - color.setVec(LLUI::sSettingGroups["color"]->getColor(colorstring)); + color.setVec(LLUIColorTable::instance().getColor(colorstring)); } else { @@ -1010,7 +1010,7 @@ bool LLXUIParser::writeUIColorValue(const void* val_ptr, const name_stack_t& sta LLUIColor color = *((LLUIColor*)val_ptr); //RN: don't write out the color that is represented by a function // rely on param block exporting to get the reference to the color settings - if (color.isUsingFunction()) return false; + if (color.isReference()) return false; node->setFloatValue(4, color.get().mV); return true; } diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index b9c61b1fed..f8d584bc75 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -305,7 +305,7 @@ fail: static T* getDefaultWidget(const std::string& name) { dummy_widget_creator_func_t* dummy_func = LLDummyWidgetRegistry::instance().getValue(&typeid(T)); - return dynamic_cast((*dummy_func)(name)); + return dummy_func ? dynamic_cast((*dummy_func)(name)) : NULL; } template diff --git a/indra/llui/lluiimage.cpp b/indra/llui/lluiimage.cpp index 8e0de0cb0c..84bc2d1bab 100644 --- a/indra/llui/lluiimage.cpp +++ b/indra/llui/lluiimage.cpp @@ -74,7 +74,7 @@ void LLUIImage::setScaleRegion(const LLRectf& region) //TODO: move drawing implementation inside class void LLUIImage::draw(S32 x, S32 y, const LLColor4& color) const { - gl_draw_image(x, y, mImage, color, mClipRegion); + gl_draw_scaled_image(x, y, getWidth(), getHeight(), mImage, color, mClipRegion); } void LLUIImage::draw(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) const diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h index e35026cd3d..e3b473b5f6 100644 --- a/indra/llui/lluiimage.h +++ b/indra/llui/lluiimage.h @@ -60,11 +60,11 @@ public: void drawSolid(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) const; void drawSolid(const LLRect& rect, const LLColor4& color) const { drawSolid(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color); } - void drawSolid(S32 x, S32 y, const LLColor4& color) const { drawSolid(x, y, mImage->getWidth(0), mImage->getHeight(0), color); } + void drawSolid(S32 x, S32 y, const LLColor4& color) const { drawSolid(x, y, getWidth(), getHeight(), color); } void drawBorder(S32 x, S32 y, S32 width, S32 height, const LLColor4& color, S32 border_width) const; void drawBorder(const LLRect& rect, const LLColor4& color, S32 border_width) const { drawBorder(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color, border_width); } - void drawBorder(S32 x, S32 y, const LLColor4& color, S32 border_width) const { drawBorder(x, y, mImage->getWidth(0), mImage->getHeight(0), color, border_width); } + void drawBorder(S32 x, S32 y, const LLColor4& color, S32 border_width) const { drawBorder(x, y, getWidth(), getHeight(), color, border_width); } const std::string& getName() const { return mName; } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index d225ad2767..29d0f6a168 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1325,13 +1325,6 @@ void LLView::draw() LLRect rootRect = getRootView()->getRect(); LLRect screenRect; - // draw focused control on top of everything else - LLView* focus_view = gFocusMgr.getKeyboardFocus(); - if (focus_view && focus_view->getParent() != this) - { - focus_view = NULL; - } - ++sDepth; for (child_list_reverse_iter_t child_iter = mChildList.rbegin(); child_iter != mChildList.rend();) // ++child_iter) @@ -1339,7 +1332,7 @@ void LLView::draw() child_list_reverse_iter_t child = child_iter++; LLView *viewp = *child; - if (viewp->getVisible() && viewp != focus_view && viewp->getRect().isValid()) + if (viewp->getVisible() && viewp->getRect().isValid()) { // Only draw views that are within the root view localRectToScreen(viewp->getRect(),&screenRect); @@ -1357,11 +1350,6 @@ void LLView::draw() } --sDepth; - - if (focus_view && focus_view->getVisible()) - { - drawChild(focus_view); - } } gGL.getTexUnit(0)->disable(); @@ -1398,7 +1386,7 @@ void LLView::drawDebugRect() } else { - static LLUICachedControl scroll_highlighted_color ("ScrollHighlightedColor", *(new LLColor4)); + static LLUIColor scroll_highlighted_color = LLUIColorTable::instance().getColor("ScrollHighlightedColor"); border_color = scroll_highlighted_color; } } diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index 04577bfc3b..f53c62580f 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -142,8 +142,25 @@ LLDir_Mac::LLDir_Mac() CFURLRefToLLString(executableParentURLRef, mExecutableDir, true); // mAppRODataDir - CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); - CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); + // *NOTE: When running in a dev tree, use the copy of app_settings and + // skins in indra/newview/ rather than in the application bundle. This + // mirrors Windows dev environment behavior and allows direct checkin + // of edited skins/xui files. JC + U32 indra_pos = mExecutableDir.find("/indra"); + if (indra_pos != std::string::npos) + { + // ...we're in a dev checkout + mAppRODataDir = mExecutableDir.substr(0, indra_pos) + + "/indra/newview"; + llinfos << "Running in dev checkout with mAppRODataDir " + << mAppRODataDir << llendl; + } + else + { + // ...normal installation running + CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); + CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); + } // mOSUserDir error = FSFindFolder(kUserDomain, kApplicationSupportFolderType, true, &fileRef); diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index b80080e458..beaf5c3488 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -64,7 +64,7 @@ if (NOT LINUX OR VIEWER) ${UI_LIBRARIES} # for GTK ${SDL_LIBRARY} ) -endif (VIEWER) +endif (NOT LINUX OR VIEWER) if (DARWIN) list(APPEND llwindow_SOURCE_FILES @@ -96,7 +96,7 @@ if (LINUX AND VIEWER) llkeyboardsdl.h llwindowsdl.h ) -endif (LINUX) +endif (LINUX AND VIEWER) if (WINDOWS) list(APPEND llwindow_SOURCE_FILES diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index afa7f707f1..567fda0034 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3329,17 +3329,6 @@ Value 0 - NotFullScreen - - Comment - Run SL in non fullscreen mode - Persist - 1 - Type - Boolean - Value - 1 - FullScreenAspectRatio Comment @@ -5460,17 +5449,6 @@ Value 1 - RenderCustomSettings - - Comment - Do you want to set the graphics settings yourself - Persist - 1 - Type - Boolean - Value - 0 - RenderDebugAlphaMask Comment @@ -5758,6 +5736,21 @@ Value 2 + RenderGlowLumWeights + + Comment + Weights for each color channel to be used in calculating luminance (should add up to 1.0) + Persist + 1 + Type + Vector3 + Value + + 0.299 + 0.587 + 0.114 + + RenderGlowMaxExtractAlpha Comment @@ -5813,6 +5806,21 @@ Value 0.0 + RenderGlowWarmthWeights + + Comment + Weight of each color channel used before finding the max warmth + Persist + 1 + Type + Vector3 + Value + + 1.0 + 0.5 + 0.7 + + RenderGlowWidth Comment @@ -6589,6 +6597,17 @@ Value 0 + ShowAdvancedGraphicsSettings + + Comment + Show advanced graphics settings + Persist + 1 + Type + Boolean + Value + 0 + ShowAllObjectHoverTip Comment @@ -7230,6 +7249,21 @@ Value 0 + SkyNightColorShift + + Comment + Controls moonlight color (base color applied to moon as light source) + Persist + 1 + Type + Color3 + Value + + 0.67 + 0.67 + 1.0 + + SkyOverrideSimSunPosition Comment @@ -9314,6 +9348,17 @@ Value 1 + WindowFullScreen + + Comment + Run SL in fullscreen mode + Persist + 1 + Type + Boolean + Value + 0 + WindowHeight Comment diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8a050539d7..22d54fe627 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -361,7 +361,7 @@ LLAgent::LLAgent() : mAutoPilotFinishedCallback(NULL), mAutoPilotCallbackData(NULL), - mEffectColor(0.f, 1.f, 1.f, 1.f), + mEffectColor(LLColor4(0.f, 1.f, 1.f, 1.f)), mHaveHomePosition(FALSE), mHomeRegionHandle( 0 ), @@ -413,7 +413,7 @@ void LLAgent::init() mCameraZoomFraction = 1.f; mTrackFocusObject = gSavedSettings.getBOOL("TrackFocusObject"); - mEffectColor = gSavedSkinSettings.getColor4("EffectColor"); + mEffectColor = LLUIColorTable::instance().getColor("EffectColor"); gSavedSettings.getControl("PreferredMaturity")->getValidateSignal()->connect(boost::bind(&LLAgent::validateMaturity, this, _2)); gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLAgent::handleMaturity, this, _2)); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 94f6229838..743784b2ef 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -44,6 +44,7 @@ #include "llcharacter.h" // LLAnimPauseRequest #include "llfollowcam.h" // Ventrella #include "llagentdata.h" // gAgentID, gAgentSessionID +#include "lluicolor.h" #include "llvoavatardefines.h" extern const BOOL ANIMATE; @@ -829,7 +830,7 @@ public: F32 mHUDTargetZoom; // Target zoom level for HUD objects (used when editing) F32 mHUDCurZoom; // Current animated zoom level for HUD objects private: - LLColor4 mEffectColor; + LLUIColor mEffectColor; /** Camera ** ** diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2c570de697..0253d9e8d5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -668,7 +668,6 @@ bool LLAppViewer::init() // Widget construction depends on LLUI being initialized LLUI::settings_map_t settings_map; settings_map["config"] = &gSavedSettings; - settings_map["color"] = &gSavedSkinSettings; settings_map["ignores"] = &gWarningSettings; settings_map["floater"] = &gSavedSettings; // *TODO: New settings file settings_map["account"] = &gSavedPerAccountSettings; @@ -1346,8 +1345,8 @@ bool LLAppViewer::cleanup() // save their rects on delete. gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); - //*FIX: don't overwrite user color tweaks with *all* colors - gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE); + LLUIColorTable::instance().saveUserSettings(); + // PerAccountSettingsFile should be empty if no use has been logged on. // *FIX:Mani This should get really saved in a "logoff" mode. gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); @@ -1361,7 +1360,7 @@ bool LLAppViewer::cleanup() gWarningSettings.saveToFile(warnings_settings_filename, TRUE); gSavedSettings.cleanup(); - gSavedSkinSettings.cleanup(); + LLUIColorTable::instance().clear(); gCrashSettings.cleanup(); // Save URL history file @@ -1701,43 +1700,11 @@ std::string LLAppViewer::getSettingsFilename(const std::string& location_key, void LLAppViewer::loadColorSettings() { - gSavedSkinSettings.cleanup(); - - loadSettingsFromDirectory("DefaultSkin"); - loadSettingsFromDirectory("CurrentSkin", true); - loadSettingsFromDirectory("UserSkin"); - - class ColorConverterFunctor : public LLControlGroup::ApplyFunctor + if(!LLUIColorTable::instance().loadFromSettings()) { - public: - explicit ColorConverterFunctor(LLUIColorTable::Params& result) - :mResult(result) - { - } - - void apply(const std::string& name, LLControlVariable* control) - { - if(control->isType(TYPE_COL4)) - { - LLUIColorTable::ColorParams color; - color.value = (LLColor4)control->getValue(); - - LLUIColorTable::ColorEntryParams color_entry; - color_entry.name = name; - color_entry.color = color; - - mResult.color_entries.add(color_entry); - } - } - - private: - LLUIColorTable::Params& mResult; - }; - - LLUIColorTable::Params params; - ColorConverterFunctor ccf(params); - LLControlGroup::getInstance("Skinning")->applyToAll(&ccf); - LLUIColorTable::instance().init(params); + convert_legacy_color_settings(); + LLUIColorTable::instance().loadFromSettings(); + } } bool LLAppViewer::initConfiguration() @@ -1781,9 +1748,6 @@ bool LLAppViewer::initConfiguration() gSavedSettings.setString("ClientSettingsFile", gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); - gSavedSettings.setString("SkinningSettingsFile", - gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("UserSkin", "Skinning"))); - gSavedSettings.setString("VersionChannelName", LL_CHANNEL); #ifndef LL_RELEASE_FOR_DOWNLOAD @@ -2039,9 +2003,6 @@ bool LLAppViewer::initConfiguration() if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString()) { gDirUtilp->setSkinFolder(skinfolder->getValue().asString()); - - gSavedSettings.setString("SkinningSettingsFile", - gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("UserSkin", "Skinning"))); } mYieldTime = gSavedSettings.getS32("YieldTime"); @@ -2265,10 +2226,10 @@ bool LLAppViewer::initWindow() gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"), FALSE, ignorePixelDepth); - if (!gSavedSettings.getBOOL("NotFullScreen")) + if (gSavedSettings.getBOOL("WindowFullScreen")) { + // request to go full screen... which will be delayed until login gViewerWindow->toggleFullscreen(FALSE); - // request to go full screen... which will be delayed until login } if (gSavedSettings.getBOOL("WindowMaximized")) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index d26da81179..604a77dac0 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -93,6 +93,11 @@ LLBottomTray::LLBottomTray() } LLIMMgr::getInstance()->addSessionObserver(this); + + //this is to fix a crash that occurs because LLBottomTray is a singleton + //and thus is deleted at the end of the viewers lifetime, but to be cleanly + //destroyed LLBottomTray requires some subsystems that are long gone + LLUI::getRootView()->addChild(this); } LLBottomTray::~LLBottomTray() @@ -495,4 +500,3 @@ LLWString LLBottomTray::stripChannelNumber(const LLWString &mesg, S32* channel) return mesg; } } - diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 1844934e6a..355a90209a 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -684,7 +684,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) { std::string notifyMsg = notification->getMessage(); if (!notifyMsg.empty()) - floater->addHistoryLine(notifyMsg,gSavedSkinSettings.getColor4("SystemChatColor")); + floater->addHistoryLine(notifyMsg,LLUIColorTable::instance().getColor("SystemChatColor")); } } diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 811ce39228..a97e56d60b 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -729,13 +729,11 @@ LLTalkButton::LLTalkButton(const LLUICtrl::Params& p) speak_params.label("Speak"); speak_params.label_selected("Speak"); speak_params.font(LLFontGL::getFontSansSerifSmall()); - speak_params.label_color(LLColor4::black); - speak_params.label_color_selected(LLColor4::black); speak_params.tab_stop(false); speak_params.is_toggle(true); speak_params.picture_style(true); - speak_params.image_selected(LLUI::getUIImage("flyout_btn_left_selected.tga")); - speak_params.image_unselected(LLUI::getUIImage("flyout_btn_left.tga")); + speak_params.image_selected(LLUI::getUIImage("SegmentedBtn_Left_Selected")); + speak_params.image_unselected(LLUI::getUIImage("SegmentedBtn_Left_Off")); mSpeakBtn = LLUICtrlFactory::create(speak_params); addChild(mSpeakBtn); @@ -749,8 +747,8 @@ LLTalkButton::LLTalkButton(const LLUICtrl::Params& p) show_params.tab_stop(false); show_params.is_toggle(true); show_params.picture_style(true); - show_params.image_selected(LLUI::getUIImage("talk_btn_right_selected.tga")); - show_params.image_unselected(LLUI::getUIImage("talk_btn_right.tga")); + show_params.image_selected(LLUI::getUIImage("ComboButton_Selected")); + show_params.image_unselected(LLUI::getUIImage("ComboButton_Off")); mShowBtn = LLUICtrlFactory::create(show_params); addChild(mShowBtn); diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 0e5b943dd3..f43b625d17 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -369,7 +369,7 @@ BOOL LLFavoritesBarCtrl::postBuild() { menu = LLUICtrlFactory::getDefaultWidget("inventory_menu"); } - menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor")); + menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor")); mInventoryItemsPopupMenuHandle = menu->getHandle(); return TRUE; diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 35613b7c34..b8e2840fe6 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -434,7 +434,6 @@ void LLFeatureManager::applyRecommendedSettings() setGraphicsLevel(level, false); gSavedSettings.setU32("RenderQualityPerformance", level); - gSavedSettings.setBOOL("RenderCustomSettings", FALSE); // now apply the tweaks to draw distance // these are double negatives, because feature masks only work by diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 9df0a96888..bdd34dfca8 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -106,7 +106,7 @@ BOOL LLFloaterAbout::postBuild() viewer_link_style->setVisible(true); viewer_link_style->setFontName(LLStringUtil::null); viewer_link_style->setLinkHREF(get_viewer_release_notes_url()); - viewer_link_style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor")); + viewer_link_style->setColor(LLUIColorTable::instance().getColor("HTMLLinkColor")); // Version string std::string version = LLTrans::getString("SECOND_LIFE_VIEWER") @@ -114,7 +114,7 @@ BOOL LLFloaterAbout::postBuild() LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD, __DATE__, __TIME__, gSavedSettings.getString("VersionChannelName").c_str()); - support_widget->appendColoredText(version, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor")); + support_widget->appendColoredText(version, FALSE, FALSE, LLUIColorTable::instance().getColor("TextFgReadOnlyColor")); support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style); std::string support; @@ -136,7 +136,7 @@ BOOL LLFloaterAbout::postBuild() server_link_style->setVisible(true); server_link_style->setFontName(LLStringUtil::null); server_link_style->setLinkHREF(region->getCapability("ServerReleaseNotes")); - server_link_style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor")); + server_link_style->setColor(LLUIColorTable::instance().getColor("HTMLLinkColor")); const LLVector3d &pos = gAgent.getPositionGlobal(); LLUIString pos_text = getString("you_are_at"); @@ -158,7 +158,7 @@ BOOL LLFloaterAbout::postBuild() support.append(gLastVersionChannel); support.append("\n"); - support_widget->appendColoredText(support, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor")); + support_widget->appendColoredText(support, FALSE, FALSE, LLUIColorTable::instance().getColor("TextFgReadOnlyColor")); support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style); support = "\n\n"; @@ -246,7 +246,7 @@ BOOL LLFloaterAbout::postBuild() support.append(getString ("PacketsLost", args) + "\n"); } - support_widget->appendColoredText(support, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor")); + support_widget->appendColoredText(support, FALSE, FALSE, LLUIColorTable::instance().getColor("TextFgReadOnlyColor")); // Fix views support_widget->setCursorPos(0); diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 61ef3abda6..5250c798f9 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -368,11 +368,11 @@ void LLFloaterChat::addChat(const LLChat& chat, F32 size = CHAT_MSG_SIZE; if (chat.mSourceType == CHAT_SOURCE_SYSTEM) { - text_color = gSavedSkinSettings.getColor("SystemChatColor"); + text_color = LLUIColorTable::instance().getColor("SystemChatColor"); } else if(from_instant_message) { - text_color = gSavedSkinSettings.getColor("IMChatColor"); + text_color = LLUIColorTable::instance().getColor("IMChatColor"); size = INSTANT_MSG_SIZE; } // We display anything if it's not an IM. If it's an IM, check pref... @@ -453,37 +453,37 @@ LLColor4 get_text_color(const LLChat& chat) switch(chat.mSourceType) { case CHAT_SOURCE_SYSTEM: - text_color = gSavedSkinSettings.getColor4("SystemChatColor"); + text_color = LLUIColorTable::instance().getColor("SystemChatColor"); break; case CHAT_SOURCE_AGENT: if (chat.mFromID.isNull()) { - text_color = gSavedSkinSettings.getColor4("SystemChatColor"); + text_color = LLUIColorTable::instance().getColor("SystemChatColor"); } else { if(gAgent.getID() == chat.mFromID) { - text_color = gSavedSkinSettings.getColor4("UserChatColor"); + text_color = LLUIColorTable::instance().getColor("UserChatColor"); } else { - text_color = gSavedSkinSettings.getColor4("AgentChatColor"); + text_color = LLUIColorTable::instance().getColor("AgentChatColor"); } } break; case CHAT_SOURCE_OBJECT: if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { - text_color = gSavedSkinSettings.getColor4("ScriptErrorColor"); + text_color = LLUIColorTable::instance().getColor("ScriptErrorColor"); } else if ( chat.mChatType == CHAT_TYPE_OWNER ) { - text_color = gSavedSkinSettings.getColor4("llOwnerSayChatColor"); + text_color = LLUIColorTable::instance().getColor("llOwnerSayChatColor"); } else { - text_color = gSavedSkinSettings.getColor4("ObjectChatColor"); + text_color = LLUIColorTable::instance().getColor("ObjectChatColor"); } break; default: diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 4964f04556..edc96715cd 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -173,7 +173,7 @@ void LLFloaterColorPicker::createUI () // argh! const std::string s ( codec.str () ); - mPalette.push_back ( new LLColor4 ( gSavedSkinSettings.getColor4 ( s ) ) ); + mPalette.push_back ( new LLColor4 ( LLUIColorTable::instance().getColor ( s ) ) ); } } @@ -1017,7 +1017,7 @@ BOOL LLFloaterColorPicker::handleMouseUp ( S32 x, S32 y, MASK mask ) std::ostringstream codec; codec << "ColorPaletteEntry" << std::setfill ( '0' ) << std::setw ( 2 ) << curEntry + 1; const std::string s ( codec.str () ); - gSavedSkinSettings.setColor4( s, *mPalette [ curEntry ] ); + LLUIColorTable::instance().setColor(s, *mPalette [ curEntry ] ); } } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 15d57ebbcc..6834af4fd5 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -45,6 +45,7 @@ #include "llagent.h" #include "llavatarconstants.h" #include "llcheckboxctrl.h" +#include "llcolorswatch.h" #include "llcombobox.h" #include "llcommandhandler.h" #include "lldirpicker.h" @@ -332,7 +333,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this)); mCommitCallbackRegistrar.add("Pref.Logging", boost::bind(&LLFloaterPreference::onCommitLogging, this)); mCommitCallbackRegistrar.add("Pref.OpenHelp", boost::bind(&LLFloaterPreference::onOpenHelp, this)); - mCommitCallbackRegistrar.add("Pref.ChangeCustom", boost::bind(&LLFloaterPreference::onChangeCustom, this)); mCommitCallbackRegistrar.add("Pref.UpdateMeterText", boost::bind(&LLFloaterPreference::updateMeterText, this, _1)); mCommitCallbackRegistrar.add("Pref.HardwareSettings", boost::bind(&LLFloaterPreference::onOpenHardwareSettings, this)); mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this)); @@ -342,8 +342,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this)); mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this)); mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2)); - - gSavedSkinSettings.getControl("HTMLLinkColor")->getCommitSignal()->connect(boost::bind(&handleHTMLLinkColorChanged, _2)); } @@ -459,7 +457,7 @@ void LLFloaterPreference::apply() applyResolution(); // Only set window size if we're not in fullscreen mode - if(gSavedSettings.getBOOL("NotFullScreen")) + if(!gSavedSettings.getBOOL("WindowFullScreen")) { applyWindowSize(); } @@ -544,7 +542,7 @@ void LLFloaterPreference::onBtnOK() apply(); closeFloater(false); gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); - gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile") , TRUE ); + LLUIColorTable::instance().saveUserSettings(); std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); // save all settings, even if equals defaults gCrashSettings.saveToFile(crash_settings_filename, FALSE); @@ -605,19 +603,6 @@ void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_ } -void LLFloaterPreference::onChangeCustom() -{ - // if custom is turned off, reset everything to defaults - if (this && getChild("CustomSettings")->getValue()) - { - U32 set = (U32)getChild("QualityPerformanceSelection")->getValueF32(); - LLFeatureManager::getInstance()->setGraphicsLevel(set, true); - updateMeterText(getChild("DrawDistance")); - } - - refreshEnabledGraphics(); -} - void LLFloaterPreference::refreshEnabledGraphics() { LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); @@ -781,12 +766,6 @@ void LLFloaterPreference::buildLists(void* data) void LLFloaterPreference::refreshEnabledState() { - // disable graphics settings and exit if it's not set to custom - if(!gSavedSettings.getBOOL("RenderCustomSettings")) - { - return; - } - LLCheckBoxCtrl* ctrl_reflections = getChild("Reflections"); LLRadioGroup* radio_reflection_detail = getChild("ReflectionDetailRadio"); @@ -1249,7 +1228,7 @@ void LLFloaterPreference::applyResolution() gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth); gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight); - gViewerWindow->requestResolutionUpdate(!gSavedSettings.getBOOL("NotFullScreen")); + gViewerWindow->requestResolutionUpdate(gSavedSettings.getBOOL("WindowFullScreen")); send_agent_update(TRUE); @@ -1298,6 +1277,12 @@ LLPanelPreference::LLPanelPreference() // mCommitCallbackRegistrar.add("setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2)); } + +static void applyUIColor(const std::string& color_name, LLUICtrl* ctrl, const LLSD& param) +{ + LLUIColorTable::instance().setColor(color_name, LLColor4(param)); +} + //virtual BOOL LLPanelPreference::postBuild() { @@ -1460,6 +1445,55 @@ BOOL LLPanelPreference::postBuild() refresh(); } + + if(hasChild("user") && hasChild("agent") && hasChild("im") + && hasChild("system") && hasChild("script_error") && hasChild("objects") + && hasChild("owner") && hasChild("background") && hasChild("links")) + { + LLColorSwatchCtrl* color_swatch = getChild("user"); + color_swatch->setCommitCallback(boost::bind(&applyUIColor, "UserChatColor", _1, _2)); + color_swatch->setOriginal(LLUIColorTable::instance().getColor("UserChatColor")); + + color_swatch = getChild("agent"); + color_swatch->setCommitCallback(boost::bind(&applyUIColor, "AgentChatColor", _1, _2)); + color_swatch->setOriginal(LLUIColorTable::instance().getColor("AgentChatColor")); + + color_swatch = getChild("im"); + color_swatch->setCommitCallback(boost::bind(&applyUIColor, "IMChatColor", _1, _2)); + color_swatch->setOriginal(LLUIColorTable::instance().getColor("IMChatColor")); + + color_swatch = getChild("system"); + color_swatch->setCommitCallback(boost::bind(&applyUIColor, "SystemChatColor", _1, _2)); + color_swatch->setOriginal(LLUIColorTable::instance().getColor("SystemChatColor")); + + color_swatch = getChild("script_error"); + color_swatch->setCommitCallback(boost::bind(&applyUIColor, "ScriptErrorColor", _1, _2)); + color_swatch->setOriginal(LLUIColorTable::instance().getColor("ScriptErrorColor")); + + color_swatch = getChild("objects"); + color_swatch->setCommitCallback(boost::bind(&applyUIColor, "ObjectChatColor", _1, _2)); + color_swatch->setOriginal(LLUIColorTable::instance().getColor("ObjectChatColor")); + + color_swatch = getChild("owner"); + color_swatch->setCommitCallback(boost::bind(&applyUIColor, "llOwnerSayChatColor", _1, _2)); + color_swatch->setOriginal(LLUIColorTable::instance().getColor("llOwnerSayChatColor")); + + color_swatch = getChild("background"); + color_swatch->setCommitCallback(boost::bind(&applyUIColor, "BackgroundChatColor", _1, _2)); + color_swatch->setOriginal(LLUIColorTable::instance().getColor("BackgroundChatColor")); + + color_swatch = getChild("links"); + color_swatch->setCommitCallback(boost::bind(&applyUIColor, "HTMLLinkColor", _1, _2)); + color_swatch->setOriginal(LLUIColorTable::instance().getColor("HTMLLinkColor")); + } + + if(hasChild("effect_color_swatch")) + { + LLColorSwatchCtrl* color_swatch = getChild("effect_color_swatch"); + color_swatch->setCommitCallback(boost::bind(&applyUIColor, "EffectColor", _1, _2)); + color_swatch->setOriginal(LLUIColorTable::instance().getColor("EffectColor")); + } + apply(); return true; } @@ -1475,16 +1509,25 @@ void LLPanelPreference::apply() // Process view on top of the stack LLView* curview = view_stack.front(); view_stack.pop_front(); - LLUICtrl* ctrl = dynamic_cast(curview); - if (ctrl) + + LLColorSwatchCtrl* color_swatch = dynamic_cast(curview); + if (color_swatch) + { + mSavedColors[color_swatch->getName()] = color_swatch->get(); + } + else { - LLControlVariable* control = ctrl->getControlVariable(); - if (control) + LLUICtrl* ctrl = dynamic_cast(curview); + if (ctrl) { - mSavedValues[control] = control->getValue(); + LLControlVariable* control = ctrl->getControlVariable(); + if (control) + { + mSavedValues[control] = control->getValue(); + } } } - + // Push children onto the end of the work stack for (child_list_t::const_iterator iter = curview->getChildList()->begin(); iter != curview->getChildList()->end(); ++iter) @@ -1504,6 +1547,17 @@ void LLPanelPreference::cancel() LLSD ctrl_value = iter->second; control->set(ctrl_value); } + + for (string_color_map_t::iterator iter = mSavedColors.begin(); + iter != mSavedColors.end(); ++iter) + { + LLColorSwatchCtrl* color_swatch = findChild(iter->first); + if(color_swatch) + { + color_swatch->set(iter->second); + color_swatch->onCommit(); + } + } } void LLPanelPreference::setControlFalse(const LLSD& user_data) diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index afff610c69..cf2ccdce6d 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -163,6 +163,9 @@ public: private: typedef std::map control_values_map_t; control_values_map_t mSavedValues; + + typedef std::map string_color_map_t; + string_color_map_t mSavedColors; }; #endif // LL_LLPREFERENCEFLOATER_H diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 8b6102c67f..53b40f8b7a 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -80,10 +80,6 @@ BOOL LLFloaterSettingsDebug::postBuild() { gSavedPerAccountSettings.applyToAll(&func); } - if (key == "all" || key == "skin") - { - gSavedSkinSettings.applyToAll(&func); - } settings_combo->sortByName(); settings_combo->updateSelection(); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index cb4f2a6711..fef0474062 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1297,7 +1297,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) floater->childSetColor("file_size_label", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_bytes - && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLColor4::red : LLUI::sSettingGroups["color"]->getColor( "LabelTextColor" )); + && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" )); switch(shot_type) { diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp index 12d12f37f2..16f4ecef07 100644 --- a/indra/newview/llfloatervoicedevicesettings.cpp +++ b/indra/newview/llfloatervoicedevicesettings.cpp @@ -113,7 +113,7 @@ void LLPanelVoiceDeviceSettings::draw() { if (power_bar_idx < discrete_power) { - LLColor4 color = (power_bar_idx >= 3) ? gSavedSkinSettings.getColor4("OverdrivenColor") : gSavedSkinSettings.getColor4("SpeakingColor"); + LLColor4 color = (power_bar_idx >= 3) ? LLUIColorTable::instance().getColor("OverdrivenColor") : LLUIColorTable::instance().getColor("SpeakingColor"); gl_rect_2d(bar_view->getRect(), color, TRUE); } gl_rect_2d(bar_view->getRect(), LLColor4::grey, FALSE); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 2fe817625a..9711e02f69 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -387,8 +387,8 @@ void LLFloaterWorldMap::reshape( S32 width, S32 height, BOOL called_from_parent // virtual void LLFloaterWorldMap::draw() { - static LLCachedControl map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white); - static LLCachedControl map_track_disabled_color(gSavedSkinSettings, "MapTrackDisabledColor", LLColor4::white); + static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white); + static LLUIColor map_track_disabled_color = LLUIColorTable::instance().getColor("MapTrackDisabledColor", LLColor4::white); // Hide/Show Mature Events controls childSetVisible("events_mature_icon", gAgent.canAccessMature()); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index fd8c22b8e5..ebda8b25fd 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -793,13 +793,13 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, void LLFolderViewItem::draw() { - static LLCachedControl sFgColor(gSavedSkinSettings, "MenuItemEnabledColor", DEFAULT_WHITE); - static LLCachedControl sHighlightBgColor(gSavedSkinSettings, "MenuItemHighlightBgColor", DEFAULT_WHITE); - static LLCachedControl sHighlightFgColor(gSavedSkinSettings, "MenuItemHighlightFgColor", DEFAULT_WHITE); - static LLCachedControl sFilterBGColor(gSavedSkinSettings, "FilterBackgroundColor", DEFAULT_WHITE); - static LLCachedControl sFilterTextColor(gSavedSkinSettings, "FilterTextColor", DEFAULT_WHITE); - static LLCachedControl sSuffixColor(gSavedSkinSettings, "InventoryItemSuffixColor", DEFAULT_WHITE); - static LLCachedControl sSearchStatusColor(gSavedSkinSettings, "InventorySearchStatusColor", DEFAULT_WHITE); + static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); + static LLUIColor sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE); + static LLUIColor sFilterBGColor = LLUIColorTable::instance().getColor("FilterBackgroundColor", DEFAULT_WHITE); + static LLUIColor sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE); + static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemSuffixColor", DEFAULT_WHITE); + static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); bool possibly_has_children = false; bool up_to_date = mListener && mListener->isUpToDate(); @@ -2562,7 +2562,7 @@ LLFolderView::LLFolderView(const Params& p) { menu = LLUICtrlFactory::getDefaultWidget("inventory_menu"); } - menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor")); + menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor")); mPopupMenuHandle = menu->getHandle(); } @@ -3148,7 +3148,7 @@ void LLFolderView::commitRename( const LLSD& data ) void LLFolderView::draw() { - static LLCachedControl sSearchStatusColor(gSavedSkinSettings, "InventorySearchStatusColor", DEFAULT_WHITE); + static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); if (mDebugFilters) { std::string current_filter_string = llformat("Current Filter: %d, Least Filter: %d, Auto-accept Filter: %d", diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp index e1e9d9c51e..8588de0fa0 100644 --- a/indra/newview/llhudmanager.cpp +++ b/indra/newview/llhudmanager.cpp @@ -40,6 +40,7 @@ #include "llagent.h" #include "llhudeffect.h" #include "pipeline.h" +#include "llui.h" #include "llviewercontrol.h" #include "llviewerobjectlist.h" @@ -52,9 +53,9 @@ LLColor4 LLHUDManager::sChildColor; LLHUDManager::LLHUDManager() { - LLHUDManager::sParentColor = gSavedSkinSettings.getColor("FocusColor"); + LLHUDManager::sParentColor = LLUIColorTable::instance().getColor("FocusColor"); // rdw commented out since it's not used. Also removed from colors_base.xml - //LLHUDManager::sChildColor =gSavedSkinSettings.getColor("FocusSecondaryColor"); + //LLHUDManager::sChildColor =LLUIColorTable::instance().getColor("FocusSecondaryColor"); } LLHUDManager::~LLHUDManager() diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index efeac9c197..abb3acd974 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -292,7 +292,7 @@ void LLHUDText::renderText(BOOL for_select) LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); // *TODO: make this a per-text setting - LLColor4 bg_color = gSavedSkinSettings.getColor4("BackgroundChatColor"); + LLColor4 bg_color = LLUIColorTable::instance().getColor("BackgroundChatColor"); bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); const S32 border_height = 16; diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 6acd174fc3..fbf990e1af 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1222,7 +1222,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label, addHistoryLine( session_start, - gSavedSkinSettings.getColor4("SystemChatColor"), + LLUIColorTable::instance().getColor("SystemChatColor"), false); } } @@ -2004,7 +2004,7 @@ void LLFloaterIMPanel::sendMsg() BOOL other_was_typing = mOtherTyping; - addHistoryLine(history_echo, gSavedSkinSettings.getColor("IMChatColor"), true, gAgent.getID()); + addHistoryLine(history_echo, LLUIColorTable::instance().getColor("IMChatColor"), true, gAgent.getID()); if (other_was_typing) { @@ -2175,7 +2175,7 @@ void LLFloaterIMPanel::addTypingIndicator(const std::string &name) mTypingLineStartIndex = mHistoryEditor->getWText().length(); LLUIString typing_start = sTypingStartString; typing_start.setArg("[NAME]", name); - addHistoryLine(typing_start, gSavedSkinSettings.getColor4("SystemChatColor"), false); + addHistoryLine(typing_start, LLUIColorTable::instance().getColor("SystemChatColor"), false); mOtherTypingName = name; mOtherTyping = TRUE; } @@ -2232,7 +2232,7 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string } //self->addHistoryLine(line, LLColor4::grey, FALSE); - self->mHistoryEditor->appendColoredText(message, false, true, gSavedSkinSettings.getColor4("ChatHistoryTextColor")); + self->mHistoryEditor->appendColoredText(message, false, true, LLUIColorTable::instance().getColor("ChatHistoryTextColor")); } void LLFloaterIMPanel::showSessionStartError( diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d6569663a2..bc98b609ec 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -745,7 +745,7 @@ void LLIMMgr::addMessage( //<< "*** region_id: " << region_id << std::endl //<< "*** position: " << position << std::endl; - floater->addHistoryLine(bonus_info.str(), gSavedSkinSettings.getColor4("SystemChatColor")); + floater->addHistoryLine(bonus_info.str(), LLUIColorTable::instance().getColor("SystemChatColor")); } make_ui_sound("UISndNewIncomingIMSession"); @@ -754,8 +754,8 @@ void LLIMMgr::addMessage( // now add message to floater bool is_from_system = target_id.isNull() || (from == SYSTEM_FROM); const LLColor4& color = ( is_from_system ? - gSavedSkinSettings.getColor4("SystemChatColor") : - gSavedSkinSettings.getColor("IMChatColor")); + LLUIColorTable::instance().getColor("SystemChatColor") : + LLUIColorTable::instance().getColor("IMChatColor")); if ( !link_name ) { floater->addHistoryLine(msg,color); // No name to prepend, so just add the message normally @@ -1332,7 +1332,7 @@ void LLIMMgr::noteOfflineUsers( S32 count = ids.count(); if(count == 0) { - floater->addHistoryLine(sOnlyUserMessage, gSavedSkinSettings.getColor4("SystemChatColor")); + floater->addHistoryLine(sOnlyUserMessage, LLUIColorTable::instance().getColor("SystemChatColor")); } else { @@ -1348,7 +1348,7 @@ void LLIMMgr::noteOfflineUsers( LLUIString offline = sOfflineMessage; offline.setArg("[FIRST]", first); offline.setArg("[LAST]", last); - floater->addHistoryLine(offline, gSavedSkinSettings.getColor4("SystemChatColor")); + floater->addHistoryLine(offline, LLUIColorTable::instance().getColor("SystemChatColor")); } } } diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index fac0de0f33..2cee9de1eb 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -174,8 +174,7 @@ LLLocationInputCtrl::Params::Params() add_landmark_image_disabled("add_landmark_image_disabled"), add_landmark_button("add_landmark_button"), add_landmark_hpad("add_landmark_hpad", 0), - info_button("info_button"), - background("background") + info_button("info_button") { } @@ -185,11 +184,6 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mInfoBtn(NULL), mAddLandmarkBtn(NULL) { - // Background image. - LLButton::Params bg_params = p.background; - mBackground = LLUICtrlFactory::create(bg_params); - addChildInBack(mBackground); - // "Place information" button. LLButton::Params info_params = p.info_button; mInfoBtn = LLUICtrlFactory::create(info_params); @@ -213,8 +207,6 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) enableAddLandmarkButton(true); addChild(mAddLandmarkBtn); - setFocusReceivedCallback(boost::bind(&LLLocationInputCtrl::onFocusReceived, this)); - setFocusLostCallback(boost::bind(&LLLocationInputCtrl::onFocusLost, this)); setPrearrangeCallback(boost::bind(&LLLocationInputCtrl::onLocationPrearrange, this, _2)); updateWidgetlayout(); @@ -354,6 +346,7 @@ void LLLocationInputCtrl::onFocusReceived() void LLLocationInputCtrl::onFocusLost() { + LLUICtrl::onFocusLost(); refreshLocation(); } @@ -462,7 +455,6 @@ void LLLocationInputCtrl::enableAddLandmarkButton(bool val) void LLLocationInputCtrl::updateAddLandmarkButton() { bool cur_parcel_landmarked = false; - // Determine whether there are landmarks pointing to the current parcel. LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; @@ -481,21 +473,14 @@ void LLLocationInputCtrl::updateWidgetlayout() { const LLRect& rect = getLocalRect(); const LLRect& hist_btn_rect = mButton->getRect(); - LLRect info_btn_rect = mButton->getRect(); + LLRect info_btn_rect = mInfoBtn->getRect(); // info button info_btn_rect.setOriginAndSize( - 0, (rect.getHeight() - info_btn_rect.getHeight()) / 2, + 2, (rect.getHeight() - info_btn_rect.getHeight()) / 2, info_btn_rect.getWidth(), info_btn_rect.getHeight()); mInfoBtn->setRect(info_btn_rect); - // background - mBackground->setRect(LLRect(info_btn_rect.getWidth(), rect.mTop, - rect.mRight - hist_btn_rect.getWidth(), rect.mBottom)); - - // history button - mButton->setRightHPad(0); - // "Add Landmark" button { LLRect al_btn_rect = mAddLandmarkBtn->getRect(); @@ -504,14 +489,4 @@ void LLLocationInputCtrl::updateWidgetlayout() (rect.getHeight() - al_btn_rect.getHeight()) / 2); mAddLandmarkBtn->setRect(al_btn_rect); } - - // text entry - if (mTextEntry) - { - LLRect text_entry_rect(rect); - text_entry_rect.mLeft = info_btn_rect.getWidth(); - text_entry_rect.mRight = mAddLandmarkBtn->getRect().mLeft; - text_entry_rect.stretch(0, -1); // make space for border - mTextEntry->setRect(text_entry_rect); - } } diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index 1732853263..0a863f6dd8 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -61,8 +61,7 @@ public: add_landmark_image_disabled; Optional add_landmark_hpad; Optional add_landmark_button, - info_button, - background; + info_button; Params(); }; @@ -70,6 +69,8 @@ public: /*virtual*/ void setEnabled(BOOL enabled); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect); /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ void onFocusReceived(); + /*virtual*/ void onFocusLost(); //======================================================================== // LLUICtrl interface @@ -98,8 +99,6 @@ private: void updateAddLandmarkButton(); void updateWidgetlayout(); - void onFocusReceived(); - void onFocusLost(); void onInfoButtonClicked(); void onLocationHistoryLoaded(); void onLocationPrearrange(const LLSD& data); @@ -107,7 +106,6 @@ private: void onAddLandmarkButtonClicked(); void onAgentParcelChange(); - LLButton* mBackground; LLButton* mAddLandmarkBtn; LLButton* mInfoBtn; S32 mAddLandmarkHPad; diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index 7039776585..062e781d49 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -581,9 +581,9 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string LLColor4 LLManip::setupSnapGuideRenderPass(S32 pass) { - static LLColor4 grid_color_fg = gSavedSkinSettings.getColor("GridlineColor"); - static LLColor4 grid_color_bg = gSavedSkinSettings.getColor("GridlineBGColor"); - static LLColor4 grid_color_shadow = gSavedSkinSettings.getColor("GridlineShadowColor"); + static LLColor4 grid_color_fg = LLUIColorTable::instance().getColor("GridlineColor"); + static LLColor4 grid_color_bg = LLUIColorTable::instance().getColor("GridlineBGColor"); + static LLColor4 grid_color_shadow = LLUIColorTable::instance().getColor("GridlineShadowColor"); LLColor4 line_color; F32 line_alpha = gSavedSettings.getF32("GridOpacity"); diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index f228ea624b..d1d112c4bf 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -1107,8 +1107,8 @@ BOOL LLManipRotate::updateVisiblity() mCenterToProfilePlaneMag = mRadiusMeters * mRadiusMeters / mCenterToCamMag; mCenterToProfilePlane = -mCenterToProfilePlaneMag * mCenterToCamNorm; - mCenterScreen.set((S32)((0.5f - mRotationCenter.mdV[VY]) / gAgent.mHUDCurZoom * gViewerWindow->getWindowWidth()), - (S32)((mRotationCenter.mdV[VZ] + 0.5f) / gAgent.mHUDCurZoom * gViewerWindow->getWindowHeight())); + mCenterScreen.set((S32)((0.5f - mRotationCenter.mdV[VY]) / gAgent.mHUDCurZoom * gViewerWindow->getWorldViewWidth()), + (S32)((mRotationCenter.mdV[VZ] + 0.5f) / gAgent.mHUDCurZoom * gViewerWindow->getWorldViewHeight())); visible = TRUE; } else @@ -1624,8 +1624,8 @@ void LLManipRotate::mouseToRay( S32 x, S32 y, LLVector3* ray_pt, LLVector3* ray_ { if (LLSelectMgr::getInstance()->getSelection()->getSelectType() == SELECT_TYPE_HUD) { - F32 mouse_x = (((F32)x / gViewerWindow->getWindowWidth()) - 0.5f) / gAgent.mHUDCurZoom; - F32 mouse_y = ((((F32)y) / gViewerWindow->getWindowHeight()) - 0.5f) / gAgent.mHUDCurZoom; + F32 mouse_x = (((F32)x / gViewerWindow->getWorldViewWidth()) - 0.5f) / gAgent.mHUDCurZoom; + F32 mouse_y = ((((F32)y) / gViewerWindow->getWorldViewHeight()) - 0.5f) / gAgent.mHUDCurZoom; *ray_pt = LLVector3(-1.f, -mouse_x, mouse_y); *ray_dir = LLVector3(1.f, 0.f, 0.f); @@ -1699,7 +1699,7 @@ void LLManipRotate::highlightManipulators( S32 x, S32 y ) F32 dist_y = mouse_dir_y.normVec(); F32 dist_z = mouse_dir_z.normVec(); - F32 distance_threshold = (MAX_MANIP_SELECT_DISTANCE * mRadiusMeters) / gViewerWindow->getWindowHeight(); + F32 distance_threshold = (MAX_MANIP_SELECT_DISTANCE * mRadiusMeters) / gViewerWindow->getWorldViewHeight(); if (llabs(dist_x - mRadiusMeters) * llmax(0.05f, proj_rot_x_axis) < distance_threshold) { diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 5261c130ea..72596e850a 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -493,8 +493,8 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) mProjectedManipulators.insert(projManipulator); } - F32 half_width = (F32)gViewerWindow->getWindowWidth() / 2.f; - F32 half_height = (F32)gViewerWindow->getWindowHeight() / 2.f; + F32 half_width = (F32)gViewerWindow->getWorldViewWidth() / 2.f; + F32 half_height = (F32)gViewerWindow->getWorldViewHeight() / 2.f; LLVector2 manip2d; LLVector2 mousePos((F32)x - half_width, (F32)y - half_height); LLVector2 delta; @@ -1368,7 +1368,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) else { F32 object_distance = dist_vec(mScaleCenter, LLViewerCamera::getInstance()->getOrigin()); - mSnapRegimeOffset = (SNAP_GUIDE_SCREEN_OFFSET * gViewerWindow->getWindowWidth() * object_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio(); + mSnapRegimeOffset = (SNAP_GUIDE_SCREEN_OFFSET * gViewerWindow->getWorldViewWidth() * object_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio(); } LLVector3 cam_at_axis; F32 snap_guide_length; @@ -1381,7 +1381,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) { cam_at_axis = LLViewerCamera::getInstance()->getAtAxis(); F32 manipulator_distance = dist_vec(box_corner_agent, LLViewerCamera::getInstance()->getOrigin()); - snap_guide_length = (SNAP_GUIDE_SCREEN_LENGTH * gViewerWindow->getWindowWidth() * manipulator_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio(); + snap_guide_length = (SNAP_GUIDE_SCREEN_LENGTH * gViewerWindow->getWorldViewWidth() * manipulator_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio(); } mSnapGuideLength = snap_guide_length / llmax(0.1f, (llmin(mSnapGuideDir1 * cam_at_axis, mSnapGuideDir2 * cam_at_axis))); diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index b8c2a3d64b..3a1ffd6546 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -414,7 +414,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) // Handle auto-rotation if necessary. const F32 ROTATE_ANGLE_PER_SECOND = 30.f * DEG_TO_RAD; - const S32 ROTATE_H_MARGIN = gViewerWindow->getWindowWidth() / 20; + const S32 ROTATE_H_MARGIN = gViewerWindow->getWorldViewWidth() / 20; const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped; BOOL rotated = FALSE; @@ -426,7 +426,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) gAgent.cameraOrbitAround(rotate_angle); rotated = TRUE; } - else if (x > gViewerWindow->getWindowWidth() - ROTATE_H_MARGIN) + else if (x > gViewerWindow->getWorldViewWidth() - ROTATE_H_MARGIN) { gAgent.cameraOrbitAround(-rotate_angle); rotated = TRUE; @@ -960,8 +960,8 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) LLVector2 manip_start_2d; LLVector2 manip_end_2d; LLVector2 manip_dir; - F32 half_width = gViewerWindow->getWindowWidth() / 2.f; - F32 half_height = gViewerWindow->getWindowHeight() / 2.f; + F32 half_width = gViewerWindow->getWorldViewWidth() / 2.f; + F32 half_height = gViewerWindow->getWorldViewHeight() / 2.f; LLVector2 mousePos((F32)x - half_width, (F32)y - half_height); LLVector2 mouse_delta; @@ -1225,7 +1225,7 @@ void LLManipTranslate::renderSnapGuides() { LLVector3 cam_to_selection = getPivotPoint() - LLViewerCamera::getInstance()->getOrigin(); F32 current_range = cam_to_selection.normVec(); - guide_size_meters = SNAP_GUIDE_SCREEN_SIZE * gViewerWindow->getWindowHeight() * current_range / LLViewerCamera::getInstance()->getPixelMeterRatio(); + guide_size_meters = SNAP_GUIDE_SCREEN_SIZE * gViewerWindow->getWorldViewHeight() * current_range / LLViewerCamera::getInstance()->getPixelMeterRatio(); F32 fraction_of_fov = mAxisArrowLength / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels(); F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView(); // radians @@ -1522,7 +1522,7 @@ void LLManipTranslate::renderSnapGuides() float a = line_alpha; - LLColor4 col = gSavedSkinSettings.getColor("SilhouetteChildColor"); + LLColor4 col = LLUIColorTable::instance().getColor("SilhouetteChildColor"); { //draw grid behind objects LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); @@ -1800,7 +1800,7 @@ void LLManipTranslate::renderTranslationHandles() // Drag handles if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - mArrowLengthMeters = mAxisArrowLength / gViewerWindow->getWindowHeight(); + mArrowLengthMeters = mAxisArrowLength / gViewerWindow->getWorldViewHeight(); mArrowLengthMeters /= gAgent.mHUDCurZoom; } else diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp index ab5db93027..3c7716e9c2 100644 --- a/indra/newview/llmemoryview.cpp +++ b/indra/newview/llmemoryview.cpp @@ -119,7 +119,7 @@ void LLMemoryView::draw() const S32 UPDATE_INTERVAL = 60; const S32 MARGIN_AMT = 10; static S32 curUpdate = UPDATE_INTERVAL; - static LLCachedControl s_console_color(gSavedSkinSettings, "ConsoleBackground", LLColor4U::black); + static LLUIColor s_console_color = LLUIColorTable::instance().getColor("ConsoleBackground", LLColor4U::black); // setup update interval if (curUpdate >= UPDATE_INTERVAL) diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index b40af37f7e..1f623af434 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -112,12 +112,12 @@ void LLNetMap::translatePan( F32 delta_x, F32 delta_y ) void LLNetMap::draw() { static LLFrameTimer map_timer; - static LLCachedControl map_avatar_color(gSavedSkinSettings, "MapAvatarColor", LLColor4::white); - static LLCachedControl map_avatar_friend_color(gSavedSkinSettings, "MapAvatarFriendColor", LLColor4::white); - static LLCachedControl map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white); - static LLCachedControl map_track_disabled_color(gSavedSkinSettings, "MapTrackDisabledColor", LLColor4::white); - static LLCachedControl map_frustum_color(gSavedSkinSettings, "MapFrustumColor", LLColor4::white); - static LLCachedControl map_frustum_rotating_color(gSavedSkinSettings, "MapFrustumRotatingColor", LLColor4::white); + static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white); + static LLUIColor map_avatar_friend_color = LLUIColorTable::instance().getColor("MapAvatarFriendColor", LLColor4::white); + static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white); + static LLUIColor map_track_disabled_color = LLUIColorTable::instance().getColor("MapTrackDisabledColor", LLColor4::white); + static LLUIColor map_frustum_color = LLUIColorTable::instance().getColor("MapFrustumColor", LLColor4::white); + static LLUIColor map_frustum_rotating_color = LLUIColorTable::instance().getColor("MapFrustumRotatingColor", LLColor4::white); if (mObjectImagep.isNull()) { diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index ff26707a56..196a86b29c 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -55,10 +55,10 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p) mPower(0), mIsMuted(true) { - static LLUICachedControl output_monitor_muted_color("OutputMonitorMutedColor", LLColor4::orange); - static LLUICachedControl output_monitor_overdriven_color("OutputMonitorOverdrivenColor", LLColor4::red); - static LLUICachedControl output_monitor_normal_color("OutputMonitorNotmalColor", LLColor4::green); - static LLUICachedControl output_monitor_bound_color("OutputMonitorBoundColor", LLColor4::white); + static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange); + static LLUIColor output_monitor_overdriven_color = LLUIColorTable::instance().getColor("OutputMonitorOverdrivenColor", LLColor4::red); + static LLUIColor output_monitor_normal_color = LLUIColorTable::instance().getColor("OutputMonitorNotmalColor", LLColor4::green); + static LLUIColor output_monitor_bound_color = LLUIColorTable::instance().getColor("OutputMonitorBoundColor", LLColor4::white); static LLUICachedControl output_monitor_rects_number("OutputMonitorRectanglesNumber", 20); static LLUICachedControl output_monitor_rect_width_ratio("OutputMonitorRectangleWidthRatio", 0.5f); static LLUICachedControl output_monitor_rect_height_ratio("OutputMonitorRectangleHeightRatio", 0.8f); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index ed7c7dce12..baa5f34849 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -187,12 +187,12 @@ LLSelectMgr::LLSelectMgr() sHighlightUAnim = gSavedSettings.getF32("SelectionHighlightUAnim"); sHighlightVAnim = gSavedSettings.getF32("SelectionHighlightVAnim"); - sSilhouetteParentColor =gSavedSkinSettings.getColor("SilhouetteParentColor"); - sSilhouetteChildColor = gSavedSkinSettings.getColor("SilhouetteChildColor"); - sHighlightParentColor = gSavedSkinSettings.getColor("HighlightParentColor"); - sHighlightChildColor = gSavedSkinSettings.getColor("HighlightChildColor"); - sHighlightInspectColor = gSavedSkinSettings.getColor("HighlightInspectColor"); - sContextSilhouetteColor = gSavedSkinSettings.getColor("ContextSilhouetteColor")*0.5f; + sSilhouetteParentColor =LLUIColorTable::instance().getColor("SilhouetteParentColor"); + sSilhouetteChildColor = LLUIColorTable::instance().getColor("SilhouetteChildColor"); + sHighlightParentColor = LLUIColorTable::instance().getColor("HighlightParentColor"); + sHighlightChildColor = LLUIColorTable::instance().getColor("HighlightChildColor"); + sHighlightInspectColor = LLUIColorTable::instance().getColor("HighlightInspectColor"); + sContextSilhouetteColor = LLUIColorTable::instance().getColor("ContextSilhouetteColor")*0.5f; sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius"); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index daee3ecfa6..2871b16f5c 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -162,8 +162,8 @@ BOOL LLSideTrayTab::postBuild() title_panel->getChild(TAB_PANEL_CAPTION_TITLE_BOX)->setValue(mTabTitle); - static LLUICachedControl default_background_color ("FloaterDefaultBackgroundColor", *(new LLColor4)); - static LLUICachedControl focus_background_color ("FloaterFocusBackgroundColor", *(new LLColor4)); + static LLUIColor default_background_color = LLUIColorTable::instance().getColor("FloaterDefaultBackgroundColor"); + static LLUIColor focus_background_color = LLUIColorTable::instance().getColor("FloaterFocusBackgroundColor"); setTransparentColor(default_background_color); setBackgroundColor(focus_background_color); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d287f25181..790669c07f 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -469,13 +469,24 @@ bool idle_startup() #if LL_WINDOWS // On the windows dev builds, unpackaged, the message_template.msg - // file will be located in - // indra/build-vc**/newview//app_settings. + // file will be located in: + // build-vc**/newview//app_settings if (!found_template) { message_template_path = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "app_settings", "message_template.msg"); found_template = LLFile::fopen(message_template_path.c_str(), "r"); /* Flawfinder: ignore */ } + #elif LL_DARWIN + // On Mac dev builds, message_template.msg lives in: + // indra/build-*/newview//Second Life/Contents/Resources/app_settings + if (!found_template) + { + message_template_path = + gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, + "../Resources/app_settings", + "message_template.msg"); + found_template = LLFile::fopen(message_template_path.c_str(), "r"); /* Flawfinder: ignore */ + } #endif if (found_template) @@ -929,7 +940,7 @@ bool idle_startup() //For HTML parsing in text boxes. - LLTextEditor::setLinkColor( gSavedSkinSettings.getColor4("HTMLLinkColor") ); + LLTextEditor::setLinkColor( LLUIColorTable::instance().getColor("HTMLLinkColor") ); // Load URL History File LLURLHistory::loadFile("url_history.xml"); @@ -1604,7 +1615,7 @@ bool idle_startup() // Since we connected, save off the settings so the user doesn't have to // type the name/password again if we crash. gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); - gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE); + LLUIColorTable::instance().saveUserSettings(); // // Initialize classes w/graphics stuff. @@ -2187,7 +2198,7 @@ bool idle_startup() // and make sure it's saved gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE ); - gSavedSkinSettings.saveToFile( gSavedSettings.getString("SkinningSettingsFile") , TRUE ); + LLUIColorTable::instance().saveUserSettings(); }; if (!gNoRender) @@ -2576,7 +2587,7 @@ void login_callback(S32 option, void *userdata) { // turn off the setting and write out to disk gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE ); - gSavedSkinSettings.saveToFile( gSavedSettings.getString("SkinningSettingsFile") , TRUE ); + LLUIColorTable::instance().saveUserSettings(); } // Next iteration through main loop should shut down the app cleanly. @@ -2786,7 +2797,7 @@ void update_app(BOOL mandatory, const std::string& auth_msg) { // store off config state, as we might quit soon gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); - gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE); + LLUIColorTable::instance().saveUserSettings(); std::ostringstream message; std::string msg; diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 8c2372ee74..58af603569 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -237,7 +237,7 @@ void LLStatusBar::draw() if (isBackgroundVisible()) { static LLUICachedControl drop_shadow_floater ("DropShadowFloater", 0); - static LLUICachedControl color_drop_shadow ("ColorDropShadow"); + static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow"); gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, color_drop_shadow, drop_shadow_floater ); } diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp index a1384c28ba..a422db1cc1 100644 --- a/indra/newview/llstylemap.cpp +++ b/indra/newview/llstylemap.cpp @@ -64,7 +64,7 @@ const LLStyleSP &LLStyleMap::lookupAgent(const LLUUID &source) style->setFontName(LLStringUtil::null); if (source != LLUUID::null && source != gAgent.getID() ) { - style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor")); + style->setColor(LLUIColorTable::instance().getColor("HTMLLinkColor")); std::string link = llformat("secondlife:///app/agent/%s/about",source.asString().c_str()); style->setLinkHREF(link); } @@ -90,7 +90,7 @@ const LLStyleSP &LLStyleMap::lookup(const LLUUID& id, const std::string& link) style->setFontName(LLStringUtil::null); if (id != LLUUID::null && !link.empty()) { - style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor")); + style->setColor(LLUIColorTable::instance().getColor("HTMLLinkColor")); style->setLinkHREF(link); } else @@ -115,6 +115,6 @@ void LLStyleMap::update() { LLStyleSP &style = iter->second; // Update the link color in case it has been changed. - style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor")); + style->setColor(LLUIColorTable::instance().getColor("HTMLLinkColor")); } } diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index ca78073575..ee6e36518f 100644 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -359,7 +359,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) // Orbit tool if (hasMouseCapture()) { - const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWindowWidth(); + const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWorldViewWidth(); if (dx != 0) { @@ -387,7 +387,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) F32 dist = (F32) camera_to_focus.normVec(); // Fudge factor for pan - F32 meters_per_pixel = 3.f * dist / gViewerWindow->getWindowWidth(); + F32 meters_per_pixel = 3.f * dist / gViewerWindow->getWorldViewWidth(); if (dx != 0) { @@ -409,7 +409,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) if (hasMouseCapture()) { - const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWindowWidth(); + const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWorldViewWidth(); if (dx != 0) { diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index 88e79fd4f4..abadd251c1 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -510,8 +510,8 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) const F32 RADIANS_PER_PIXEL_X = 0.01f; const F32 RADIANS_PER_PIXEL_Y = 0.01f; - S32 dx = x - (gViewerWindow->getWindowWidth() / 2); - S32 dy = y - (gViewerWindow->getWindowHeight() / 2); + S32 dx = x - (gViewerWindow->getWorldViewWidth() / 2); + S32 dy = y - (gViewerWindow->getWorldViewHeight() / 2); if (dx != 0 || dy != 0) { @@ -631,10 +631,10 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) // Handle auto-rotation at screen edge. LLVector3 grab_pos_agent = gAgent.getPosAgentFromGlobal( grab_point_global ); - LLCoordGL grab_center_gl( gViewerWindow->getWindowWidth() / 2, gViewerWindow->getWindowHeight() / 2); + LLCoordGL grab_center_gl( gViewerWindow->getWorldViewWidth() / 2, gViewerWindow->getWorldViewHeight() / 2); LLViewerCamera::getInstance()->projectPosAgentToScreen(grab_pos_agent, grab_center_gl); - const S32 ROTATE_H_MARGIN = gViewerWindow->getWindowWidth() / 20; + const S32 ROTATE_H_MARGIN = gViewerWindow->getWorldViewWidth() / 20; const F32 ROTATE_ANGLE_PER_SECOND = 30.f * DEG_TO_RAD; const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped; // ...build mode moves camera about focus point @@ -649,7 +649,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) gAgent.cameraOrbitAround(rotate_angle); } } - else if (grab_center_gl.mX > gViewerWindow->getWindowWidth() - ROTATE_H_MARGIN) + else if (grab_center_gl.mX > gViewerWindow->getWorldViewWidth() - ROTATE_H_MARGIN) { if (gAgent.getFocusOnAvatar()) { @@ -662,7 +662,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) } // Don't move above top of screen or below bottom - if ((grab_center_gl.mY < gViewerWindow->getWindowHeight() - 6) + if ((grab_center_gl.mY < gViewerWindow->getWorldViewHeight() - 6) && (grab_center_gl.mY > 24)) { // Transmit update to simulator @@ -884,7 +884,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask) // Look for cursor against the edge of the screen // Only works in fullscreen - if (!gSavedSettings.getBOOL("NotFullScreen")) + if (gSavedSettings.getBOOL("WindowFullScreen")) { if (gAgent.cameraThirdPerson() ) { @@ -893,7 +893,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask) gAgent.yaw(rotate_angle); //gAgent.setControlFlags(AGENT_CONTROL_YAW_POS); } - else if (x == (gViewerWindow->getWindowWidth() - 1) ) + else if (x == (gViewerWindow->getWorldViewWidth() - 1) ) { gAgent.yaw(-rotate_angle); //gAgent.setControlFlags(AGENT_CONTROL_YAW_NEG); diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index 72fd8b3bac..3dc0ea646a 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -137,7 +137,7 @@ void LLToolGun::draw() { LLUIImagePtr crosshair = LLUI::getUIImage("crosshairs.tga"); crosshair->draw( - ( gViewerWindow->getWindowWidth() - crosshair->getWidth() ) / 2, - ( gViewerWindow->getWindowHeight() - crosshair->getHeight() ) / 2); + ( gViewerWindow->getWorldViewWidth() - crosshair->getWidth() ) / 2, + ( gViewerWindow->getWorldViewHeight() - crosshair->getHeight() ) / 2); } } diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index e3ee209030..cf3d15a12a 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -180,6 +180,8 @@ void LLToolMgr::setCurrentTool( LLTool* tool ) mBaseTool = tool; updateToolStatus(); + + mSavedTool = NULL; } LLTool* LLToolMgr::getCurrentTool() diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index 8e4f637832..5929ecd928 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -112,7 +112,7 @@ void LLTracker::stopTracking(void* userdata) // static virtual void LLTracker::drawHUDArrow() { - static LLCachedControl map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white); + static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white); /* tracking autopilot destination has been disabled -- 2004.01.09, Leviathan @@ -163,7 +163,7 @@ void LLTracker::render3D() return; } - static LLCachedControl map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white); + static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white); // Arbitary location beacon if( instance()->mIsTrackingLocation ) diff --git a/indra/newview/lluploaddialog.cpp b/indra/newview/lluploaddialog.cpp index f5160fd26c..153e3e7382 100644 --- a/indra/newview/lluploaddialog.cpp +++ b/indra/newview/lluploaddialog.cpp @@ -144,7 +144,7 @@ void LLUploadDialog::setMessage( const std::string& msg) msg_rect.setOriginAndSize( msg_x, msg_y, max_msg_width, line_height ); mLabelBox[line_num]->setRect(msg_rect); mLabelBox[line_num]->setText(cur_line); - mLabelBox[line_num]->setColor( gSavedSkinSettings.getColor( "LabelTextColor" ) ); + mLabelBox[line_num]->setColor( LLUIColorTable::instance().getColor( "LabelTextColor" ) ); mLabelBox[line_num]->setVisible(TRUE); msg_y -= line_height; ++line_num; diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 320b950649..0f3feb789f 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -78,7 +78,6 @@ BOOL gHackGodmode = FALSE; LLControlGroup gSavedSettings("Global"); // saved at end of session -LLControlGroup gSavedSkinSettings("Skinning"); // saved at end of session LLControlGroup gSavedPerAccountSettings("PerAccount"); // saved at end of session LLControlGroup gCrashSettings("CrashSettings"); // saved at end of session LLControlGroup gWarningSettings("Warnings"); // persists ignored dialogs/warnings @@ -585,7 +584,6 @@ void settings_setup_listeners() gSavedSettings.getControl("DebugViews")->getSignal()->connect(boost::bind(&handleDebugViewsChanged, _2)); gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _2)); gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _2)); - gSavedSkinSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _2)); gSavedSettings.getControl("HighResSnapshot")->getSignal()->connect(boost::bind(handleHighResSnapshotChanged, _2)); gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2)); gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2)); @@ -603,6 +601,69 @@ void settings_setup_listeners() gSavedSettings.getControl("VelocityInterpolate")->getSignal()->connect(boost::bind(&handleVelocityInterpolate, _2)); } +class ColorConvertFunctor : public LLControlGroup::ApplyFunctor +{ +public: + ColorConvertFunctor(LLUIColorTable::Params& params) + :mParams(params) + { + } + + void apply(const std::string& name, LLControlVariable* control) + { + if(control->isType(TYPE_COL4)) + { + LLUIColorTable::ColorParams color_params; + color_params.value = LLColor4(control->getValue()); + + mParams.color_entries.add(LLUIColorTable::ColorEntryParams().name(name).color(color_params)); + } + } + +private: + LLUIColorTable::Params& mParams; +}; + +static void convert_legacy_color_settings(const std::string& location_key, ELLPath path) +{ + LLControlGroup::getInstance("Skinning")->cleanup(); + LLAppViewer::instance()->loadSettingsFromDirectory(location_key); + + LLUIColorTable::Params params; + ColorConvertFunctor ccf(params); + LLControlGroup::getInstance("Skinning")->applyToAll(&ccf); + + LLXMLNodePtr output_node = new LLXMLNode("colors", false); + LLXUIParser::instance().writeXUI(output_node, params); + + if(!output_node->isNull()) + { + std::string filename = gDirUtilp->getExpandedFilename(path, "colors_def.xml"); + LLFILE *fp = LLFile::fopen(filename, "w"); + + if(fp != NULL) + { + LLXMLNode::writeHeaderToFile(fp); + output_node->writeToFile(fp); + + fclose(fp); + } + } + + LLControlGroup::getInstance("Skinning")->cleanup(); +} + +void convert_legacy_color_settings() +{ + LLControlGroup saved_skin_settings("Skinning"); + + convert_legacy_color_settings("DefaultSkin", LL_PATH_DEFAULT_SKIN); + convert_legacy_color_settings("CurrentSkin", LL_PATH_TOP_SKIN); + convert_legacy_color_settings("UserSkin", LL_PATH_USER_SKIN); + + saved_skin_settings.cleanup(); +} + #if TEST_CACHED_CONTROL diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h index 3271e5fe9b..0e1c24e4fb 100644 --- a/indra/newview/llviewercontrol.h +++ b/indra/newview/llviewercontrol.h @@ -50,9 +50,12 @@ void settings_setup_listeners(); // for the graphics settings void create_graphics_group(LLControlGroup& group); +// convert legacy colors.xml LLSD based color settings to +// newer colors_def.xml XUI/Params based color settings +void convert_legacy_color_settings(); + // saved at end of session extern LLControlGroup gSavedSettings; -extern LLControlGroup gSavedSkinSettings; extern LLControlGroup gSavedPerAccountSettings; extern LLControlGroup gWarningSettings; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 826aca5e64..ae7099d382 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -523,7 +523,7 @@ void init_menus() /// LLColor4 color; - LLColor4 context_menu_color = gSavedSkinSettings.getColor("MenuPopupBgColor"); + LLColor4 context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor"); gPieSelf->setBackgroundColor( context_menu_color ); gPieAvatar->setBackgroundColor( context_menu_color ); @@ -532,17 +532,17 @@ void init_menus() gPieLand->setBackgroundColor( context_menu_color ); - color = gSavedSkinSettings.getColor( "MenuPopupBgColor" ); + color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" ); gPopupMenuView->setBackgroundColor( color ); // If we are not in production, use a different color to make it apparent. if (LLViewerLogin::getInstance()->isInProductionGrid()) { - color = gSavedSkinSettings.getColor( "MenuBarBgColor" ); + color = LLUIColorTable::instance().getColor( "MenuBarBgColor" ); } else { - color = gSavedSkinSettings.getColor( "MenuNonProductionBgColor" ); + color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); } gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile("menu_viewer.xml", gMenuHolder); gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT)); @@ -7983,6 +7983,7 @@ void initialize_menus() // Advanced > XUI + commit.add("Advanced.ReloadColorSettings", boost::bind(&LLUIColorTable::loadFromSettings, LLUIColorTable::getInstance())); view_listener_t::addMenu(new LLAdvancedShowFontTest(), "Advanced.ShowFontTest"); view_listener_t::addMenu(new LLAdvancedLoadUIFromXML(), "Advanced.LoadUIFromXML"); view_listener_t::addMenu(new LLAdvancedSaveUIToXML(), "Advanced.SaveUIToXML"); diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 8e9c798aca..468c9fbb66 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1020,16 +1020,16 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { - LLColor4 above_water_color = gSavedSkinSettings.getColor( "NetMapOtherOwnAboveWater" ); - LLColor4 below_water_color = gSavedSkinSettings.getColor( "NetMapOtherOwnBelowWater" ); + LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" ); + LLColor4 below_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnBelowWater" ); LLColor4 you_own_above_water_color = - gSavedSkinSettings.getColor( "NetMapYouOwnAboveWater" ); + LLUIColorTable::instance().getColor( "NetMapYouOwnAboveWater" ); LLColor4 you_own_below_water_color = - gSavedSkinSettings.getColor( "NetMapYouOwnBelowWater" ); + LLUIColorTable::instance().getColor( "NetMapYouOwnBelowWater" ); LLColor4 group_own_above_water_color = - gSavedSkinSettings.getColor( "NetMapGroupOwnAboveWater" ); + LLUIColorTable::instance().getColor( "NetMapGroupOwnAboveWater" ); LLColor4 group_own_below_water_color = - gSavedSkinSettings.getColor( "NetMapGroupOwnBelowWater" ); + LLUIColorTable::instance().getColor( "NetMapGroupOwnBelowWater" ); for (S32 i = 0; i < mMapObjects.count(); i++) diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index 5b60ed5a27..2056a4be1b 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -206,12 +206,12 @@ void LLViewerParcelOverlay::updateOverlayTexture() { return; } - const LLColor4U avail = gSavedSkinSettings.getColor4("PropertyColorAvail"); - const LLColor4U owned = gSavedSkinSettings.getColor4("PropertyColorOther"); - const LLColor4U group = gSavedSkinSettings.getColor4("PropertyColorGroup"); - const LLColor4U self = gSavedSkinSettings.getColor4("PropertyColorSelf"); - const LLColor4U for_sale = gSavedSkinSettings.getColor4("PropertyColorForSale"); - const LLColor4U auction = gSavedSkinSettings.getColor4("PropertyColorAuction"); + const LLColor4U avail = LLUIColorTable::instance().getColor("PropertyColorAvail").get(); + const LLColor4U owned = LLUIColorTable::instance().getColor("PropertyColorOther").get(); + const LLColor4U group = LLUIColorTable::instance().getColor("PropertyColorGroup").get(); + const LLColor4U self = LLUIColorTable::instance().getColor("PropertyColorSelf").get(); + const LLColor4U for_sale = LLUIColorTable::instance().getColor("PropertyColorForSale").get(); + const LLColor4U auction = LLUIColorTable::instance().getColor("PropertyColorAuction").get(); // Create the base texture. U8 *raw = mImageRaw->getData(); @@ -314,11 +314,11 @@ void LLViewerParcelOverlay::updatePropertyLines() S32 row, col; - const LLColor4U self_coloru = gSavedSkinSettings.getColor4("PropertyColorSelf"); - const LLColor4U other_coloru = gSavedSkinSettings.getColor4("PropertyColorOther"); - const LLColor4U group_coloru = gSavedSkinSettings.getColor4("PropertyColorGroup"); - const LLColor4U for_sale_coloru = gSavedSkinSettings.getColor4("PropertyColorForSale"); - const LLColor4U auction_coloru = gSavedSkinSettings.getColor4("PropertyColorAuction"); + const LLColor4U self_coloru = LLUIColorTable::instance().getColor("PropertyColorSelf").get(); + const LLColor4U other_coloru = LLUIColorTable::instance().getColor("PropertyColorOther").get(); + const LLColor4U group_coloru = LLUIColorTable::instance().getColor("PropertyColorGroup").get(); + const LLColor4U for_sale_coloru = LLUIColorTable::instance().getColor("PropertyColorForSale").get(); + const LLColor4U auction_coloru = LLUIColorTable::instance().getColor("PropertyColorAuction").get(); // Build into dynamic arrays, then copy into static arrays. LLDynamicArray new_vertex_array; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2689fff533..569eba2f20 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1526,10 +1526,10 @@ void LLViewerWindow::initBase() params.rect(LLRect (0, 1, 1, 0)); params.h_pad(4); params.v_pad(2); - params.text_color(gSavedSkinSettings.getColor( "ToolTipTextColor" )); - params.border_color(gSavedSkinSettings.getColor( "ToolTipBorderColor" )); + params.text_color(LLUIColorTable::instance().getColor( "ToolTipTextColor" )); + params.border_color(LLUIColorTable::instance().getColor( "ToolTipBorderColor" )); params.border_visible(false); - params.background_color(gSavedSkinSettings.getColor( "ToolTipBgColor" )); + params.background_color(LLUIColorTable::instance().getColor( "ToolTipBgColor" )); params.bg_visible(true); params.font.style("NORMAL"); params.border_drop_shadow_visible(true); @@ -1824,7 +1824,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) // store the mode the user wants (even if not there yet) - gSavedSettings.setBOOL("NotFullScreen", !mWantFullscreen); + gSavedSettings.setBOOL("WindowFullScreen", mWantFullscreen); // store new settings for the mode we are in, regardless if (!mWindow->getFullscreen()) @@ -1887,19 +1887,19 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) if(god_mode && LLViewerLogin::getInstance()->isInProductionGrid()) { - new_bg_color = gSavedSkinSettings.getColor( "MenuBarGodBgColor" ); + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarGodBgColor" ); } else if(god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) { - new_bg_color = gSavedSkinSettings.getColor( "MenuNonProductionGodBgColor" ); + new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" ); } else if(!god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) { - new_bg_color = gSavedSkinSettings.getColor( "MenuNonProductionBgColor" ); + new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); } else { - new_bg_color = gSavedSkinSettings.getColor( "MenuBarBgColor" ); + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBgColor" ); } if(gMenuBarView) @@ -2162,10 +2162,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) LLUICtrl* keyboard_focus = gFocusMgr.getKeyboardFocus(); if( keyboard_focus ) { + LLLineEditor* chat_bar = gBottomTray ? gBottomTray->getChatBox() : NULL; // arrow keys move avatar while chatting hack - if (gChatBar && gChatBar->inputEditorHasFocus()) + if (chat_bar && chat_bar->hasFocus()) { - if (gChatBar->getCurrentChat().empty() || gSavedSettings.getBOOL("ArrowKeysMoveAvatar")) + if (chat_bar->getText().empty() || gSavedSettings.getBOOL("ArrowKeysMoveAvatar")) { switch(key) { @@ -2895,15 +2896,17 @@ void LLViewerWindow::updateKeyboardFocus() if(LLSideTray::instanceCreated())//just getInstance will create sidetray. we don't want this LLSideTray::getInstance()->highlightFocused(); - - if (gSavedSettings.getBOOL("ChatBarStealsFocus") - && gChatBar - && gFocusMgr.getKeyboardFocus() == NULL - && gChatBar->isInVisibleChain()) - { - gChatBar->startChat(NULL); - } + //NOTE: this behavior is no longer desirable with a permanently visible chat batr + // which would *always* steal focus, disallowing navigation of the world via WASD controls --RN + + //if (gSavedSettings.getBOOL("ChatBarStealsFocus") + // && gChatBar + // && gFocusMgr.getKeyboardFocus() == NULL + // && gChatBar->isInVisibleChain()) + //{ + // gChatBar->startChat(NULL); + //} } @@ -4649,7 +4652,7 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, BOOL was_maximized = gSavedSettings.getBOOL("WindowMaximized"); mWantFullscreen = fullscreen; mShowFullscreenProgress = show_progress_bar; - gSavedSettings.setBOOL("NotFullScreen", !mWantFullscreen); + gSavedSettings.setBOOL("WindowFullScreen", mWantFullscreen); //gResizeScreenTexture = TRUE; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c2b54ec9c6..b38e71236d 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2660,7 +2660,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) new_name = TRUE; } - LLColor4 avatar_name_color = gSavedSkinSettings.getColor( "AvatarNameColor" ); + LLColor4 avatar_name_color = LLUIColorTable::instance().getColor( "AvatarNameColor" ); avatar_name_color.setAlpha(alpha); mNameText->setColor(avatar_name_color); @@ -2802,7 +2802,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) std::deque::iterator chat_iter = mChats.begin(); mNameText->clearString(); - LLColor4 new_chat = gSavedSkinSettings.getColor( "AvatarNameColor" ); + LLColor4 new_chat = LLUIColorTable::instance().getColor( "AvatarNameColor" ); LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f); LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f); if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES) diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index d99758edf8..d4df141477 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -368,7 +368,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) initSunDirection(mSunDefaultPosition, LLVector3(0, 0, 0)); } mAmbientScale = gSavedSettings.getF32("SkyAmbientScale"); - mNightColorShift = gSavedSkinSettings.getColor3("SkyNightColorShift"); + mNightColorShift = gSavedSettings.getColor3("SkyNightColorShift"); mFogColor.mV[VRED] = mFogColor.mV[VGREEN] = mFogColor.mV[VBLUE] = 0.5f; mFogColor.mV[VALPHA] = 0.0f; mFogRatio = 1.2f; diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 9ac758433c..9e04c14beb 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -284,7 +284,7 @@ BOOL is_agent_in_region(LLViewerRegion* region, LLSimInfo* info) void LLWorldMapView::draw() { - static LLCachedControl map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white); + static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white); LLTextureView::clearDebugImages(); @@ -908,8 +908,8 @@ void LLWorldMapView::drawImageStack(const LLVector3d& global_pos, LLUIImagePtr i void LLWorldMapView::drawAgents() { - static LLCachedControl map_avatar_color(gSavedSkinSettings, "MapAvatarColor", LLColor4::white); - static LLCachedControl map_avatar_friend_color(gSavedSkinSettings, "MapAvatarFriendColor", LLColor4::white); + static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white); + static LLUIColor map_avatar_friend_color = LLUIColorTable::instance().getColor("MapAvatarFriendColor", LLColor4::white); F32 agents_scale = (gMapScale * 0.9f) / 256.f; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 25ed853146..88d2eab66d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -5094,8 +5094,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) F32 minLum = llmax(gSavedSettings.getF32("RenderGlowMinLuminance"), 0.0f); F32 maxAlpha = gSavedSettings.getF32("RenderGlowMaxExtractAlpha"); F32 warmthAmount = gSavedSettings.getF32("RenderGlowWarmthAmount"); - LLVector3 lumWeights = gSavedSkinSettings.getVector3("RenderGlowLumWeights"); - LLVector3 warmthWeights = gSavedSkinSettings.getVector3("RenderGlowWarmthWeights"); + LLVector3 lumWeights = gSavedSettings.getVector3("RenderGlowLumWeights"); + LLVector3 warmthWeights = gSavedSettings.getVector3("RenderGlowWarmthWeights"); gGlowExtractProgram.uniform1f("minLuminance", minLum); gGlowExtractProgram.uniform1f("maxExtractAlpha", maxAlpha); gGlowExtractProgram.uniform3f("lumWeights", lumWeights.mV[0], lumWeights.mV[1], lumWeights.mV[2]); diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 49ea0bc8aa..94b9b04bb0 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -123,9 +123,9 @@ Color4 Value - 0.94 - 0.61 - 0 + 1 + 1 + 1 1 @@ -171,9 +171,9 @@ Color4 Value - 1 - 0.75 - 0.24 + 0.334399998188018798828125 + 0.545599997043609619140625 + 0.51590001583099365234375 0.5 @@ -203,10 +203,10 @@ Color4 Value - 0.86 - 0.86 - 0.86 - 1 + 1 + 1 + 1 + 1 ButtonLabelDisabledColor @@ -219,10 +219,10 @@ Color4 Value - 0.58 - 0.66 - 0.84 - 0.78 + 0.75 + 0.75 + 0.75 + 0.7799999713897705078125 ButtonLabelSelectedColor @@ -251,10 +251,10 @@ Color4 Value - 0.64 - 0.75 - 0.93 - 0.78 + 1 + 1 + 1 + 0.7799999713897705078125 ButtonSelectedBgColor @@ -267,9 +267,9 @@ Color4 Value - 0.24 - 0.24 - 0.24 + 1 + 1 + 1 1 @@ -299,9 +299,9 @@ Color4 Value - 0.24 - 0.24 - 0.24 + 1 + 1 + 1 1 @@ -411,9 +411,9 @@ Color4 Value - 0.5 - 0.0 - 0.0 + 0.334399998188018798828125 + 0.545599997043609619140625 + 0.51590001583099365234375 1.0 @@ -1003,9 +1003,9 @@ Color4 Value - 0 - 0 - 0.08 + 1 + 1 + 1 1 @@ -1035,9 +1035,9 @@ Color4 Value - 0.94 - 0.61 - 0 + 0.334399998188018798828125 + 0.545599997043609619140625 + 0.51590001583099365234375 1 @@ -1115,9 +1115,9 @@ Color4 Value - 0.94 - 0.61 - 0 + 0.272800028324127197265625 + 0.607199966907501220703125 + 0.5601749420166015625 1 @@ -1131,9 +1131,9 @@ Color4 Value - 0.94 - 0.65 - 0.35 + 0.334399998188018798828125 + 0.545599997043609619140625 + 0.51590001583099365234375 1 @@ -1211,9 +1211,9 @@ Color4 Value - 0.27 - 0.67 - 1 + 0.334399998188018798828125 + 0.545599997043609619140625 + 0.51590001583099365234375 1 @@ -1259,10 +1259,10 @@ Color4 Value - 0.60 - 0.60 - 1.0 - 1.0 + 0.334399998188018798828125 + 0.545599997043609619140625 + 0.51590001583099365234375 + 1 HealthTextColor @@ -1404,9 +1404,9 @@ Value 1 + 0.5 0 1 - 1 HighlightParentColor @@ -1595,9 +1595,9 @@ Color4 Value - 0.64 - 0.75 - 0.93 + 1 + 1 + 1 0.5 @@ -1611,9 +1611,9 @@ Color4 Value - 0.58 - 0.66 - 0.84 + 1 + 1 + 1 1 @@ -1724,9 +1724,9 @@ Color4 Value - 0.0 1.0 - 0.0 + 1.0 + 1.0 1.0 @@ -1756,10 +1756,10 @@ Color4 Value - 1.0 - 1.0 - 1.0 - 1.0 + 0.53125 + 0 + 0.498047053813934326171875 + 1 MapFrustumColor @@ -1854,9 +1854,9 @@ Color4 Value - 0.24 - 0.5 - 0.24 + 0.0 + 0.0 + 0.0 1 @@ -2014,9 +2014,9 @@ Color4 Value - 0.72 - 0.72 - 0.74 + 1 + 1 + 1 1 @@ -2500,36 +2500,6 @@ 0.4 - RenderGlowLumWeights - - Comment - Weights for each color channel to be used in calculating luminance (should add up to 1.0) - Persist - 1 - Type - Vector3 - Value - - 0.299 - 0.587 - 0.114 - - - RenderGlowWarmthWeights - - Comment - Weight of each color channel used before finding the max warmth - Persist - 1 - Type - Vector3 - Value - - 1.0 - 0.5 - 0.7 - - ScriptBgReadOnlyColor Comment @@ -2572,10 +2542,10 @@ Color4 Value - 0.39 - 0.39 - 0.39 - 0.16 + 0.334399998188018798828125 + 0.545599997043609619140625 + 0.51590001583099365234375 + 0.1599999964237213134765625 ScrollBgReadOnlyColor @@ -2716,9 +2686,9 @@ Color4 Value - 0.24 - 0.3 - 0.49 + 1 + 1 + 1 1 @@ -2732,9 +2702,9 @@ Color4 Value - 0.6 - 0.6 - 0.62 + 1 + 1 + 1 1 @@ -2770,21 +2740,6 @@ 1 - SkyNightColorShift - - Comment - Controls moonlight color (base color applied to moon as light source) - Persist - 1 - Type - Color3 - Value - - 0.67 - 0.67 - 1.0 - - SliderDisabledThumbColor Comment @@ -2795,9 +2750,9 @@ Color4 Value - 0 - 0 - 0 + 1 + 1 + 1 1 @@ -2811,9 +2766,9 @@ Color4 Value - 0.78 - 0.78 - 0.78 + 1 + 1 + 1 1 diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Off.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Off.png new file mode 100644 index 0000000000..19c842b816 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Off.png differ diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.png new file mode 100644 index 0000000000..e47f913db1 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.png differ diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Press.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Press.png new file mode 100644 index 0000000000..b9879dcc8a Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Press.png differ diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.png new file mode 100644 index 0000000000..e2c67de9c0 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.png differ diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Press.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Press.png new file mode 100644 index 0000000000..08f7493a02 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Press.png differ diff --git a/indra/newview/skins/default/textures/containers/Accordion_Off.png b/indra/newview/skins/default/textures/containers/Accordion_Off.png new file mode 100644 index 0000000000..414f4509c6 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Accordion_Off.png differ diff --git a/indra/newview/skins/default/textures/containers/Accordion_Over.png b/indra/newview/skins/default/textures/containers/Accordion_Over.png new file mode 100644 index 0000000000..5416d73310 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Accordion_Over.png differ diff --git a/indra/newview/skins/default/textures/containers/Accordion_Press.png b/indra/newview/skins/default/textures/containers/Accordion_Press.png new file mode 100644 index 0000000000..1578e0dfc5 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Accordion_Press.png differ diff --git a/indra/newview/skins/default/textures/containers/Container.png b/indra/newview/skins/default/textures/containers/Container.png new file mode 100644 index 0000000000..511eb94386 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Container.png differ diff --git a/indra/newview/skins/default/textures/containers/TabTop_Left_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Left_Off.png new file mode 100644 index 0000000000..1951413f8d Binary files /dev/null and b/indra/newview/skins/default/textures/containers/TabTop_Left_Off.png differ diff --git a/indra/newview/skins/default/textures/containers/TabTop_Left_Over.png b/indra/newview/skins/default/textures/containers/TabTop_Left_Over.png new file mode 100644 index 0000000000..295cd89a57 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/TabTop_Left_Over.png differ diff --git a/indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png new file mode 100644 index 0000000000..8364716e02 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png differ diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png new file mode 100644 index 0000000000..21f1c2d8a8 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png differ diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Over.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Over.png new file mode 100644 index 0000000000..0758cbcf0d Binary files /dev/null and b/indra/newview/skins/default/textures/containers/TabTop_Middle_Over.png differ diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png new file mode 100644 index 0000000000..3946917c7c Binary files /dev/null and b/indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png differ diff --git a/indra/newview/skins/default/textures/containers/TabTop_Right_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Right_Off.png new file mode 100644 index 0000000000..eeef28e5a5 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/TabTop_Right_Off.png differ diff --git a/indra/newview/skins/default/textures/containers/TabTop_Right_Over.png b/indra/newview/skins/default/textures/containers/TabTop_Right_Over.png new file mode 100644 index 0000000000..c2cbc2b1e5 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/TabTop_Right_Over.png differ diff --git a/indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png new file mode 100644 index 0000000000..b0f1f16398 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png differ diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png new file mode 100644 index 0000000000..41b5d24d87 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png differ diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png new file mode 100644 index 0000000000..083acc0156 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png differ diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png new file mode 100644 index 0000000000..ee4649a8f9 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png differ diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png new file mode 100644 index 0000000000..55c02160e3 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png differ diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png new file mode 100644 index 0000000000..2f6ea90196 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png differ diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png new file mode 100644 index 0000000000..642113b135 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png differ diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png new file mode 100644 index 0000000000..01fd765c3d Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png differ diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png new file mode 100644 index 0000000000..74e00635f1 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png differ diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png new file mode 100644 index 0000000000..8a0d98a780 Binary files /dev/null and b/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png differ diff --git a/indra/newview/skins/default/textures/navbar/Arrow_Left_Off.png b/indra/newview/skins/default/textures/navbar/Arrow_Left_Off.png new file mode 100644 index 0000000000..19569501fe Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Arrow_Left_Off.png differ diff --git a/indra/newview/skins/default/textures/navbar/Arrow_Left_Over.png b/indra/newview/skins/default/textures/navbar/Arrow_Left_Over.png new file mode 100644 index 0000000000..a91b74819f Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Arrow_Left_Over.png differ diff --git a/indra/newview/skins/default/textures/navbar/Arrow_Right_Off.png b/indra/newview/skins/default/textures/navbar/Arrow_Right_Off.png new file mode 100644 index 0000000000..3648c42656 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Arrow_Right_Off.png differ diff --git a/indra/newview/skins/default/textures/navbar/Arrow_Right_Over.png b/indra/newview/skins/default/textures/navbar/Arrow_Right_Over.png new file mode 100644 index 0000000000..a2caf227a7 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Arrow_Right_Over.png differ diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png new file mode 100644 index 0000000000..a4060e5e37 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png differ diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Off.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Off.png new file mode 100644 index 0000000000..9c2815ebba Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Favorite_Star_Off.png differ diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png new file mode 100644 index 0000000000..377b707529 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png differ diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Press.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Press.png new file mode 100644 index 0000000000..a69a729bd4 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Favorite_Star_Press.png differ diff --git a/indra/newview/skins/default/textures/navbar/FileMenu_Divider.png b/indra/newview/skins/default/textures/navbar/FileMenu_Divider.png new file mode 100644 index 0000000000..5ab4abc5b8 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/FileMenu_Divider.png differ diff --git a/indra/newview/skins/default/textures/navbar/Help_Over.png b/indra/newview/skins/default/textures/navbar/Help_Over.png new file mode 100644 index 0000000000..b9bc0d0f87 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Help_Over.png differ diff --git a/indra/newview/skins/default/textures/navbar/Help_Press.png b/indra/newview/skins/default/textures/navbar/Help_Press.png new file mode 100644 index 0000000000..ed3695f9d5 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Help_Press.png differ diff --git a/indra/newview/skins/default/textures/navbar/Home_Off.png b/indra/newview/skins/default/textures/navbar/Home_Off.png new file mode 100644 index 0000000000..fe3bc63b77 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Home_Off.png differ diff --git a/indra/newview/skins/default/textures/navbar/Home_Over.png b/indra/newview/skins/default/textures/navbar/Home_Over.png new file mode 100644 index 0000000000..d9c6b3842e Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Home_Over.png differ diff --git a/indra/newview/skins/default/textures/navbar/Info_Off.png b/indra/newview/skins/default/textures/navbar/Info_Off.png new file mode 100644 index 0000000000..64722255a3 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Info_Off.png differ diff --git a/indra/newview/skins/default/textures/navbar/Info_Over.png b/indra/newview/skins/default/textures/navbar/Info_Over.png new file mode 100644 index 0000000000..84f1d03129 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Info_Over.png differ diff --git a/indra/newview/skins/default/textures/navbar/Info_Press.png b/indra/newview/skins/default/textures/navbar/Info_Press.png new file mode 100644 index 0000000000..169105829e Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Info_Press.png differ diff --git a/indra/newview/skins/default/textures/navbar/NavBar_BG.png b/indra/newview/skins/default/textures/navbar/NavBar_BG.png new file mode 100644 index 0000000000..1df61751a8 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/NavBar_BG.png differ diff --git a/indra/newview/skins/default/textures/navbar/Row_Selection.png b/indra/newview/skins/default/textures/navbar/Row_Selection.png new file mode 100644 index 0000000000..fc4f0c07ef Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Row_Selection.png differ diff --git a/indra/newview/skins/default/textures/navbar/Search.png b/indra/newview/skins/default/textures/navbar/Search.png new file mode 100644 index 0000000000..c43519d5f1 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/Search.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Off.png b/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Off.png new file mode 100644 index 0000000000..918be7555f Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Off.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Selected.png b/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Selected.png new file mode 100644 index 0000000000..b3316386b9 Binary files /dev/null and b/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Selected.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 84dd3ffd7a..e6c9cdb246 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -1,75 +1,85 @@ - - + + + + - - - - - - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - + @@ -115,7 +125,7 @@ - + @@ -142,13 +152,13 @@ - + - + - + @@ -158,17 +168,17 @@ - + - + - + @@ -199,11 +209,11 @@ - + - + @@ -214,7 +224,7 @@ - + @@ -226,7 +236,7 @@ - + @@ -234,39 +244,51 @@ - + - - - - - + + + + + - + - + - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -282,7 +304,7 @@ - + @@ -306,7 +328,7 @@ - + @@ -321,17 +343,36 @@ - + - + - - + + + + + + + + + + + + + + + + + + + + + + + - - diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png b/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png new file mode 100644 index 0000000000..c1ee210099 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Off.png b/indra/newview/skins/default/textures/widgets/Checkbox_Off.png new file mode 100644 index 0000000000..2525405f37 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Checkbox_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On.png b/indra/newview/skins/default/textures/widgets/Checkbox_On.png new file mode 100644 index 0000000000..2d9dba1592 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Checkbox_On.png differ diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png new file mode 100644 index 0000000000..beaa7bcbf6 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Over.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Over.png new file mode 100644 index 0000000000..bc504d130e Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Checkbox_On_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png new file mode 100644 index 0000000000..5bced95a89 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Over.png b/indra/newview/skins/default/textures/widgets/Checkbox_Over.png new file mode 100644 index 0000000000..5a7162addf Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Checkbox_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Press.png b/indra/newview/skins/default/textures/widgets/Checkbox_Press.png new file mode 100644 index 0000000000..44be193678 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Checkbox_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png b/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png new file mode 100644 index 0000000000..d0fff1b3c3 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Off.png b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png new file mode 100644 index 0000000000..80402458b7 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_On.png b/indra/newview/skins/default/textures/widgets/ComboButton_On.png new file mode 100644 index 0000000000..b42cc7542e Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ComboButton_On.png differ diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png new file mode 100644 index 0000000000..bbc0657487 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png differ diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png b/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png new file mode 100644 index 0000000000..b295752ea9 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Off.png b/indra/newview/skins/default/textures/widgets/DropDown_Off.png new file mode 100644 index 0000000000..4764ed4ee2 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/DropDown_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/DropDown_On.png b/indra/newview/skins/default/textures/widgets/DropDown_On.png new file mode 100644 index 0000000000..10262d3979 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/DropDown_On.png differ diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Press.png b/indra/newview/skins/default/textures/widgets/DropDown_Press.png new file mode 100644 index 0000000000..16cb25cc77 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/DropDown_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/ProgressBar.png b/indra/newview/skins/default/textures/widgets/ProgressBar.png new file mode 100644 index 0000000000..edf11ac1f5 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ProgressBar.png differ diff --git a/indra/newview/skins/default/textures/widgets/ProgressTrack.png b/indra/newview/skins/default/textures/widgets/ProgressTrack.png new file mode 100644 index 0000000000..bb6d9f4144 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ProgressTrack.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png b/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png new file mode 100644 index 0000000000..04e91bdaab Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Off.png b/indra/newview/skins/default/textures/widgets/PushButton_Off.png new file mode 100644 index 0000000000..1ee0329e66 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On.png b/indra/newview/skins/default/textures/widgets/PushButton_On.png new file mode 100644 index 0000000000..661d1c5611 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_On.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_On_Over.png new file mode 100644 index 0000000000..064a4c4f7f Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_On_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png b/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png new file mode 100644 index 0000000000..48e8aa2eab Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Over.png new file mode 100644 index 0000000000..c227f07513 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Press.png b/indra/newview/skins/default/textures/widgets/PushButton_Press.png new file mode 100644 index 0000000000..0a4a3a6ad9 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected.png new file mode 100644 index 0000000000..0a4a3a6ad9 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_Selected.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png new file mode 100644 index 0000000000..661d1c5611 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.png new file mode 100644 index 0000000000..064a4c4f7f Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png new file mode 100644 index 0000000000..48e8aa2eab Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png b/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png new file mode 100644 index 0000000000..a1052684b9 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Off.png b/indra/newview/skins/default/textures/widgets/RadioButton_Off.png new file mode 100644 index 0000000000..c58e0305ef Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/RadioButton_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On.png b/indra/newview/skins/default/textures/widgets/RadioButton_On.png new file mode 100644 index 0000000000..c09a2197c7 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/RadioButton_On.png differ diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png new file mode 100644 index 0000000000..d7d444fd0c Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Over.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Over.png new file mode 100644 index 0000000000..3e7d803a28 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/RadioButton_On_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png new file mode 100644 index 0000000000..a707e8ceb8 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Over.png b/indra/newview/skins/default/textures/widgets/RadioButton_Over.png new file mode 100644 index 0000000000..a5c8cbe293 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/RadioButton_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Press.png b/indra/newview/skins/default/textures/widgets/RadioButton_Press.png new file mode 100644 index 0000000000..33eaa14030 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/RadioButton_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png new file mode 100644 index 0000000000..186822da43 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.png new file mode 100644 index 0000000000..605d159eaa Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png new file mode 100644 index 0000000000..42f999a451 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.png new file mode 100644 index 0000000000..c79547dffd Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png new file mode 100644 index 0000000000..176ffcdbb9 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.png new file mode 100644 index 0000000000..e353542ad9 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png new file mode 100644 index 0000000000..4d245eb57a Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.png new file mode 100644 index 0000000000..dd2fceb716 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png new file mode 100644 index 0000000000..8a085aa966 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.png new file mode 100644 index 0000000000..cf78ea3924 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png new file mode 100644 index 0000000000..fc7fd93e7a Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.png new file mode 100644 index 0000000000..53587197da Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png b/indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png new file mode 100644 index 0000000000..4f31c48c02 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png differ diff --git a/indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png b/indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png new file mode 100644 index 0000000000..f89ee3f68f Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png new file mode 100644 index 0000000000..3b39c51a77 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png new file mode 100644 index 0000000000..57ed79d733 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.png new file mode 100644 index 0000000000..7afb9c99c3 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.png new file mode 100644 index 0000000000..77c4224539 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.png new file mode 100644 index 0000000000..8b93dd551e Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.png new file mode 100644 index 0000000000..3f207cbea2 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png new file mode 100644 index 0000000000..5b8878e0cb Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png new file mode 100644 index 0000000000..379953216b Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png new file mode 100644 index 0000000000..379953216b Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png new file mode 100644 index 0000000000..77c4224539 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png new file mode 100644 index 0000000000..8b93dd551e Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png new file mode 100644 index 0000000000..3f207cbea2 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png new file mode 100644 index 0000000000..deb87c8489 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.png new file mode 100644 index 0000000000..220df9db25 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.png new file mode 100644 index 0000000000..5bbcdcb0b4 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.png new file mode 100644 index 0000000000..dde367f05e Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.png new file mode 100644 index 0000000000..d4f30b9adb Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png new file mode 100644 index 0000000000..ca7027da91 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png new file mode 100644 index 0000000000..220df9db25 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.png new file mode 100644 index 0000000000..5bbcdcb0b4 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png new file mode 100644 index 0000000000..dde367f05e Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png new file mode 100644 index 0000000000..8e6b9c8c6f Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png new file mode 100644 index 0000000000..b1521199ff Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.png new file mode 100644 index 0000000000..467c43fc90 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.png new file mode 100644 index 0000000000..2049736897 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png new file mode 100644 index 0000000000..1574f48b28 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png new file mode 100644 index 0000000000..2717e7d7b0 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png new file mode 100644 index 0000000000..3883518033 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png new file mode 100644 index 0000000000..3883518033 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png new file mode 100644 index 0000000000..ab31f6ded7 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.png new file mode 100644 index 0000000000..2049736897 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png new file mode 100644 index 0000000000..1574f48b28 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png new file mode 100644 index 0000000000..b627232012 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png new file mode 100644 index 0000000000..b627232012 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Over.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Over.png new file mode 100644 index 0000000000..b6f900d3bd Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SliderThumb_Over.png differ diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png new file mode 100644 index 0000000000..7081f9cfe0 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png differ diff --git a/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png b/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png new file mode 100644 index 0000000000..232006ee5a Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png differ diff --git a/indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png b/indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png new file mode 100644 index 0000000000..cd002b3973 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png differ diff --git a/indra/newview/skins/default/textures/widgets/TextField_Active.png b/indra/newview/skins/default/textures/widgets/TextField_Active.png new file mode 100644 index 0000000000..ca6daab4e0 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/TextField_Active.png differ diff --git a/indra/newview/skins/default/textures/widgets/TextField_Disabled.png b/indra/newview/skins/default/textures/widgets/TextField_Disabled.png new file mode 100644 index 0000000000..3d205a3f2e Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/TextField_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/TextField_Off.png b/indra/newview/skins/default/textures/widgets/TextField_Off.png new file mode 100644 index 0000000000..911d907acc Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/TextField_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png new file mode 100644 index 0000000000..fa79cb6260 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png differ diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png new file mode 100644 index 0000000000..8b504af101 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png differ diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png new file mode 100644 index 0000000000..862b13d219 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png differ diff --git a/indra/newview/skins/default/textures/windows/Flyout.png b/indra/newview/skins/default/textures/windows/Flyout.png new file mode 100644 index 0000000000..5596b194c9 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Flyout.png differ diff --git a/indra/newview/skins/default/textures/windows/Flyout_Pointer.png b/indra/newview/skins/default/textures/windows/Flyout_Pointer.png new file mode 100644 index 0000000000..69fc08ceaa Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Flyout_Pointer.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png new file mode 100644 index 0000000000..fb59f2e61e Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Close_Press.png b/indra/newview/skins/default/textures/windows/Icon_Close_Press.png new file mode 100644 index 0000000000..7177c803b0 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Close_Press.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Close_Toast.png b/indra/newview/skins/default/textures/windows/Icon_Close_Toast.png new file mode 100644 index 0000000000..ecf01c617a Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Close_Toast.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png new file mode 100644 index 0000000000..cadd6bc8ce Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Dock_Press.png b/indra/newview/skins/default/textures/windows/Icon_Dock_Press.png new file mode 100644 index 0000000000..08f8cfc3d4 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Dock_Press.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png new file mode 100644 index 0000000000..db74b93afd Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png new file mode 100644 index 0000000000..1032e45f7e Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png new file mode 100644 index 0000000000..01dbde102b Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png new file mode 100644 index 0000000000..6614bdd165 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png new file mode 100644 index 0000000000..d790cf57ef Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png differ diff --git a/indra/newview/skins/default/textures/windows/Icon_Undock_Press.png b/indra/newview/skins/default/textures/windows/Icon_Undock_Press.png new file mode 100644 index 0000000000..fdae4b75f6 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Icon_Undock_Press.png differ diff --git a/indra/newview/skins/default/textures/windows/Resize_Corner.png b/indra/newview/skins/default/textures/windows/Resize_Corner.png new file mode 100644 index 0000000000..16ed63e428 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Resize_Corner.png differ diff --git a/indra/newview/skins/default/textures/windows/Toast_CloseBtn.png b/indra/newview/skins/default/textures/windows/Toast_CloseBtn.png new file mode 100644 index 0000000000..78b137cdaf Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Toast_CloseBtn.png differ diff --git a/indra/newview/skins/default/textures/windows/Toast_Over.png b/indra/newview/skins/default/textures/windows/Toast_Over.png new file mode 100644 index 0000000000..807e8e553c Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Toast_Over.png differ diff --git a/indra/newview/skins/default/textures/windows/Window_Background.png b/indra/newview/skins/default/textures/windows/Window_Background.png new file mode 100644 index 0000000000..e9f15e76b9 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Window_Background.png differ diff --git a/indra/newview/skins/default/textures/windows/Window_Foreground.png b/indra/newview/skins/default/textures/windows/Window_Foreground.png new file mode 100644 index 0000000000..e76e9f3c79 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Window_Foreground.png differ diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index cef204eb5f..8084d2427e 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -1,5 +1,633 @@ - + + - - - - - - - If unchecked, viewer will display full-screen when logged in. - - Window Size: + Window size: - - - - - - - - - Display Resolution: - - - - Aspect Ratio: - + left_delta="30" + name="windowed mode" + top_pad="5" + width="100"> + - - - - - Quality and - - - Performance: + left="30" + name="QualitySpeed" + top_pad="5" + width="400"> + Quality and speed: Faster @@ -224,80 +100,20 @@ follows="left|top" height="12" layout="topleft" - left="158" - name="ShadersPrefText" - top="93" - width="40"> - Low - - - Mid - - - High - - - Ultra - - - Higher + Better - - Quality - - - - - - + Low + + + Mid + + + High + + + Ultra + + + diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index f99d629aed..1af3c6511d 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -578,7 +578,7 @@ top="0" width="50" /> - - + --> diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml index 6139bae874..4f23c4d26d 100644 --- a/indra/newview/skins/default/xui/en/panel_progress.xml +++ b/indra/newview/skins/default/xui/en/panel_progress.xml @@ -61,28 +61,28 @@ width="640" /> + width="593" /> + width="593" /> + width="610" /> + top="700" + width="90" /> diff --git a/indra/newview/skins/default/xui/en/panel_region_covenant.xml b/indra/newview/skins/default/xui/en/panel_region_covenant.xml index 7bd548d464..8265ab3227 100644 --- a/indra/newview/skins/default/xui/en/panel_region_covenant.xml +++ b/indra/newview/skins/default/xui/en/panel_region_covenant.xml @@ -2,13 +2,13 @@ + width="280"> Purchased land in this region may be resold. @@ -49,7 +49,7 @@ mouse_opaque="false" name="estate_name_lbl" top_pad="5" - width="100"> + width="75"> Name: + width="75"> Owner: + width="75"> Covenant: + width="167"> Last Modified Wed Dec 31 16:00:00 1969 diff --git a/indra/newview/skins/default/xui/en/floater_beacons.xml b/indra/newview/skins/default/xui/en/floater_beacons.xml index 41ddec6395..049ea9ab14 100644 --- a/indra/newview/skins/default/xui/en/floater_beacons.xml +++ b/indra/newview/skins/default/xui/en/floater_beacons.xml @@ -20,43 +20,64 @@ control_name="scripttouchbeacon" label="Scripted Objects with Touch Only" layout="topleft" - name="touch_only" /> + name="touch_only" > + + + name="scripted"> + + + name="physical" > + + + name="sounds" > + + + name="particles" > + + + name="highlights" > + + + name="beacons" > + + + width="100"> + + - + + + + width="100"> + + diff --git a/indra/newview/skins/default/xui/en/floater_god_tools.xml b/indra/newview/skins/default/xui/en/floater_god_tools.xml index e35ab3ea49..f3abad8cb2 100644 --- a/indra/newview/skins/default/xui/en/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_god_tools.xml @@ -34,7 +34,10 @@ left="10" name="Kick all users" top="8" - width="100" /> + width="100"> + + + width="208"> + + + width="180"> + + + width="180"> + + + width="180"> + + + width="180"> + + + width="180"> + + + width="180"> + + + width="180"> + + + width="180"> + + + width="50"> + + + width="50"> + + + width="40"> + + + width="50"> + + + width="40"> + + + width="80"> + + + width="80"> + + + width="110"> + + + width="110"> + + + width="121"> + + + width="130"> + + + + width="380"> + + + + width="100"> + + diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml new file mode 100644 index 0000000000..7c95fcd96a --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/indra/newview/skins/default/xui/en/floater_inspect.xml b/indra/newview/skins/default/xui/en/floater_inspect.xml index ed3b4f00f2..b11b3e4df5 100644 --- a/indra/newview/skins/default/xui/en/floater_inspect.xml +++ b/indra/newview/skins/default/xui/en/floater_inspect.xml @@ -40,6 +40,8 @@ label="Creation Date" name="creation_date" width="150" /> + diff --git a/indra/newview/skins/default/xui/en/floater_lagmeter.xml b/indra/newview/skins/default/xui/en/floater_lagmeter.xml index 8af4f74aa3..a326cd006f 100644 --- a/indra/newview/skins/default/xui/en/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/en/floater_lagmeter.xml @@ -201,7 +201,7 @@ Client: + width="55"> + + + width="540"> + + + width="200"> + + + width="185"> + + + width="70"> + + diff --git a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml index e2a99e6614..da698f276b 100644 --- a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml @@ -20,7 +20,10 @@ max_val="4.29497e+009" name="leak_speed" top="30" - width="330" /> + width="330"> + + + width="330"> + + + width="70"> + + diff --git a/indra/newview/skins/default/xui/en/floater_openobject.xml b/indra/newview/skins/default/xui/en/floater_openobject.xml index 742934b57b..e0ac2c1d51 100644 --- a/indra/newview/skins/default/xui/en/floater_openobject.xml +++ b/indra/newview/skins/default/xui/en/floater_openobject.xml @@ -42,7 +42,10 @@ name="copy_to_inventory_button" tab_group="1" top_pad="285" - width="120" /> + width="120"> + + diff --git a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml index 430cb940e5..e4cb97035c 100644 --- a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml @@ -24,7 +24,11 @@ left="260" name="help" top="7" - width="22" /> + width="22"> + + + width="88" > + + + width="100"> + + diff --git a/indra/newview/skins/default/xui/en/floater_test_list_view.xml b/indra/newview/skins/default/xui/en/floater_test_list_view.xml new file mode 100644 index 0000000000..3991a4a82b --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_test_list_view.xml @@ -0,0 +1,31 @@ + + + + + width="100"> + + + width="100"> + + diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 43f209546a..b179190819 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -144,7 +144,10 @@ name="Go Home" tool_tip="Teleport to your home" top="34" - width="88" /> + width="88" > + + + + + width="60"> + + + + width="48"> + + + width="48" > + + + width="48"> + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 1d1a1c063e..4ce3c18dcc 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -15,8 +15,17 @@ name="Preferences" shortcut="control|P"> + + + @@ -221,22 +230,22 @@ layout="topleft" name="Active Speakers"> + function="Floater.Visible" + parameter="active_speakers" /> + function="Floater.Toggle" + parameter="active_speakers" /> + function="Floater.Visible" + parameter="mute" /> + function="Floater.Toggle" + parameter="mute" /> + function="Floater.Visible" + parameter="camera" /> + function="Floater.Toggle" + parameter="camera" /> + function="Floater.Visible" + parameter="moveview" /> + function="Floater.Toggle" + parameter="moveview" /> @@ -273,16 +282,16 @@ layout="topleft" name="About Land"> + function="Floater.Show" + parameter="about_land" /> + function="Floater.Show" + parameter="region_info" /> @@ -350,9 +359,10 @@ name="Mini-Map" shortcut="control|shift|M"> + function="Floater.Visible" + parameter="mini_map" /> + function="Floater.Show" + parameter="hud" /> + function="Floater.Show" + parameter="bumps" /> + function="Floater.Show" + parameter="sl_about" /> @@ -573,8 +583,8 @@ layout="topleft" name="perm prefs"> + function="Floater.Toggle" + parameter="perm_prefs" /> + function="Floater.Show" + parameter="build_options" /> @@ -720,10 +730,10 @@ name="beacons" shortcut="control|alt|shift|N"> + function="Floater.Show" + parameter="lagmeter" /> + function="Floater.Show" + parameter="notifications_console" /> @@ -1999,8 +2009,8 @@ layout="topleft" name="Memory Leaking Simulation"> + function="Floater.Show" + parameter="mem_leaking" /> @@ -2843,7 +2853,8 @@ layout="topleft" name="Show Font Test"> + function="Floater.Show" + parameter="font_test" /> + + + + function="Floater.Show" + parameter="god_tools" /> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 0a63da1463..d2c0ffd13d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -13,7 +13,7 @@ Close - +