diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloater.cpp | 3 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 51 |
2 files changed, 30 insertions, 24 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 76877c2dc4..0754d0eda9 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2252,7 +2252,8 @@ void LLFloaterView::refresh() LLFloater* floaterp = (LLFloater*)*child_it; if( floaterp->getVisible() ) { - adjustToFitScreen(floaterp, TRUE); + // minimized floaters are kept fully onscreen + adjustToFitScreen(floaterp, !floaterp->isMinimized()); } } } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index d6be3d045f..c29789e083 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1669,7 +1669,7 @@ void LLScrollListCtrl::drawItems() { // Draw background of selected item bg_color = mBgSelectedColor; - fg_color = mFgSelectedColor; + fg_color = (item->getEnabled() ? mFgSelectedColor : mFgDisabledColor); } else if (mHighlightedItem == line && mCanSelect) { @@ -1979,33 +1979,38 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) LLScrollListCell* hit_cell = hit_item->getColumn(column_index); if (!hit_cell) return FALSE; - // select item (thus deselecting any currently selected item) - // only if item is not already selected - if (!hit_item->getSelected()) - { - selectItemAt(x, y, mask); - gFocusMgr.setMouseCapture(this); - mNeedsScroll = TRUE; - } - + // if cell handled click directly (i.e. clicked on an embedded checkbox) if (hit_cell->handleClick()) { - // propagate value of this cell to other selected items - // and commit the respective widgets - LLSD item_value = hit_cell->getValue(); - for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); iter++) + // if item not currently selected, select it + if (!hit_item->getSelected()) { - LLScrollListItem* item = *iter; - if (item->getSelected()) + selectItemAt(x, y, mask); + gFocusMgr.setMouseCapture(this); + mNeedsScroll = TRUE; + } + // otherwise we already have this item selected + // so propagate state of cell to rest of selected column + else + { + // propagate value of this cell to other selected items + // and commit the respective widgets + LLSD item_value = hit_cell->getValue(); + for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); iter++) { - LLScrollListCell* cellp = item->getColumn(column_index); - cellp->setValue(item_value); - cellp->onCommit(); + LLScrollListItem* item = *iter; + if (item->getSelected()) + { + LLScrollListCell* cellp = item->getColumn(column_index); + cellp->setValue(item_value); + cellp->onCommit(); + } } + //FIXME: find a better way to signal cell changes + onCommit(); } - //FIXME: find a better way to signal cell changes - onCommit(); - return TRUE; + // eat click (e.g. do not trigger double click callback) + return TRUE; } else { @@ -2013,7 +2018,7 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) selectItemAt(x, y, mask); gFocusMgr.setMouseCapture(this); mNeedsScroll = TRUE; - // do not stop click processing (click callback, etc) + // do not eat click (allow double click callback) return FALSE; } } |