From c24b8b47a915f6877708c7848823638e519bd844 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Thu, 30 Mar 2017 14:08:03 -0700 Subject: [PATCH] Minor layout changes --- interface/resources/qml/hifi/NameCard.qml | 8 ++++---- interface/resources/qml/hifi/Pal.qml | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/interface/resources/qml/hifi/NameCard.qml b/interface/resources/qml/hifi/NameCard.qml index 2f7aa99610..86cc0218a4 100644 --- a/interface/resources/qml/hifi/NameCard.qml +++ b/interface/resources/qml/hifi/NameCard.qml @@ -316,16 +316,16 @@ Item { visible: thisNameCard.userName !== ""; // Size width: parent.width - height: pal.activeTab == "nearbyTab" || isMyCard ? usernameTextPixelSize + 4 : displayNameTextPixelSize + 4 + height: pal.activeTab == "nearbyTab" || isMyCard ? usernameTextPixelSize + 4 : parent.height; // Anchors - anchors.top: isMyCard ? myDisplayName.bottom : undefined; - anchors.bottom: !isMyCard ? avatarImage.bottom : undefined; + anchors.top: isMyCard ? myDisplayName.bottom : (pal.activeTab == "nearbyTab" ? displayNameContainer.bottom : parent.top); anchors.left: avatarImage.right; anchors.leftMargin: avatarImage.visible ? 5 : 0; + anchors.rightMargin: 5; // Text Size size: pal.activeTab == "nearbyTab" || isMyCard ? usernameTextPixelSize : displayNameTextPixelSize; // Text Positioning - verticalAlignment: Text.AlignBottom + verticalAlignment: Text.AlignVCenter; // Style color: hifi.colors.blueAccent; MouseArea { diff --git a/interface/resources/qml/hifi/Pal.qml b/interface/resources/qml/hifi/Pal.qml index 6db995d027..a61dcc060f 100644 --- a/interface/resources/qml/hifi/Pal.qml +++ b/interface/resources/qml/hifi/Pal.qml @@ -850,7 +850,7 @@ Rectangle { } // LOCATION data - FiraSansSemiBold { + FiraSansRegular { id: connectionsLocationData // Properties visible: styleData.role === "placeName"; @@ -883,7 +883,7 @@ Rectangle { // "Friends" checkbox HifiControlsUit.CheckBox { id: friendsCheckBox; - visible: styleData.role === "friends"; + visible: styleData.role === "friends" && model.userName !== myData.userName; anchors.centerIn: parent; checked: model ? (model["connection"] === "friend" ? true : false) : false; boxSize: 24; @@ -892,6 +892,7 @@ Rectangle { connectionsUserModel.setProperty(model.userIndex, styleData.role, newValue); connectionsUserModelData[model.userIndex][styleData.role] = newValue; // Defensive programming // Insert line here about actually taking the friend/unfriend action + //pal.sendToScript({method: 'addFriend', params: model.userName}); // Also insert line here about logging the activity, similar to the commented line below //UserActivityLogger["palAction"](newValue ? styleData.role : "un-" + styleData.role, model.sessionId);