summaryrefslogtreecommitdiff
path: root/indra/llui/llaccordionctrltab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llaccordionctrltab.cpp')
-rw-r--r--indra/llui/llaccordionctrltab.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 54bb328a18..20e4b7867c 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -76,6 +76,8 @@ public:
std::string getTitle();
void setTitle(const std::string& title, const std::string& hl);
+ void setTitleFontStyle(std::string style);
+
void setSelected(bool is_selected) { mIsSelected = is_selected; }
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
@@ -102,6 +104,9 @@ private:
LLPointer<LLUIImage> mImageHeaderPressed;
LLPointer<LLUIImage> mImageHeaderFocused;
+ // style saved when applying it in setTitleFontStyle
+ LLStyle::Params mStyleParams;
+
LLUIColor mHeaderBGColor;
bool mNeedsHighlight;
@@ -170,12 +175,23 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitle(const std::string& t
{
LLTextUtil::textboxSetHighlightedVal(
mHeaderTextbox,
- LLStyle::Params(),
+ mStyleParams,
title,
hl);
}
}
+void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleFontStyle(std::string style)
+{
+ if (mHeaderTextbox)
+ {
+ std::string text = mHeaderTextbox->getText();
+ mStyleParams.font(mHeaderTextbox->getDefaultFont());
+ mStyleParams.font.style(style);
+ mHeaderTextbox->setText(text, mStyleParams);
+ }
+}
+
void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw()
{
S32 width = getRect().getWidth();
@@ -495,6 +511,15 @@ void LLAccordionCtrlTab::setTitle(const std::string& title, const std::string& h
}
}
+void LLAccordionCtrlTab::setTitleFontStyle(std::string style)
+{
+ LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME);
+ if (header)
+ {
+ header->setTitleFontStyle(style);
+ }
+}
+
boost::signals2::connection LLAccordionCtrlTab::setFocusReceivedCallback(const focus_signal_t::slot_type& cb)
{
LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME);