diff options
Diffstat (limited to 'linden/indra/llui')
-rw-r--r-- | linden/indra/llui/llbutton.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llui/llcombobox.cpp | 22 | ||||
-rw-r--r-- | linden/indra/llui/llcombobox.h | 3 | ||||
-rw-r--r-- | linden/indra/llui/lldraghandle.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llui/llfloater.cpp | 21 | ||||
-rw-r--r-- | linden/indra/llui/lllineeditor.cpp | 10 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/llui/llmemberlistener.h | 0 | ||||
-rw-r--r-- | linden/indra/llui/llmenugl.cpp | 20 | ||||
-rw-r--r-- | linden/indra/llui/llpanel.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llui/lltabcontainer.cpp | 8 | ||||
-rw-r--r-- | linden/indra/llui/lltabcontainervertical.cpp | 4 | ||||
-rw-r--r-- | linden/indra/llui/lltextbox.cpp | 16 | ||||
-rw-r--r-- | linden/indra/llui/lltextbox.h | 4 | ||||
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 20 | ||||
-rw-r--r-- | linden/indra/llui/llui.cpp | 18 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/llui/lluistring.cpp | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/llui/lluistring.h | 0 | ||||
-rw-r--r-- | linden/indra/llui/llviewborder.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llui/llviewborder.h | 2 |
19 files changed, 101 insertions, 54 deletions
diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp index d35dd57..1d44537 100644 --- a/linden/indra/llui/llbutton.cpp +++ b/linden/indra/llui/llbutton.cpp | |||
@@ -648,7 +648,7 @@ void LLButton::draw() | |||
648 | mGLFont->render(label, 0, (F32)x, (F32)(LLBUTTON_V_PAD + y_offset), | 648 | mGLFont->render(label, 0, (F32)x, (F32)(LLBUTTON_V_PAD + y_offset), |
649 | label_color, | 649 | label_color, |
650 | mHAlign, LLFontGL::BOTTOM, | 650 | mHAlign, LLFontGL::BOTTOM, |
651 | mDropShadowedText ? LLFontGL::DROP_SHADOW : LLFontGL::NORMAL, | 651 | mDropShadowedText ? LLFontGL::DROP_SHADOW_SOFT : LLFontGL::NORMAL, |
652 | U32_MAX, drawable_width, | 652 | U32_MAX, drawable_width, |
653 | NULL, FALSE, FALSE); | 653 | NULL, FALSE, FALSE); |
654 | } | 654 | } |
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp index 983dd43..e00454a 100644 --- a/linden/indra/llui/llcombobox.cpp +++ b/linden/indra/llui/llcombobox.cpp | |||
@@ -55,8 +55,7 @@ S32 LLCOMBOBOX_WIDTH = 0; | |||
55 | 55 | ||
56 | LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString& label, | 56 | LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString& label, |
57 | void (*commit_callback)(LLUICtrl*,void*), | 57 | void (*commit_callback)(LLUICtrl*,void*), |
58 | void *callback_userdata, | 58 | void *callback_userdata |
59 | S32 list_width | ||
60 | ) | 59 | ) |
61 | : LLUICtrl(name, rect, TRUE, commit_callback, callback_userdata, | 60 | : LLUICtrl(name, rect, TRUE, commit_callback, callback_userdata, |
62 | FOLLOWS_LEFT | FOLLOWS_TOP), | 61 | FOLLOWS_LEFT | FOLLOWS_TOP), |
@@ -99,10 +98,7 @@ LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString | |||
99 | addChild(mButton); | 98 | addChild(mButton); |
100 | 99 | ||
101 | // Default size, will be set by arrange() call in button callback. | 100 | // Default size, will be set by arrange() call in button callback. |
102 | if (list_width == 0) | 101 | S32 list_width = mRect.getWidth() + SCROLLBAR_SIZE; |
103 | { | ||
104 | list_width = mRect.getWidth() + SCROLLBAR_SIZE; | ||
105 | } | ||
106 | r.setOriginAndSize(0, 16, list_width, 220); | 102 | r.setOriginAndSize(0, 16, list_width, 220); |
107 | 103 | ||
108 | // disallow multiple selection | 104 | // disallow multiple selection |
@@ -503,12 +499,14 @@ void LLComboBox::showList() | |||
503 | 499 | ||
504 | LLRect rect = mList->getRect(); | 500 | LLRect rect = mList->getRect(); |
505 | 501 | ||
502 | S32 list_width = mRect.getWidth() + SCROLLBAR_SIZE; | ||
503 | |||
506 | if (mListPosition == BELOW) | 504 | if (mListPosition == BELOW) |
507 | { | 505 | { |
508 | if (rect.getHeight() <= -root_view_local.mBottom) | 506 | if (rect.getHeight() <= -root_view_local.mBottom) |
509 | { | 507 | { |
510 | // Move rect so it hangs off the bottom of this view | 508 | // Move rect so it hangs off the bottom of this view |
511 | rect.setLeftTopAndSize(0, 0, rect.getWidth(), rect.getHeight() ); | 509 | rect.setLeftTopAndSize(0, 0, list_width, rect.getHeight() ); |
512 | } | 510 | } |
513 | else | 511 | else |
514 | { | 512 | { |
@@ -516,12 +514,12 @@ void LLComboBox::showList() | |||
516 | if (-root_view_local.mBottom > root_view_local.mTop - mRect.getHeight()) | 514 | if (-root_view_local.mBottom > root_view_local.mTop - mRect.getHeight()) |
517 | { | 515 | { |
518 | // Move rect so it hangs off the bottom of this view | 516 | // Move rect so it hangs off the bottom of this view |
519 | rect.setLeftTopAndSize(0, 0, rect.getWidth(), llmin(-root_view_local.mBottom, rect.getHeight())); | 517 | rect.setLeftTopAndSize(0, 0, list_width, llmin(-root_view_local.mBottom, rect.getHeight())); |
520 | } | 518 | } |
521 | else | 519 | else |
522 | { | 520 | { |
523 | // move rect so it stacks on top of this view (clipped to size of screen) | 521 | // move rect so it stacks on top of this view (clipped to size of screen) |
524 | rect.setOriginAndSize(0, mRect.getHeight(), rect.getWidth(), llmin(root_view_local.mTop - mRect.getHeight(), rect.getHeight())); | 522 | rect.setOriginAndSize(0, mRect.getHeight(), list_width, llmin(root_view_local.mTop - mRect.getHeight(), rect.getHeight())); |
525 | } | 523 | } |
526 | } | 524 | } |
527 | } | 525 | } |
@@ -530,7 +528,7 @@ void LLComboBox::showList() | |||
530 | if (rect.getHeight() <= root_view_local.mTop - mRect.getHeight()) | 528 | if (rect.getHeight() <= root_view_local.mTop - mRect.getHeight()) |
531 | { | 529 | { |
532 | // move rect so it stacks on top of this view (clipped to size of screen) | 530 | // move rect so it stacks on top of this view (clipped to size of screen) |
533 | rect.setOriginAndSize(0, mRect.getHeight(), rect.getWidth(), llmin(root_view_local.mTop - mRect.getHeight(), rect.getHeight())); | 531 | rect.setOriginAndSize(0, mRect.getHeight(), list_width, llmin(root_view_local.mTop - mRect.getHeight(), rect.getHeight())); |
534 | } | 532 | } |
535 | else | 533 | else |
536 | { | 534 | { |
@@ -538,12 +536,12 @@ void LLComboBox::showList() | |||
538 | if (-root_view_local.mBottom > root_view_local.mTop - mRect.getHeight()) | 536 | if (-root_view_local.mBottom > root_view_local.mTop - mRect.getHeight()) |
539 | { | 537 | { |
540 | // Move rect so it hangs off the bottom of this view | 538 | // Move rect so it hangs off the bottom of this view |
541 | rect.setLeftTopAndSize(0, 0, rect.getWidth(), llmin(-root_view_local.mBottom, rect.getHeight())); | 539 | rect.setLeftTopAndSize(0, 0, list_width, llmin(-root_view_local.mBottom, rect.getHeight())); |
542 | } | 540 | } |
543 | else | 541 | else |
544 | { | 542 | { |
545 | // move rect so it stacks on top of this view (clipped to size of screen) | 543 | // move rect so it stacks on top of this view (clipped to size of screen) |
546 | rect.setOriginAndSize(0, mRect.getHeight(), rect.getWidth(), llmin(root_view_local.mTop - mRect.getHeight(), rect.getHeight())); | 544 | rect.setOriginAndSize(0, mRect.getHeight(), list_width, llmin(root_view_local.mTop - mRect.getHeight(), rect.getHeight())); |
547 | } | 545 | } |
548 | } | 546 | } |
549 | 547 | ||
diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h index 8c317ee..d77224a 100644 --- a/linden/indra/llui/llcombobox.h +++ b/linden/indra/llui/llcombobox.h | |||
@@ -65,8 +65,7 @@ public: | |||
65 | const LLRect &rect, | 65 | const LLRect &rect, |
66 | const LLString& label, | 66 | const LLString& label, |
67 | void (*commit_callback)(LLUICtrl*, void*) = NULL, | 67 | void (*commit_callback)(LLUICtrl*, void*) = NULL, |
68 | void *callback_userdata = NULL, | 68 | void *callback_userdata = NULL |
69 | S32 list_width = 0 | ||
70 | ); | 69 | ); |
71 | virtual ~LLComboBox(); | 70 | virtual ~LLComboBox(); |
72 | 71 | ||
diff --git a/linden/indra/llui/lldraghandle.cpp b/linden/indra/llui/lldraghandle.cpp index 9e80c99..a3d28ad 100644 --- a/linden/indra/llui/lldraghandle.cpp +++ b/linden/indra/llui/lldraghandle.cpp | |||
@@ -122,6 +122,7 @@ void LLDragHandleTop::setTitle(const LLString& title) | |||
122 | const LLFontGL* font = gResMgr->getRes( LLFONT_SANSSERIF ); | 122 | const LLFontGL* font = gResMgr->getRes( LLFONT_SANSSERIF ); |
123 | mTitleBox = new LLTextBox( "Drag Handle Title", mRect, trimmed_title, font ); | 123 | mTitleBox = new LLTextBox( "Drag Handle Title", mRect, trimmed_title, font ); |
124 | mTitleBox->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT); | 124 | mTitleBox->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT); |
125 | mTitleBox->setFontStyle(LLFontGL::DROP_SHADOW_SOFT); | ||
125 | reshapeTitleBox(); | 126 | reshapeTitleBox(); |
126 | 127 | ||
127 | // allow empty titles, as default behavior replaces them with title box name | 128 | // allow empty titles, as default behavior replaces them with title box name |
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index 12758b3..1613fd7 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp | |||
@@ -696,7 +696,13 @@ void LLFloater::translate(S32 x, S32 y) | |||
696 | 696 | ||
697 | BOOL LLFloater::canSnapTo(LLView* other_view) | 697 | BOOL LLFloater::canSnapTo(LLView* other_view) |
698 | { | 698 | { |
699 | if (other_view && other_view != getParent()) | 699 | if (NULL == other_view) |
700 | { | ||
701 | llwarns << "other_view is NULL" << llendl; | ||
702 | return FALSE; | ||
703 | } | ||
704 | |||
705 | if (other_view != getParent()) | ||
700 | { | 706 | { |
701 | LLFloater* other_floaterp = (LLFloater*)other_view; | 707 | LLFloater* other_floaterp = (LLFloater*)other_view; |
702 | 708 | ||
@@ -1933,7 +1939,11 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) | |||
1933 | LLFloater* floaterp = (LLFloater*)(*view_it); | 1939 | LLFloater* floaterp = (LLFloater*)(*view_it); |
1934 | sendChildToFront(floaterp); | 1940 | sendChildToFront(floaterp); |
1935 | 1941 | ||
1936 | floaterp->setMinimized(FALSE); | 1942 | // always unminimize dependee, but allow dependents to stay minimized |
1943 | if (!floaterp->isDependent()) | ||
1944 | { | ||
1945 | floaterp->setMinimized(FALSE); | ||
1946 | } | ||
1937 | } | 1947 | } |
1938 | floaters_to_move.clear(); | 1948 | floaters_to_move.clear(); |
1939 | 1949 | ||
@@ -1945,7 +1955,9 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) | |||
1945 | if (dependent) | 1955 | if (dependent) |
1946 | { | 1956 | { |
1947 | sendChildToFront(dependent); | 1957 | sendChildToFront(dependent); |
1948 | dependent->setMinimized(FALSE); | 1958 | //don't un-minimize dependent windows automatically |
1959 | // respect user's wishes | ||
1960 | //dependent->setMinimized(FALSE); | ||
1949 | } | 1961 | } |
1950 | ++dependent_it; | 1962 | ++dependent_it; |
1951 | } | 1963 | } |
@@ -2555,6 +2567,7 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, | |||
2555 | if (!mTabContainer) | 2567 | if (!mTabContainer) |
2556 | { | 2568 | { |
2557 | llerrs << "Tab Container used without having been initialized." << llendl; | 2569 | llerrs << "Tab Container used without having been initialized." << llendl; |
2570 | return; | ||
2558 | } | 2571 | } |
2559 | 2572 | ||
2560 | if (floaterp->getHost() == this) | 2573 | if (floaterp->getHost() == this) |
@@ -2718,7 +2731,7 @@ void LLMultiFloater::setVisible(BOOL visible) | |||
2718 | BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) | 2731 | BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) |
2719 | { | 2732 | { |
2720 | if (getEnabled() | 2733 | if (getEnabled() |
2721 | && mask == (MASK_CONTROL|MASK_SHIFT)) | 2734 | && mask == MASK_CONTROL) |
2722 | { | 2735 | { |
2723 | if (key == 'W') | 2736 | if (key == 'W') |
2724 | { | 2737 | { |
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index ec156ba..a2cd9af 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp | |||
@@ -711,11 +711,11 @@ S32 LLLineEditor::prevWordPos(S32 cursorPos) const | |||
711 | S32 LLLineEditor::nextWordPos(S32 cursorPos) const | 711 | S32 LLLineEditor::nextWordPos(S32 cursorPos) const |
712 | { | 712 | { |
713 | const LLWString& wtext = mText.getWString(); | 713 | const LLWString& wtext = mText.getWString(); |
714 | while( (cursorPos < getLength()) && isPartOfWord( wtext[cursorPos+1] ) ) | 714 | while( (cursorPos < getLength()) && isPartOfWord( wtext[cursorPos] ) ) |
715 | { | 715 | { |
716 | cursorPos++; | 716 | cursorPos++; |
717 | } | 717 | } |
718 | while( (cursorPos < getLength()) && (wtext[cursorPos+1] == ' ') ) | 718 | while( (cursorPos < getLength()) && (wtext[cursorPos] == ' ') ) |
719 | { | 719 | { |
720 | cursorPos++; | 720 | cursorPos++; |
721 | } | 721 | } |
@@ -1035,7 +1035,8 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) | |||
1035 | break; | 1035 | break; |
1036 | 1036 | ||
1037 | case KEY_LEFT: | 1037 | case KEY_LEFT: |
1038 | if (!mIgnoreArrowKeys) | 1038 | if (!mIgnoreArrowKeys |
1039 | && mask != MASK_ALT) | ||
1039 | { | 1040 | { |
1040 | if( hasSelection() ) | 1041 | if( hasSelection() ) |
1041 | { | 1042 | { |
@@ -1060,7 +1061,8 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) | |||
1060 | break; | 1061 | break; |
1061 | 1062 | ||
1062 | case KEY_RIGHT: | 1063 | case KEY_RIGHT: |
1063 | if (!mIgnoreArrowKeys) | 1064 | if (!mIgnoreArrowKeys |
1065 | && mask != MASK_ALT) | ||
1064 | { | 1066 | { |
1065 | if (hasSelection()) | 1067 | if (hasSelection()) |
1066 | { | 1068 | { |
diff --git a/linden/indra/llui/llmemberlistener.h b/linden/indra/llui/llmemberlistener.h index 92e7278..92e7278 100755..100644 --- a/linden/indra/llui/llmemberlistener.h +++ b/linden/indra/llui/llmemberlistener.h | |||
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index 1920aac..9530f26 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp | |||
@@ -517,7 +517,7 @@ void LLMenuItemGL::draw( void ) | |||
517 | U8 font_style = mStyle; | 517 | U8 font_style = mStyle; |
518 | if (LLMenuItemGL::sDropShadowText && getEnabled() && !mDrawTextDisabled ) | 518 | if (LLMenuItemGL::sDropShadowText && getEnabled() && !mDrawTextDisabled ) |
519 | { | 519 | { |
520 | font_style |= LLFontGL::DROP_SHADOW; | 520 | font_style |= LLFontGL::DROP_SHADOW_SOFT; |
521 | } | 521 | } |
522 | 522 | ||
523 | if ( getEnabled() && getHighlight() ) | 523 | if ( getEnabled() && getHighlight() ) |
@@ -729,14 +729,18 @@ void LLMenuItemTearOffGL::doIt() | |||
729 | 729 | ||
730 | LLFloater* parent_floater = LLFloater::getFloaterByHandle(mParentHandle); | 730 | LLFloater* parent_floater = LLFloater::getFloaterByHandle(mParentHandle); |
731 | LLFloater* tear_off_menu = LLTearOffMenu::create(getMenu()); | 731 | LLFloater* tear_off_menu = LLTearOffMenu::create(getMenu()); |
732 | if (parent_floater && tear_off_menu) | 732 | |
733 | if (tear_off_menu) | ||
733 | { | 734 | { |
734 | parent_floater->addDependentFloater(tear_off_menu, FALSE); | 735 | if (parent_floater) |
735 | } | 736 | { |
737 | parent_floater->addDependentFloater(tear_off_menu, FALSE); | ||
738 | } | ||
736 | 739 | ||
737 | // give focus to torn off menu because it will have been taken away | 740 | // give focus to torn off menu because it will have |
738 | // when parent menu closes | 741 | // been taken away when parent menu closes |
739 | tear_off_menu->setFocus(TRUE); | 742 | tear_off_menu->setFocus(TRUE); |
743 | } | ||
740 | } | 744 | } |
741 | LLMenuItemGL::doIt(); | 745 | LLMenuItemGL::doIt(); |
742 | } | 746 | } |
@@ -1744,7 +1748,7 @@ void LLMenuItemBranchDownGL::draw( void ) | |||
1744 | U8 font_style = mStyle; | 1748 | U8 font_style = mStyle; |
1745 | if (LLMenuItemGL::sDropShadowText && getEnabled() && !mDrawTextDisabled ) | 1749 | if (LLMenuItemGL::sDropShadowText && getEnabled() && !mDrawTextDisabled ) |
1746 | { | 1750 | { |
1747 | font_style |= LLFontGL::DROP_SHADOW; | 1751 | font_style |= LLFontGL::DROP_SHADOW_SOFT; |
1748 | } | 1752 | } |
1749 | 1753 | ||
1750 | LLColor4 color; | 1754 | LLColor4 color; |
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp index 9e444c1..f0b5b25 100644 --- a/linden/indra/llui/llpanel.cpp +++ b/linden/indra/llui/llpanel.cpp | |||
@@ -362,7 +362,7 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) | |||
362 | // If we have a default button, click it when | 362 | // If we have a default button, click it when |
363 | // return is pressed, unless current focus is a return-capturing button | 363 | // return is pressed, unless current focus is a return-capturing button |
364 | // in which case *that* button will handle the return key | 364 | // in which case *that* button will handle the return key |
365 | if (!(cur_focus->getWidgetType() == WIDGET_TYPE_BUTTON && static_cast<LLButton *>(cur_focus)->getCommitOnReturn())) | 365 | if (cur_focus && !(cur_focus->getWidgetType() == WIDGET_TYPE_BUTTON && static_cast<LLButton *>(cur_focus)->getCommitOnReturn())) |
366 | { | 366 | { |
367 | // RETURN key means hit default button in this case | 367 | // RETURN key means hit default button in this case |
368 | if (key == KEY_RETURN && mask == MASK_NONE | 368 | if (key == KEY_RETURN && mask == MASK_NONE |
diff --git a/linden/indra/llui/lltabcontainer.cpp b/linden/indra/llui/lltabcontainer.cpp index db09717..61cfde4 100644 --- a/linden/indra/llui/lltabcontainer.cpp +++ b/linden/indra/llui/lltabcontainer.cpp | |||
@@ -941,8 +941,8 @@ void LLTabContainer::addTabPanel(LLPanel* child, | |||
941 | else | 941 | else |
942 | { | 942 | { |
943 | LLString tooltip = trimmed_label; | 943 | LLString tooltip = trimmed_label; |
944 | tooltip += "\nCtrl-[ for previous tab"; | 944 | tooltip += "\nAlt-Left arrow for previous tab"; |
945 | tooltip += "\nCtrl-] for next tab"; | 945 | tooltip += "\nAlt-Right arrow for next tab"; |
946 | 946 | ||
947 | LLButton* btn = new LLButton( | 947 | LLButton* btn = new LLButton( |
948 | LLString(child->getName()) + " tab", | 948 | LLString(child->getName()) + " tab", |
@@ -1486,12 +1486,12 @@ BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) | |||
1486 | if (!gFocusMgr.childHasKeyboardFocus(this)) return FALSE; | 1486 | if (!gFocusMgr.childHasKeyboardFocus(this)) return FALSE; |
1487 | 1487 | ||
1488 | BOOL handled = FALSE; | 1488 | BOOL handled = FALSE; |
1489 | if (key == '[' && mask == MASK_CONTROL) | 1489 | if (key == KEY_LEFT && mask == MASK_ALT) |
1490 | { | 1490 | { |
1491 | selectPrevTab(); | 1491 | selectPrevTab(); |
1492 | handled = TRUE; | 1492 | handled = TRUE; |
1493 | } | 1493 | } |
1494 | else if (key == ']' && mask == MASK_CONTROL) | 1494 | else if (key == KEY_RIGHT && mask == MASK_ALT) |
1495 | { | 1495 | { |
1496 | selectNextTab(); | 1496 | selectNextTab(); |
1497 | handled = TRUE; | 1497 | handled = TRUE; |
diff --git a/linden/indra/llui/lltabcontainervertical.cpp b/linden/indra/llui/lltabcontainervertical.cpp index a921b4b..317b7ca 100644 --- a/linden/indra/llui/lltabcontainervertical.cpp +++ b/linden/indra/llui/lltabcontainervertical.cpp | |||
@@ -557,12 +557,12 @@ BOOL LLTabContainerVertical::handleKeyHere(KEY key, MASK mask, BOOL called_from_ | |||
557 | BOOL handled = FALSE; | 557 | BOOL handled = FALSE; |
558 | if (getEnabled()) | 558 | if (getEnabled()) |
559 | { | 559 | { |
560 | if (key == '[' && mask == MASK_CONTROL) | 560 | if (key == KEY_LEFT && mask == MASK_ALT) |
561 | { | 561 | { |
562 | selectPrevTab(); | 562 | selectPrevTab(); |
563 | handled = TRUE; | 563 | handled = TRUE; |
564 | } | 564 | } |
565 | else if (key == ']' && mask == MASK_CONTROL) | 565 | else if (key == KEY_RIGHT && mask == MASK_ALT) |
566 | { | 566 | { |
567 | selectNextTab(); | 567 | selectNextTab(); |
568 | handled = TRUE; | 568 | handled = TRUE; |
diff --git a/linden/indra/llui/lltextbox.cpp b/linden/indra/llui/lltextbox.cpp index 884d638..c4f2cea 100644 --- a/linden/indra/llui/lltextbox.cpp +++ b/linden/indra/llui/lltextbox.cpp | |||
@@ -48,7 +48,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLRect& rect, const LLString& t | |||
48 | mBorderColor( LLUI::sColorsGroup->getColor( "DefaultHighlightLight" ) ), | 48 | mBorderColor( LLUI::sColorsGroup->getColor( "DefaultHighlightLight" ) ), |
49 | mBackgroundVisible( FALSE ), | 49 | mBackgroundVisible( FALSE ), |
50 | mBorderVisible( FALSE ), | 50 | mBorderVisible( FALSE ), |
51 | mDropshadowVisible( TRUE ), | 51 | mFontStyle(LLFontGL::DROP_SHADOW_SOFT), |
52 | mBorderDropShadowVisible( FALSE ), | 52 | mBorderDropShadowVisible( FALSE ), |
53 | mHPad(0), | 53 | mHPad(0), |
54 | mVPad(0), | 54 | mVPad(0), |
@@ -73,7 +73,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLString& text, F32 max_width, | |||
73 | mBorderColor(LLUI::sColorsGroup->getColor("DefaultHighlightLight")), | 73 | mBorderColor(LLUI::sColorsGroup->getColor("DefaultHighlightLight")), |
74 | mBackgroundVisible(FALSE), | 74 | mBackgroundVisible(FALSE), |
75 | mBorderVisible(FALSE), | 75 | mBorderVisible(FALSE), |
76 | mDropshadowVisible(TRUE), | 76 | mFontStyle(LLFontGL::DROP_SHADOW_SOFT), |
77 | mBorderDropShadowVisible(FALSE), | 77 | mBorderDropShadowVisible(FALSE), |
78 | mHPad(0), | 78 | mHPad(0), |
79 | mVPad(0), | 79 | mVPad(0), |
@@ -363,7 +363,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color ) | |||
363 | S32 line_length = *iter; | 363 | S32 line_length = *iter; |
364 | mFontGL->render(mText.getWString(), cur_pos, (F32)x, (F32)y, color, | 364 | mFontGL->render(mText.getWString(), cur_pos, (F32)x, (F32)y, color, |
365 | mHAlign, mVAlign, | 365 | mHAlign, mVAlign, |
366 | mDropshadowVisible ? LLFontGL::DROP_SHADOW : LLFontGL::NORMAL, | 366 | mFontStyle, |
367 | line_length, mRect.getWidth(), NULL, TRUE ); | 367 | line_length, mRect.getWidth(), NULL, TRUE ); |
368 | cur_pos += line_length + 1; | 368 | cur_pos += line_length + 1; |
369 | y -= llfloor(mFontGL->getLineHeight()); | 369 | y -= llfloor(mFontGL->getLineHeight()); |
@@ -373,7 +373,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color ) | |||
373 | { | 373 | { |
374 | mFontGL->render(mText.getWString(), 0, (F32)x, (F32)y, color, | 374 | mFontGL->render(mText.getWString(), 0, (F32)x, (F32)y, color, |
375 | mHAlign, mVAlign, | 375 | mHAlign, mVAlign, |
376 | mDropshadowVisible ? LLFontGL::DROP_SHADOW : LLFontGL::NORMAL, | 376 | mFontStyle, |
377 | S32_MAX, mRect.getWidth(), NULL, TRUE); | 377 | S32_MAX, mRect.getWidth(), NULL, TRUE); |
378 | } | 378 | } |
379 | } | 379 | } |
@@ -406,8 +406,6 @@ LLXMLNodePtr LLTextBox::getXML(bool save_children) const | |||
406 | 406 | ||
407 | node->createChild("border_visible", TRUE)->setBoolValue(mBorderVisible); | 407 | node->createChild("border_visible", TRUE)->setBoolValue(mBorderVisible); |
408 | 408 | ||
409 | node->createChild("drop_shadow_visible", TRUE)->setBoolValue(mDropshadowVisible); | ||
410 | |||
411 | node->createChild("border_drop_shadow_visible", TRUE)->setBoolValue(mBorderDropShadowVisible); | 409 | node->createChild("border_drop_shadow_visible", TRUE)->setBoolValue(mBorderDropShadowVisible); |
412 | 410 | ||
413 | node->createChild("h_pad", TRUE)->setIntValue(mHPad); | 411 | node->createChild("h_pad", TRUE)->setIntValue(mHPad); |
@@ -447,6 +445,12 @@ LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f | |||
447 | 445 | ||
448 | text_box->initFromXML(node, parent); | 446 | text_box->initFromXML(node, parent); |
449 | 447 | ||
448 | LLString font_style; | ||
449 | if (node->getAttributeString("font-style", font_style)) | ||
450 | { | ||
451 | text_box->mFontStyle = LLFontGL::getStyleFromString(font_style); | ||
452 | } | ||
453 | |||
450 | if(node->hasAttribute("text_color")) | 454 | if(node->hasAttribute("text_color")) |
451 | { | 455 | { |
452 | LLColor4 color; | 456 | LLColor4 color; |
diff --git a/linden/indra/llui/lltextbox.h b/linden/indra/llui/lltextbox.h index 45d6acb..e8d4690 100644 --- a/linden/indra/llui/lltextbox.h +++ b/linden/indra/llui/lltextbox.h | |||
@@ -74,7 +74,7 @@ public: | |||
74 | 74 | ||
75 | void setBackgroundVisible(BOOL visible) { mBackgroundVisible = visible; } | 75 | void setBackgroundVisible(BOOL visible) { mBackgroundVisible = visible; } |
76 | void setBorderVisible(BOOL visible) { mBorderVisible = visible; } | 76 | void setBorderVisible(BOOL visible) { mBorderVisible = visible; } |
77 | void setDropshadowVisible(BOOL visible) { mDropshadowVisible = visible; } | 77 | void setFontStyle(U8 style) { mFontStyle = style; } |
78 | void setBorderDropshadowVisible(BOOL visible){ mBorderDropShadowVisible = visible; } | 78 | void setBorderDropshadowVisible(BOOL visible){ mBorderDropShadowVisible = visible; } |
79 | void setHPad(S32 pixels) { mHPad = pixels; } | 79 | void setHPad(S32 pixels) { mHPad = pixels; } |
80 | void setVPad(S32 pixels) { mVPad = pixels; } | 80 | void setVPad(S32 pixels) { mVPad = pixels; } |
@@ -112,7 +112,7 @@ protected: | |||
112 | BOOL mBackgroundVisible; | 112 | BOOL mBackgroundVisible; |
113 | BOOL mBorderVisible; | 113 | BOOL mBorderVisible; |
114 | 114 | ||
115 | BOOL mDropshadowVisible; // Draws black dropshadow below and to the right of the text. | 115 | U8 mFontStyle; // style bit flags for font |
116 | BOOL mBorderDropShadowVisible; | 116 | BOOL mBorderDropShadowVisible; |
117 | 117 | ||
118 | S32 mHPad; | 118 | S32 mHPad; |
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 787eba5..ba991c2 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -723,11 +723,11 @@ S32 LLTextEditor::prevWordPos(S32 cursorPos) const | |||
723 | S32 LLTextEditor::nextWordPos(S32 cursorPos) const | 723 | S32 LLTextEditor::nextWordPos(S32 cursorPos) const |
724 | { | 724 | { |
725 | const LLWString& wtext = mWText; | 725 | const LLWString& wtext = mWText; |
726 | while( (cursorPos < getLength()) && isPartOfWord( wtext[cursorPos+1] ) ) | 726 | while( (cursorPos < getLength()) && isPartOfWord( wtext[cursorPos] ) ) |
727 | { | 727 | { |
728 | cursorPos++; | 728 | cursorPos++; |
729 | } | 729 | } |
730 | while( (cursorPos < getLength()) && (wtext[cursorPos+1] == ' ') ) | 730 | while( (cursorPos < getLength()) && (wtext[cursorPos] == ' ') ) |
731 | { | 731 | { |
732 | cursorPos++; | 732 | cursorPos++; |
733 | } | 733 | } |
@@ -3667,10 +3667,18 @@ void LLTextEditor::pruneSegments() | |||
3667 | break; // done | 3667 | break; // done |
3668 | } | 3668 | } |
3669 | } | 3669 | } |
3670 | // erase invalid segments | 3670 | if (iter != mSegments.end()) |
3671 | ++iter; | 3671 | { |
3672 | std::for_each(iter, mSegments.end(), DeletePointer()); | 3672 | // erase invalid segments |
3673 | mSegments.erase(iter, mSegments.end()); | 3673 | ++iter; |
3674 | std::for_each(iter, mSegments.end(), DeletePointer()); | ||
3675 | mSegments.erase(iter, mSegments.end()); | ||
3676 | } | ||
3677 | else | ||
3678 | { | ||
3679 | llwarns << "Tried to erase end of empty LLTextEditor" | ||
3680 | << llendl; | ||
3681 | } | ||
3674 | } | 3682 | } |
3675 | 3683 | ||
3676 | void LLTextEditor::findEmbeddedItemSegments() | 3684 | void LLTextEditor::findEmbeddedItemSegments() |
diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index 9d689b5..a725281 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp | |||
@@ -421,6 +421,12 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border | |||
421 | stop_glerror(); | 421 | stop_glerror(); |
422 | F32 border_scale = 1.f; | 422 | F32 border_scale = 1.f; |
423 | 423 | ||
424 | if (NULL == image) | ||
425 | { | ||
426 | llwarns << "image == NULL; aborting function" << llendl; | ||
427 | return; | ||
428 | } | ||
429 | |||
424 | if (border_height * 2 > height) | 430 | if (border_height * 2 > height) |
425 | { | 431 | { |
426 | border_scale = (F32)height / ((F32)border_height * 2.f); | 432 | border_scale = (F32)height / ((F32)border_height * 2.f); |
@@ -599,6 +605,12 @@ void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LL | |||
599 | 605 | ||
600 | void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLImageGL* image, const LLColor4& color) | 606 | void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLImageGL* image, const LLColor4& color) |
601 | { | 607 | { |
608 | if (NULL == image) | ||
609 | { | ||
610 | llwarns << "image == NULL; aborting function" << llendl; | ||
611 | return; | ||
612 | } | ||
613 | |||
602 | LLGLSUIDefault gls_ui; | 614 | LLGLSUIDefault gls_ui; |
603 | 615 | ||
604 | glPushMatrix(); | 616 | glPushMatrix(); |
@@ -639,6 +651,12 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre | |||
639 | 651 | ||
640 | void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color) | 652 | void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color) |
641 | { | 653 | { |
654 | if (NULL == image) | ||
655 | { | ||
656 | llwarns << "image == NULL; aborting function" << llendl; | ||
657 | return; | ||
658 | } | ||
659 | |||
642 | LLGLSUIDefault gls_ui; | 660 | LLGLSUIDefault gls_ui; |
643 | 661 | ||
644 | glPushMatrix(); | 662 | glPushMatrix(); |
diff --git a/linden/indra/llui/lluistring.cpp b/linden/indra/llui/lluistring.cpp index 49b6fca..49b6fca 100755..100644 --- a/linden/indra/llui/lluistring.cpp +++ b/linden/indra/llui/lluistring.cpp | |||
diff --git a/linden/indra/llui/lluistring.h b/linden/indra/llui/lluistring.h index 37792aa..37792aa 100755..100644 --- a/linden/indra/llui/lluistring.h +++ b/linden/indra/llui/lluistring.h | |||
diff --git a/linden/indra/llui/llviewborder.cpp b/linden/indra/llui/llviewborder.cpp index 4c2b602..84f396b 100644 --- a/linden/indra/llui/llviewborder.cpp +++ b/linden/indra/llui/llviewborder.cpp | |||
@@ -59,7 +59,7 @@ LLViewBorder::LLViewBorder( const LLString& name, const LLRect& rect, EBevel bev | |||
59 | } | 59 | } |
60 | 60 | ||
61 | // virtual | 61 | // virtual |
62 | BOOL LLViewBorder::isCtrl() | 62 | BOOL LLViewBorder::isCtrl() const |
63 | { | 63 | { |
64 | return FALSE; | 64 | return FALSE; |
65 | } | 65 | } |
diff --git a/linden/indra/llui/llviewborder.h b/linden/indra/llui/llviewborder.h index 7e5de4b..38d6c9f 100644 --- a/linden/indra/llui/llviewborder.h +++ b/linden/indra/llui/llviewborder.h | |||
@@ -54,7 +54,7 @@ public: | |||
54 | virtual EWidgetType getWidgetType() const; | 54 | virtual EWidgetType getWidgetType() const; |
55 | virtual LLString getWidgetTag() const; | 55 | virtual LLString getWidgetTag() const; |
56 | 56 | ||
57 | virtual BOOL isCtrl(); | 57 | virtual BOOL isCtrl() const; |
58 | 58 | ||
59 | // llview functionality | 59 | // llview functionality |
60 | virtual void draw(); | 60 | virtual void draw(); |