From 995c18b1c7eb8fd23c0a35d5f504c03b7f2b144f Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 2 Nov 2009 19:28:24 -0800 Subject: removed picture_style from LLButton::Params and allow empty labels --- indra/llui/llbutton.cpp | 32 +++------------------- indra/llui/llbutton.h | 5 +--- indra/llui/llfloater.cpp | 1 - indra/llui/llflyoutbutton.cpp | 1 + indra/llui/llmenugl.cpp | 2 -- indra/llui/llscrollbar.cpp | 2 ++ indra/llui/lltabcontainer.cpp | 4 ++- indra/newview/llchiclet.cpp | 3 -- indra/newview/lldebugmessagebox.cpp | 1 + indra/newview/llfavoritesbar.cpp | 1 + .../default/xui/en/floater_animation_preview.xml | 2 -- .../skins/default/xui/en/floater_avatar_picker.xml | 2 -- .../skins/default/xui/en/floater_camera.xml | 7 ----- .../skins/default/xui/en/floater_color_picker.xml | 1 - .../skins/default/xui/en/floater_gesture.xml | 3 -- .../skins/default/xui/en/floater_lagmeter.xml | 3 -- .../skins/default/xui/en/floater_media_browser.xml | 2 -- .../skins/default/xui/en/floater_moveview.xml | 6 ---- .../skins/default/xui/en/floater_report_abuse.xml | 1 - .../skins/default/xui/en/floater_test_button.xml | 2 -- .../skins/default/xui/en/floater_texture_ctrl.xml | 1 - .../newview/skins/default/xui/en/floater_tools.xml | 27 ------------------ .../skins/default/xui/en/inspect_avatar.xml | 4 --- .../newview/skins/default/xui/en/inspect_group.xml | 1 - .../skins/default/xui/en/inspect_object.xml | 2 -- .../default/xui/en/panel_avatar_list_item.xml | 2 -- .../skins/default/xui/en/panel_bottomtray.xml | 1 - .../skins/default/xui/en/panel_edit_pick.xml | 1 - .../skins/default/xui/en/panel_edit_wearable.xml | 1 - .../default/xui/en/panel_group_info_sidetray.xml | 2 -- .../skins/default/xui/en/panel_group_list_item.xml | 2 -- .../skins/default/xui/en/panel_landmarks.xml | 3 -- .../skins/default/xui/en/panel_navigation_bar.xml | 4 --- .../default/xui/en/panel_notifications_channel.xml | 1 - .../newview/skins/default/xui/en/panel_people.xml | 11 -------- .../skins/default/xui/en/panel_pick_info.xml | 1 - .../skins/default/xui/en/panel_pick_list_item.xml | 1 - indra/newview/skins/default/xui/en/panel_picks.xml | 3 -- .../newview/skins/default/xui/en/panel_places.xml | 1 - .../default/xui/en/panel_preferences_alerts.xml | 2 -- .../default/xui/en/panel_preferences_sound.xml | 7 ----- .../default/xui/en/panel_prim_media_controls.xml | 18 ------------ .../skins/default/xui/en/panel_profile_view.xml | 1 - .../skins/default/xui/en/panel_progress.xml | 1 - .../skins/default/xui/en/panel_scrolling_param.xml | 2 -- .../default/xui/en/panel_teleport_history.xml | 1 - .../default/xui/en/panel_teleport_history_item.xml | 2 -- .../skins/default/xui/en/widgets/combo_box.xml | 2 -- .../default/xui/en/widgets/location_input.xml | 2 -- .../skins/default/xui/en/widgets/search_editor.xml | 4 +-- .../skins/default/xui/es/floater_script_debug.xml | 2 +- .../skins/default/xui/it/floater_script_debug.xml | 2 +- .../skins/default/xui/nl/floater_script_debug.xml | 2 +- .../skins/default/xui/pt/floater_script_debug.xml | 2 +- 54 files changed, 19 insertions(+), 181 deletions(-) (limited to 'indra') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index a7946cacf5..8daceb9485 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -95,8 +95,7 @@ LLButton::Params::Params() is_toggle("is_toggle", false), scale_image("scale_image", true), hover_glow_amount("hover_glow_amount"), - commit_on_return("commit_on_return", true), - picture_style("picture_style", false) + commit_on_return("commit_on_return", true) { addSynonym(is_toggle, "toggle"); held_down_delay.seconds = 0.5f; @@ -153,17 +152,9 @@ LLButton::LLButton(const LLButton::Params& p) static LLUICachedControl llbutton_orig_h_pad ("UIButtonOrigHPad", 0); 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) + if (!p.label_selected.isProvided()) { - if (!p.label.isProvided()) - { - mUnselectedLabel = p.name(); - } - if (!p.label_selected.isProvided()) - { - mSelectedLabel = mUnselectedLabel.getString(); - } + mSelectedLabel = mUnselectedLabel; } // Hack to make sure there is space for at least one character @@ -1099,19 +1090,4 @@ void LLButton::resetMouseDownTimer() { mMouseDownTimer.stop(); mMouseDownTimer.reset(); -} - - -// *TODO: Remove this function after the initial XUI XML re-export pass. -// static -void LLButton::setupParamsForExport(Params& p, LLView* parent) -{ - std::string label = p.label; - if (label.empty()) - { - //if our label is empty this is a picture style button - p.picture_style = true; - } - - LLUICtrl::setupParamsForExport(p, parent); -} +} \ No newline at end of file diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 85580a98bf..08f289092f 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -115,8 +115,7 @@ public: // misc Optional is_toggle, scale_image, - commit_on_return, - picture_style; //if true, don't display label + commit_on_return; Optional hover_glow_amount; Optional held_down_delay; @@ -247,8 +246,6 @@ protected: LLFrameTimer mMouseDownTimer; - // If the label is empty, set the picture_style attribute - static void setupParamsForExport(Params& p, LLView* parent); private: void drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size); void resetMouseDownTimer(); diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 26a8b6c48f..90ba2dc41f 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1826,7 +1826,6 @@ void LLFloater::buildButtons() LLButton::Params p; p.name(sButtonNames[i]); p.rect(btn_rect); - p.label(""); p.image_unselected.name(sButtonActiveImageNames[i]); // Selected, no matter if hovered or not, is "pressed" p.image_selected.name(sButtonPressedImageNames[i]); diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp index 3483bac782..abb0b869eb 100644 --- a/indra/llui/llflyoutbutton.cpp +++ b/indra/llui/llflyoutbutton.cpp @@ -48,6 +48,7 @@ LLFlyoutButton::LLFlyoutButton(const Params& p) // Text label button LLButton::Params bp(p.action_button); bp.name(p.label); + bp.label(p.label); bp.rect.left(0).bottom(0).width(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH).height(getRect().getHeight()); bp.click_callback.function(boost::bind(&LLFlyoutButton::onActionButtonClick, this, _2)); bp.follows.flags(FOLLOWS_ALL); diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 91e7e46195..7847cc1790 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1555,8 +1555,6 @@ LLMenuScrollItem::LLMenuScrollItem(const Params& p) } LLButton::Params bparams; - bparams.label(""); - bparams.label_selected(""); bparams.mouse_opaque(true); bparams.scale_image(false); bparams.click_callback(p.scroll_callback); diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index dfd315d451..b450ecbbf9 100644 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -115,6 +115,7 @@ LLScrollbar::LLScrollbar(const Params & p) LLButton::Params up_btn(mOrientation == VERTICAL ? p.up_button : p.left_button); up_btn.name(std::string("Line Up")); + up_btn.label(std::string("Line Up")); up_btn.rect(line_up_rect); up_btn.click_callback.function(boost::bind(&LLScrollbar::onLineUpBtnPressed, this, _2)); up_btn.mouse_held_callback.function(boost::bind(&LLScrollbar::onLineUpBtnPressed, this, _2)); @@ -125,6 +126,7 @@ LLScrollbar::LLScrollbar(const Params & p) LLButton::Params down_btn(mOrientation == VERTICAL ? p.down_button : p.right_button); down_btn.name(std::string("Line Down")); + down_btn.label(std::string("Line Down")); down_btn.rect(line_down_rect); down_btn.follows.flags(FOLLOWS_RIGHT|FOLLOWS_BOTTOM); down_btn.click_callback.function(boost::bind(&LLScrollbar::onLineDownBtnPressed, this, _2)); diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index cde4c75518..6ca9c4ceda 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -927,7 +927,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) textbox = LLUICtrlFactory::create (params); LLButton::Params p; - p.name(""); + p.name("placeholder"); btn = LLUICtrlFactory::create(p); } else @@ -1645,6 +1645,7 @@ void LLTabContainer::initButtons() LLButton::Params prev_btn_params; prev_btn_params.name(std::string("Up Arrow")); + prev_btn_params.label(std::string("Up Arrow")); prev_btn_params.rect(up_arrow_btn_rect); prev_btn_params.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT); prev_btn_params.image_unselected.name("scrollbutton_up_out_blue.tga"); @@ -1654,6 +1655,7 @@ void LLTabContainer::initButtons() LLButton::Params next_btn_params; next_btn_params.name(std::string("Down Arrow")); + next_btn_params.label(std::string("Down Arrow")); next_btn_params.rect(down_arrow_btn_rect); next_btn_params.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_LEFT); next_btn_params.image_unselected.name("scrollbutton_down_out_blue.tga"); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index bad61101c1..7214ac2886 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1264,17 +1264,14 @@ LLTalkButton::Params::Params() speak_button.font(LLFontGL::getFontSansSerifSmall()); speak_button.tab_stop(false); speak_button.is_toggle(true); - speak_button.picture_style(true); // Use default button art. JC //speak_button.image_selected(LLUI::getUIImage("SegmentedBtn_Left_Selected")); //speak_button.image_unselected(LLUI::getUIImage("SegmentedBtn_Left_Off")); show_button.name("right"); - show_button.label(LLStringUtil::null); show_button.rect(LLRect(0, 0, 20, 0)); show_button.tab_stop(false); show_button.is_toggle(true); - show_button.picture_style(true); show_button.image_selected(LLUI::getUIImage("ComboButton_Selected")); show_button.image_unselected(LLUI::getUIImage("ComboButton_Off")); diff --git a/indra/newview/lldebugmessagebox.cpp b/indra/newview/lldebugmessagebox.cpp index 29e375c9fa..7814e94dfd 100644 --- a/indra/newview/lldebugmessagebox.cpp +++ b/indra/newview/lldebugmessagebox.cpp @@ -124,6 +124,7 @@ LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarTy LLButton::Params p; p.name(std::string("Animate")); + p.label(std::string("Animate")); p.rect(LLRect(20, 45, 180, 25)); p.click_callback.function(boost::bind(&LLDebugVarMessageBox::onAnimateClicked, this, _2)); mAnimateButton = LLUICtrlFactory::create(p); diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index a6afbc05be..04860b061c 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -750,6 +750,7 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width) bparams.tab_stop(false); bparams.font(mFont); bparams.name(">>"); + bparams.label(">>"); bparams.tool_tip(mChevronButtonToolTip); bparams.click_callback.function(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this)); diff --git a/indra/newview/skins/default/xui/en/floater_animation_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_preview.xml index ab3d5722f0..ebce758d3d 100644 --- a/indra/newview/skins/default/xui/en/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_animation_preview.xml @@ -455,7 +455,6 @@ Maximum animation length is [MAX_LENGTH] seconds. layout="topleft" left="10" name="play_btn" - picture_style="true" tool_tip="Play/pause your animation" top_pad="0" width="28" /> @@ -467,7 +466,6 @@ Maximum animation length is [MAX_LENGTH] seconds. layout="topleft" left_pad="4" name="stop_btn" - picture_style="true" tool_tip="Stop animation playback" top_delta="0" width="28" /> 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 3f4f8b197f..8cfe5288fd 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml @@ -116,7 +116,6 @@ height="20" width="20" name="RefreshFriends" - picture_style="true" image_overlay="Refresh_Off"> @@ -188,7 +187,6 @@ height="28" width="28" name="Refresh" - picture_style="true" image_overlay="Refresh_Off" /> @@ -113,7 +109,6 @@ layout="topleft" left_pad="5" name="group_view" - picture_style="true" tool_tip="Group View" top="2" width="30"> @@ -128,7 +123,6 @@ layout="topleft" left="5" name="front_view" - picture_style="true" tool_tip="Front View" top_pad="5" width="30"> @@ -143,7 +137,6 @@ layout="topleft" left_pad="5" name="mouselook_view" - picture_style="true" tool_tip="Mouselook View" top_pad="-30" width="30"> diff --git a/indra/newview/skins/default/xui/en/floater_color_picker.xml b/indra/newview/skins/default/xui/en/floater_color_picker.xml index 686b8dc40f..7c6376d84a 100644 --- a/indra/newview/skins/default/xui/en/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_color_picker.xml @@ -180,7 +180,6 @@ layout="topleft" left_pad="30" name="color_pipette" - picture_style="true" width="32" /> @@ -367,7 +359,6 @@ function="MediaCtrl.CommitURL" /> is_toggle="true" layout="topleft" scale_image="false" - picture_style="true" tool_tip="Mute This Media" top_delta="22" min_width="24" @@ -391,7 +382,6 @@ function="MediaCtrl.CommitURL" /> image_unselected="media_btn_scrollup.png" layout="topleft" tool_tip="Volume up" - picture_style="true" scale_image="true" min_width="20" width="20" > @@ -414,7 +404,6 @@ function="MediaCtrl.CommitURL" /> image_unselected="media_btn_scrolldown.png" layout="topleft" tool_tip="Volume down" - picture_style="true" scale_image="true" min_width="20" width="20"> @@ -446,7 +435,6 @@ function="MediaCtrl.CommitURL" /> image_unselected="media_btn_scrollup.png" layout="topleft" tool_tip="Scroll up" - picture_style="true" scale_image="false" left="12" top_delta="4" @@ -460,7 +448,6 @@ function="MediaCtrl.CommitURL" /> layout="topleft" left="3" tool_tip="Scroll left" - picture_style="true" scale_image="false" top="12" min_width="8" @@ -473,7 +460,6 @@ function="MediaCtrl.CommitURL" /> layout="topleft" left_pad="9" tool_tip="Scroll right" - picture_style="true" scale_image="false" top_delta="0" min_width="8" @@ -486,7 +472,6 @@ function="MediaCtrl.CommitURL" /> layout="topleft" left="12" tool_tip="Scroll down" - picture_style="true" scale_image="false" top="20" min_width="8" @@ -506,7 +491,6 @@ function="MediaCtrl.CommitURL" /> image_unselected="media_btn_optimalzoom.png" layout="topleft" tool_tip="Zoom" - picture_style="true" min_width="22" width="22"> image_unselected="media_btn_newwindow.png" layout="topleft" tool_tip = "Open URL in browser" - picture_style="true" top_delta="-3" min_width="24" width="24" > @@ -579,7 +562,6 @@ function="MediaCtrl.CommitURL" /> image_unselected="media_btn_done.png" layout="topleft" tool_tip ="Close media control" - picture_style="true" top_delta="-4" width="21" > diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml index 21ecd01839..44afadf65a 100644 --- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml +++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml @@ -56,7 +56,6 @@ layout="topleft" left="2" name="less" - picture_style="true" tab_stop="false" top="0" width="132" /> @@ -70,7 +69,6 @@ layout="topleft" left_pad="2" name="more" - picture_style="true" tab_stop="false" top_delta="0" width="132" /> diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml index 4169c6245b..bbfffe7bab 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -176,7 +176,6 @@ layout="topleft" left="10" name="gear_btn" - picture_style="true" top="5" width="18" /> diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml index 73a7d95ff4..289daee7c2 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml @@ -56,7 +56,6 @@ left_pad="3" right="-31" name="info_btn" - picture_style="true" top_delta="-2" width="16" />