mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
old style card fonts, margins, etc.
This commit is contained in:
parent
2512255dd0
commit
b8e9fb67b8
1 changed files with 46 additions and 74 deletions
|
@ -80,7 +80,7 @@ Rectangle {
|
||||||
id: lobby;
|
id: lobby;
|
||||||
visible: !hasGif || (animation.status !== Image.Ready);
|
visible: !hasGif || (animation.status !== Image.Ready);
|
||||||
width: parent.width - (isConcurrency ? 0 : (2 * smallMargin));
|
width: parent.width - (isConcurrency ? 0 : (2 * smallMargin));
|
||||||
height: parent.height - (isConcurrency ? 0 : smallMargin);
|
height: parent.height - messageHeight - (isConcurrency ? 0 : smallMargin);
|
||||||
source: thumbnail || defaultThumbnail;
|
source: thumbnail || defaultThumbnail;
|
||||||
fillMode: Image.PreserveAspectCrop;
|
fillMode: Image.PreserveAspectCrop;
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -129,7 +129,7 @@ Rectangle {
|
||||||
property int dropSamples: 9;
|
property int dropSamples: 9;
|
||||||
property int dropSpread: 0;
|
property int dropSpread: 0;
|
||||||
DropShadow {
|
DropShadow {
|
||||||
visible: true;
|
visible: showPlace && desktop.gradientsSupported;
|
||||||
source: place;
|
source: place;
|
||||||
anchors.fill: place;
|
anchors.fill: place;
|
||||||
horizontalOffset: dropHorizontalOffset;
|
horizontalOffset: dropHorizontalOffset;
|
||||||
|
@ -139,12 +139,12 @@ Rectangle {
|
||||||
color: hifi.colors.black;
|
color: hifi.colors.black;
|
||||||
spread: dropSpread;
|
spread: dropSpread;
|
||||||
}
|
}
|
||||||
RalewayLight {
|
RalewaySemiBold {
|
||||||
id: place;
|
id: place;
|
||||||
visible: showPlace;
|
visible: showPlace;
|
||||||
text: placeName;
|
text: placeName;
|
||||||
color: hifi.colors.white;
|
color: hifi.colors.white;
|
||||||
size: 38;
|
size: textSize;
|
||||||
elide: Text.ElideRight; // requires constrained width
|
elide: Text.ElideRight; // requires constrained width
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top;
|
top: parent.top;
|
||||||
|
@ -153,57 +153,44 @@ Rectangle {
|
||||||
margins: textPadding;
|
margins: textPadding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Row {
|
||||||
id: rectRow
|
FiraSansRegular {
|
||||||
z: 1
|
id: users;
|
||||||
width: message.width + (users.visible ? users.width + bottomRow.spacing : 0)
|
visible: isConcurrency;
|
||||||
+ (icon.visible ? icon.width + bottomRow.spacing: 0) + bottomRow.spacing;
|
text: onlineUsers;
|
||||||
height: messageHeight + 1;
|
size: textSize;
|
||||||
radius: 25
|
color: messageColor;
|
||||||
|
anchors.verticalCenter: message.verticalCenter;
|
||||||
anchors {
|
|
||||||
bottom: parent.bottom
|
|
||||||
left: parent.left
|
|
||||||
leftMargin: textPadding
|
|
||||||
bottomMargin: textPadding
|
|
||||||
}
|
}
|
||||||
|
Image {
|
||||||
Row {
|
id: icon;
|
||||||
id: bottomRow
|
source: "../../images/snap-icon.svg"
|
||||||
FiraSansRegular {
|
width: 40;
|
||||||
id: users;
|
height: 40;
|
||||||
visible: isConcurrency;
|
visible: action === 'snapshot';
|
||||||
text: onlineUsers;
|
}
|
||||||
size: textSize;
|
RalewayRegular {
|
||||||
color: messageColor;
|
id: message;
|
||||||
anchors.verticalCenter: message.verticalCenter;
|
text: isConcurrency ? ((onlineUsers === 1) ? "person" : "people") : (drillDownToPlace ? "snapshots" : ("by " + userName));
|
||||||
}
|
size: textSizeSmall;
|
||||||
Image {
|
color: messageColor;
|
||||||
id: icon;
|
elide: Text.ElideRight; // requires a width to be specified`
|
||||||
source: "../../images/snap-icon.svg"
|
width: root.width - textPadding
|
||||||
width: 40;
|
- (users.visible ? users.width + parent.spacing : 0)
|
||||||
height: 40;
|
- (icon.visible ? icon.width + parent.spacing : 0)
|
||||||
visible: action === 'snapshot';
|
- (actionIcon.width + (2 * smallMargin));
|
||||||
}
|
|
||||||
RalewayRegular {
|
|
||||||
id: message;
|
|
||||||
text: isConcurrency ? ((onlineUsers === 1) ? "person" : "people") : (drillDownToPlace ? "snapshots" : ("by " + userName));
|
|
||||||
size: textSizeSmall;
|
|
||||||
color: messageColor;
|
|
||||||
elide: Text.ElideRight; // requires a width to be specified`
|
|
||||||
anchors {
|
|
||||||
bottom: parent.bottom;
|
|
||||||
bottomMargin: parent.spacing;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
spacing: textPadding;
|
|
||||||
height: messageHeight;
|
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom;
|
bottom: parent.bottom;
|
||||||
left: parent.left;
|
bottomMargin: parent.spacing;
|
||||||
leftMargin: 4
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
spacing: textPadding;
|
||||||
|
height: messageHeight;
|
||||||
|
anchors {
|
||||||
|
bottom: parent.bottom;
|
||||||
|
left: parent.left;
|
||||||
|
leftMargin: textPadding;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// These two can be supplied to provide hover behavior.
|
// These two can be supplied to provide hover behavior.
|
||||||
// For example, AddressBarDialog provides functions that set the current list view item
|
// For example, AddressBarDialog provides functions that set the current list view item
|
||||||
|
@ -218,37 +205,22 @@ Rectangle {
|
||||||
onEntered: hoverThunk();
|
onEntered: hoverThunk();
|
||||||
onExited: unhoverThunk();
|
onExited: unhoverThunk();
|
||||||
}
|
}
|
||||||
Rectangle {
|
StateImage {
|
||||||
id: rectIcon
|
id: actionIcon;
|
||||||
z: 1
|
imageURL: "../../images/info-icon-2-state.svg";
|
||||||
width: 32
|
size: 32;
|
||||||
height: 32
|
buttonState: messageArea.containsMouse ? 1 : 0;
|
||||||
radius: 15
|
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom;
|
bottom: parent.bottom;
|
||||||
right: parent.right;
|
right: parent.right;
|
||||||
bottomMargin: textPadding;
|
margins: smallMargin;
|
||||||
rightMargin: textPadding;
|
|
||||||
}
|
|
||||||
|
|
||||||
StateImage {
|
|
||||||
id: actionIcon;
|
|
||||||
imageURL: "../../images/info-icon-2-state.svg";
|
|
||||||
size: 32;
|
|
||||||
buttonState: messageArea.containsMouse ? 1 : 0;
|
|
||||||
anchors {
|
|
||||||
bottom: parent.bottom;
|
|
||||||
right: parent.right;
|
|
||||||
//margins: smallMargin;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: messageArea;
|
id: messageArea;
|
||||||
width: rectIcon.width;
|
width: parent.width;
|
||||||
height: rectIcon.height;
|
height: messageHeight;
|
||||||
anchors.fill: rectIcon
|
anchors.top: lobby.bottom;
|
||||||
acceptedButtons: Qt.LeftButton;
|
acceptedButtons: Qt.LeftButton;
|
||||||
onClicked: goFunction(drillDownToPlace ? ("/places/" + placeName) : ("/user_stories/" + storyId));
|
onClicked: goFunction(drillDownToPlace ? ("/places/" + placeName) : ("/user_stories/" + storyId));
|
||||||
hoverEnabled: true;
|
hoverEnabled: true;
|
||||||
|
|
Loading…
Reference in a new issue