diff options
Diffstat (limited to 'linden/indra/llui')
-rw-r--r-- | linden/indra/llui/llcombobox.cpp | 5 | ||||
-rw-r--r-- | linden/indra/llui/llcombobox.h | 5 | ||||
-rw-r--r-- | linden/indra/llui/llfloater.cpp | 16 | ||||
-rw-r--r-- | linden/indra/llui/llfunctorregistry.h | 2 | ||||
-rw-r--r-- | linden/indra/llui/llkeywords.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llui/llmenugl.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llui/llpanel.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llui/llprogressbar.cpp | 3 | ||||
-rw-r--r-- | linden/indra/llui/llresmgr.cpp | 9 | ||||
-rw-r--r-- | linden/indra/llui/llslider.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 4 | ||||
-rw-r--r-- | linden/indra/llui/llui.h | 2 |
12 files changed, 15 insertions, 37 deletions
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp index 2546c4e..e79f7b2 100644 --- a/linden/indra/llui/llcombobox.cpp +++ b/linden/indra/llui/llcombobox.cpp | |||
@@ -75,7 +75,8 @@ LLComboBox::LLComboBox( const std::string& name, const LLRect &rect, const std:: | |||
75 | mListPosition(BELOW), | 75 | mListPosition(BELOW), |
76 | mPrearrangeCallback( NULL ), | 76 | mPrearrangeCallback( NULL ), |
77 | mTextEntryCallback( NULL ), | 77 | mTextEntryCallback( NULL ), |
78 | mLabel(label) | 78 | mLabel(label), |
79 | mListColor(LLUI::sColorsGroup->getColor("ComboBoxBg")) | ||
79 | { | 80 | { |
80 | if (font) | 81 | if (font) |
81 | { | 82 | { |
@@ -109,7 +110,7 @@ LLComboBox::LLComboBox( const std::string& name, const LLRect &rect, const std:: | |||
109 | mList = new LLScrollListCtrl(std::string("ComboBox"), LLRect(), mGLFont, | 110 | mList = new LLScrollListCtrl(std::string("ComboBox"), LLRect(), mGLFont, |
110 | &LLComboBox::onItemSelected, this, FALSE); | 111 | &LLComboBox::onItemSelected, this, FALSE); |
111 | mList->setVisible(FALSE); | 112 | mList->setVisible(FALSE); |
112 | mList->setBgWriteableColor( LLColor4(1,1,1,1) ); | 113 | mList->setBgWriteableColor(mListColor); |
113 | mList->setCommitOnKeyboardMovement(FALSE); | 114 | mList->setCommitOnKeyboardMovement(FALSE); |
114 | addChild(mList); | 115 | addChild(mList); |
115 | 116 | ||
diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h index 7384b87..0ce6ccd 100644 --- a/linden/indra/llui/llcombobox.h +++ b/linden/indra/llui/llcombobox.h | |||
@@ -187,12 +187,13 @@ public: | |||
187 | virtual void hideList(); | 187 | virtual void hideList(); |
188 | 188 | ||
189 | protected: | 189 | protected: |
190 | LLButton* mButton; | 190 | LLButton* mButton; |
191 | LLScrollListCtrl* mList; | 191 | LLScrollListCtrl* mList; |
192 | EPreferredPosition mListPosition; | 192 | EPreferredPosition mListPosition; |
193 | LLPointer<LLUIImage> mArrowImage; | 193 | LLPointer<LLUIImage> mArrowImage; |
194 | std::string mLabel; | 194 | std::string mLabel; |
195 | const LLFontGL* mGLFont; | 195 | const LLFontGL* mGLFont; |
196 | LLColor4 mListColor; | ||
196 | 197 | ||
197 | private: | 198 | private: |
198 | S32 mButtonPadding; | 199 | S32 mButtonPadding; |
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index 58c717a..4c4aeaf 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp | |||
@@ -277,30 +277,14 @@ void LLFloater::initFloater(const std::string& title, | |||
277 | mMinimized = FALSE; | 277 | mMinimized = FALSE; |
278 | mExpandedRect.set(0,0,0,0); | 278 | mExpandedRect.set(0,0,0,0); |
279 | 279 | ||
280 | S32 close_pad; // space to the right of close box | ||
281 | S32 close_box_size; // For layout purposes, how big is the close box? | 280 | S32 close_box_size; // For layout purposes, how big is the close box? |
282 | if (close_btn) | 281 | if (close_btn) |
283 | { | 282 | { |
284 | close_box_size = LLFLOATER_CLOSE_BOX_SIZE; | 283 | close_box_size = LLFLOATER_CLOSE_BOX_SIZE; |
285 | close_pad = 0; | ||
286 | } | 284 | } |
287 | else | 285 | else |
288 | { | 286 | { |
289 | close_box_size = 0; | 287 | close_box_size = 0; |
290 | close_pad = 0; | ||
291 | } | ||
292 | |||
293 | S32 minimize_box_size; | ||
294 | S32 minimize_pad; | ||
295 | if (minimizable && !drag_on_left) | ||
296 | { | ||
297 | minimize_box_size = LLFLOATER_CLOSE_BOX_SIZE; | ||
298 | minimize_pad = 0; | ||
299 | } | ||
300 | else | ||
301 | { | ||
302 | minimize_box_size = 0; | ||
303 | minimize_pad = 0; | ||
304 | } | 288 | } |
305 | 289 | ||
306 | // Drag Handle | 290 | // Drag Handle |
diff --git a/linden/indra/llui/llfunctorregistry.h b/linden/indra/llui/llfunctorregistry.h index 8864f7a..7c03f2f 100644 --- a/linden/indra/llui/llfunctorregistry.h +++ b/linden/indra/llui/llfunctorregistry.h | |||
@@ -75,7 +75,6 @@ public: | |||
75 | bool registerFunctor(const std::string& name, ResponseFunctor f) | 75 | bool registerFunctor(const std::string& name, ResponseFunctor f) |
76 | { | 76 | { |
77 | bool retval = true; | 77 | bool retval = true; |
78 | typename FunctorMap::iterator it = mMap.find(name); | ||
79 | if (mMap.count(name) == 0) | 78 | if (mMap.count(name) == 0) |
80 | { | 79 | { |
81 | mMap[name] = f; | 80 | mMap[name] = f; |
@@ -102,7 +101,6 @@ public: | |||
102 | 101 | ||
103 | FUNCTOR_TYPE getFunctor(const std::string& name) | 102 | FUNCTOR_TYPE getFunctor(const std::string& name) |
104 | { | 103 | { |
105 | typename FunctorMap::iterator it = mMap.find(name); | ||
106 | if (mMap.count(name) != 0) | 104 | if (mMap.count(name) != 0) |
107 | { | 105 | { |
108 | return mMap[name]; | 106 | return mMap[name]; |
diff --git a/linden/indra/llui/llkeywords.cpp b/linden/indra/llui/llkeywords.cpp index 93da44c..a50dbff 100644 --- a/linden/indra/llui/llkeywords.cpp +++ b/linden/indra/llui/llkeywords.cpp | |||
@@ -288,7 +288,6 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS | |||
288 | 288 | ||
289 | const llwchar* base = wtext.c_str(); | 289 | const llwchar* base = wtext.c_str(); |
290 | const llwchar* cur = base; | 290 | const llwchar* cur = base; |
291 | const llwchar* line = NULL; | ||
292 | 291 | ||
293 | while( *cur ) | 292 | while( *cur ) |
294 | { | 293 | { |
@@ -304,7 +303,6 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS | |||
304 | } | 303 | } |
305 | 304 | ||
306 | // Start of a new line | 305 | // Start of a new line |
307 | line = cur; | ||
308 | 306 | ||
309 | // Skip white space | 307 | // Skip white space |
310 | while( *cur && isspace(*cur) && (*cur != '\n') ) | 308 | while( *cur && isspace(*cur) && (*cur != '\n') ) |
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index 2d4a2f1..6850891 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp | |||
@@ -3095,8 +3095,6 @@ void LLMenuGL::draw( void ) | |||
3095 | LLUI::sConfigGroup->getS32("DropShadowFloater") ); | 3095 | LLUI::sConfigGroup->getS32("DropShadowFloater") ); |
3096 | } | 3096 | } |
3097 | 3097 | ||
3098 | LLColor4 bg_color = mBackgroundColor; | ||
3099 | |||
3100 | if( mBgVisible ) | 3098 | if( mBgVisible ) |
3101 | { | 3099 | { |
3102 | gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor ); | 3100 | gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor ); |
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp index 07e78ed..361e4f3 100644 --- a/linden/indra/llui/llpanel.cpp +++ b/linden/indra/llui/llpanel.cpp | |||
@@ -1078,7 +1078,6 @@ struct LLLayoutStack::LLEmbeddedPanel | |||
1078 | mVisibleAmt(1.f) // default to fully visible | 1078 | mVisibleAmt(1.f) // default to fully visible |
1079 | { | 1079 | { |
1080 | LLResizeBar::Side side = (orientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM; | 1080 | LLResizeBar::Side side = (orientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM; |
1081 | LLRect resize_bar_rect = panelp->getRect(); | ||
1082 | 1081 | ||
1083 | S32 min_dim; | 1082 | S32 min_dim; |
1084 | if (orientation == HORIZONTAL) | 1083 | if (orientation == HORIZONTAL) |
diff --git a/linden/indra/llui/llprogressbar.cpp b/linden/indra/llui/llprogressbar.cpp index d148733..0000d77 100644 --- a/linden/indra/llui/llprogressbar.cpp +++ b/linden/indra/llui/llprogressbar.cpp | |||
@@ -83,9 +83,6 @@ void LLProgressBar::draw() | |||
83 | bar_bg_imagep->draw(getLocalRect(), | 83 | bar_bg_imagep->draw(getLocalRect(), |
84 | background_color); | 84 | background_color); |
85 | 85 | ||
86 | F32 alpha = 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32())); | ||
87 | LLColor4 bar_color = LLUI::sColorsGroup->getColor("LoginProgressBarFgColor"); | ||
88 | bar_color.mV[3] = alpha; | ||
89 | LLRect progress_rect = getLocalRect(); | 86 | LLRect progress_rect = getLocalRect(); |
90 | progress_rect.mRight = llround(getRect().getWidth() * (mPercentDone / 100.f)); | 87 | progress_rect.mRight = llround(getRect().getWidth() * (mPercentDone / 100.f)); |
91 | bar_fg_imagep->draw(progress_rect); | 88 | bar_fg_imagep->draw(progress_rect); |
diff --git a/linden/indra/llui/llresmgr.cpp b/linden/indra/llui/llresmgr.cpp index 22610ca..a16cfdf 100644 --- a/linden/indra/llui/llresmgr.cpp +++ b/linden/indra/llui/llresmgr.cpp | |||
@@ -266,8 +266,13 @@ std::string LLResMgr::getMonetaryString( S32 input ) const | |||
266 | default: // Unknown -- use the US defaults. | 266 | default: // Unknown -- use the US defaults. |
267 | case LLLOCALE_USA: | 267 | case LLLOCALE_USA: |
268 | case LLLOCALE_UK: // UK ends up being the same as US for the items used here. | 268 | case LLLOCALE_UK: // UK ends up being the same as US for the items used here. |
269 | fakeconv.negative_sign = "-"; | 269 | // Mac OS X 10.6 SDK's struct lconv contains "char *" not |
270 | fakeconv.mon_grouping = "\x03\x03\x00"; // commas every 3 digits | 270 | // "const char *" so these char arrays work around the error |
271 | // this causes in GCC 4.2, even though they won't be modified. | ||
272 | static char negative_sign[] = "-"; | ||
273 | static char mon_grouping[] = "\x03\x03\x00"; | ||
274 | fakeconv.negative_sign = negative_sign; | ||
275 | fakeconv.mon_grouping = mon_grouping; // commas every 3 digits | ||
271 | fakeconv.n_sign_posn = 1; // negative sign before the string | 276 | fakeconv.n_sign_posn = 1; // negative sign before the string |
272 | break; | 277 | break; |
273 | } | 278 | } |
diff --git a/linden/indra/llui/llslider.cpp b/linden/indra/llui/llslider.cpp index 5c17baa..c8f5935 100644 --- a/linden/indra/llui/llslider.cpp +++ b/linden/indra/llui/llslider.cpp | |||
@@ -283,7 +283,6 @@ void LLSlider::draw() | |||
283 | 283 | ||
284 | F32 opacity = getEnabled() ? 1.f : 0.3f; | 284 | F32 opacity = getEnabled() ? 1.f : 0.3f; |
285 | LLColor4 center_color = (mThumbCenterColor % opacity); | 285 | LLColor4 center_color = (mThumbCenterColor % opacity); |
286 | LLColor4 track_color = (mTrackColor % opacity); | ||
287 | 286 | ||
288 | // Track | 287 | // Track |
289 | LLRect track_rect(mThumbImage->getWidth() / 2, | 288 | LLRect track_rect(mThumbImage->getWidth() / 2, |
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 8612427..106f658 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -3077,7 +3077,6 @@ void LLTextEditor::drawSelectionBackground() | |||
3077 | S32 selection_right_x = mTextRect.mRight; | 3077 | S32 selection_right_x = mTextRect.mRight; |
3078 | S32 selection_right_y = mTextRect.mBottom; | 3078 | S32 selection_right_y = mTextRect.mBottom; |
3079 | 3079 | ||
3080 | BOOL selection_left_visible = FALSE; | ||
3081 | BOOL selection_right_visible = FALSE; | 3080 | BOOL selection_right_visible = FALSE; |
3082 | 3081 | ||
3083 | // Skip through the lines we aren't drawing. | 3082 | // Skip through the lines we aren't drawing. |
@@ -3085,7 +3084,6 @@ void LLTextEditor::drawSelectionBackground() | |||
3085 | 3084 | ||
3086 | S32 left_line_num = cur_line; | 3085 | S32 left_line_num = cur_line; |
3087 | S32 num_lines = getLineCount(); | 3086 | S32 num_lines = getLineCount(); |
3088 | S32 right_line_num = num_lines - 1; | ||
3089 | 3087 | ||
3090 | S32 line_start = -1; | 3088 | S32 line_start = -1; |
3091 | if (cur_line >= num_lines) | 3089 | if (cur_line >= num_lines) |
@@ -3119,13 +3117,11 @@ void LLTextEditor::drawSelectionBackground() | |||
3119 | if( line_start <= selection_left && selection_left <= line_end ) | 3117 | if( line_start <= selection_left && selection_left <= line_end ) |
3120 | { | 3118 | { |
3121 | left_line_num = cur_line; | 3119 | left_line_num = cur_line; |
3122 | selection_left_visible = TRUE; | ||
3123 | selection_left_x = mTextRect.mLeft + mGLFont->getWidth(line, 0, selection_left - line_start, mAllowEmbeddedItems); | 3120 | selection_left_x = mTextRect.mLeft + mGLFont->getWidth(line, 0, selection_left - line_start, mAllowEmbeddedItems); |
3124 | selection_left_y = text_y; | 3121 | selection_left_y = text_y; |
3125 | } | 3122 | } |
3126 | if( line_start <= selection_right && selection_right <= line_end ) | 3123 | if( line_start <= selection_right && selection_right <= line_end ) |
3127 | { | 3124 | { |
3128 | right_line_num = cur_line; | ||
3129 | selection_right_visible = TRUE; | 3125 | selection_right_visible = TRUE; |
3130 | selection_right_x = mTextRect.mLeft + mGLFont->getWidth(line, 0, selection_right - line_start, mAllowEmbeddedItems); | 3126 | selection_right_x = mTextRect.mLeft + mGLFont->getWidth(line, 0, selection_right - line_start, mAllowEmbeddedItems); |
3131 | if (selection_right == line_end) | 3127 | if (selection_right == line_end) |
diff --git a/linden/indra/llui/llui.h b/linden/indra/llui/llui.h index ebcc730..466d2c7 100644 --- a/linden/indra/llui/llui.h +++ b/linden/indra/llui/llui.h | |||
@@ -706,10 +706,12 @@ public: | |||
706 | 706 | ||
707 | // this avoids a MSVC bug where non-referenced static members are "optimized" away | 707 | // this avoids a MSVC bug where non-referenced static members are "optimized" away |
708 | // even if their constructors have side effects | 708 | // even if their constructors have side effects |
709 | // Then we avoid a compiler warning that dummy is never used. lol | ||
709 | void reference() | 710 | void reference() |
710 | { | 711 | { |
711 | S32 dummy; | 712 | S32 dummy; |
712 | dummy = 0; | 713 | dummy = 0; |
714 | dummy = dummy + 0; | ||
713 | } | 715 | } |
714 | }; | 716 | }; |
715 | 717 | ||