Port appearance settings to formcard
This commit is contained in:
@@ -7,29 +7,22 @@ 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.kirigamiaddons.labs.mobileform 0.1 as MobileForm
|
import org.kde.kirigamiaddons.formcard 1.0 as FormCard
|
||||||
import org.kde.kirigamiaddons.labs.components 1.0 as KirigamiComponents
|
import org.kde.kirigamiaddons.labs.components 1.0 as KirigamiComponents
|
||||||
|
|
||||||
import org.kde.neochat 1.0
|
import org.kde.neochat 1.0
|
||||||
|
|
||||||
Kirigami.ScrollablePage {
|
FormCard.FormCardPage {
|
||||||
|
id: root
|
||||||
|
|
||||||
title: i18nc("@title:window", "Appearance")
|
title: i18nc("@title:window", "Appearance")
|
||||||
topPadding: 0
|
|
||||||
leftPadding: 0
|
FormCard.FormHeader {
|
||||||
rightPadding: 0
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
MobileForm.FormHeader {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
title: i18n("General theme")
|
title: i18n("General theme")
|
||||||
}
|
}
|
||||||
MobileForm.FormCard {
|
FormCard.FormCard {
|
||||||
Layout.fillWidth: true
|
FormCard.AbstractFormDelegate {
|
||||||
contentItem: ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
MobileForm.AbstractFormDelegate {
|
|
||||||
id: timelineModeSetting
|
id: timelineModeSetting
|
||||||
Layout.fillWidth: true
|
|
||||||
background: Item {}
|
background: Item {}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
@@ -202,9 +195,9 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.FormDelegateSeparator { below: compactRoomListDelegate }
|
FormCard.FormDelegateSeparator { below: compactRoomListDelegate }
|
||||||
|
|
||||||
MobileForm.FormCheckDelegate {
|
FormCard.FormCheckDelegate {
|
||||||
id: compactRoomListDelegate
|
id: compactRoomListDelegate
|
||||||
text: i18n("Use compact room list")
|
text: i18n("Use compact room list")
|
||||||
checked: Config.compactRoomList
|
checked: Config.compactRoomList
|
||||||
@@ -214,7 +207,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.FormDelegateSeparator { above: compactRoomListDelegate ; below: colorSchemeDelegate.item ; visible: colorSchemeDelegate.visible }
|
FormCard.FormDelegateSeparator { above: compactRoomListDelegate ; below: colorSchemeDelegate.item ; visible: colorSchemeDelegate.visible }
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: colorSchemeDelegate
|
id: colorSchemeDelegate
|
||||||
@@ -223,14 +216,10 @@ Kirigami.ScrollablePage {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
MobileForm.FormCard {
|
FormCard.FormCard {
|
||||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
Layout.fillWidth: true
|
FormCard.FormCheckDelegate {
|
||||||
contentItem: ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
MobileForm.FormCheckDelegate {
|
|
||||||
id: showFancyEffectsDelegate
|
id: showFancyEffectsDelegate
|
||||||
text: i18n("Show fancy effects in chat")
|
text: i18n("Show fancy effects in chat")
|
||||||
checked: Config.showFancyEffects
|
checked: Config.showFancyEffects
|
||||||
@@ -241,9 +230,9 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.FormDelegateSeparator { above: showFancyEffectsDelegate ; below: hasWindowSystemDelegate }
|
FormCard.FormDelegateSeparator { above: showFancyEffectsDelegate ; below: hasWindowSystemDelegate }
|
||||||
|
|
||||||
MobileForm.FormCheckDelegate {
|
FormCard.FormCheckDelegate {
|
||||||
id: hasWindowSystemDelegate
|
id: hasWindowSystemDelegate
|
||||||
visible: Controller.hasWindowSystem
|
visible: Controller.hasWindowSystem
|
||||||
text: i18n("Use transparent chat page")
|
text: i18n("Use transparent chat page")
|
||||||
@@ -255,11 +244,10 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.FormDelegateSeparator { above: hasWindowSystemDelegate; below: transparencyDelegate }
|
FormCard.FormDelegateSeparator { above: hasWindowSystemDelegate; below: transparencyDelegate }
|
||||||
|
|
||||||
MobileForm.AbstractFormDelegate {
|
FormCard.AbstractFormDelegate {
|
||||||
id: transparencyDelegate
|
id: transparencyDelegate
|
||||||
Layout.fillWidth: true
|
|
||||||
visible: Controller.hasWindowSystem && Config.blur
|
visible: Controller.hasWindowSystem && Config.blur
|
||||||
enabled: !Config.isTransparancyImmutable
|
enabled: !Config.isTransparancyImmutable
|
||||||
background: Item {}
|
background: Item {}
|
||||||
@@ -291,9 +279,9 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.FormDelegateSeparator { above: transparencyDelegate; below: showLocalMessagesOnRightDelegate; visible: transparencyDelegate.visible }
|
FormCard.FormDelegateSeparator { above: transparencyDelegate; below: showLocalMessagesOnRightDelegate; visible: transparencyDelegate.visible }
|
||||||
|
|
||||||
MobileForm.FormCheckDelegate {
|
FormCard.FormCheckDelegate {
|
||||||
id: showLocalMessagesOnRightDelegate
|
id: showLocalMessagesOnRightDelegate
|
||||||
text: i18n("Show your messages on the right")
|
text: i18n("Show your messages on the right")
|
||||||
checked: Config.showLocalMessagesOnRight
|
checked: Config.showLocalMessagesOnRight
|
||||||
@@ -304,9 +292,9 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.FormDelegateSeparator { above: showLocalMessagesOnRightDelegate; below: showLinkPreviewDelegate }
|
FormCard.FormDelegateSeparator { above: showLocalMessagesOnRightDelegate; below: showLinkPreviewDelegate }
|
||||||
|
|
||||||
MobileForm.FormCheckDelegate {
|
FormCard.FormCheckDelegate {
|
||||||
id: showLinkPreviewDelegate
|
id: showLinkPreviewDelegate
|
||||||
text: i18n("Show links preview in the chat messages")
|
text: i18n("Show links preview in the chat messages")
|
||||||
checked: Config.showLinkPreview
|
checked: Config.showLinkPreview
|
||||||
@@ -316,17 +304,13 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
MobileForm.FormHeader {
|
|
||||||
Layout.fillWidth: true
|
FormCard.FormHeader {
|
||||||
title: i18n("Show Avatar")
|
title: i18n("Show Avatar")
|
||||||
}
|
}
|
||||||
MobileForm.FormCard {
|
FormCard.FormCard {
|
||||||
Layout.fillWidth: true
|
FormCard.FormCheckDelegate {
|
||||||
contentItem: ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
MobileForm.FormCheckDelegate {
|
|
||||||
text: i18n("In chat")
|
text: i18n("In chat")
|
||||||
checked: Config.showAvatarInTimeline
|
checked: Config.showAvatarInTimeline
|
||||||
onToggled: {
|
onToggled: {
|
||||||
@@ -336,7 +320,7 @@ Kirigami.ScrollablePage {
|
|||||||
enabled: !Config.isShowAvatarInTimelineImmutable
|
enabled: !Config.isShowAvatarInTimelineImmutable
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.FormCheckDelegate {
|
FormCard.FormCheckDelegate {
|
||||||
text: i18n("In sidebar")
|
text: i18n("In sidebar")
|
||||||
checked: Config.showAvatarInRoomDrawer
|
checked: Config.showAvatarInRoomDrawer
|
||||||
enabled: !Config.isShowAvatarInRoomDrawerImmutable
|
enabled: !Config.isShowAvatarInRoomDrawerImmutable
|
||||||
@@ -346,6 +330,4 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user