mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-04 18:39:18 +02:00
Kinda screwed things up by changing styles
This commit is contained in:
parent
feafc16833
commit
7999e14ecf
3 changed files with 48 additions and 34 deletions
|
@ -18,11 +18,16 @@ Row {
|
||||||
// Spacing
|
// Spacing
|
||||||
spacing: 10;
|
spacing: 10;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.topMargin: 10;
|
anchors.top: parent.top;
|
||||||
anchors.leftMargin: 10;
|
anchors {
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
topMargin: (parent.height - contentHeight)/2;
|
||||||
|
bottomMargin: (parent.height - contentHeight)/2;
|
||||||
|
leftMargin: 10;
|
||||||
|
rightMargin: 10;
|
||||||
|
}
|
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
|
property int contentHeight: 50;
|
||||||
property string displayName: "";
|
property string displayName: "";
|
||||||
property string userName: "";
|
property string userName: "";
|
||||||
property int displayTextHeight: 18;
|
property int displayTextHeight: 18;
|
||||||
|
@ -31,8 +36,8 @@ Row {
|
||||||
Column {
|
Column {
|
||||||
id: avatarImage;
|
id: avatarImage;
|
||||||
// Size
|
// Size
|
||||||
width: 50;
|
height: contentHeight;
|
||||||
height: width;
|
width: height;
|
||||||
Rectangle {
|
Rectangle {
|
||||||
radius: parent.width*0.5;
|
radius: parent.width*0.5;
|
||||||
color: "#AAA5AD";
|
color: "#AAA5AD";
|
||||||
|
@ -44,12 +49,11 @@ Row {
|
||||||
Column {
|
Column {
|
||||||
id: textContainer;
|
id: textContainer;
|
||||||
// Size
|
// Size
|
||||||
width: parent.width - avatarImage.width - parent.anchors.leftMargin*2 - parent.spacing;
|
width: parent.width - avatarImage.width - parent.anchors.leftMargin - parent.anchors.rightMargin - parent.spacing;
|
||||||
// Anchors
|
height: contentHeight;
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
|
||||||
|
|
||||||
// DisplayName Text
|
// DisplayName Text
|
||||||
RalewaySemiBold {
|
FiraSansSemiBold {
|
||||||
id: displayNameText;
|
id: displayNameText;
|
||||||
// Properties
|
// Properties
|
||||||
text: thisNameCard.displayName;
|
text: thisNameCard.displayName;
|
||||||
|
@ -63,7 +67,7 @@ Row {
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserName Text
|
// UserName Text
|
||||||
RalewayLight {
|
FiraSansSemiBold {
|
||||||
id: userNameText;
|
id: userNameText;
|
||||||
// Properties
|
// Properties
|
||||||
text: thisNameCard.userName;
|
text: thisNameCard.userName;
|
||||||
|
@ -84,11 +88,11 @@ Row {
|
||||||
}
|
}
|
||||||
|
|
||||||
// VU Meter
|
// VU Meter
|
||||||
Hifi.AvatarInputs {
|
Rectangle {
|
||||||
id: nameCardVUMeter;
|
id: nameCardVUMeter;
|
||||||
objectName: "AvatarInputs";
|
objectName: "AvatarInputs";
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
height: 30;
|
height: 4;
|
||||||
// Avatar Audio VU Meter
|
// Avatar Audio VU Meter
|
||||||
Item {
|
Item {
|
||||||
id: controls;
|
id: controls;
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
|
import "../styles-uit"
|
||||||
|
import "../controls-uit" as HifiControls
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: pal;
|
id: pal;
|
||||||
|
@ -35,10 +37,10 @@ Rectangle {
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
height: parent.height;
|
height: parent.height;
|
||||||
// Properties
|
// Properties
|
||||||
property int myCardHeight: 75;
|
property int myCardHeight: 70;
|
||||||
property int rowHeight: 65;
|
property int rowHeight: 70;
|
||||||
property int separatorColWidth: 30;
|
property int separatorColWidth: 10;
|
||||||
property int actionButtonWidth: 50;
|
property int actionButtonWidth: 55;
|
||||||
property int nameCardWidth: width - separatorColWidth- actionButtonWidth*(table.columnCount - 2); // "-2" for Name and Separator cols;
|
property int nameCardWidth: width - separatorColWidth- actionButtonWidth*(table.columnCount - 2); // "-2" for Name and Separator cols;
|
||||||
|
|
||||||
// This contains the current user's NameCard and will contain other information in the future
|
// This contains the current user's NameCard and will contain other information in the future
|
||||||
|
@ -50,8 +52,6 @@ Rectangle {
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: pal.top;
|
anchors.top: pal.top;
|
||||||
anchors.left: pal.left;
|
anchors.left: pal.left;
|
||||||
anchors.topMargin: 10;
|
|
||||||
anchors.bottomMargin: anchors.topMargin;
|
|
||||||
// This NameCard refers to the current user's NameCard (the one above the table)
|
// This NameCard refers to the current user's NameCard (the one above the table)
|
||||||
NameCard {
|
NameCard {
|
||||||
id: myCard;
|
id: myCard;
|
||||||
|
@ -66,7 +66,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// This TableView refers to the table (below the current user's NameCard)
|
// This TableView refers to the table (below the current user's NameCard)
|
||||||
TableView {
|
HifiControls.Table {
|
||||||
id: table;
|
id: table;
|
||||||
// Size
|
// Size
|
||||||
height: pal.height - myInfo.height;
|
height: pal.height - myInfo.height;
|
||||||
|
@ -81,29 +81,41 @@ Rectangle {
|
||||||
|
|
||||||
TableViewColumn {
|
TableViewColumn {
|
||||||
role: "displayName";
|
role: "displayName";
|
||||||
title: "Name";
|
title: "NAMES";
|
||||||
width: nameCardWidth
|
width: nameCardWidth;
|
||||||
|
movable: false;
|
||||||
|
}
|
||||||
|
TableViewColumn {
|
||||||
|
role: "personalMute";
|
||||||
|
title: "MUTE"
|
||||||
|
width: actionButtonWidth;
|
||||||
|
movable: false;
|
||||||
}
|
}
|
||||||
TableViewColumn {
|
TableViewColumn {
|
||||||
role: "ignore";
|
role: "ignore";
|
||||||
title: "Ignore"
|
title: "IGNORE";
|
||||||
width: actionButtonWidth
|
width: actionButtonWidth;
|
||||||
|
movable: false;
|
||||||
}
|
}
|
||||||
TableViewColumn {
|
TableViewColumn {
|
||||||
title: "";
|
title: "";
|
||||||
width: separatorColWidth
|
width: separatorColWidth;
|
||||||
|
resizable: false;
|
||||||
|
movable: false;
|
||||||
}
|
}
|
||||||
TableViewColumn {
|
TableViewColumn {
|
||||||
visible: iAmAdmin;
|
visible: iAmAdmin;
|
||||||
role: "mute";
|
role: "mute";
|
||||||
title: "Mute";
|
title: "SILENCE";
|
||||||
width: actionButtonWidth
|
width: actionButtonWidth;
|
||||||
|
movable: false;
|
||||||
}
|
}
|
||||||
TableViewColumn {
|
TableViewColumn {
|
||||||
visible: iAmAdmin;
|
visible: iAmAdmin;
|
||||||
role: "kick";
|
role: "kick";
|
||||||
title: "Ban"
|
title: "BAN"
|
||||||
width: actionButtonWidth
|
width: actionButtonWidth;
|
||||||
|
movable: false;
|
||||||
}
|
}
|
||||||
model: userModel;
|
model: userModel;
|
||||||
|
|
||||||
|
@ -127,9 +139,6 @@ Rectangle {
|
||||||
id: itemCell;
|
id: itemCell;
|
||||||
property bool isCheckBox: typeof(styleData.value) === 'boolean';
|
property bool isCheckBox: typeof(styleData.value) === 'boolean';
|
||||||
property bool isSeparator: styleData.value === '';
|
property bool isSeparator: styleData.value === '';
|
||||||
// Anchors
|
|
||||||
anchors.topMargin: 10;
|
|
||||||
anchors.bottomMargin: anchors.topMargin;
|
|
||||||
// This NameCard refers to the cell that contains an avatar's
|
// This NameCard refers to the cell that contains an avatar's
|
||||||
// DisplayName and UserName
|
// DisplayName and UserName
|
||||||
NameCard {
|
NameCard {
|
||||||
|
@ -248,7 +257,7 @@ Rectangle {
|
||||||
datum[property] = false;
|
datum[property] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
['ignore', 'spacer', 'mute', 'kick'].forEach(init);
|
['personalMute', 'ignore', 'spacer', 'mute', 'kick'].forEach(init);
|
||||||
datum.userIndex = userIndex++;
|
datum.userIndex = userIndex++;
|
||||||
userModel.append(datum);
|
userModel.append(datum);
|
||||||
});
|
});
|
||||||
|
|
|
@ -79,7 +79,7 @@ ExtendedOverlay.applyPickRay = function (pickRay, cb) { // cb(overlay) on the on
|
||||||
var pal = new OverlayWindow({
|
var pal = new OverlayWindow({
|
||||||
title: 'People Action List',
|
title: 'People Action List',
|
||||||
source: 'hifi/Pal.qml',
|
source: 'hifi/Pal.qml',
|
||||||
width: 480,
|
width: 580,
|
||||||
height: 640,
|
height: 640,
|
||||||
visible: false
|
visible: false
|
||||||
});
|
});
|
||||||
|
@ -144,7 +144,8 @@ function usernameFromIDReply(id, username, machineFingerprint) {
|
||||||
// Set the data to contain specific strings.
|
// Set the data to contain specific strings.
|
||||||
data = ['', username]
|
data = ['', username]
|
||||||
} else {
|
} else {
|
||||||
// Set the data to contain the ID and the username+ID concat string.
|
// Set the data to contain the ID and the username (if we have one)
|
||||||
|
// or fingerprint (if we don't have a username) string.
|
||||||
data = [id, username || machineFingerprint];
|
data = [id, username || machineFingerprint];
|
||||||
}
|
}
|
||||||
print('Username Data:', JSON.stringify(data));
|
print('Username Data:', JSON.stringify(data));
|
||||||
|
|
Loading…
Reference in a new issue