moved the platform-specific android code for the new ui

This commit is contained in:
vladimir.kuznetsov 2023-07-24 16:31:04 +09:00
parent 5b8a0881b7
commit 0a1359ed16
31 changed files with 854 additions and 764 deletions

View file

@ -26,7 +26,7 @@ CheckBox {
hoverEnabled: true
indicator: Rectangle {
id: checkBoxBackground
id: background
anchors.verticalCenter: parent.verticalCenter
@ -57,7 +57,6 @@ CheckBox {
radius: 4
Image {
id: indicator
anchors.centerIn: parent
source: root.pressed ? imageSource : root.checked ? imageSource : ""
@ -71,31 +70,38 @@ CheckBox {
}
}
contentItem: ColumnLayout {
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 8 + checkBoxBackground.width
contentItem: Item {
implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight
spacing: 4
anchors.fill: parent
anchors.leftMargin: 8 + background.width
ListItemTitleType {
Layout.fillWidth: true
// Layout.topMargin: 16
// Layout.bottomMargin: description.visible ? 0 : 16
ColumnLayout {
id: content
text: root.text
}
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
CaptionTextType {
id: description
spacing: 4
Layout.fillWidth: true
Layout.bottomMargin: 16
ListItemTitleType {
Layout.fillWidth: true
text: root.descriptionText
color: "#878b91"
text: root.text
}
visible: root.descriptionText !== ""
CaptionTextType {
id: description
Layout.fillWidth: true
text: root.descriptionText
color: "#878b91"
visible: root.descriptionText !== ""
}
}
}

View file

@ -20,7 +20,6 @@ Item {
if (root.stackView.depth <= 1) {
return
}
root.stackView.pop()
}

View file

@ -85,44 +85,50 @@ RadioButton {
}
}
contentItem: ColumnLayout {
id: content
anchors.left: parent.left
anchors.right: parent.right
contentItem: Item {
implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight
anchors.fill: parent
anchors.leftMargin: 8 + background.width
spacing: 4
ColumnLayout {
id: content
ListItemTitleType {
text: root.text
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
color: {
if (root.checked) {
return selectedTextColor
spacing: 4
ListItemTitleType {
text: root.text
color: {
if (root.checked) {
return selectedTextColor
}
return textColor
}
Layout.fillWidth: true
Behavior on color {
PropertyAnimation { duration: 200 }
}
return textColor
}
Layout.fillWidth: true
Layout.topMargin: 16
Layout.bottomMargin: description.visible ? 0 : 16
CaptionTextType {
id: description
Behavior on color {
PropertyAnimation { duration: 200 }
color: "#878B91"
text: root.descriptionText
visible: root.descriptionText !== ""
Layout.fillWidth: true
}
}
CaptionTextType {
id: description
color: "#878B91"
text: root.descriptionText
visible: root.descriptionText !== ""
Layout.fillWidth: true
Layout.bottomMargin: 16
}
}
MouseArea {