From 2307dec193fcb38e580ea2ae0521e1d0805bc716 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Mon, 18 Jan 2010 14:24:03 +0200 Subject: implemented Task EXT-572 Action buttons on toast should size to word for internationalization Changes: 1. Remove hard coded button's width. Now buttons will be reshaped to required size if the required width is bigger then default. 2. Default width is configurable now. --HG-- branch : product-engine --- indra/newview/lltoastnotifypanel.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoastnotifypanel.h') diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index 04525387b3..1f50c21f6f 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -57,7 +57,7 @@ public: virtual ~LLToastNotifyPanel(); protected: - LLButton* addButton(std::string const &name, const std::string& label, BOOL is_option, BOOL is_default); + LLButton* createButton(const LLSD& form_element, BOOL is_option); // Used for callbacks struct InstanceAndS32 @@ -69,8 +69,11 @@ protected: private: - void adjustPanelForScriptNotice(const boost::shared_ptr form); + typedef std::pair index_button_pair_t; + void adjustPanelForScriptNotice(S32 max_width, S32 max_height); void adjustPanelForTipNotice(); + void addDefaultButton(); + void updateButtonsLayout(const std::vector& buttons, S32 left_pad, S32 top); // panel elements LLTextBase* mTextBox; -- cgit v1.2.3