summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichard <none@none>2010-01-15 14:27:44 -0800
committerrichard <none@none>2010-01-15 14:27:44 -0800
commita61cf40d815884fe2839ed09a43238cc47efef28 (patch)
tree04575f5847b95e9294d408202daef4420da771d0
parenta4850a1a0bc1f6faa9b820850f678d6aab655397 (diff)
parentd0458d8e2d73804786467ad226b5102a1855772a (diff)
merge
-rw-r--r--indra/llui/lltextbase.cpp14
-rw-r--r--indra/newview/llfolderview.cpp11
-rw-r--r--indra/newview/llfolderviewitem.cpp1
-rw-r--r--indra/newview/llstatusbar.cpp22
-rw-r--r--indra/newview/llstatusbar.h2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/chat_history.xml22
-rw-r--r--indra/newview/skins/default/xui/en/widgets/menu.xml2
7 files changed, 39 insertions, 35 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 5ebf49c488..17aecaf32f 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -346,7 +346,8 @@ void LLTextBase::drawSelectionBackground()
S32 segment_line_start = segmentp->getStart() + segment_offset;
S32 segment_line_end = llmin(segmentp->getEnd(), line_iter->mDocIndexEnd);
- S32 segment_width, segment_height;
+ S32 segment_width = 0;
+ S32 segment_height = 0;
// if selection after beginning of segment
if(selection_left >= segment_line_start)
@@ -433,7 +434,8 @@ void LLTextBase::drawCursor()
if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode() && !hasSelection())
{
- S32 segment_width, segment_height;
+ S32 segment_width = 0;
+ S32 segment_height = 0;
segmentp->getDimensions(mCursorPos - segmentp->getStart(), 1, segment_width, segment_height);
S32 width = llmax(CURSOR_THICKNESS, segment_width);
cursor_rect.mRight = cursor_rect.mLeft + width;
@@ -2443,10 +2445,12 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip)
bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
{
- height = mFontHeight;
+ height = 0;
+ width = 0;
bool force_newline = false;
if (num_chars > 0)
{
+ height = mFontHeight;
LLWString text = mEditor.getWText();
// if last character is a newline, then return true, forcing line break
llwchar last_char = text[mStart + first_char + num_chars - 1];
@@ -2461,10 +2465,6 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt
width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars);
}
}
- else
- {
- width = 0;
- }
LLUIImagePtr image = mStyle->getImage();
if( image.notNull())
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 9aed403991..afde543ca8 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -78,7 +78,7 @@
///----------------------------------------------------------------------------
const S32 RENAME_WIDTH_PAD = 4;
-const S32 RENAME_HEIGHT_PAD = 2;
+const S32 RENAME_HEIGHT_PAD = 1;
const S32 AUTO_OPEN_STACK_DEPTH = 16;
const S32 MIN_ITEM_WIDTH_VISIBLE = LLFolderViewItem::ICON_WIDTH
+ LLFolderViewItem::ICON_PAD
@@ -2221,10 +2221,9 @@ void LLFolderView::updateRenamerPosition()
{
if(mRenameItem)
{
- LLFontGL* font = getLabelFontForStyle(mLabelStyle);
-
- S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD - 1 + mRenameItem->getIndentation();
- S32 y = llfloor(mRenameItem->getRect().getHeight() - font->getLineHeight()-2);
+ // See also LLFolderViewItem::draw()
+ S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mRenameItem->getIndentation();
+ S32 y = mRenameItem->getRect().getHeight() - mRenameItem->getItemHeight() - RENAME_HEIGHT_PAD;
mRenameItem->localPointToScreen( x, y, &x, &y );
screenPointToLocal( x, y, &x, &y );
mRenamer->setOrigin( x, y );
@@ -2236,7 +2235,7 @@ void LLFolderView::updateRenamerPosition()
}
S32 width = llmax(llmin(mRenameItem->getRect().getWidth() - x, scroller_rect.getWidth() - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH);
- S32 height = llfloor(font->getLineHeight() + RENAME_HEIGHT_PAD);
+ S32 height = mRenameItem->getItemHeight() - RENAME_HEIGHT_PAD;
mRenamer->reshape( width, height, TRUE );
}
}
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 2363f51d80..4b48626b22 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -855,6 +855,7 @@ void LLFolderViewItem::draw()
ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, arrow_image->getImage(), sFgColor);
}
+ // See also LLFolderView::updateRenamerPosition()
F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation);
LLFontGL* font = getLabelFontForStyle(mLabelStyle);
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index b3b2b9ee5d..24895e7a35 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -107,7 +107,6 @@ const F32 ICON_TIMER_EXPIRY = 3.f; // How long the balance and health icons sho
const F32 ICON_FLASH_FREQUENCY = 2.f;
const S32 TEXT_HEIGHT = 18;
-static void onClickBuyCurrency(void*);
static void onClickHealth(void*);
static void onClickScriptDebug(void*);
static void onClickVolume(void*);
@@ -122,7 +121,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mTextTime(NULL),
mSGBandwidth(NULL),
mSGPacketLoss(NULL),
- mBtnBuyCurrency(NULL),
mBtnVolume(NULL),
mBalance(0),
mHealth(100),
@@ -153,8 +151,10 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mTextHealth = getChild<LLTextBox>("HealthText" );
mTextTime = getChild<LLTextBox>("TimeText" );
- mBtnBuyCurrency = getChild<LLButton>( "buycurrency" );
- mBtnBuyCurrency->setClickedCallback( onClickBuyCurrency, this );
+ getChild<LLUICtrl>("buycurrency")->setCommitCallback(
+ boost::bind(&LLStatusBar::onClickBuyCurrency, this));
+ getChild<LLUICtrl>("buyL")->setCommitCallback(
+ boost::bind(&LLStatusBar::onClickBuyCurrency, this));
mBtnVolume = getChild<LLButton>( "volume_btn" );
mBtnVolume->setClickedCallback( onClickVolume, this );
@@ -362,7 +362,8 @@ void LLStatusBar::refresh()
void LLStatusBar::setVisibleForMouselook(bool visible)
{
mTextTime->setVisible(visible);
- mBtnBuyCurrency->setVisible(visible);
+ getChild<LLUICtrl>("buycurrency")->setVisible(visible);
+ getChild<LLUICtrl>("buyL")->setVisible(visible);
mSGBandwidth->setVisible(visible);
mSGPacketLoss->setVisible(visible);
setBackgroundVisible(visible);
@@ -382,17 +383,18 @@ void LLStatusBar::setBalance(S32 balance)
{
std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance );
+ LLButton* btn_buy_currency = getChild<LLButton>("buycurrency");
LLStringUtil::format_map_t string_args;
string_args["[AMT]"] = llformat("%s", money_str.c_str());
std::string labe_str = getString("buycurrencylabel", string_args);
- mBtnBuyCurrency->setLabel(labe_str);
+ btn_buy_currency->setLabel(labe_str);
// Resize the balance button so that the label fits it, and the button expands to the left.
// *TODO: LLButton should have an option where to expand.
{
- S32 saved_right = mBtnBuyCurrency->getRect().mRight;
- mBtnBuyCurrency->autoResize();
- mBtnBuyCurrency->translate(saved_right - mBtnBuyCurrency->getRect().mRight, 0);
+ S32 saved_right = btn_buy_currency->getRect().mRight;
+ btn_buy_currency->autoResize();
+ btn_buy_currency->translate(saved_right - btn_buy_currency->getRect().mRight, 0);
}
if (mBalance && (fabs((F32)(mBalance - balance)) > gSavedSettings.getF32("UISndMoneyChangeThreshold")))
@@ -497,7 +499,7 @@ S32 LLStatusBar::getSquareMetersLeft() const
return mSquareMetersCredit - mSquareMetersCommitted;
}
-static void onClickBuyCurrency(void* data)
+void LLStatusBar::onClickBuyCurrency()
{
LLFloaterBuyCurrency::buyCurrency();
}
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 0e98da0fe4..21a98dd753 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -91,6 +91,7 @@ private:
// simple method to setup the part that holds the date
void setupDate();
+ void onClickBuyCurrency();
void onVolumeChanged(const LLSD& newvalue);
static void onMouseEnterVolume(LLUICtrl* ctrl);
@@ -103,7 +104,6 @@ private:
LLStatGraph *mSGBandwidth;
LLStatGraph *mSGPacketLoss;
- LLButton *mBtnBuyCurrency;
LLButton *mBtnVolume;
S32 mBalance;
diff --git a/indra/newview/skins/default/xui/en/widgets/chat_history.xml b/indra/newview/skins/default/xui/en/widgets/chat_history.xml
index 8785dff2ae..f6d1992c8e 100644
--- a/indra/newview/skins/default/xui/en/widgets/chat_history.xml
+++ b/indra/newview/skins/default/xui/en/widgets/chat_history.xml
@@ -1,23 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<chat_history
- message_header="panel_chat_header.xml"
- message_separator="panel_chat_separator.xml"
- left_text_pad="10"
- right_text_pad="15"
- left_widget_pad="0"
- right_widget_pad="10"
- top_separator_pad="5"
- bottom_separator_pad="5"
- top_header_pad="17"
- bottom_header_pad="10"
+ message_header="panel_chat_header.xml"
+ message_separator="panel_chat_separator.xml"
+ left_text_pad="10"
+ right_text_pad="15"
+ left_widget_pad="0"
+ right_widget_pad="10"
+ top_separator_pad="2"
+ bottom_separator_pad="2"
+ top_header_pad="12"
+ bottom_header_pad="5"
max_length="2147483647"
track_bottom="true"
name="chat_history"
type="string"
word_wrap="true"
+ line_spacing.multiple="1.0"
font="SansSerif">
<more_chat_text
mouse_opaque="true"
word_wrap="true"
/>
</chat_history>
+enabledcontrol \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/widgets/menu.xml b/indra/newview/skins/default/xui/en/widgets/menu.xml
index 53034afa61..58543338f6 100644
--- a/indra/newview/skins/default/xui/en/widgets/menu.xml
+++ b/indra/newview/skins/default/xui/en/widgets/menu.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<menu bg_color="MenuDefaultBgColor"
bg_visible="true"
- drop_shadow="false"
+ drop_shadow="true"
tear_off="false"
shortcut_pad="15">
</menu>