Merge pull request #10148 from davidkelly/dk/3936

pal selection changes
This commit is contained in:
Howard Stearns 2017-04-06 14:58:46 -07:00 committed by GitHub
commit 67f2cc3567
2 changed files with 9 additions and 3 deletions

View file

@ -443,7 +443,7 @@ Rectangle {
rowDelegate: Rectangle { // The only way I know to specify a row height. rowDelegate: Rectangle { // The only way I know to specify a row height.
// Size // Size
height: rowHeight + (styleData.selected ? 15 : 0); height: rowHeight + (styleData.selected ? 15 : 0);
color: rowColor(styleData.selected, styleData.alternate); color: nearbyRowColor(styleData.selected, styleData.alternate);
} }
// This Item refers to the contents of each Cell // This Item refers to the contents of each Cell
@ -771,7 +771,7 @@ Rectangle {
rowDelegate: Rectangle { rowDelegate: Rectangle {
// Size // Size
height: rowHeight + (styleData.selected ? 15 : 0); height: rowHeight + (styleData.selected ? 15 : 0);
color: rowColor(styleData.selected, styleData.alternate); color: connectionsRowColor(styleData.selected, styleData.alternate);
} }
// This Item refers to the contents of each Cell // This Item refers to the contents of each Cell
@ -1199,9 +1199,12 @@ Rectangle {
} }
} }
function rowColor(selected, alternate) { function nearbyRowColor(selected, alternate) {
return selected ? hifi.colors.orangeHighlight : alternate ? hifi.colors.tableRowLightEven : hifi.colors.tableRowLightOdd; return selected ? hifi.colors.orangeHighlight : alternate ? hifi.colors.tableRowLightEven : hifi.colors.tableRowLightOdd;
} }
function connectionsRowColor(selected, alternate) {
return selected ? hifi.colors.lightBlueHighlight : alternate ? hifi.colors.tableRowLightEven : hifi.colors.tableRowLightOdd;
}
function findNearbySessionIndex(sessionId, optionalData) { // no findIndex in .qml function findNearbySessionIndex(sessionId, optionalData) { // no findIndex in .qml
var data = optionalData || nearbyUserModelData, length = data.length; var data = optionalData || nearbyUserModelData, length = data.length;
for (var i = 0; i < length; i++) { for (var i = 0; i < length; i++) {
@ -1272,6 +1275,8 @@ Rectangle {
selectionTimer.userIndex = userIndex; selectionTimer.userIndex = userIndex;
selectionTimer.start(); selectionTimer.start();
} }
// in any case make sure we are in the nearby tab
activeTab="nearbyTab";
break; break;
// Received an "updateUsername()" request from the JS // Received an "updateUsername()" request from the JS
case 'updateUsername': case 'updateUsername':

View file

@ -72,6 +72,7 @@ Item {
readonly property color magentaAccent: "#A2277C" readonly property color magentaAccent: "#A2277C"
readonly property color checkboxCheckedRed: "#FF0000" readonly property color checkboxCheckedRed: "#FF0000"
readonly property color checkboxCheckedBorderRed: "#D00000" readonly property color checkboxCheckedBorderRed: "#D00000"
readonly property color lightBlueHighlight: "#d6f6ff"
// Semitransparent // Semitransparent
readonly property color darkGray30: "#4d121212" readonly property color darkGray30: "#4d121212"