mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 05:08:25 +02:00
style updates
This commit is contained in:
parent
2f1b6be24d
commit
4629accc9c
3 changed files with 27 additions and 45 deletions
|
@ -19,12 +19,11 @@ Original.CheckBox {
|
||||||
|
|
||||||
property int colorScheme: hifi.colorSchemes.light
|
property int colorScheme: hifi.colorSchemes.light
|
||||||
readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light
|
readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light
|
||||||
|
property bool isRedCheck: false
|
||||||
property int boxSize: 14
|
property int boxSize: 14
|
||||||
readonly property int boxRadius: 3
|
readonly property int boxRadius: 3
|
||||||
readonly property int checkSize: Math.max(boxSize - 8, 10)
|
readonly property int checkSize: Math.max(boxSize - 8, 10)
|
||||||
readonly property int checkRadius: 2
|
readonly property int checkRadius: 2
|
||||||
|
|
||||||
activeFocusOnPress: true
|
activeFocusOnPress: true
|
||||||
|
|
||||||
style: CheckBoxStyle {
|
style: CheckBoxStyle {
|
||||||
|
@ -37,6 +36,7 @@ Original.CheckBox {
|
||||||
border.color: pressed || hovered
|
border.color: pressed || hovered
|
||||||
? hifi.colors.checkboxCheckedBorder
|
? hifi.colors.checkboxCheckedBorder
|
||||||
: (checkBox.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish)
|
: (checkBox.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish)
|
||||||
|
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
GradientStop {
|
GradientStop {
|
||||||
position: 0.2
|
position: 0.2
|
||||||
|
@ -68,9 +68,9 @@ Original.CheckBox {
|
||||||
height: checkSize
|
height: checkSize
|
||||||
radius: checkRadius
|
radius: checkRadius
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: hifi.colors.checkboxChecked
|
color: isRedCheck ? "#FF0000" : hifi.colors.checkboxChecked
|
||||||
border.width: 2
|
border.width: 2
|
||||||
border.color: hifi.colors.checkboxCheckedBorder
|
border.color: isRedCheck? "#D00000" : hifi.colors.checkboxCheckedBorder
|
||||||
visible: checked && !pressed || !checked && pressed
|
visible: checked && !pressed || !checked && pressed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ import QtQuick.Controls 1.4
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
property var dialogTitleText;
|
property var dialogTitleText : "";
|
||||||
property var optionTitleText;
|
property var optionTitleText: "";
|
||||||
property var optionBodyText;
|
property var optionBodyText: "";
|
||||||
property var optionValues;
|
property var optionValues: [];
|
||||||
property var selectedOptionIndex;
|
property var selectedOptionIndex: 0;
|
||||||
property var callbackFunction;
|
property var callbackFunction;
|
||||||
property int dialogWidth;
|
property int dialogWidth;
|
||||||
property int dialogHeight;
|
property int dialogHeight;
|
||||||
|
@ -51,12 +51,12 @@ Item {
|
||||||
id: dialogContainer;
|
id: dialogContainer;
|
||||||
color: "white";
|
color: "white";
|
||||||
anchors.centerIn: dialogBackground;
|
anchors.centerIn: dialogBackground;
|
||||||
width: dialogWidth;
|
width: combo.dialogWidth;
|
||||||
height: dialogHeight;
|
height: combo.dialogHeight;
|
||||||
|
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
id: dialogTitle;
|
id: dialogTitle;
|
||||||
text: dialogTitleText;
|
text: combo.dialogTitleText;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 20;
|
anchors.topMargin: 20;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
|
@ -154,4 +154,4 @@ Item {
|
||||||
comboListViewModel.insert(index, {"titleText": titleText, "bodyText": optionBodyText[index], "optionValue": optionValues[index]});
|
comboListViewModel.insert(index, {"titleText": titleText, "bodyText": optionBodyText[index], "optionValue": optionValues[index]});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -512,6 +512,7 @@ Rectangle {
|
||||||
// If this is an "Ignore" checkbox, disable the checkbox if user isn't present.
|
// If this is an "Ignore" checkbox, disable the checkbox if user isn't present.
|
||||||
enabled: styleData.role === "ignore" ? (model ? model["isPresent"] : true) : true;
|
enabled: styleData.role === "ignore" ? (model ? model["isPresent"] : true) : true;
|
||||||
boxSize: 24;
|
boxSize: 24;
|
||||||
|
isRedCheck: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var newValue = !model[styleData.role];
|
var newValue = !model[styleData.role];
|
||||||
nearbyUserModel.setProperty(model.userIndex, styleData.role, newValue);
|
nearbyUserModel.setProperty(model.userIndex, styleData.role, newValue);
|
||||||
|
@ -611,7 +612,7 @@ Rectangle {
|
||||||
"Bold names in the list are <b>avatar display names</b>.<br>" +
|
"Bold names in the list are <b>avatar display names</b>.<br>" +
|
||||||
"<font color='purple'>Purple borders around profile pictures are <b>connections</b></font>.<br>" +
|
"<font color='purple'>Purple borders around profile pictures are <b>connections</b></font>.<br>" +
|
||||||
"<font color='green'>Green borders around profile pictures are <b>friends</b>.</font><br>" +
|
"<font color='green'>Green borders around profile pictures are <b>friends</b>.</font><br>" +
|
||||||
"(TEMPORARY LANGUAGE) In some situations, you can also see others' usernames.<br>" +
|
"In some situations, you can also see others' usernames.<br>" +
|
||||||
"If you can see someone's username, you can GoTo them by selecting them in the PAL, then clicking their name.<br>" +
|
"If you can see someone's username, you can GoTo them by selecting them in the PAL, then clicking their name.<br>" +
|
||||||
"<br>If someone's display name isn't set, a unique <b>session display name</b> is assigned to them.<br>" +
|
"<br>If someone's display name isn't set, a unique <b>session display name</b> is assigned to them.<br>" +
|
||||||
"<br>Administrators of this domain can also see the <b>username</b> or <b>machine ID</b> associated with each avatar present.");
|
"<br>Administrators of this domain can also see the <b>username</b> or <b>machine ID</b> associated with each avatar present.");
|
||||||
|
@ -948,7 +949,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
id: upperRightInfoContainer;
|
id: upperRightInfoContainer;
|
||||||
width: 160;
|
width: 200;
|
||||||
height: parent.height;
|
height: parent.height;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
|
@ -959,7 +960,7 @@ Rectangle {
|
||||||
// Text size
|
// Text size
|
||||||
size: hifi.fontSizes.tabularData;
|
size: hifi.fontSizes.tabularData;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: availabilityComboBox.bottom;
|
anchors.top: myCard.top;
|
||||||
anchors.horizontalCenter: parent.horizontalCenter;
|
anchors.horizontalCenter: parent.horizontalCenter;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGrayHighlight;
|
color: hifi.colors.baseGrayHighlight;
|
||||||
|
@ -972,13 +973,20 @@ Rectangle {
|
||||||
id: availabilityComboBox;
|
id: availabilityComboBox;
|
||||||
color: hifi.colors.textFieldLightBackground
|
color: hifi.colors.textFieldLightBackground
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: parent.top;
|
anchors.top: availabilityText.bottom;
|
||||||
anchors.horizontalCenter: parent.horizontalCenter;
|
anchors.horizontalCenter: parent.horizontalCenter;
|
||||||
// Size
|
// Size
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
height: 40;
|
height: 40;
|
||||||
|
function determineAvailabilityIndex() {
|
||||||
|
return ['all', 'connections', 'friends', 'none'].indexOf(GlobalServices.findableBy);
|
||||||
|
}
|
||||||
|
|
||||||
|
function determineAvailabilityString() {
|
||||||
|
return availabilityStrings[determineAvailabilityIndex()];
|
||||||
|
}
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
text: myData.userName === "Unknown user" ? "Login to Set" : availabilityStrings[GlobalServices.findableBy];
|
text: myData.userName === "Unknown user" ? "Login to Set" : availabilityComboBox.determineAvailabilityString();
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
anchors.leftMargin: 10;
|
anchors.leftMargin: 10;
|
||||||
horizontalAlignment: Text.AlignLeft;
|
horizontalAlignment: Text.AlignLeft;
|
||||||
|
@ -986,7 +994,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
enabled: myData.userName ==! "Unknown user";
|
enabled: myData.userName !== "Unknown user";
|
||||||
hoverEnabled: true;
|
hoverEnabled: true;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
popupComboDialog("Set your availability:",
|
popupComboDialog("Set your availability:",
|
||||||
|
@ -1001,32 +1009,6 @@ Rectangle {
|
||||||
onExited: availabilityComboBox.color = hifi.colors.textFieldLightBackground;
|
onExited: availabilityComboBox.color = hifi.colors.textFieldLightBackground;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*HifiControlsUit.ComboBox {
|
|
||||||
function determineAvailabilityIndex() {
|
|
||||||
return ['all', 'connections', 'friends', 'none'].indexOf(GlobalServices.findableBy)
|
|
||||||
}
|
|
||||||
id: availabilityComboBox;
|
|
||||||
// Anchors
|
|
||||||
anchors.top: parent.top;
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter;
|
|
||||||
// Size
|
|
||||||
width: parent.width;
|
|
||||||
height: 40;
|
|
||||||
currentIndex: determineAvailabilityIndex();
|
|
||||||
model: ListModel {
|
|
||||||
id: availabilityComboBoxListItems
|
|
||||||
ListElement { text: "Everyone"; value: "all"; }
|
|
||||||
ListElement { text: "All Connections"; value: "connections"; }
|
|
||||||
ListElement { text: "Friends Only"; value: "friends"; }
|
|
||||||
ListElement { text: "Appear Offline"; value: "none" }
|
|
||||||
}
|
|
||||||
onCurrentIndexChanged: {
|
|
||||||
GlobalServices.findableBy = availabilityComboBoxListItems.get(currentIndex).value;
|
|
||||||
UserActivityLogger.palAction("set_availability", availabilityComboBoxListItems.get(currentIndex).value);
|
|
||||||
print('Setting availability:', JSON.stringify(GlobalServices.findableBy));
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue