Port EmoticonEditorPage to FormCard
This commit is contained in:
@@ -8,11 +8,11 @@ import Qt.labs.platform 1.1
|
|||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
|
|
||||||
import org.kde.kirigami 2.19 as Kirigami
|
import org.kde.kirigami 2.19 as Kirigami
|
||||||
import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm
|
import org.kde.kirigamiaddons.formcard 1.0 as FormCard
|
||||||
|
|
||||||
import org.kde.neochat 1.0
|
import org.kde.neochat 1.0
|
||||||
|
|
||||||
Kirigami.ScrollablePage {
|
FormCard.FormCardPage {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property string description
|
required property string description
|
||||||
@@ -24,25 +24,14 @@ Kirigami.ScrollablePage {
|
|||||||
property bool newEmoticon: false
|
property bool newEmoticon: false
|
||||||
required property var emoticonType
|
required property var emoticonType
|
||||||
|
|
||||||
topPadding: 0
|
|
||||||
leftPadding: 0
|
|
||||||
rightPadding: 0
|
|
||||||
|
|
||||||
title: emoticonType === EmoticonFormCard.Stickers ? (newEmoticon ? i18nc("@title", "Add Sticker") : i18nc("@title", "Edit Sticker"))
|
title: emoticonType === EmoticonFormCard.Stickers ? (newEmoticon ? i18nc("@title", "Add Sticker") : i18nc("@title", "Edit Sticker"))
|
||||||
: (newEmoticon ? i18nc("@title", "Add Emoji") : i18nc("@title", "Edit Emoji"))
|
: (newEmoticon ? i18nc("@title", "Add Emoji") : i18nc("@title", "Edit Emoji"))
|
||||||
|
|
||||||
ColumnLayout {
|
FormCard.FormHeader {
|
||||||
spacing: 0
|
|
||||||
MobileForm.FormHeader {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
title: emoticonType === EmoticonFormCard.Stickers ? i18n("Sticker") : i18n("Emoji")
|
title: emoticonType === EmoticonFormCard.Stickers ? i18n("Sticker") : i18n("Emoji")
|
||||||
}
|
}
|
||||||
MobileForm.FormCard {
|
FormCard.FormCard {
|
||||||
Layout.fillWidth: true
|
FormCard.AbstractFormDelegate {
|
||||||
contentItem: ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
MobileForm.AbstractFormDelegate {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
background: Item {}
|
background: Item {}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
Item {
|
Item {
|
||||||
@@ -106,17 +95,17 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MobileForm.FormTextFieldDelegate {
|
FormCard.FormTextFieldDelegate {
|
||||||
id: shortcode
|
id: shortcode
|
||||||
label: i18n("Shortcode:")
|
label: i18n("Shortcode:")
|
||||||
text: root.shortcode
|
text: root.shortcode
|
||||||
}
|
}
|
||||||
MobileForm.FormTextFieldDelegate {
|
FormCard.FormTextFieldDelegate {
|
||||||
id: description
|
id: description
|
||||||
label: i18n("Description:")
|
label: i18n("Description:")
|
||||||
text: root.description
|
text: root.description
|
||||||
}
|
}
|
||||||
MobileForm.FormButtonDelegate {
|
FormCard.FormButtonDelegate {
|
||||||
id: save
|
id: save
|
||||||
text: i18n("Save")
|
text: i18n("Save")
|
||||||
icon.name: "document-save"
|
icon.name: "document-save"
|
||||||
@@ -139,9 +128,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
property Component openFileDialog: Component {
|
||||||
}
|
|
||||||
Component {
|
|
||||||
id: openFileDialog
|
id: openFileDialog
|
||||||
|
|
||||||
OpenFileDialog {
|
OpenFileDialog {
|
||||||
|
|||||||
Reference in New Issue
Block a user