diff options
author | David Seikel | 2011-06-04 00:17:28 +1000 |
---|---|---|
committer | David Seikel | 2011-06-04 00:17:28 +1000 |
commit | 492eaaf4eec82327116f2605e3d8becf94bec1b3 (patch) | |
tree | dcddd674cb4861445c3ec5aaa59325b99a437614 /linden/indra/llui | |
parent | Set the real bare minimum prim size to 0.00001, as 0 sized objects cause bugs. (diff) | |
parent | Fixing the menu to actually use its color options reveals how broken the whol... (diff) | |
download | meta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.zip meta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.tar.gz meta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.tar.bz2 meta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.tar.xz |
Merge branch 'next' of git://github.com/jacek/imprudence into next
Conflicts (manually merged):
linden/indra/llcommon/llversionviewer.h
linden/indra/llvfs/lldir.cpp
linden/indra/llvfs/lldir_mac.cpp
linden/indra/newview/CMakeLists.txt
linden/indra/newview/English.lproj/InfoPlist.strings
linden/indra/newview/Info-Imprudence.plist
linden/indra/newview/Info-meta-impy.plist
linden/indra/newview/llappviewer.cpp
linden/indra/newview/llpanellogin.cpp
linden/indra/newview/packaging/mac/Info.plist.in
linden/indra/newview/res/viewerRes.rc
linden/indra/newview/skins/default/xui/en-us/floater_about.xml
linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml
linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml
linden/indra/newview/skins/default/xui/en-us/panel_preferences_skins.xml
linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml
linden/indra/newview/skins/default/xui/zh/menu_viewer.xml
linden/indra/newview/skins/default/xui/zh/panel_group_general.xml
linden/indra/newview/viewer_manifest.py
linden/indra/newview/viewerversion.cpp
linden/indra/newview/viewerversion.h
linden/install.xml
Also some post merge tweaks.
Diffstat (limited to 'linden/indra/llui')
-rw-r--r-- | linden/indra/llui/lllineeditor.cpp | 7 | ||||
-rw-r--r-- | linden/indra/llui/llmenugl.cpp | 44 | ||||
-rw-r--r-- | linden/indra/llui/llmenugl.h | 5 | ||||
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 12 |
4 files changed, 23 insertions, 45 deletions
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 453bb50..5f16853 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp | |||
@@ -223,18 +223,15 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect, | |||
223 | } | 223 | } |
224 | mImage = sImage; | 224 | mImage = sImage; |
225 | 225 | ||
226 | |||
227 | LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this); | 226 | LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this); |
228 | if (!menu) | 227 | if (!menu) |
229 | { | 228 | { |
230 | menu = new LLMenuGL(LLStringUtil::null); | 229 | menu = new LLMenuGL(LLStringUtil::null); |
231 | } | 230 | } |
232 | 231 | ||
233 | defineMenuCallbacks(menu); | 232 | defineMenuCallbacks(menu); |
234 | mPopupMenuHandle = menu->getHandle(); | 233 | mPopupMenuHandle = menu->getHandle(); |
235 | menu->setBorderColor(gColors.getColor("MenuItemDisabledColor")); | ||
236 | menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); | 234 | menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); |
237 | |||
238 | } | 235 | } |
239 | 236 | ||
240 | 237 | ||
@@ -1344,7 +1341,7 @@ void LLLineEditor::defineMenuCallbacks(LLMenuGL* menu) { | |||
1344 | "Select All Text", | 1341 | "Select All Text", |
1345 | this, | 1342 | this, |
1346 | (void*)context_enable_selectall); | 1343 | (void*)context_enable_selectall); |
1347 | menu->setCtrlResponse(1+LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | 1344 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, |
1348 | "Select All Text", | 1345 | "Select All Text", |
1349 | this, | 1346 | this, |
1350 | (void*)context_selectall); | 1347 | (void*)context_selectall); |
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index d5e1186..2d4a2f1 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp | |||
@@ -3099,8 +3099,7 @@ void LLMenuGL::draw( void ) | |||
3099 | 3099 | ||
3100 | if( mBgVisible ) | 3100 | if( mBgVisible ) |
3101 | { | 3101 | { |
3102 | gl_rect_2d( -1, getRect().getHeight()+2, getRect().getWidth()+2, -2, mBorderColor,FALSE); | 3102 | gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor ); |
3103 | gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor ); | ||
3104 | } | 3103 | } |
3105 | LLView::draw(); | 3104 | LLView::draw(); |
3106 | } | 3105 | } |
@@ -3157,37 +3156,18 @@ LLMenuGL* LLMenuGL::getChildMenuByName(const std::string& name, BOOL recurse) co | |||
3157 | } | 3156 | } |
3158 | 3157 | ||
3159 | 3158 | ||
3160 | void LLMenuGL::setBackgroundColor( const LLColor4& color ) { | 3159 | void LLMenuGL::setBackgroundColor( const LLColor4& color ) |
3161 | 3160 | { | |
3162 | mBackgroundColor = color; | 3161 | mBackgroundColor = color; |
3163 | item_list_t::iterator item_iter; | 3162 | item_list_t::iterator item_iter; |
3164 | for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) | 3163 | for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) |
3165 | { | ||
3166 | if((*item_iter)->getType()=="menu") | ||
3167 | { | ||
3168 | LLMenuItemBranchGL *menuBranchItem = (LLMenuItemBranchGL*)(*item_iter); | ||
3169 | menuBranchItem->getBranch()->setBackgroundColor(color); | ||
3170 | } | ||
3171 | } | ||
3172 | |||
3173 | |||
3174 | } | ||
3175 | |||
3176 | |||
3177 | void LLMenuGL::setBorderColor( const LLColor4& color ) { | ||
3178 | |||
3179 | mBorderColor = color; | ||
3180 | item_list_t::iterator item_iter; | ||
3181 | for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) | ||
3182 | { | 3164 | { |
3183 | if((*item_iter)->getType()=="menu") | 3165 | if((*item_iter)->getType()=="menu") |
3184 | { | 3166 | { |
3185 | LLMenuItemBranchGL *menuBranchItem = (LLMenuItemBranchGL*)(*item_iter); | 3167 | LLMenuItemBranchGL *menuBranchItem = (LLMenuItemBranchGL*)(*item_iter); |
3186 | menuBranchItem->getBranch()->setBorderColor(color); | 3168 | menuBranchItem->getBranch()->setBackgroundColor(color); |
3187 | } | 3169 | } |
3188 | } | 3170 | } |
3189 | |||
3190 | |||
3191 | } | 3171 | } |
3192 | 3172 | ||
3193 | 3173 | ||
diff --git a/linden/indra/llui/llmenugl.h b/linden/indra/llui/llmenugl.h index 9a9d1b0..3b57a32 100644 --- a/linden/indra/llui/llmenugl.h +++ b/linden/indra/llui/llmenugl.h | |||
@@ -514,10 +514,8 @@ public: | |||
514 | 514 | ||
515 | // background colors | 515 | // background colors |
516 | static void setDefaultBackgroundColor( const LLColor4& color ) { sDefaultBackgroundColor = color; } | 516 | static void setDefaultBackgroundColor( const LLColor4& color ) { sDefaultBackgroundColor = color; } |
517 | void setBackgroundColor( const LLColor4& color ); | 517 | void setBackgroundColor( const LLColor4& color ); |
518 | void setBorderColor( const LLColor4& color ); | ||
519 | const LLColor4& getBackgroundColor() const { return mBackgroundColor; } | 518 | const LLColor4& getBackgroundColor() const { return mBackgroundColor; } |
520 | const LLColor4& getBorderColor() const { return mBorderColor; } | ||
521 | void setBackgroundVisible( BOOL b ) { mBgVisible = b; } | 519 | void setBackgroundVisible( BOOL b ) { mBgVisible = b; } |
522 | void setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>()); | 520 | void setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>()); |
523 | 521 | ||
@@ -631,7 +629,6 @@ private: | |||
631 | static BOOL sKeyboardMode; | 629 | static BOOL sKeyboardMode; |
632 | 630 | ||
633 | LLColor4 mBackgroundColor; | 631 | LLColor4 mBackgroundColor; |
634 | LLColor4 mBorderColor; | ||
635 | BOOL mBgVisible; | 632 | BOOL mBgVisible; |
636 | LLMenuItemGL* mParentMenuItem; | 633 | LLMenuItemGL* mParentMenuItem; |
637 | LLUIString mLabel; | 634 | LLUIString mLabel; |
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 28859b1..8612427 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -389,14 +389,12 @@ LLTextEditor::LLTextEditor( | |||
389 | LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this); | 389 | LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this); |
390 | if (!menu) | 390 | if (!menu) |
391 | { | 391 | { |
392 | menu = new LLMenuGL(LLStringUtil::null); | 392 | menu = new LLMenuGL(LLStringUtil::null); |
393 | } | 393 | } |
394 | 394 | ||
395 | defineMenuCallbacks(menu); | 395 | defineMenuCallbacks(menu); |
396 | mPopupMenuHandle = menu->getHandle(); | 396 | mPopupMenuHandle = menu->getHandle(); |
397 | menu->setBorderColor(gColors.getColor("MenuItemDisabledColor")); | ||
398 | menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); | 397 | menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); |
399 | |||
400 | } | 398 | } |
401 | 399 | ||
402 | LLTextEditor::~LLTextEditor() | 400 | LLTextEditor::~LLTextEditor() |
@@ -636,7 +634,7 @@ void LLTextEditor::defineMenuCallbacks(LLMenuGL* menu) { | |||
636 | "Select All Text", | 634 | "Select All Text", |
637 | this, | 635 | this, |
638 | (void*)context_enable_selectall); | 636 | (void*)context_enable_selectall); |
639 | menu->setCtrlResponse(1+LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | 637 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, |
640 | "Select All Text", | 638 | "Select All Text", |
641 | this, | 639 | this, |
642 | (void*)context_selectall); | 640 | (void*)context_selectall); |
@@ -3869,6 +3867,12 @@ void LLTextEditor::onTabInto() | |||
3869 | // virtual | 3867 | // virtual |
3870 | void LLTextEditor::clear() | 3868 | void LLTextEditor::clear() |
3871 | { | 3869 | { |
3870 | // Also clear any styling we might have added -- MC | ||
3871 | mParseHTML = FALSE; | ||
3872 | mParseHighlights = FALSE; | ||
3873 | |||
3874 | mSegments.clear(); | ||
3875 | |||
3872 | setText(LLStringUtil::null); | 3876 | setText(LLStringUtil::null); |
3873 | std::for_each(mSegments.begin(), mSegments.end(), DeletePointer()); | 3877 | std::for_each(mSegments.begin(), mSegments.end(), DeletePointer()); |
3874 | mSegments.clear(); | 3878 | mSegments.clear(); |