summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llcombobox.cpp10
-rw-r--r--indra/llui/llcombobox.h3
-rw-r--r--indra/llui/llpanel.h1
-rw-r--r--indra/llui/llscrolllistctrl.cpp2
-rw-r--r--indra/llui/lltexteditor.cpp2
-rw-r--r--indra/llui/lluictrl.h1
-rw-r--r--indra/llui/lluictrlfactory.cpp10
-rw-r--r--indra/llui/lluictrlfactory.h2
8 files changed, 22 insertions, 9 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index fc7a29887b..667985c699 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -43,6 +43,7 @@ LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString
mDrawButton(TRUE),
mTextEntry(NULL),
mArrowImage(NULL),
+ mArrowImageWidth(8),
mAllowTextEntry(FALSE),
mMaxChars(20),
mTextEntryTentative(TRUE),
@@ -99,6 +100,7 @@ LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString
LLUUID arrow_image_id( LLUI::sAssetsGroup->getString("combobox_arrow.tga") );
mArrowImage = LLUI::sImageProvider->getUIImageByID(arrow_image_id);
+ mArrowImageWidth = llmax(8,mArrowImage->getWidth()); // In case image hasn't loaded yet
}
@@ -502,7 +504,7 @@ void LLComboBox::setButtonVisible(BOOL visible)
LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0);
if (visible)
{
- text_entry_rect.mRight -= mArrowImage->getWidth() + 2 * LLUI::sConfigGroup->getS32("DropShadowButton");
+ text_entry_rect.mRight -= mArrowImageWidth + 2 * LLUI::sConfigGroup->getS32("DropShadowButton");
}
//mTextEntry->setRect(text_entry_rect);
mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE);
@@ -525,7 +527,7 @@ void LLComboBox::draw()
// Paste the graphic on the right edge
if (!mArrowImage.isNull())
{
- S32 left = mRect.getWidth() - mArrowImage->getWidth() - LLUI::sConfigGroup->getS32("DropShadowButton");
+ S32 left = mRect.getWidth() - mArrowImageWidth - LLUI::sConfigGroup->getS32("DropShadowButton");
gl_draw_image( left, 0, mArrowImage,
LLColor4::white);
@@ -825,7 +827,7 @@ void LLComboBox::setAllowTextEntry(BOOL allow, S32 max_chars, BOOL set_tentative
if (allow && !mAllowTextEntry)
{
S32 shadow_size = LLUI::sConfigGroup->getS32("DropShadowButton");
- mButton->setRect(LLRect( mRect.getWidth() - mArrowImage->getWidth() - 2 * shadow_size,
+ mButton->setRect(LLRect( mRect.getWidth() - mArrowImageWidth - 2 * shadow_size,
rect.mTop, rect.mRight, rect.mBottom));
mButton->setTabStop(FALSE);
@@ -835,7 +837,7 @@ void LLComboBox::setAllowTextEntry(BOOL allow, S32 max_chars, BOOL set_tentative
if (!mTextEntry)
{
LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0);
- text_entry_rect.mRight -= mArrowImage->getWidth() + 2 * LLUI::sConfigGroup->getS32("DropShadowButton");
+ text_entry_rect.mRight -= mArrowImageWidth + 2 * LLUI::sConfigGroup->getS32("DropShadowButton");
mTextEntry = new LLLineEditor("combo_text_entry",
text_entry_rect,
"",
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index 1ec31ec1c0..faf99937c9 100644
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -167,8 +167,9 @@ protected:
BOOL mDrawButton;
LLLineEditor* mTextEntry;
LLPointer<LLImageGL> mArrowImage;
+ S32 mArrowImageWidth;
BOOL mAllowTextEntry;
- S32 mMaxChars;
+ S32 mMaxChars;
BOOL mTextEntryTentative;
void (*mPrearrangeCallback)(LLUICtrl*,void*);
void (*mTextEntryCallback)(LLLineEditor*, void*);
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 59922994c1..fdf4a117d4 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -17,6 +17,7 @@
#include "llviewborder.h"
#include "v4color.h"
#include <list>
+#include <queue>
const S32 LLPANEL_BORDER_WIDTH = 1;
const BOOL BORDER_YES = TRUE;
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index c168bbe5a8..f2ae318dca 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -2720,7 +2720,7 @@ void LLScrollListCtrl::setFocus(BOOL b)
if (!getFirstSelected())
{
selectFirstItem();
- onCommit();
+ //onCommit(); // SJB: selectFirstItem() will call onCommit() if appropriate
}
LLUICtrl::setFocus(b);
}
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 710e333796..de34aabb1f 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -3934,6 +3934,8 @@ LLXMLNodePtr LLTextEditor::getXML(bool save_children) const
node->createChild("word_wrap", TRUE)->setBoolValue(mWordWrap);
+ node->createChild("hide_scrollbar", TRUE)->setBoolValue(mHideScrollbarForShortDocs);
+
addColorXML(node, mCursorColor, "cursor_color", "TextCursorColor");
addColorXML(node, mFgColor, "text_color", "TextFgColor");
addColorXML(node, mReadOnlyFgColor, "text_readonly_color", "TextFgReadOnlyColor");
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index f58b7d6e16..1418151201 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -17,7 +17,6 @@
//
// Classes
//
-class LLViewerImage;
class LLFontGL;
class LLButton;
class LLTextBox;
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 8ae9fd0284..21278455da 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -191,12 +191,18 @@ LLUICtrlFactory::LLUICtrlFactory()
LLUICtrlCreator<LLMenuBarGL>::registerCreator(LL_MENU_BAR_GL_TAG, this);
LLUICtrlCreator<LLScrollingPanelList>::registerCreator(LL_SCROLLING_PANEL_LIST_TAG, this);
+ setupPaths();
+}
+
+void LLUICtrlFactory::setupPaths()
+{
LLString filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "paths.xml");
LLXMLNodePtr root;
BOOL success = LLXMLNode::parseFile(filename, root, NULL);
-
+ mXUIPaths.clear();
+
if (!success)
{
LLString slash = gDirUtilp->getDirDelimiter();
@@ -220,7 +226,7 @@ LLUICtrlFactory::LLUICtrlFactory()
path_val_ui.setArg("[Language]", language);
LLString fullpath = app_dir + path_val_ui.getString();
- if (mXUIPaths.empty() || (find(mXUIPaths.begin(), mXUIPaths.end(), fullpath) == mXUIPaths.end()) )
+ if (std::find(mXUIPaths.begin(), mXUIPaths.end(), fullpath) == mXUIPaths.end())
{
mXUIPaths.push_back(app_dir + path_val_ui.getString());
}
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index b3bd5c9020..cb6864bafd 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -55,6 +55,8 @@ public:
// do not call! needs to be public so run-time can clean up the singleton
virtual ~LLUICtrlFactory();
+ void setupPaths();
+
void buildFloater(LLFloater* floaterp, const LLString &filename,
const LLCallbackMap::map_t* factory_map = NULL, BOOL open = TRUE);