summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-05-04 21:57:06 +0000
committerDon Kjer <don@lindenlab.com>2007-05-04 21:57:06 +0000
commit70aaa3e444cf9cb067addcbdde237762bd62fcf4 (patch)
tree4013659d2335c4681b8c93ea795cf8ccb8aa55cd /indra/llui
parent08d746156b56d8b72919af8cbca25609c855ef82 (diff)
svn merge -r 61148:61343 svn+ssh://svn/svn/linden/branches/maintenance into release
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llbutton.cpp2
-rw-r--r--indra/llui/lldraghandle.cpp1
-rw-r--r--indra/llui/llfloater.cpp10
-rw-r--r--indra/llui/llmenugl.cpp4
-rw-r--r--indra/llui/lltextbox.cpp16
-rw-r--r--indra/llui/lltextbox.h4
6 files changed, 24 insertions, 13 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 9f66daf890..ddd81e77b3 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -628,7 +628,7 @@ void LLButton::draw()
mGLFont->render(label, 0, (F32)x, (F32)(LLBUTTON_V_PAD + y_offset),
label_color,
mHAlign, LLFontGL::BOTTOM,
- mDropShadowedText ? LLFontGL::DROP_SHADOW : LLFontGL::NORMAL,
+ mDropShadowedText ? LLFontGL::DROP_SHADOW_SOFT : LLFontGL::NORMAL,
U32_MAX, drawable_width,
NULL, FALSE, FALSE);
}
diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp
index 599a85021b..25b41e44e1 100644
--- a/indra/llui/lldraghandle.cpp
+++ b/indra/llui/lldraghandle.cpp
@@ -102,6 +102,7 @@ void LLDragHandleTop::setTitle(const LLString& title)
const LLFontGL* font = gResMgr->getRes( LLFONT_SANSSERIF );
mTitleBox = new LLTextBox( "Drag Handle Title", mRect, trimmed_title, font );
mTitleBox->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT);
+ mTitleBox->setFontStyle(LLFontGL::DROP_SHADOW_SOFT);
reshapeTitleBox();
// allow empty titles, as default behavior replaces them with title box name
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 40c11c69cc..3da53275c7 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1919,7 +1919,11 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus)
LLFloater* floaterp = (LLFloater*)(*view_it);
sendChildToFront(floaterp);
- floaterp->setMinimized(FALSE);
+ // always unminimize dependee, but allow dependents to stay minimized
+ if (!floaterp->isDependent())
+ {
+ floaterp->setMinimized(FALSE);
+ }
}
floaters_to_move.clear();
@@ -1931,7 +1935,9 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus)
if (dependent)
{
sendChildToFront(dependent);
- dependent->setMinimized(FALSE);
+ //don't un-minimize dependent windows automatically
+ // respect user's wishes
+ //dependent->setMinimized(FALSE);
}
++dependent_it;
}
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index f5dcae5787..2cae50bd04 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -497,7 +497,7 @@ void LLMenuItemGL::draw( void )
U8 font_style = mStyle;
if (LLMenuItemGL::sDropShadowText && getEnabled() && !mDrawTextDisabled )
{
- font_style |= LLFontGL::DROP_SHADOW;
+ font_style |= LLFontGL::DROP_SHADOW_SOFT;
}
if ( getEnabled() && getHighlight() )
@@ -1728,7 +1728,7 @@ void LLMenuItemBranchDownGL::draw( void )
U8 font_style = mStyle;
if (LLMenuItemGL::sDropShadowText && getEnabled() && !mDrawTextDisabled )
{
- font_style |= LLFontGL::DROP_SHADOW;
+ font_style |= LLFontGL::DROP_SHADOW_SOFT;
}
LLColor4 color;
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp
index 2afa32eccd..48ff6afbd5 100644
--- a/indra/llui/lltextbox.cpp
+++ b/indra/llui/lltextbox.cpp
@@ -28,7 +28,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLRect& rect, const LLString& t
mBorderColor( LLUI::sColorsGroup->getColor( "DefaultHighlightLight" ) ),
mBackgroundVisible( FALSE ),
mBorderVisible( FALSE ),
- mDropshadowVisible( TRUE ),
+ mFontStyle(LLFontGL::DROP_SHADOW_SOFT),
mBorderDropShadowVisible( FALSE ),
mHPad(0),
mVPad(0),
@@ -53,7 +53,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLString& text, F32 max_width,
mBorderColor(LLUI::sColorsGroup->getColor("DefaultHighlightLight")),
mBackgroundVisible(FALSE),
mBorderVisible(FALSE),
- mDropshadowVisible(TRUE),
+ mFontStyle(LLFontGL::DROP_SHADOW_SOFT),
mBorderDropShadowVisible(FALSE),
mHPad(0),
mVPad(0),
@@ -343,7 +343,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color )
S32 line_length = *iter;
mFontGL->render(mText.getWString(), cur_pos, (F32)x, (F32)y, color,
mHAlign, mVAlign,
- mDropshadowVisible ? LLFontGL::DROP_SHADOW : LLFontGL::NORMAL,
+ mFontStyle,
line_length, mRect.getWidth(), NULL, TRUE );
cur_pos += line_length + 1;
y -= llfloor(mFontGL->getLineHeight());
@@ -353,7 +353,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color )
{
mFontGL->render(mText.getWString(), 0, (F32)x, (F32)y, color,
mHAlign, mVAlign,
- mDropshadowVisible ? LLFontGL::DROP_SHADOW : LLFontGL::NORMAL,
+ mFontStyle,
S32_MAX, mRect.getWidth(), NULL, TRUE);
}
}
@@ -386,8 +386,6 @@ LLXMLNodePtr LLTextBox::getXML(bool save_children) const
node->createChild("border_visible", TRUE)->setBoolValue(mBorderVisible);
- node->createChild("drop_shadow_visible", TRUE)->setBoolValue(mDropshadowVisible);
-
node->createChild("border_drop_shadow_visible", TRUE)->setBoolValue(mBorderDropShadowVisible);
node->createChild("h_pad", TRUE)->setIntValue(mHPad);
@@ -427,6 +425,12 @@ LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f
text_box->initFromXML(node, parent);
+ LLString font_style;
+ if (node->getAttributeString("font-style", font_style))
+ {
+ text_box->mFontStyle = LLFontGL::getStyleFromString(font_style);
+ }
+
if(node->hasAttribute("text_color"))
{
LLColor4 color;
diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h
index 56c00eb8b3..8972450c30 100644
--- a/indra/llui/lltextbox.h
+++ b/indra/llui/lltextbox.h
@@ -54,7 +54,7 @@ public:
void setBackgroundVisible(BOOL visible) { mBackgroundVisible = visible; }
void setBorderVisible(BOOL visible) { mBorderVisible = visible; }
- void setDropshadowVisible(BOOL visible) { mDropshadowVisible = visible; }
+ void setFontStyle(U8 style) { mFontStyle = style; }
void setBorderDropshadowVisible(BOOL visible){ mBorderDropShadowVisible = visible; }
void setHPad(S32 pixels) { mHPad = pixels; }
void setVPad(S32 pixels) { mVPad = pixels; }
@@ -92,7 +92,7 @@ protected:
BOOL mBackgroundVisible;
BOOL mBorderVisible;
- BOOL mDropshadowVisible; // Draws black dropshadow below and to the right of the text.
+ U8 mFontStyle; // style bit flags for font
BOOL mBorderDropShadowVisible;
S32 mHPad;