aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llcombobox.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/llui/llcombobox.cpp
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/llcombobox.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp
index b19be9a..7c3755a 100644
--- a/linden/indra/llui/llcombobox.cpp
+++ b/linden/indra/llui/llcombobox.cpp
@@ -62,6 +62,7 @@ LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString
62 mDrawButton(TRUE), 62 mDrawButton(TRUE),
63 mTextEntry(NULL), 63 mTextEntry(NULL),
64 mArrowImage(NULL), 64 mArrowImage(NULL),
65 mArrowImageWidth(8),
65 mAllowTextEntry(FALSE), 66 mAllowTextEntry(FALSE),
66 mMaxChars(20), 67 mMaxChars(20),
67 mTextEntryTentative(TRUE), 68 mTextEntryTentative(TRUE),
@@ -118,6 +119,7 @@ LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString
118 119
119 LLUUID arrow_image_id( LLUI::sAssetsGroup->getString("combobox_arrow.tga") ); 120 LLUUID arrow_image_id( LLUI::sAssetsGroup->getString("combobox_arrow.tga") );
120 mArrowImage = LLUI::sImageProvider->getUIImageByID(arrow_image_id); 121 mArrowImage = LLUI::sImageProvider->getUIImageByID(arrow_image_id);
122 mArrowImageWidth = llmax(8,mArrowImage->getWidth()); // In case image hasn't loaded yet
121} 123}
122 124
123 125
@@ -521,7 +523,7 @@ void LLComboBox::setButtonVisible(BOOL visible)
521 LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0); 523 LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0);
522 if (visible) 524 if (visible)
523 { 525 {
524 text_entry_rect.mRight -= mArrowImage->getWidth() + 2 * LLUI::sConfigGroup->getS32("DropShadowButton"); 526 text_entry_rect.mRight -= mArrowImageWidth + 2 * LLUI::sConfigGroup->getS32("DropShadowButton");
525 } 527 }
526 //mTextEntry->setRect(text_entry_rect); 528 //mTextEntry->setRect(text_entry_rect);
527 mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE); 529 mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE);
@@ -544,7 +546,7 @@ void LLComboBox::draw()
544 // Paste the graphic on the right edge 546 // Paste the graphic on the right edge
545 if (!mArrowImage.isNull()) 547 if (!mArrowImage.isNull())
546 { 548 {
547 S32 left = mRect.getWidth() - mArrowImage->getWidth() - LLUI::sConfigGroup->getS32("DropShadowButton"); 549 S32 left = mRect.getWidth() - mArrowImageWidth - LLUI::sConfigGroup->getS32("DropShadowButton");
548 550
549 gl_draw_image( left, 0, mArrowImage, 551 gl_draw_image( left, 0, mArrowImage,
550 LLColor4::white); 552 LLColor4::white);
@@ -844,7 +846,7 @@ void LLComboBox::setAllowTextEntry(BOOL allow, S32 max_chars, BOOL set_tentative
844 if (allow && !mAllowTextEntry) 846 if (allow && !mAllowTextEntry)
845 { 847 {
846 S32 shadow_size = LLUI::sConfigGroup->getS32("DropShadowButton"); 848 S32 shadow_size = LLUI::sConfigGroup->getS32("DropShadowButton");
847 mButton->setRect(LLRect( mRect.getWidth() - mArrowImage->getWidth() - 2 * shadow_size, 849 mButton->setRect(LLRect( mRect.getWidth() - mArrowImageWidth - 2 * shadow_size,
848 rect.mTop, rect.mRight, rect.mBottom)); 850 rect.mTop, rect.mRight, rect.mBottom));
849 mButton->setTabStop(FALSE); 851 mButton->setTabStop(FALSE);
850 852
@@ -854,7 +856,7 @@ void LLComboBox::setAllowTextEntry(BOOL allow, S32 max_chars, BOOL set_tentative
854 if (!mTextEntry) 856 if (!mTextEntry)
855 { 857 {
856 LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0); 858 LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0);
857 text_entry_rect.mRight -= mArrowImage->getWidth() + 2 * LLUI::sConfigGroup->getS32("DropShadowButton"); 859 text_entry_rect.mRight -= mArrowImageWidth + 2 * LLUI::sConfigGroup->getS32("DropShadowButton");
858 mTextEntry = new LLLineEditor("combo_text_entry", 860 mTextEntry = new LLLineEditor("combo_text_entry",
859 text_entry_rect, 861 text_entry_rect,
860 "", 862 "",