Remove quotes from id: properties
As suggested in the Qt Quick coding style
This commit is contained in:
parent
8f35e60801
commit
c866ac87a9
|
@ -22,7 +22,7 @@ Controls1.SplitView {
|
||||||
console.log("replaced")
|
console.log("replaced")
|
||||||
}
|
}
|
||||||
|
|
||||||
id: "pageStack"
|
id: pageStack
|
||||||
|
|
||||||
onCurrentItemChanged: currentItem.forceActiveFocus()
|
onCurrentItemChanged: currentItem.forceActiveFocus()
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,12 @@ Item {
|
||||||
typeof(name) == "string" ? name :
|
typeof(name) == "string" ? name :
|
||||||
(name.value ? name.value : "?")
|
(name.value ? name.value : "?")
|
||||||
|
|
||||||
id: "root"
|
id: root
|
||||||
width: dimmension
|
width: dimmension
|
||||||
height: invisible ? 1 : dimmension
|
height: invisible ? 1 : dimmension
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: "letterRectangle"
|
id: letterRectangle
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: ! invisible && imageSource === null
|
visible: ! invisible && imageSource === null
|
||||||
color: resolvedName === "?" ?
|
color: resolvedName === "?" ?
|
||||||
|
@ -34,7 +34,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: "avatarImage"
|
id: avatarImage
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: ! invisible && imageSource !== null
|
visible: ! invisible && imageSource !== null
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ ToolButton {
|
||||||
property string tooltip: ""
|
property string tooltip: ""
|
||||||
property string iconName: ""
|
property string iconName: ""
|
||||||
|
|
||||||
id: "button"
|
id: button
|
||||||
display: ToolButton.IconOnly
|
display: ToolButton.IconOnly
|
||||||
icon.source: "../../icons/" + iconName + ".svg"
|
icon.source: "../../icons/" + iconName + ".svg"
|
||||||
background: Rectangle { color: "transparent" }
|
background: Rectangle { color: "transparent" }
|
||||||
|
@ -20,7 +20,7 @@ ToolButton {
|
||||||
visible: text ? toolTipZone.containsMouse : false
|
visible: text ? toolTipZone.containsMouse : false
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: "toolTipZone"
|
id: toolTipZone
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
acceptedButtons: Qt.NoButton // Make button receive clicks normally
|
acceptedButtons: Qt.NoButton // Make button receive clicks normally
|
||||||
|
|
|
@ -2,11 +2,11 @@ import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
|
|
||||||
HLabel {
|
HLabel {
|
||||||
id: "label"
|
id: label
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: "mouseArea"
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import QtQuick.Layouts 1.4
|
||||||
|
|
||||||
Avatar {
|
Avatar {
|
||||||
Image {
|
Image {
|
||||||
id: "status"
|
id: status
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
source: "../../icons/status.svg"
|
source: "../../icons/status.svg"
|
||||||
|
|
|
@ -5,7 +5,7 @@ import "../base" as Base
|
||||||
import "utils.js" as ChatJS
|
import "utils.js" as ChatJS
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: "messageDelegate"
|
id: messageDelegate
|
||||||
|
|
||||||
function minsBetween(date1, date2) {
|
function minsBetween(date1, date2) {
|
||||||
return Math.round((((date2 - date1) % 86400000) % 3600000) / 60000)
|
return Math.round((((date2 - date1) % 86400000) % 3600000) / 60000)
|
||||||
|
|
|
@ -7,26 +7,26 @@ Rectangle {
|
||||||
property string displayName: ""
|
property string displayName: ""
|
||||||
property string topic: ""
|
property string topic: ""
|
||||||
|
|
||||||
id: "root"
|
id: root
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.minimumHeight: 36
|
Layout.minimumHeight: 36
|
||||||
Layout.maximumHeight: Layout.minimumHeight
|
Layout.maximumHeight: Layout.minimumHeight
|
||||||
color: "#BBB"
|
color: "#BBB"
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: "row"
|
id: row
|
||||||
spacing: 12
|
spacing: 12
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Base.Avatar {
|
Base.Avatar {
|
||||||
id: "avatar"
|
id: avatar
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
dimmension: root.Layout.minimumHeight
|
dimmension: root.Layout.minimumHeight
|
||||||
name: displayName
|
name: displayName
|
||||||
}
|
}
|
||||||
|
|
||||||
Base.HLabel {
|
Base.HLabel {
|
||||||
id: "roomName"
|
id: roomName
|
||||||
text: displayName
|
text: displayName
|
||||||
font.pixelSize: bigSize
|
font.pixelSize: bigSize
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
@ -37,7 +37,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Base.HLabel {
|
Base.HLabel {
|
||||||
id: "roomTopic"
|
id: roomTopic
|
||||||
text: topic
|
text: topic
|
||||||
font.pixelSize: smallSize
|
font.pixelSize: smallSize
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
|
@ -9,17 +9,17 @@ ColumnLayout {
|
||||||
property var roomInfo:
|
property var roomInfo:
|
||||||
Backend.models.rooms.get(userId).getWhere("roomId", roomId)
|
Backend.models.rooms.get(userId).getWhere("roomId", roomId)
|
||||||
|
|
||||||
id: "chatPage"
|
id: chatPage
|
||||||
spacing: 0
|
spacing: 0
|
||||||
onFocusChanged: sendBox.setFocus()
|
onFocusChanged: sendBox.setFocus()
|
||||||
|
|
||||||
RoomHeader {
|
RoomHeader {
|
||||||
id: "roomHeader"
|
id: roomHeader
|
||||||
displayName: roomInfo.displayName
|
displayName: roomInfo.displayName
|
||||||
topic: roomInfo.topic
|
topic: roomInfo.topic
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageList {}
|
MessageList {}
|
||||||
TypingUsersBar {}
|
TypingUsersBar {}
|
||||||
SendBox { id: "sendBox" }
|
SendBox { id: sendBox }
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import "../base" as Base
|
||||||
Rectangle {
|
Rectangle {
|
||||||
function setFocus() { textArea.forceActiveFocus() }
|
function setFocus() { textArea.forceActiveFocus() }
|
||||||
|
|
||||||
id: "root"
|
id: root
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.minimumHeight: 32
|
Layout.minimumHeight: 32
|
||||||
Layout.preferredHeight: textArea.implicitHeight
|
Layout.preferredHeight: textArea.implicitHeight
|
||||||
|
@ -19,7 +19,7 @@ Rectangle {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Base.Avatar {
|
Base.Avatar {
|
||||||
id: "avatar"
|
id: avatar
|
||||||
name: Backend.getUserDisplayName(chatPage.userId)
|
name: Backend.getUserDisplayName(chatPage.userId)
|
||||||
dimmension: root.Layout.minimumHeight
|
dimmension: root.Layout.minimumHeight
|
||||||
//visible: textArea.text === ""
|
//visible: textArea.text === ""
|
||||||
|
|
|
@ -14,7 +14,7 @@ Rectangle {
|
||||||
property var typingUsers: chatPage.roomInfo.typingUsers
|
property var typingUsers: chatPage.roomInfo.typingUsers
|
||||||
|
|
||||||
Base.HLabel {
|
Base.HLabel {
|
||||||
id: "usersLabel"
|
id: usersLabel
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
text: ChatJS.getTypingUsersText(typingUsers, chatPage.userId)
|
text: ChatJS.getTypingUsersText(typingUsers, chatPage.userId)
|
||||||
|
|
||||||
|
|
|
@ -4,15 +4,15 @@ import QtQuick.Layouts 1.4
|
||||||
import "../base" as Base
|
import "../base" as Base
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: "accountDelegate"
|
id: accountDelegate
|
||||||
spacing: 0
|
spacing: 0
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: "row"
|
id: row
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Base.Avatar { id: "avatar"; name: displayName; dimmension: 36 }
|
Base.Avatar { id: avatar; name: displayName; dimmension: 36 }
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -20,7 +20,7 @@ ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Base.HLabel {
|
Base.HLabel {
|
||||||
id: "accountLabel"
|
id: accountLabel
|
||||||
text: displayName.value || userId
|
text: displayName.value || userId
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
|
@ -30,7 +30,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: "statusEdit"
|
id: statusEdit
|
||||||
text: statusMessage || ""
|
text: statusMessage || ""
|
||||||
placeholderText: qsTr("Set status message")
|
placeholderText: qsTr("Set status message")
|
||||||
background: null
|
background: null
|
||||||
|
@ -51,7 +51,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
Base.HToolButton {
|
Base.HToolButton {
|
||||||
id: "toggleExpand"
|
id: toggleExpand
|
||||||
iconName: roomList.visible ? "up" : "down"
|
iconName: roomList.visible ? "up" : "down"
|
||||||
Layout.maximumWidth: 28
|
Layout.maximumWidth: 28
|
||||||
Layout.minimumHeight: row.height
|
Layout.minimumHeight: row.height
|
||||||
|
@ -64,7 +64,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
RoomList {
|
RoomList {
|
||||||
id: "roomList"
|
id: roomList
|
||||||
visible: true
|
visible: true
|
||||||
interactive: false // no scrolling
|
interactive: false // no scrolling
|
||||||
forUserId: userId
|
forUserId: userId
|
||||||
|
|
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.2
|
||||||
import QtQuick.Layouts 1.4
|
import QtQuick.Layouts 1.4
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: "accountList"
|
id: accountList
|
||||||
spacing: 8
|
spacing: 8
|
||||||
model: Backend.models.accounts
|
model: Backend.models.accounts
|
||||||
delegate: AccountDelegate {}
|
delegate: AccountDelegate {}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import QtQuick.Layouts 1.4
|
||||||
import "../base" as Base
|
import "../base" as Base
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: "toolBar"
|
id: toolBar
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: 32
|
Layout.maximumHeight: 32
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
|
@ -9,7 +9,7 @@ Base.HToolButton {
|
||||||
Layout.minimumWidth * (toolBar.children.length - 2)
|
Layout.minimumWidth * (toolBar.children.length - 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
id: "button"
|
id: button
|
||||||
visible: toolBarIsBig()
|
visible: toolBarIsBig()
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -5,7 +5,7 @@ import "../base" as Base
|
||||||
import "utils.js" as SidePaneJS
|
import "utils.js" as SidePaneJS
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: "root"
|
id: root
|
||||||
width: roomList.width
|
width: roomList.width
|
||||||
height: roomList.childrenHeight
|
height: roomList.childrenHeight
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ ListView {
|
||||||
spacing * (model.count - 1)
|
spacing * (model.count - 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
id: "roomList"
|
id: roomList
|
||||||
spacing: 8
|
spacing: 8
|
||||||
model: Backend.models.rooms.get(forUserId)
|
model: Backend.models.rooms.get(forUserId)
|
||||||
delegate: RoomDelegate {}
|
delegate: RoomDelegate {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user