Always include QtQuick.Controls as QQC2
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ Loader {
|
|||||||
|
|
||||||
active: visible
|
active: visible
|
||||||
sourceComponent: Component {
|
sourceComponent: Component {
|
||||||
Pane {
|
QQC2.Pane {
|
||||||
id: attachmentPane
|
id: attachmentPane
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ Loader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BusyIndicator {
|
QQC2.BusyIndicator {
|
||||||
id: imageBusyIndicator
|
id: imageBusyIndicator
|
||||||
anchors {
|
anchors {
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
@@ -98,7 +98,7 @@ Loader {
|
|||||||
source: attachmentMimetype.iconName
|
source: attachmentMimetype.iconName
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
QQC2.Label {
|
||||||
id: fileLabel
|
id: fileLabel
|
||||||
text: baseFileName
|
text: baseFileName
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ Loader {
|
|||||||
|
|
||||||
// Using a toolbar to get a button spacing consistent with what the QQC2 style normally has
|
// Using a toolbar to get a button spacing consistent with what the QQC2 style normally has
|
||||||
// Also has some accessibility info
|
// Also has some accessibility info
|
||||||
ToolBar {
|
QQC2.ToolBar {
|
||||||
id: toolBar
|
id: toolBar
|
||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
@@ -130,7 +130,7 @@ Loader {
|
|||||||
|
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
spacing: parent.spacing
|
spacing: parent.spacing
|
||||||
Label {
|
QQC2.Label {
|
||||||
Layout.leftMargin: -attachmentPane.leftPadding
|
Layout.leftMargin: -attachmentPane.leftPadding
|
||||||
Layout.topMargin: -attachmentPane.topPadding
|
Layout.topMargin: -attachmentPane.topPadding
|
||||||
leftPadding: cancelAttachmentButton.leftPadding + 1 + attachmentPane.leftPadding
|
leftPadding: cancelAttachmentButton.leftPadding + 1 + attachmentPane.leftPadding
|
||||||
@@ -152,12 +152,12 @@ Loader {
|
|||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
id: editImageButton
|
id: editImageButton
|
||||||
visible: hasImage
|
visible: hasImage
|
||||||
icon.name: "document-edit"
|
icon.name: "document-edit"
|
||||||
text: i18n("Edit")
|
text: i18n("Edit")
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: imageEditorPage
|
id: imageEditorPage
|
||||||
@@ -172,17 +172,17 @@ Loader {
|
|||||||
attachmentPaneLoader.attachmentPath = newPath;
|
attachmentPaneLoader.attachmentPath = newPath;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
id: cancelAttachmentButton
|
id: cancelAttachmentButton
|
||||||
icon.name: "dialog-close"
|
icon.name: "dialog-close"
|
||||||
text: i18n("Cancel sending Image")
|
text: i18n("Cancel sending Image")
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
onClicked: currentRoom.chatBoxAttachmentPath = "";
|
onClicked: currentRoom.chatBoxAttachmentPath = "";
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
background: null
|
background: null
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.18 as Kirigami
|
import org.kde.kirigami 2.18 as Kirigami
|
||||||
import org.kde.neochat 1.0
|
import org.kde.neochat 1.0
|
||||||
|
|
||||||
ToolBar {
|
QQC2.ToolBar {
|
||||||
id: chatBar
|
id: chatBar
|
||||||
property alias inputFieldText: inputField.text
|
property alias inputFieldText: inputField.text
|
||||||
property alias textField: inputField
|
property alias textField: inputField
|
||||||
@@ -26,7 +26,7 @@ ToolBar {
|
|||||||
inputField.cursorPosition = inputField.length;
|
inputField.cursorPosition = inputField.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
position: ToolBar.Footer
|
position: QQC2.ToolBar.Footer
|
||||||
|
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ ToolBar {
|
|||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
spacing: chatBar.spacing
|
spacing: chatBar.spacing
|
||||||
|
|
||||||
ScrollView {
|
QQC2.ScrollView {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.minimumHeight: inputField.implicitHeight
|
Layout.minimumHeight: inputField.implicitHeight
|
||||||
@@ -50,14 +50,14 @@ ToolBar {
|
|||||||
+ inputField.topPadding + inputField.bottomPadding
|
+ inputField.topPadding + inputField.bottomPadding
|
||||||
|
|
||||||
// HACK: Hide unnecessary horizontal scrollbar (https://bugreports.qt.io/browse/QTBUG-83890)
|
// HACK: Hide unnecessary horizontal scrollbar (https://bugreports.qt.io/browse/QTBUG-83890)
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
QQC2.ScrollBar.horizontal.policy: QQC2.ScrollBar.AlwaysOff
|
||||||
|
|
||||||
FontMetrics {
|
FontMetrics {
|
||||||
id: fontMetrics
|
id: fontMetrics
|
||||||
font: inputField.font
|
font: inputField.font
|
||||||
}
|
}
|
||||||
|
|
||||||
TextArea {
|
QQC2.TextArea {
|
||||||
id: inputField
|
id: inputField
|
||||||
focus: true
|
focus: true
|
||||||
/* Some QQC2 styles will have their own predefined backgrounds for TextAreas.
|
/* Some QQC2 styles will have their own predefined backgrounds for TextAreas.
|
||||||
@@ -159,20 +159,20 @@ ToolBar {
|
|||||||
visible: currentRoom.chatBoxReplyId.length === 0 && (currentRoom.chatBoxAttachmentPath.length === 0 || uploadingBusySpinner.running)
|
visible: currentRoom.chatBoxReplyId.length === 0 && (currentRoom.chatBoxAttachmentPath.length === 0 || uploadingBusySpinner.running)
|
||||||
implicitWidth: uploadButton.implicitWidth
|
implicitWidth: uploadButton.implicitWidth
|
||||||
implicitHeight: uploadButton.implicitHeight
|
implicitHeight: uploadButton.implicitHeight
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
id: uploadButton
|
id: uploadButton
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
// Matrix does not allow sending attachments in replies
|
// Matrix does not allow sending attachments in replies
|
||||||
visible: currentRoom.chatBoxReplyId.length === 0 && currentRoom.chatBoxAttachmentPath.length === 0 && !uploadingBusySpinner.running
|
visible: currentRoom.chatBoxReplyId.length === 0 && currentRoom.chatBoxAttachmentPath.length === 0 && !uploadingBusySpinner.running
|
||||||
icon.name: "mail-attachment"
|
icon.name: "mail-attachment"
|
||||||
text: i18n("Attach an image or file")
|
text: i18n("Attach an image or file")
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (Clipboard.hasImage) {
|
if (Clipboard.hasImage) {
|
||||||
attachDialog.open()
|
attachDialog.open()
|
||||||
} else {
|
} else {
|
||||||
var fileDialog = openFileDialog.createObject(ApplicationWindow.overlay)
|
var fileDialog = openFileDialog.createObject(QQC2.ApplicationWindow.overlay)
|
||||||
fileDialog.chosen.connect((path) => {
|
fileDialog.chosen.connect((path) => {
|
||||||
if (!path) {
|
if (!path) {
|
||||||
return;
|
return;
|
||||||
@@ -183,10 +183,10 @@ ToolBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
BusyIndicator {
|
QQC2.BusyIndicator {
|
||||||
id: uploadingBusySpinner
|
id: uploadingBusySpinner
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: running
|
visible: running
|
||||||
@@ -194,29 +194,29 @@ ToolBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
id: emojiButton
|
id: emojiButton
|
||||||
icon.name: "smiley"
|
icon.name: "smiley"
|
||||||
text: i18n("Add an Emoji")
|
text: i18n("Add an Emoji")
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
checkable: true
|
checkable: true
|
||||||
|
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
id: sendButton
|
id: sendButton
|
||||||
icon.name: "document-send"
|
icon.name: "document-send"
|
||||||
text: i18n("Send message")
|
text: i18n("Send message")
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
chatBar.postMessage()
|
chatBar.postMessage()
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import Qt.labs.qmlmodels 1.0
|
import Qt.labs.qmlmodels 1.0
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|
||||||
import org.kde.neochat 1.0
|
import org.kde.neochat 1.0
|
||||||
|
|
||||||
Popup {
|
QQC2.Popup {
|
||||||
id: completionMenu
|
id: completionMenu
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
|
|
||||||
import org.kde.kirigami 2.14 as Kirigami
|
import org.kde.kirigami 2.14 as Kirigami
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ Loader {
|
|||||||
signal replyCancelled()
|
signal replyCancelled()
|
||||||
|
|
||||||
active: visible
|
active: visible
|
||||||
sourceComponent: Pane {
|
sourceComponent: QQC2.Pane {
|
||||||
id: replyPane
|
id: replyPane
|
||||||
|
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||||
@@ -49,7 +49,7 @@ Loader {
|
|||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: fontMetrics.leading
|
spacing: fontMetrics.leading
|
||||||
Label {
|
QQC2.Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
textFormat: Text.StyledText
|
textFormat: Text.StyledText
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
@@ -66,15 +66,15 @@ Loader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//TODO edit user mentions
|
//TODO edit user mentions
|
||||||
ScrollView {
|
QQC2.ScrollView {
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: fontMetrics.lineSpacing * 8 - fontMetrics.leading
|
Layout.maximumHeight: fontMetrics.lineSpacing * 8 - fontMetrics.leading
|
||||||
|
|
||||||
// HACK: Hide unnecessary horizontal scrollbar (https://bugreports.qt.io/browse/QTBUG-83890)
|
// HACK: Hide unnecessary horizontal scrollbar (https://bugreports.qt.io/browse/QTBUG-83890)
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
QQC2.ScrollBar.horizontal.policy: QQC2.ScrollBar.AlwaysOff
|
||||||
|
|
||||||
TextArea {
|
QQC2.TextArea {
|
||||||
id: textArea
|
id: textArea
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
@@ -84,7 +84,7 @@ Loader {
|
|||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
selectByKeyboard: true
|
selectByKeyboard: true
|
||||||
readOnly: true
|
readOnly: true
|
||||||
wrapMode: Label.Wrap
|
wrapMode: QQC2.Label.Wrap
|
||||||
textFormat: TextEdit.RichText
|
textFormat: TextEdit.RichText
|
||||||
background: Item {}
|
background: Item {}
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
@@ -94,8 +94,8 @@ Loader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
text: i18nc("@action:button", "Cancel reply")
|
text: i18nc("@action:button", "Cancel reply")
|
||||||
icon.name: "dialog-close"
|
icon.name: "dialog-close"
|
||||||
@@ -105,8 +105,8 @@ Loader {
|
|||||||
}
|
}
|
||||||
shortcut: "Escape"
|
shortcut: "Escape"
|
||||||
}
|
}
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|
||||||
@@ -19,10 +19,10 @@ ColumnLayout {
|
|||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
ScrollView {
|
QQC2.ScrollView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 2 + ScrollBar.horizontal.height + 2 // for the focus line
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2 + QQC2.ScrollBar.horizontal.height + 2 // for the focus line
|
||||||
ScrollBar.horizontal.height: ScrollBar.horizontal.visible ? ScrollBar.horizontal.implicitHeight : 0
|
QQC2.ScrollBar.horizontal.height: QQC2.ScrollBar.horizontal.visible ? QQC2.ScrollBar.horizontal.implicitHeight : 0
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
clip: true
|
clip: true
|
||||||
@@ -41,7 +41,7 @@ ColumnLayout {
|
|||||||
ListElement { label: "🏁"; category: "flags" }
|
ListElement { label: "🏁"; category: "flags" }
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: ItemDelegate {
|
delegate: QQC2.ItemDelegate {
|
||||||
id: del
|
id: del
|
||||||
|
|
||||||
required property string label
|
required property string label
|
||||||
@@ -82,7 +82,7 @@ ColumnLayout {
|
|||||||
Layout.preferredHeight: 1
|
Layout.preferredHeight: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
QQC2.ScrollView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 8
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 8
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
@@ -119,7 +119,7 @@ ColumnLayout {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: ItemDelegate {
|
delegate: QQC2.ItemDelegate {
|
||||||
width: Kirigami.Units.gridUnit * 2
|
width: Kirigami.Units.gridUnit * 2
|
||||||
height: Kirigami.Units.gridUnit * 2
|
height: Kirigami.Units.gridUnit * 2
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15 as Controls
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import QtQuick.Particles 2.15
|
import QtQuick.Particles 2.15
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import Qt.labs.platform 1.1
|
import Qt.labs.platform 1.1
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|
||||||
Popup {
|
QQC2.Popup {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property alias source: image.source
|
property alias source: image.source
|
||||||
@@ -18,8 +18,8 @@ Popup {
|
|||||||
property int imageHeight: -1
|
property int imageHeight: -1
|
||||||
property var modelData
|
property var modelData
|
||||||
|
|
||||||
parent: Overlay.overlay
|
parent: QQC2.Overlay.overlay
|
||||||
closePolicy: Popup.CloseOnEscape
|
closePolicy: QQC2.Popup.CloseOnEscape
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
modal: true
|
modal: true
|
||||||
@@ -32,7 +32,7 @@ Popup {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Kirigami.Units.largeSpacing
|
spacing: Kirigami.Units.largeSpacing
|
||||||
|
|
||||||
Control {
|
QQC2.Control {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
@@ -52,7 +52,7 @@ Popup {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Label {
|
QQC2.Label {
|
||||||
id: nameLabel
|
id: nameLabel
|
||||||
|
|
||||||
text: modelData.author.displayName
|
text: modelData.author.displayName
|
||||||
@@ -60,13 +60,13 @@ Popup {
|
|||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
color: author.color
|
color: author.color
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
id: timeLabel
|
id: timeLabel
|
||||||
|
|
||||||
text: time.toLocaleString(Qt.locale(), Locale.ShortFormat)
|
text: time.toLocaleString(Qt.locale(), Locale.ShortFormat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
id: imageLabel
|
id: imageLabel
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.leftMargin: Kirigami.Units.largeSpacing
|
Layout.leftMargin: Kirigami.Units.largeSpacing
|
||||||
@@ -75,14 +75,14 @@ Popup {
|
|||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
||||||
|
|
||||||
text: i18n("Zoom in")
|
text: i18n("Zoom in")
|
||||||
Accessible.name: text
|
Accessible.name: text
|
||||||
icon.name: "zoom-in"
|
icon.name: "zoom-in"
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
onClicked: {
|
onClicked: {
|
||||||
image.scaleFactor = image.scaleFactor + 0.25
|
image.scaleFactor = image.scaleFactor + 0.25
|
||||||
if (image.scaleFactor > 3) {
|
if (image.scaleFactor > 3) {
|
||||||
@@ -90,18 +90,18 @@ Popup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.delay: Kirigami.Units.toolTipDelay
|
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
||||||
|
|
||||||
text: i18n("Zoom out")
|
text: i18n("Zoom out")
|
||||||
Accessible.name: text
|
Accessible.name: text
|
||||||
icon.name: "zoom-out"
|
icon.name: "zoom-out"
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
onClicked: {
|
onClicked: {
|
||||||
image.scaleFactor = image.scaleFactor - 0.25
|
image.scaleFactor = image.scaleFactor - 0.25
|
||||||
if (image.scaleFactor < 0.25) {
|
if (image.scaleFactor < 0.25) {
|
||||||
@@ -109,71 +109,71 @@ Popup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.delay: Kirigami.Units.toolTipDelay
|
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
||||||
|
|
||||||
text: i18n("Rotate left")
|
text: i18n("Rotate left")
|
||||||
Accessible.name: text
|
Accessible.name: text
|
||||||
icon.name: "image-rotate-left-symbolic"
|
icon.name: "image-rotate-left-symbolic"
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
onClicked: image.rotationAngle = image.rotationAngle - 90
|
onClicked: image.rotationAngle = image.rotationAngle - 90
|
||||||
|
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.delay: Kirigami.Units.toolTipDelay
|
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
||||||
|
|
||||||
text: i18n("Rotate right")
|
text: i18n("Rotate right")
|
||||||
Accessible.name: text
|
Accessible.name: text
|
||||||
icon.name: "image-rotate-right-symbolic"
|
icon.name: "image-rotate-right-symbolic"
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
onClicked: image.rotationAngle = image.rotationAngle + 90
|
onClicked: image.rotationAngle = image.rotationAngle + 90
|
||||||
|
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.delay: Kirigami.Units.toolTipDelay
|
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
||||||
|
|
||||||
text: i18n("Save as")
|
text: i18n("Save as")
|
||||||
Accessible.name: text
|
Accessible.name: text
|
||||||
icon.name: "document-save"
|
icon.name: "document-save"
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var dialog = saveAsDialog.createObject(ApplicationWindow.overlay)
|
var dialog = saveAsDialog.createObject(ApplicationWindow.overlay)
|
||||||
dialog.open()
|
dialog.open()
|
||||||
dialog.currentFile = dialog.folder + "/" + currentRoom.fileNameToDownload(eventId)
|
dialog.currentFile = dialog.folder + "/" + currentRoom.fileNameToDownload(eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.delay: Kirigami.Units.toolTipDelay
|
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
||||||
|
|
||||||
text: i18n("Close")
|
text: i18n("Close")
|
||||||
Accessible.name: text
|
Accessible.name: text
|
||||||
icon.name: "dialog-close"
|
icon.name: "dialog-close"
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.close()
|
root.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
ToolTip.delay: Kirigami.Units.toolTipDelay
|
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ Popup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BusyIndicator {
|
QQC2.BusyIndicator {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: image.status !== Image.Ready && root.blurhash === ""
|
visible: image.status !== Image.Ready && root.blurhash === ""
|
||||||
running: visible
|
running: visible
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15 as Controls
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|
||||||
@@ -15,14 +15,14 @@ LoginStep {
|
|||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: i18n("Login with password")
|
text: i18n("Login with password")
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
|
||||||
onClicked: processed("qrc:/Password.qml")
|
onClicked: processed("qrc:/Password.qml")
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: i18n("Login with single sign-on")
|
text: i18n("Login with single sign-on")
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15 as Controls
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
@@ -14,14 +14,14 @@ LoginStep {
|
|||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: i18n("Login")
|
text: i18n("Login")
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
|
||||||
onClicked: processed("qrc:/Login.qml")
|
onClicked: processed("qrc:/Login.qml")
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: i18n("Register")
|
text: i18n("Register")
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.14
|
import QtQuick 2.14
|
||||||
import QtQuick.Controls 2.14
|
import QtQuick.Controls 2.14 as QQC2
|
||||||
import QtQuick.Layouts 1.14
|
import QtQuick.Layouts 1.14
|
||||||
|
|
||||||
/// Step for the login/registration flow
|
/// Step for the login/registration flow
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import QtMultimedia 5.15
|
import QtMultimedia 5.15
|
||||||
|
|
||||||
@@ -80,16 +80,16 @@ TimelineContainer {
|
|||||||
]
|
]
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
id: playButton
|
id: playButton
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
text: model.display
|
text: model.display
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ProgressBar {
|
QQC2.ProgressBar {
|
||||||
id: downloadBar
|
id: downloadBar
|
||||||
visible: false
|
visible: false
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -100,7 +100,7 @@ TimelineContainer {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
visible: audio.hasAudio
|
visible: audio.hasAudio
|
||||||
|
|
||||||
Slider {
|
QQC2.Slider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
from: 0
|
from: 0
|
||||||
to: audio.duration
|
to: audio.duration
|
||||||
@@ -108,13 +108,13 @@ TimelineContainer {
|
|||||||
onMoved: audio.seek(value)
|
onMoved: audio.seek(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
QQC2.Label {
|
||||||
visible: audioDelegate.contentMaxWidth > Kirigami.Units.gridUnit * 12
|
visible: audioDelegate.contentMaxWidth > Kirigami.Units.gridUnit * 12
|
||||||
|
|
||||||
text: Controller.formatDuration(audio.position) + "/" + Controller.formatDuration(audio.duration)
|
text: Controller.formatDuration(audio.position) + "/" + Controller.formatDuration(audio.duration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
Layout.rightMargin: Kirigami.Units.smallSpacing
|
Layout.rightMargin: Kirigami.Units.smallSpacing
|
||||||
visible: audio.hasAudio && audioDelegate.contentMaxWidth < Kirigami.Units.gridUnit * 12
|
visible: audio.hasAudio && audioDelegate.contentMaxWidth < Kirigami.Units.gridUnit * 12
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import Qt.labs.platform 1.1
|
import Qt.labs.platform 1.1
|
||||||
|
|
||||||
@@ -45,9 +45,9 @@ TimelineContainer {
|
|||||||
|
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
|
|
||||||
ToolTip.text: model.display
|
QQC2.ToolTip.text: model.display
|
||||||
ToolTip.visible: hoverHandler.hovered
|
QQC2.ToolTip.visible: hoverHandler.hovered
|
||||||
ToolTip.delay: Kirigami.Units.toolTipDelay
|
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
id: hoverHandler
|
id: hoverHandler
|
||||||
@@ -60,7 +60,7 @@ TimelineContainer {
|
|||||||
|
|
||||||
color: "#BB000000"
|
color: "#BB000000"
|
||||||
|
|
||||||
ProgressBar {
|
QQC2.ProgressBar {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
width: parent.width * 0.8
|
width: parent.width * 0.8
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-or-later OR LicenseRef-KDE-Accepted-GPL
|
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-or-later OR LicenseRef-KDE-Accepted-GPL
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
@@ -65,7 +65,7 @@ a {
|
|||||||
visible: lp.loaded
|
visible: lp.loaded
|
||||||
onLinkActivated: RoomManager.openResource(link)
|
onLinkActivated: RoomManager.openResource(link)
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
text: lp.description
|
text: lp.description
|
||||||
Layout.maximumWidth: messageDelegate.bubbleMaxWidth
|
Layout.maximumWidth: messageDelegate.bubbleMaxWidth
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
@@ -14,10 +14,10 @@ Flow {
|
|||||||
Repeater {
|
Repeater {
|
||||||
model: reaction ?? null
|
model: reaction ?? null
|
||||||
|
|
||||||
delegate: AbstractButton {
|
delegate: QQC2.AbstractButton {
|
||||||
width: Math.max(implicitWidth, height)
|
width: Math.max(implicitWidth, height)
|
||||||
|
|
||||||
contentItem: Label {
|
contentItem: QQC2.Label {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: modelData.reaction + " " + modelData.count
|
text: modelData.reaction + " " + modelData.count
|
||||||
}
|
}
|
||||||
@@ -41,8 +41,8 @@ Flow {
|
|||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
ToolTip.text: {
|
QQC2.ToolTip.text: {
|
||||||
var text = "";
|
var text = "";
|
||||||
|
|
||||||
for (var i = 0; i < modelData.authors.length && i < 3; i++) {
|
for (var i = 0; i < modelData.authors.length && i < 3; i++) {
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|
||||||
import org.kde.neochat 1.0
|
import org.kde.neochat 1.0
|
||||||
|
|
||||||
Control {
|
QQC2.Control {
|
||||||
id: stateDelegate
|
id: stateDelegate
|
||||||
|
|
||||||
readonly property bool sectionVisible: model.showSection
|
readonly property bool sectionVisible: model.showSection
|
||||||
@@ -88,11 +88,11 @@ Control {
|
|||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: userDetailDialog.createObject(ApplicationWindow.overlay, {room: currentRoom, user: author.object, displayName: author.displayName, avatarMediaId: author.avatarMediaId, avatarUrl: author.avatarUrl}).open()
|
onClicked: userDetailDialog.createObject(QQC2.ApplicationWindow.overlay, {room: currentRoom, user: author.object, displayName: author.displayName, avatarMediaId: author.avatarMediaId, avatarUrl: author.avatarUrl}).open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
QQC2.Label {
|
||||||
id: label
|
id: label
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import QtMultimedia 5.15
|
import QtMultimedia 5.15
|
||||||
import Qt.labs.platform 1.1 as Platform
|
import Qt.labs.platform 1.1 as Platform
|
||||||
@@ -70,7 +70,7 @@ TimelineContainer {
|
|||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
QQC2.Label {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
visible: vid.playbackState == MediaPlayer.StoppedState || vid.error != MediaPlayer.NoError
|
visible: vid.playbackState == MediaPlayer.StoppedState || vid.error != MediaPlayer.NoError
|
||||||
@@ -94,7 +94,7 @@ TimelineContainer {
|
|||||||
|
|
||||||
color: "#BB000000"
|
color: "#BB000000"
|
||||||
|
|
||||||
ProgressBar {
|
QQC2.ProgressBar {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
width: parent.width * 0.8
|
width: parent.width * 0.8
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import org.kde.kirigami 2.14 as Kirigami
|
import org.kde.kirigami 2.14 as Kirigami
|
||||||
import org.kde.neochat 1.0
|
import org.kde.neochat 1.0
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ Loader {
|
|||||||
property string labelText: ""
|
property string labelText: ""
|
||||||
|
|
||||||
active: visible
|
active: visible
|
||||||
sourceComponent: Pane {
|
sourceComponent: QQC2.Pane {
|
||||||
id: typingPane
|
id: typingPane
|
||||||
|
|
||||||
leftPadding: Kirigami.Units.largeSpacing
|
leftPadding: Kirigami.Units.largeSpacing
|
||||||
@@ -86,7 +86,7 @@ Loader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
id: typingLabel
|
id: typingLabel
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: root.labelText
|
text: root.labelText
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|
||||||
@@ -16,19 +16,19 @@ Kirigami.OverlaySheet {
|
|||||||
title: i18n("Create a Room")
|
title: i18n("Create a Room")
|
||||||
|
|
||||||
contentItem: Kirigami.FormLayout {
|
contentItem: Kirigami.FormLayout {
|
||||||
TextField {
|
QQC2.TextField {
|
||||||
id: roomNameField
|
id: roomNameField
|
||||||
Kirigami.FormData.label: i18n("Room Name")
|
Kirigami.FormData.label: i18n("Room Name")
|
||||||
onAccepted: roomTopicField.forceActiveFocus();
|
onAccepted: roomTopicField.forceActiveFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
QQC2.TextField {
|
||||||
id: roomTopicField
|
id: roomTopicField
|
||||||
Kirigami.FormData.label: i18n("Room Topic")
|
Kirigami.FormData.label: i18n("Room Topic")
|
||||||
onAccepted: okButton.forceActiveFocus();
|
onAccepted: okButton.forceActiveFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
QQC2.Button {
|
||||||
id: okButton
|
id: okButton
|
||||||
|
|
||||||
text: i18nc("@action:button", "Ok")
|
text: i18nc("@action:button", "Ok")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.19 as Kirigami
|
import org.kde.kirigami 2.19 as Kirigami
|
||||||
@@ -20,8 +20,8 @@ Loader {
|
|||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: regularMenu
|
id: regularMenu
|
||||||
Menu {
|
QQC2.Menu {
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
id: newWindow
|
id: newWindow
|
||||||
text: i18n("Open in New Window")
|
text: i18n("Open in New Window")
|
||||||
icon.name: "window-new"
|
icon.name: "window-new"
|
||||||
@@ -29,29 +29,29 @@ Loader {
|
|||||||
visible: !Kirigami.Settings.isMobile
|
visible: !Kirigami.Settings.isMobile
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator {
|
QQC2.MenuSeparator {
|
||||||
visible: newWindow.visible
|
visible: newWindow.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: room.isFavourite ? i18n("Remove from Favourites") : i18n("Add to Favourites")
|
text: room.isFavourite ? i18n("Remove from Favourites") : i18n("Add to Favourites")
|
||||||
icon.name: room.isFavourite ? "bookmark-remove" : "bookmark-new"
|
icon.name: room.isFavourite ? "bookmark-remove" : "bookmark-new"
|
||||||
onTriggered: room.isFavourite ? room.removeTag("m.favourite") : room.addTag("m.favourite", 1.0)
|
onTriggered: room.isFavourite ? room.removeTag("m.favourite") : room.addTag("m.favourite", 1.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: room.isLowPriority ? i18n("Reprioritize") : i18n("Deprioritize")
|
text: room.isLowPriority ? i18n("Reprioritize") : i18n("Deprioritize")
|
||||||
icon.name: room.isLowPriority ? "arrow-up" : "arrow-down"
|
icon.name: room.isLowPriority ? "arrow-up" : "arrow-down"
|
||||||
onTriggered: room.isLowPriority ? room.removeTag("m.lowpriority") : room.addTag("m.lowpriority", 1.0)
|
onTriggered: room.isLowPriority ? room.removeTag("m.lowpriority") : room.addTag("m.lowpriority", 1.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18n("Mark as Read")
|
text: i18n("Mark as Read")
|
||||||
icon.name: "checkmark"
|
icon.name: "checkmark"
|
||||||
onTriggered: room.markAllMessagesAsRead()
|
onTriggered: room.markAllMessagesAsRead()
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18nc("@action:inmenu", "Copy Address to Clipboard")
|
text: i18nc("@action:inmenu", "Copy Address to Clipboard")
|
||||||
icon.name: "edit-copy"
|
icon.name: "edit-copy"
|
||||||
onTriggered: if (room.canonicalAlias.length === 0) {
|
onTriggered: if (room.canonicalAlias.length === 0) {
|
||||||
@@ -61,10 +61,10 @@ Loader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
QQC2.Menu {
|
||||||
title: i18n("Notification State")
|
title: i18n("Notification State")
|
||||||
|
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18n("Follow Global Setting")
|
text: i18n("Follow Global Setting")
|
||||||
icon.name: "globe"
|
icon.name: "globe"
|
||||||
checkable: true
|
checkable: true
|
||||||
@@ -75,7 +75,7 @@ Loader {
|
|||||||
room.pushNotificationState = PushNotificationState.Default
|
room.pushNotificationState = PushNotificationState.Default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18nc("As in 'notify for all messages'","All")
|
text: i18nc("As in 'notify for all messages'","All")
|
||||||
icon.name: "notifications"
|
icon.name: "notifications"
|
||||||
checkable: true
|
checkable: true
|
||||||
@@ -86,7 +86,7 @@ Loader {
|
|||||||
room.pushNotificationState = PushNotificationState.All
|
room.pushNotificationState = PushNotificationState.All
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18nc("As in 'notify when the user is mentioned or the message contains a set keyword'","@Mentions and Keywords")
|
text: i18nc("As in 'notify when the user is mentioned or the message contains a set keyword'","@Mentions and Keywords")
|
||||||
icon.name: "im-user"
|
icon.name: "im-user"
|
||||||
checkable: true
|
checkable: true
|
||||||
@@ -97,7 +97,7 @@ Loader {
|
|||||||
room.pushNotificationState = PushNotificationState.MentionKeyword
|
room.pushNotificationState = PushNotificationState.MentionKeyword
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18nc("As in 'do not notify for any messages'","Off")
|
text: i18nc("As in 'do not notify for any messages'","Off")
|
||||||
icon.name: "notifications-disabled"
|
icon.name: "notifications-disabled"
|
||||||
checkable: true
|
checkable: true
|
||||||
@@ -110,15 +110,15 @@ Loader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18n("Room Settings")
|
text: i18n("Room Settings")
|
||||||
icon.name: "configure"
|
icon.name: "configure"
|
||||||
onTriggered: ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/Categories.qml', {room: room})
|
onTriggered: ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/Categories.qml', {room: room})
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator {}
|
QQC2.MenuSeparator {}
|
||||||
|
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18n("Leave Room")
|
text: i18n("Leave Room")
|
||||||
icon.name: "go-previous"
|
icon.name: "go-previous"
|
||||||
onTriggered: RoomManager.leaveRoom(room)
|
onTriggered: RoomManager.leaveRoom(room)
|
||||||
@@ -168,7 +168,7 @@ Loader {
|
|||||||
text: room.displayName
|
text: room.displayName
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
checked: room.isFavourite
|
checked: room.isFavourite
|
||||||
checkable: true
|
checkable: true
|
||||||
icon.name: 'favorite'
|
icon.name: 'favorite'
|
||||||
@@ -176,7 +176,7 @@ Loader {
|
|||||||
onClicked: room.isFavourite ? room.removeTag("m.favourite") : room.addTag("m.favourite", 1.0)
|
onClicked: room.isFavourite ? room.removeTag("m.favourite") : room.addTag("m.favourite", 1.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
icon.name: 'settings-configure'
|
icon.name: 'settings-configure'
|
||||||
onClicked: ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/Categories.qml', {room: room})
|
onClicked: ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/Categories.qml', {room: room})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Controls 2.15 as Controls
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import org.kde.kirigami 2.14 as Kirigami
|
import org.kde.kirigami 2.14 as Kirigami
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Controls 2.15 as Controls
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import org.kde.purpose 1.0 as Purpose
|
import org.kde.purpose 1.0 as Purpose
|
||||||
import org.kde.notification 1.0
|
import org.kde.notification 1.0
|
||||||
import org.kde.kirigami 2.14 as Kirigami
|
import org.kde.kirigami 2.14 as Kirigami
|
||||||
@@ -23,7 +23,7 @@ Kirigami.Page {
|
|||||||
property alias index: jobView.index
|
property alias index: jobView.index
|
||||||
property alias model: jobView.model
|
property alias model: jobView.model
|
||||||
|
|
||||||
Controls.Action {
|
QQC2.Action {
|
||||||
shortcut: 'Escape'
|
shortcut: 'Escape'
|
||||||
onTriggered: window.closeDialog()
|
onTriggered: window.closeDialog()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.19 as Kirigami
|
import org.kde.kirigami 2.19 as Kirigami
|
||||||
@@ -20,8 +20,8 @@ Loader {
|
|||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: regularMenu
|
id: regularMenu
|
||||||
Menu {
|
QQC2.Menu {
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18nc("@action:inmenu", "Copy Address to Clipboard")
|
text: i18nc("@action:inmenu", "Copy Address to Clipboard")
|
||||||
onTriggered: if (room.canonicalAlias.length === 0) {
|
onTriggered: if (room.canonicalAlias.length === 0) {
|
||||||
Clipboard.saveText(room.id)
|
Clipboard.saveText(room.id)
|
||||||
@@ -30,14 +30,14 @@ Loader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18nc("'Space' is a matrix space", "Space Settings")
|
text: i18nc("'Space' is a matrix space", "Space Settings")
|
||||||
onTriggered: ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/Categories.qml', {room: room})
|
onTriggered: ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/Categories.qml', {room: room})
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator {}
|
QQC2.MenuSeparator {}
|
||||||
|
|
||||||
MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18nc("'Space' is a matrix space", "Leave Space")
|
text: i18nc("'Space' is a matrix space", "Leave Space")
|
||||||
onTriggered: RoomManager.leaveRoom(room)
|
onTriggered: RoomManager.leaveRoom(room)
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ Loader {
|
|||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
icon.name: 'settings-configure'
|
icon.name: 'settings-configure'
|
||||||
onClicked: ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/Categories.qml', {room: room})
|
onClicked: ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/Categories.qml', {room: room})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import Qt.labs.platform 1.1
|
import Qt.labs.platform 1.1
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
|
|
||||||
import org.kde.syntaxhighlighting 1.0
|
import org.kde.syntaxhighlighting 1.0
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
@@ -19,14 +19,14 @@ Kirigami.Page {
|
|||||||
|
|
||||||
title: i18n("Message Source")
|
title: i18n("Message Source")
|
||||||
|
|
||||||
ScrollView {
|
QQC2.ScrollView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
contentWidth: availableWidth
|
contentWidth: availableWidth
|
||||||
|
|
||||||
// HACK: Hide unnecessary horizontal scrollbar (https://bugreports.qt.io/browse/QTBUG-83890)
|
// HACK: Hide unnecessary horizontal scrollbar (https://bugreports.qt.io/browse/QTBUG-83890)
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
QQC2.ScrollBar.horizontal.policy: QQC2.ScrollBar.AlwaysOff
|
||||||
|
|
||||||
TextArea {
|
QQC2.TextArea {
|
||||||
id: sourceTextArea
|
id: sourceTextArea
|
||||||
text: sourceText
|
text: sourceText
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
@@ -104,7 +104,7 @@ Kirigami.ScrollablePage {
|
|||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
QQC2.Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
visible: !inRoom
|
visible: !inRoom
|
||||||
icon.name: "document-send"
|
icon.name: "document-send"
|
||||||
text: i18n("Send invitation")
|
text: i18n("Send invitation")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import Qt.labs.qmlmodels 1.0
|
import Qt.labs.qmlmodels 1.0
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ Kirigami.ScrollablePage {
|
|||||||
|
|
||||||
Component.onCompleted: identifierField.forceActiveFocus()
|
Component.onCompleted: identifierField.forceActiveFocus()
|
||||||
|
|
||||||
header: Control {
|
header: QQC2.Control {
|
||||||
padding: Kirigami.Units.largeSpacing
|
padding: Kirigami.Units.largeSpacing
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
Kirigami.SearchField {
|
Kirigami.SearchField {
|
||||||
@@ -36,7 +36,7 @@ Kirigami.ScrollablePage {
|
|||||||
placeholderText: i18n("Find a room...")
|
placeholderText: i18n("Find a room...")
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
QQC2.Button {
|
||||||
id: joinButton
|
id: joinButton
|
||||||
|
|
||||||
visible: identifierField.isRoomAlias
|
visible: identifierField.isRoomAlias
|
||||||
@@ -53,7 +53,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBox {
|
QQC2.ComboBox {
|
||||||
id: serverField
|
id: serverField
|
||||||
|
|
||||||
// TODO: in KF6 we should be able to switch to using implicitContentWidthPolicy
|
// TODO: in KF6 we should be able to switch to using implicitContentWidthPolicy
|
||||||
@@ -77,12 +77,12 @@ Kirigami.ScrollablePage {
|
|||||||
addServerSheet.open()
|
addServerSheet.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
trailing: ToolButton {
|
trailing: QQC2.ToolButton {
|
||||||
visible: isAddServerDelegate || isDeletable
|
visible: isAddServerDelegate || isDeletable
|
||||||
icon.name: isAddServerDelegate ? "list-add" : "dialog-close"
|
icon.name: isAddServerDelegate ? "list-add" : "dialog-close"
|
||||||
text: i18n("Add new server")
|
text: i18n("Add new server")
|
||||||
Accessible.name: text
|
Accessible.name: text
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (serverField.currentIndex === index && isDeletable) {
|
if (serverField.currentIndex === index && isDeletable) {
|
||||||
@@ -121,13 +121,13 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Kirigami.FormLayout {
|
contentItem: Kirigami.FormLayout {
|
||||||
Label {
|
QQC2.Label {
|
||||||
Layout.minimumWidth: Kirigami.Units.gridUnit * 20
|
Layout.minimumWidth: Kirigami.Units.gridUnit * 20
|
||||||
|
|
||||||
text: serverUrlField.length > 0 ? (serverUrlField.acceptableInput ? (serverUrlField.isValidServer ? i18n("Valid server entered") : i18n("This server cannot be resolved or has already been added")) : i18n("The entered text is not a valid url")) : i18n("Enter server url e.g. kde.org")
|
text: serverUrlField.length > 0 ? (serverUrlField.acceptableInput ? (serverUrlField.isValidServer ? i18n("Valid server entered") : i18n("This server cannot be resolved or has already been added")) : i18n("The entered text is not a valid url")) : i18n("Enter server url e.g. kde.org")
|
||||||
color: serverUrlField.length > 0 ? (serverUrlField.acceptableInput ? (serverUrlField.isValidServer ? Kirigami.Theme.positiveTextColor : Kirigami.Theme.negativeTextColor) : Kirigami.Theme.negativeTextColor) : Kirigami.Theme.textColor
|
color: serverUrlField.length > 0 ? (serverUrlField.acceptableInput ? (serverUrlField.isValidServer ? Kirigami.Theme.positiveTextColor : Kirigami.Theme.negativeTextColor) : Kirigami.Theme.negativeTextColor) : Kirigami.Theme.textColor
|
||||||
}
|
}
|
||||||
TextField {
|
QQC2.TextField {
|
||||||
id: serverUrlField
|
id: serverUrlField
|
||||||
|
|
||||||
property bool isValidServer: false
|
property bool isValidServer: false
|
||||||
@@ -153,7 +153,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
QQC2.Button {
|
||||||
id: okButton
|
id: okButton
|
||||||
|
|
||||||
text: i18nc("@action:button", "Ok")
|
text: i18nc("@action:button", "Ok")
|
||||||
@@ -222,13 +222,13 @@ Kirigami.ScrollablePage {
|
|||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
visible: isJoined || justJoined
|
visible: isJoined || justJoined
|
||||||
text: i18n("Joined")
|
text: i18n("Joined")
|
||||||
color: Kirigami.Theme.linkColor
|
color: Kirigami.Theme.linkColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: text
|
visible: text
|
||||||
text: topic ? topic.replace(/(\r\n\t|\n|\r\t)/gm," ") : ""
|
text: topic ? topic.replace(/(\r\n\t|\n|\r\t)/gm," ") : ""
|
||||||
@@ -244,7 +244,7 @@ Kirigami.ScrollablePage {
|
|||||||
implicitHeight: Kirigami.Units.iconSizes.small
|
implicitHeight: Kirigami.Units.iconSizes.small
|
||||||
implicitWidth: Kirigami.Units.iconSizes.small
|
implicitWidth: Kirigami.Units.iconSizes.small
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
text: memberCount + " " + (alias ?? roomID)
|
text: memberCount + " " + (alias ?? roomID)
|
||||||
color: Kirigami.Theme.disabledTextColor
|
color: Kirigami.Theme.disabledTextColor
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
@@ -17,7 +17,7 @@ Kirigami.ScrollablePage {
|
|||||||
|
|
||||||
title: i18n("Start a Chat")
|
title: i18n("Start a Chat")
|
||||||
|
|
||||||
header: Control {
|
header: QQC2.Control {
|
||||||
padding: Kirigami.Units.largeSpacing
|
padding: Kirigami.Units.largeSpacing
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
Kirigami.SearchField {
|
Kirigami.SearchField {
|
||||||
@@ -32,7 +32,7 @@ Kirigami.ScrollablePage {
|
|||||||
onAccepted: userDictListModel.search()
|
onAccepted: userDictListModel.search()
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
QQC2.Button {
|
||||||
visible: identifierField.isUserID
|
visible: identifierField.isUserID
|
||||||
|
|
||||||
text: i18n("Chat")
|
text: i18n("Chat")
|
||||||
@@ -89,7 +89,7 @@ Kirigami.ScrollablePage {
|
|||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
QQC2.Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
QQC2.Button {
|
||||||
id: joinChatButton
|
id: joinChatButton
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
visible: directChats && directChats.length > 0
|
visible: directChats && directChats.length > 0
|
||||||
@@ -112,7 +112,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
QQC2.Button {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
icon.name: "irc-join-channel"
|
icon.name: "irc-join-channel"
|
||||||
// We wants to make sure an user can't start more than one
|
// We wants to make sure an user can't start more than one
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15 as Controls
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
@@ -16,7 +16,7 @@ Kirigami.ScrollablePage {
|
|||||||
|
|
||||||
title: module.item.title ?? i18n("Welcome")
|
title: module.item.title ?? i18n("Welcome")
|
||||||
|
|
||||||
header: Controls.Control {
|
header: QQC2.Control {
|
||||||
contentItem: Kirigami.InlineMessage {
|
contentItem: Kirigami.InlineMessage {
|
||||||
id: headerMessage
|
id: headerMessage
|
||||||
type: Kirigami.MessageType.Error
|
type: Kirigami.MessageType.Error
|
||||||
@@ -49,7 +49,7 @@ Kirigami.ScrollablePage {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 16
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 16
|
||||||
}
|
}
|
||||||
Controls.Label {
|
QQC2.Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font.pixelSize: 25
|
font.pixelSize: 25
|
||||||
@@ -68,7 +68,7 @@ Kirigami.ScrollablePage {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
text: i18nc("@action:button", "Back")
|
text: i18nc("@action:button", "Back")
|
||||||
|
|
||||||
enabled: welcomePage.currentStep.previousUrl !== ""
|
enabled: welcomePage.currentStep.previousUrl !== ""
|
||||||
@@ -79,7 +79,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
id: continueButton
|
id: continueButton
|
||||||
enabled: welcomePage.currentStep.acceptable
|
enabled: welcomePage.currentStep.acceptable
|
||||||
visible: welcomePage.currentStep.showContinueButton
|
visible: welcomePage.currentStep.showContinueButton
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
@@ -93,24 +93,24 @@ Kirigami.OverlayDrawer {
|
|||||||
text: i18n("Room information")
|
text: i18n("Room information")
|
||||||
level: 1
|
level: 1
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
id: inviteButton
|
id: inviteButton
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
icon.name: "list-add-user"
|
icon.name: "list-add-user"
|
||||||
text: i18n("Invite user to room")
|
text: i18n("Invite user to room")
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
applicationWindow().pageStack.layers.push("qrc:/InviteUserPage.qml", {room: room})
|
applicationWindow().pageStack.layers.push("qrc:/InviteUserPage.qml", {room: room})
|
||||||
roomDrawer.close();
|
roomDrawer.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolTip {
|
QQC2.ToolTip {
|
||||||
text: inviteButton.text
|
text: inviteButton.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
id: favouriteButton
|
id: favouriteButton
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
@@ -118,15 +118,15 @@ Kirigami.OverlayDrawer {
|
|||||||
checkable: true
|
checkable: true
|
||||||
checked: room && room.isFavourite
|
checked: room && room.isFavourite
|
||||||
text: room && room.isFavourite ? i18n("Remove room from favorites") : i18n("Make room favorite")
|
text: room && room.isFavourite ? i18n("Remove room from favorites") : i18n("Make room favorite")
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
onClicked: room.isFavourite ? room.removeTag("m.favourite") : room.addTag("m.favourite", 1.0)
|
onClicked: room.isFavourite ? room.removeTag("m.favourite") : room.addTag("m.favourite", 1.0)
|
||||||
|
|
||||||
ToolTip {
|
QQC2.ToolTip {
|
||||||
text: favouriteButton.text
|
text: favouriteButton.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
id: encryptButton
|
id: encryptButton
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
@@ -134,25 +134,25 @@ Kirigami.OverlayDrawer {
|
|||||||
enabled: roomDrawer.room.canEncryptRoom
|
enabled: roomDrawer.room.canEncryptRoom
|
||||||
visible: !roomDrawer.room.usesEncryption && Controller.encryptionSupported
|
visible: !roomDrawer.room.usesEncryption && Controller.encryptionSupported
|
||||||
text: i18n("Enable encryption")
|
text: i18n("Enable encryption")
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
onClicked: roomDrawer.room.activateEncryption()
|
onClicked: roomDrawer.room.activateEncryption()
|
||||||
|
|
||||||
ToolTip {
|
QQC2.ToolTip {
|
||||||
text: encryptButton.text
|
text: encryptButton.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
id: settingsButton
|
id: settingsButton
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
icon.name: 'settings-configure'
|
icon.name: 'settings-configure'
|
||||||
text: i18n("Room settings")
|
text: i18n("Room settings")
|
||||||
display: AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
onClicked: ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/Categories.qml', {room: room})
|
onClicked: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/Categories.qml', {room: room})
|
||||||
|
|
||||||
ToolTip {
|
QQC2.ToolTip {
|
||||||
text: settingsButton.text
|
text: settingsButton.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -186,7 +186,7 @@ Kirigami.OverlayDrawer {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
level: 1
|
level: 1
|
||||||
type: Kirigami.Heading.Type.Primary
|
type: Kirigami.Heading.Type.Primary
|
||||||
wrapMode: Label.Wrap
|
wrapMode: QQC2.Label.Wrap
|
||||||
text: room ? room.displayName : i18n("No name")
|
text: room ? room.displayName : i18n("No name")
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
}
|
}
|
||||||
@@ -228,7 +228,7 @@ Kirigami.OverlayDrawer {
|
|||||||
label: i18n("Members")
|
label: i18n("Members")
|
||||||
activeFocusOnTab: false
|
activeFocusOnTab: false
|
||||||
|
|
||||||
Label {
|
QQC2.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: room ? i18np("%1 Member", "%1 Members", room.joinedCount) : i18n("No Member Count")
|
text: room ? i18np("%1 Member", "%1 Members", room.joinedCount) : i18n("No Member Count")
|
||||||
}
|
}
|
||||||
@@ -245,12 +245,12 @@ Kirigami.OverlayDrawer {
|
|||||||
onAccepted: sortedMessageEventModel.filterString = text;
|
onAccepted: sortedMessageEventModel.filterString = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
QQC2.ScrollView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
// HACK: Hide unnecessary horizontal scrollbar (https://bugreports.qt.io/browse/QTBUG-83890)
|
// HACK: Hide unnecessary horizontal scrollbar (https://bugreports.qt.io/browse/QTBUG-83890)
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
QQC2.ScrollBar.horizontal.policy: QQC2.ScrollBar.AlwaysOff
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: userListView
|
id: userListView
|
||||||
@@ -297,7 +297,7 @@ Kirigami.OverlayDrawer {
|
|||||||
name: model.userId
|
name: model.userId
|
||||||
}
|
}
|
||||||
|
|
||||||
trailing: Label {
|
trailing: QQC2.Label {
|
||||||
visible: perm != UserType.Member
|
visible: perm != UserType.Member
|
||||||
|
|
||||||
text: {
|
text: {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ Kirigami.ScrollablePage {
|
|||||||
name: room.name
|
name: room.name
|
||||||
source: room.avatarMediaId ? ("image://mxc/" + room.avatarMediaId) : ""
|
source: room.avatarMediaId ? ("image://mxc/" + room.avatarMediaId) : ""
|
||||||
|
|
||||||
RoundButton {
|
QQC2.RoundButton {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
height: Kirigami.Units.gridUnits
|
height: Kirigami.Units.gridUnits
|
||||||
@@ -52,14 +52,14 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TextField {
|
QQC2.TextField {
|
||||||
id: roomNameField
|
id: roomNameField
|
||||||
text: room.name
|
text: room.name
|
||||||
Kirigami.FormData.label: i18n("Room Name:")
|
Kirigami.FormData.label: i18n("Room Name:")
|
||||||
enabled: canChangeName
|
enabled: canChangeName
|
||||||
}
|
}
|
||||||
|
|
||||||
TextArea {
|
QQC2.TextArea {
|
||||||
id: roomTopicField
|
id: roomTopicField
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: room.topic
|
text: room.topic
|
||||||
@@ -73,7 +73,7 @@ Kirigami.ScrollablePage {
|
|||||||
visible: canonicalAliasComboBox.visible || altAlias.visible
|
visible: canonicalAliasComboBox.visible || altAlias.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBox {
|
QQC2.ComboBox {
|
||||||
id: canonicalAliasComboBox
|
id: canonicalAliasComboBox
|
||||||
visible: room.aliases && room.aliases.length
|
visible: room.aliases && room.aliases.length
|
||||||
Kirigami.FormData.label: i18n("Canonical Alias:")
|
Kirigami.FormData.label: i18n("Canonical Alias:")
|
||||||
@@ -109,11 +109,11 @@ Kirigami.ScrollablePage {
|
|||||||
delegate: RowLayout {
|
delegate: RowLayout {
|
||||||
Layout.maximumWidth: parent.width
|
Layout.maximumWidth: parent.width
|
||||||
|
|
||||||
Label {
|
QQC2.Label {
|
||||||
text: modelData
|
text: modelData
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
QQC2.ToolButton {
|
||||||
icon.name: ""
|
icon.name: ""
|
||||||
onClicked: room.removeLocalAlias(modelData)
|
onClicked: room.removeLocalAlias(modelData)
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ Kirigami.ScrollablePage {
|
|||||||
visible: next.visible || prev.visible
|
visible: next.visible || prev.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
Control {
|
QQC2.Control {
|
||||||
id: next
|
id: next
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Control {
|
QQC2.Control {
|
||||||
id: prev
|
id: prev
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
@@ -175,12 +175,12 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
footer: ToolBar {
|
footer: QQC2.ToolBar {
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Button {
|
QQC2.Button {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
enabled: room.name !== roomNameField.text || room.topic !== roomTopicField.text
|
enabled: room.name !== roomNameField.text || room.topic !== roomTopicField.text
|
||||||
text: i18n("Apply")
|
text: i18n("Apply")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import org.kde.kirigami 2.15 as Kirigami
|
import org.kde.kirigami 2.15 as Kirigami
|
||||||
|
|
||||||
@@ -20,43 +20,43 @@ Kirigami.ScrollablePage {
|
|||||||
Kirigami.FormLayout {
|
Kirigami.FormLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
RadioButton {
|
QQC2.RadioButton {
|
||||||
text: i18nc("@option:check", "Private (invite only)")
|
text: i18nc("@option:check", "Private (invite only)")
|
||||||
Kirigami.FormData.label: i18nc("@option:check", "Access:")
|
Kirigami.FormData.label: i18nc("@option:check", "Access:")
|
||||||
checked: room.joinRule === "invite"
|
checked: room.joinRule === "invite"
|
||||||
enabled: false
|
enabled: false
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
text: i18n("Only invited people can join.")
|
text: i18n("Only invited people can join.")
|
||||||
font: Kirigami.Theme.smallFont
|
font: Kirigami.Theme.smallFont
|
||||||
}
|
}
|
||||||
RadioButton {
|
QQC2.RadioButton {
|
||||||
text: i18nc("@option:check", "Space members")
|
text: i18nc("@option:check", "Space members")
|
||||||
checked: room.joinRule === "restricted"
|
checked: room.joinRule === "restricted"
|
||||||
enabled: false
|
enabled: false
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
text: i18n("Anyone in a space can find and join.")
|
text: i18n("Anyone in a space can find and join.")
|
||||||
font: Kirigami.Theme.smallFont
|
font: Kirigami.Theme.smallFont
|
||||||
}
|
}
|
||||||
RadioButton {
|
QQC2.RadioButton {
|
||||||
text: i18nc("@option:check", "Public")
|
text: i18nc("@option:check", "Public")
|
||||||
checked: room.joinRule === "public"
|
checked: room.joinRule === "public"
|
||||||
enabled: false
|
enabled: false
|
||||||
}
|
}
|
||||||
Label {
|
QQC2.Label {
|
||||||
text: i18nc("@option:check", "Anyone can find and join.") + room.joinRule
|
text: i18nc("@option:check", "Anyone can find and join.") + room.joinRule
|
||||||
font: Kirigami.Theme.smallFont
|
font: Kirigami.Theme.smallFont
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
footer: ToolBar {
|
footer: QQC2.ToolBar {
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Button {
|
QQC2.Button {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
enabled: false
|
enabled: false
|
||||||
text: i18n("Apply")
|
text: i18n("Apply")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15 as Controls
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import Qt.labs.platform 1.1
|
import Qt.labs.platform 1.1
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ Kirigami.ScrollablePage {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fileDialog = openFileDialog.createObject(Controls.ApplicationWindow.Overlay)
|
fileDialog = openFileDialog.createObject(QQC2.ApplicationWindow.Overlay)
|
||||||
|
|
||||||
fileDialog.chosen.connect(function(receivedSource) {
|
fileDialog.chosen.connect(function(receivedSource) {
|
||||||
mouseArea.fileDialog = null;
|
mouseArea.fileDialog = null;
|
||||||
@@ -49,7 +49,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
visible: avatar.source.toString().length !== 0
|
visible: avatar.source.toString().length !== 0
|
||||||
icon.name: "edit-clear"
|
icon.name: "edit-clear"
|
||||||
|
|
||||||
@@ -57,30 +57,30 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
Kirigami.FormData.label: i18n("Avatar:")
|
Kirigami.FormData.label: i18n("Avatar:")
|
||||||
}
|
}
|
||||||
Controls.TextField {
|
QQC2.TextField {
|
||||||
id: name
|
id: name
|
||||||
text: root.connection ? root.connection.localUser.displayName : ""
|
text: root.connection ? root.connection.localUser.displayName : ""
|
||||||
Kirigami.FormData.label: i18n("Name:")
|
Kirigami.FormData.label: i18n("Name:")
|
||||||
}
|
}
|
||||||
Controls.TextField {
|
QQC2.TextField {
|
||||||
id: accountLabel
|
id: accountLabel
|
||||||
text: root.connection ? root.connection.localUser.accountLabel : ""
|
text: root.connection ? root.connection.localUser.accountLabel : ""
|
||||||
Kirigami.FormData.label: i18n("Label:")
|
Kirigami.FormData.label: i18n("Label:")
|
||||||
}
|
}
|
||||||
Controls.TextField {
|
QQC2.TextField {
|
||||||
id: currentPassword
|
id: currentPassword
|
||||||
Kirigami.FormData.label: i18n("Current Password:")
|
Kirigami.FormData.label: i18n("Current Password:")
|
||||||
enabled: root.connection !== undefined && root.connection.canChangePassword !== false
|
enabled: root.connection !== undefined && root.connection.canChangePassword !== false
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
}
|
}
|
||||||
Controls.TextField {
|
QQC2.TextField {
|
||||||
id: newPassword
|
id: newPassword
|
||||||
Kirigami.FormData.label: i18n("New Password:")
|
Kirigami.FormData.label: i18n("New Password:")
|
||||||
enabled: root.connection !== undefined && root.connection.canChangePassword !== false
|
enabled: root.connection !== undefined && root.connection.canChangePassword !== false
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
|
|
||||||
}
|
}
|
||||||
Controls.TextField {
|
QQC2.TextField {
|
||||||
id: confirmPassword
|
id: confirmPassword
|
||||||
Kirigami.FormData.label: i18n("Confirm new Password:")
|
Kirigami.FormData.label: i18n("Confirm new Password:")
|
||||||
enabled: root.connection !== undefined && root.connection.canChangePassword !== false
|
enabled: root.connection !== undefined && root.connection.canChangePassword !== false
|
||||||
@@ -94,7 +94,7 @@ Kirigami.ScrollablePage {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
text: i18n("Save")
|
text: i18n("Save")
|
||||||
Layout.bottomMargin: Kirigami.Units.smallSpacing
|
Layout.bottomMargin: Kirigami.Units.smallSpacing
|
||||||
Layout.topMargin: Kirigami.Units.smallSpacing
|
Layout.topMargin: Kirigami.Units.smallSpacing
|
||||||
@@ -119,7 +119,7 @@ Kirigami.ScrollablePage {
|
|||||||
root.closeDialog();
|
root.closeDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
text: i18n("Cancel")
|
text: i18n("Cancel")
|
||||||
Layout.rightMargin: Kirigami.Units.smallSpacing
|
Layout.rightMargin: Kirigami.Units.smallSpacing
|
||||||
Layout.bottomMargin: Kirigami.Units.smallSpacing
|
Layout.bottomMargin: Kirigami.Units.smallSpacing
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15 as Controls
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import Qt.labs.platform 1.1
|
import Qt.labs.platform 1.1
|
||||||
|
|
||||||
@@ -40,9 +40,9 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
trailing: RowLayout {
|
trailing: RowLayout {
|
||||||
Controls.ToolButton {
|
QQC2.ToolButton {
|
||||||
display: Controls.AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
Controls.ToolTip {
|
QQC2.ToolTip {
|
||||||
text: parent.action.text
|
text: parent.action.text
|
||||||
}
|
}
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
@@ -55,9 +55,9 @@ Kirigami.ScrollablePage {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.ToolButton {
|
QQC2.ToolButton {
|
||||||
display: Controls.AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
Controls.ToolTip {
|
QQC2.ToolTip {
|
||||||
text: parent.action.text
|
text: parent.action.text
|
||||||
}
|
}
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
@@ -75,7 +75,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
footer: Controls.ToolBar {
|
footer: QQC2.ToolBar {
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.Window
|
Kirigami.Theme.colorSet: Kirigami.Theme.Window
|
||||||
Kirigami.ActionToolBar {
|
Kirigami.ActionToolBar {
|
||||||
alignment: Qt.AlignRight
|
alignment: Qt.AlignRight
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15 as Controls
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.19 as Kirigami
|
import org.kde.kirigami 2.19 as Kirigami
|
||||||
@@ -29,8 +29,8 @@ Kirigami.ScrollablePage {
|
|||||||
subtitle: model.id
|
subtitle: model.id
|
||||||
icon: "network-connect"
|
icon: "network-connect"
|
||||||
trailing: RowLayout {
|
trailing: RowLayout {
|
||||||
Controls.ToolButton {
|
QQC2.ToolButton {
|
||||||
display: Controls.AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
text: i18n("Edit device name")
|
text: i18n("Edit device name")
|
||||||
iconName: "document-edit"
|
iconName: "document-edit"
|
||||||
@@ -41,8 +41,8 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.ToolButton {
|
QQC2.ToolButton {
|
||||||
display: Controls.AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
visible: Controller.encryptionSupported
|
visible: Controller.encryptionSupported
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
text: i18n("Verify device")
|
text: i18n("Verify device")
|
||||||
@@ -52,8 +52,8 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.ToolButton {
|
QQC2.ToolButton {
|
||||||
display: Controls.AbstractButton.IconOnly
|
display: QQC2.AbstractButton.IconOnly
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
text: i18n("Logout device")
|
text: i18n("Logout device")
|
||||||
iconName: "edit-delete-remove"
|
iconName: "edit-delete-remove"
|
||||||
@@ -74,12 +74,12 @@ Kirigami.ScrollablePage {
|
|||||||
|
|
||||||
title: i18n("Remove device")
|
title: i18n("Remove device")
|
||||||
Kirigami.FormLayout {
|
Kirigami.FormLayout {
|
||||||
Controls.TextField {
|
QQC2.TextField {
|
||||||
id: passwordField
|
id: passwordField
|
||||||
Kirigami.FormData.label: i18n("Password:")
|
Kirigami.FormData.label: i18n("Password:")
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
}
|
}
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
text: i18n("Confirm")
|
text: i18n("Confirm")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
devices.logout(passwordSheet.index, passwordField.text)
|
devices.logout(passwordSheet.index, passwordField.text)
|
||||||
@@ -97,12 +97,12 @@ Kirigami.ScrollablePage {
|
|||||||
|
|
||||||
title: i18n("Edit device")
|
title: i18n("Edit device")
|
||||||
Kirigami.FormLayout {
|
Kirigami.FormLayout {
|
||||||
Controls.TextField {
|
QQC2.TextField {
|
||||||
id: nameField
|
id: nameField
|
||||||
Kirigami.FormData.label: i18n("Name:")
|
Kirigami.FormData.label: i18n("Name:")
|
||||||
text: renameSheet.name
|
text: renameSheet.name
|
||||||
}
|
}
|
||||||
Controls.Button {
|
QQC2.Button {
|
||||||
text: i18n("Save")
|
text: i18n("Save")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
devices.setName(renameSheet.index, nameField.text)
|
devices.setName(renameSheet.index, nameField.text)
|
||||||
|
|||||||
Reference in New Issue
Block a user