diff options
author | James Cook <james@lindenlab.com> | 2009-12-01 15:01:14 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-12-01 15:01:14 -0800 |
commit | db9f74d55074d6f814783815a803d81238af507a (patch) | |
tree | 01a3ee89f3c072472dd651815db4f3bb7beef5f6 /indra/newview | |
parent | a0c133f819b7b6043e39a39a02310cd1fad67859 (diff) | |
parent | a63d01b8bcac2ee248e8011ae45988e94187f3aa (diff) |
merge
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 73 | ||||
-rw-r--r-- | indra/newview/llfavoritesbar.h | 6 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/colors.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_aaa.xml | 81 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 14 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/location_input.xml | 19 |
7 files changed, 100 insertions, 102 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 8406ddeeca..17b0710813 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -355,8 +355,8 @@ struct LLFavoritesSort }; LLFavoritesBarCtrl::Params::Params() -: chevron_button_tool_tip("chevron_button_tool_tip"), - image_drag_indication("image_drag_indication") +: image_drag_indication("image_drag_indication"), + chevron_button("chevron_button") { } @@ -365,7 +365,6 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p) mFont(p.font.isProvided() ? p.font() : LLFontGL::getFontSansSerifSmall()), mPopupMenuHandle(), mInventoryItemsPopupMenuHandle(), - mChevronButtonToolTip(p.chevron_button_tool_tip), mImageDragIndication(p.image_drag_indication), mShowDragMarker(FALSE), mLandingTab(NULL), @@ -381,6 +380,12 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p) boost::bind(&LLFavoritesBarCtrl::enableSelected, this, _2)); gInventory.addObserver(this); + + //make chevron button + LLButton::Params chevron_button_params(p.chevron_button); + chevron_button_params.click_callback.function(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this)); + mChevronButton = LLUICtrlFactory::create<LLButton> (chevron_button_params); + addChild(mChevronButton); } LLFavoritesBarCtrl::~LLFavoritesBarCtrl() @@ -653,10 +658,6 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width) buttonXMLNode->getAttributeS32("left", buttonHGap); S32 count = mItems.count(); - - const S32 buttonHPad = LLUI::sSettingGroups["config"]->getS32("ButtonHPad"); - const S32 chevron_button_width = mFont->getWidth(">>") + buttonHPad * 2; - S32 buttons_space = bar_width - buttonHGap; S32 first_drop_down_item = count; @@ -670,7 +671,7 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width) { // There is no space for all buttons. // Calculating the number of buttons, that are fit with chevron button - buttons_space -= chevron_button_width + buttonHGap; + buttons_space -= mChevronButton->getRect().getWidth() + buttonHGap; while (i >= 0 && buttons_width > buttons_space) { buttons_width -= buttonWidth + buttonHGap; @@ -718,7 +719,7 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width) child_list_const_iter_t cur_it = child_it++; LLView* viewp = *cur_it; LLButton* button = dynamic_cast<LLButton*>(viewp); - if (button) + if (button && (button != mChevronButton)) { removeChild(button); delete button; @@ -732,55 +733,15 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width) if (mFirstDropDownItem != count) { // Chevron button should stay right aligned - LLView *chevron_button = findChildView(std::string(">>"), FALSE); - if (chevron_button) - { - LLRect rect; - rect.setOriginAndSize(bar_width - chevron_button_width - buttonHGap, 0, chevron_button_width, getRect().getHeight()); - chevron_button->setRect(rect); - chevron_button->setVisible(TRUE); - mChevronRect = rect; - } - else - { - static LLButton::Params default_button_params(LLUICtrlFactory::getDefaultParams<LLButton>()); - std::string flat_icon = "transparent.j2c"; - std::string hover_icon = default_button_params.image_unselected.name; - std::string hover_icon_selected = default_button_params.image_selected.name; - - LLButton::Params bparams; - - LLRect rect; - rect.setOriginAndSize(bar_width - chevron_button_width - buttonHGap, 0, chevron_button_width, getRect().getHeight()); - - bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_BOTTOM); - bparams.image_unselected.name(flat_icon); - bparams.image_disabled.name(flat_icon); - bparams.image_selected.name(hover_icon_selected); - bparams.image_hover_selected.name(hover_icon_selected); - bparams.image_disabled_selected.name(hover_icon_selected); - bparams.image_hover_unselected.name(hover_icon); - bparams.rect (rect); - bparams.tab_stop(false); - bparams.font(mFont); - bparams.name(">>"); - bparams.label(">>"); - bparams.tool_tip(mChevronButtonToolTip); - bparams.click_callback.function(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this)); - - addChildInBack(LLUICtrlFactory::create<LLButton> (bparams)); - - mChevronRect = rect; - } + LLRect rect; + rect.setOriginAndSize(bar_width - mChevronButton->getRect().getWidth() - buttonHGap, 0, mChevronButton->getRect().getWidth(), mChevronButton->getRect().getHeight()); + mChevronButton->setRect(rect); + mChevronButton->setVisible(TRUE); } else { // Hide chevron button if all items are visible on bar - LLView *chevron_button = findChildView(std::string(">>"), FALSE); - if (chevron_button) - { - chevron_button->setVisible(FALSE); - } + mChevronButton->setVisible(FALSE); } } @@ -917,7 +878,7 @@ void LLFavoritesBarCtrl::showDropDownMenu() if (menu->getButtonRect().isEmpty()) { - menu->setButtonRect(mChevronRect, this); + menu->setButtonRect(mChevronButton->getRect(), this); } LLMenuGL::showPopup(this, menu, getRect().getWidth() - menu->getRect().getWidth(), 0); @@ -981,7 +942,7 @@ void LLFavoritesBarCtrl::showDropDownMenu() menu->buildDrawLabels(); menu->updateParent(LLMenuGL::sMenuContainer); - menu->setButtonRect(mChevronRect, this); + menu->setButtonRect(mChevronButton->getRect(), this); LLMenuGL::showPopup(this, menu, getRect().getWidth() - max_width, 0); diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index 20a324c67c..b2fe3cc651 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -33,6 +33,7 @@ #ifndef LL_LLFAVORITESBARCTRL_H #define LL_LLFAVORITESBARCTRL_H +#include "llbutton.h" #include "lluictrl.h" #include "llinventoryobserver.h" @@ -43,8 +44,8 @@ class LLFavoritesBarCtrl : public LLUICtrl, public LLInventoryObserver public: struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { - Optional<std::string> chevron_button_tool_tip; Optional<LLUIImage*> image_drag_indication; + Optional<LLButton::Params> chevron_button; Params(); }; @@ -105,9 +106,7 @@ protected: item_names_array_t mItemNamesCache; LLUUID mSelectedItemID; - LLRect mChevronRect; - std::string mChevronButtonToolTip; LLUIImage* mImageDragIndication; private: @@ -150,6 +149,7 @@ private: BOOL mShowDragMarker; LLUICtrl* mLandingTab; LLUICtrl* mLastTab; + LLButton* mChevronButton; LLUUID mDragItemId; BOOL mStartDrag; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 83c784c1f7..a6ecb4c127 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -367,6 +367,10 @@ BOOL LLFloaterPreference::postBuild() tabcontainer->selectFirstTab(); S32 show_avatar_nametag_options = gSavedSettings.getS32("AvatarNameTagMode"); handleNameTagOptionChanged(LLSD(show_avatar_nametag_options)); + + std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
+ childSetText("cache_location", cache_location); + return TRUE; } @@ -760,8 +764,9 @@ void LLFloaterPreference::onClickResetCache() { gSavedSettings.setString("NewCacheLocation", ""); gSavedSettings.setString("NewCacheLocationTopFolder", ""); - LLNotificationsUtil::add("CacheWillBeMoved"); } + + LLNotificationsUtil::add("CacheWillBeMoved"); std::string cache_location = gDirUtilp->getCacheDir(true); gSavedSettings.setString("CacheLocation", cache_location); std::string top_folder(gDirUtilp->getBaseFileName(cache_location)); diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index d53d2d896c..85cb145dbc 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -459,7 +459,7 @@ value="0 0.5 0 1" /> <color name="MenuPopupBgColor" - reference="DkGray_66" /> + reference="DkGray2" /> <color name="MultiSliderDisabledThumbColor" reference="Unused?" /> diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml index 3f86080160..6598c95c0e 100644 --- a/indra/newview/skins/default/xui/en/floater_aaa.xml +++ b/indra/newview/skins/default/xui/en/floater_aaa.xml @@ -1,36 +1,53 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater - height="400" + legacy_header_height="18" + can_minimize="false" + can_tear_off="false" + can_resize="true" + can_drag_on_left="false" + can_close="true" + can_dock="true" + bevel_style="in" + height="300" layout="topleft" - name="floater_aaa" - can_resize="true" - width="500"> - <string name="bump_parabuild">1</string> - <text - bottom="390" - left="10" - name="right_aligned_text" - width="300" - halign="right" - top_pad="10"> - Right aligned text - </text> - <text - bottom="390" - left="10" - name="centered_text" - width="300" - halign="center" - top_pad="10"> - Centered text - </text> - <text - left="10" - name="left_aligned_text" - width="300" - halign="left" - top_pad="10"> - Left aligned text - </text> - + name="Test Floater" + save_rect="true" + title="TEST FLOATER" + save_dock_state="true" + save_visibility="true" + single_instance="true" + width="320"> + <chat_history + allow_html="true" + bg_readonly_color="ChatHistoryBgColor" + bg_writeable_color="ChatHistoryBgColor" + border_visible="true" + follows="all" + font="SansSerif" + left="1" + top="20" + layout="topleft" + height="260" + name="chat_history" + parse_highlights="true" + text_color="ChatHistoryTextColor" + text_readonly_color="ChatHistoryTextColor" + width="320"> +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. +Really long line that is long enough to wrap once with jyg descenders. + </chat_history> </floater> diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 9702bd41c8..e8e4a9dbb2 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -154,7 +154,15 @@ left="0" name="favorite" image_drag_indication="arrow_down.tga" - chevron_button_tool_tip="Show more of My Favorites" - bottom="62" - width="590" /> + bottom="62" + width="590"> + <chevron_button name=">>" + image_unselected="TabIcon_Close_Off" + image_selected="TabIcon_Close_Off" + tab_stop="false" + follows="left|bottom" + tool_tip="Show more of My Favorites" + width="15" + height="15"/> + </favorites_bar> </panel> diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index ea78f6d0dd..d32952b04f 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -53,35 +53,40 @@ name="voice_icon" width="22" height="18" - top="21" + top="21" + follows="right|top" image_name="parcel_lght_VoiceNo" /> <fly_icon name="fly_icon" width="22" height="18" - top="21" + top="21" + follows="right|top" image_name="parcel_lght_FlyNo" /> <push_icon name="push_icon" width="22" height="18" - top="21" + top="21" + follows="right|top" image_name="parcel_lght_PushNo" /> <build_icon name="build_icon" width="22" height="18" - top="21" + top="21" + follows="right|top" image_name="parcel_lght_BuildNo" /> <scripts_icon name="scripts_icon" width="22" height="18" - top="21" + top="21" + follows="right|top" image_name="parcel_lght_ScriptsNo" /> <!-- NOTE: Placeholder icon, there is no dark grayscale version --> @@ -89,7 +94,8 @@ name="damage_icon" width="22" height="18" - top="21" + top="21" + follows="right|top" image_name="parcel_lght_Damage" /> <!-- Default text color is invisible on top of nav bar background --> @@ -98,6 +104,7 @@ width="35" height="18" top="16" + follows="right|top" halign="right" font="SansSerifSmall" text_color="TextFgColor" |