added exportController and PageShare
- added a blank PageSettingsProtocol
This commit is contained in:
parent
3034019d5a
commit
be7386f0d7
38 changed files with 1080 additions and 115 deletions
|
@ -11,6 +11,8 @@ Item {
|
|||
implicitWidth: content.implicitWidth
|
||||
implicitHeight: content.implicitHeight
|
||||
|
||||
visible: backButtonImage !== ""
|
||||
|
||||
RowLayout {
|
||||
id: content
|
||||
|
||||
|
|
|
@ -19,11 +19,12 @@ Item {
|
|||
property string rootButtonImage: "qrc:/images/controls/chevron-down.svg"
|
||||
property string rootButtonImageColor: "#494B50"
|
||||
property string rootButtonDefaultColor: "#1C1D21"
|
||||
property int rootButtonMaximumWidth
|
||||
property int rootButtonMaximumWidth: 0
|
||||
|
||||
property string rootButtonBorderColor: "#494B50"
|
||||
property int rootButtonBorderWidth: 1
|
||||
|
||||
property real drawerHeight: 0.9
|
||||
property Component listView
|
||||
|
||||
property alias menuVisible: menu.visible
|
||||
|
@ -55,7 +56,9 @@ Item {
|
|||
Layout.leftMargin: 16
|
||||
|
||||
LabelTextType {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
visible: root.descriptionText !== ""
|
||||
|
@ -65,7 +68,9 @@ Item {
|
|||
}
|
||||
|
||||
ButtonTextType {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
Layout.maximumWidth: rootButtonMaximumWidth ? rootButtonMaximumWidth : implicitWidth
|
||||
|
@ -115,7 +120,7 @@ Item {
|
|||
id: menu
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.9
|
||||
height: parent.height * drawerHeight
|
||||
|
||||
ColumnLayout {
|
||||
id: header
|
||||
|
|
107
client/ui/qml/Controls2/ListViewType.qml
Normal file
107
client/ui/qml/Controls2/ListViewType.qml
Normal file
|
@ -0,0 +1,107 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
ListView {
|
||||
id: menuContent
|
||||
|
||||
property var rootWidth
|
||||
property var selectedText
|
||||
property string imageSource
|
||||
property var clickedFunction
|
||||
property bool dividerVisible: false
|
||||
|
||||
width: rootWidth
|
||||
height: menuContent.contentItem.height
|
||||
|
||||
clip: true
|
||||
interactive: false
|
||||
|
||||
ButtonGroup {
|
||||
id: buttonGroup
|
||||
}
|
||||
|
||||
delegate: Item {
|
||||
implicitWidth: rootWidth
|
||||
implicitHeight: content.implicitHeight
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
|
||||
anchors.fill: parent
|
||||
spacing: 16
|
||||
|
||||
RadioButton {
|
||||
id: radioButton
|
||||
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: radioButtonContent.implicitHeight
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
indicator: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: radioButton.hovered ? "#2C2D30" : "#1C1D21"
|
||||
|
||||
Behavior on color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: radioButtonContent
|
||||
anchors.fill: parent
|
||||
|
||||
anchors.rightMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
|
||||
z: 1
|
||||
|
||||
ParagraphTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
Layout.bottomMargin: 20
|
||||
|
||||
text: name
|
||||
}
|
||||
|
||||
Image {
|
||||
source: imageSource ? imageSource : "qrc:/images/controls/check.svg"
|
||||
visible: imageSource ? true : radioButton.checked
|
||||
|
||||
width: 24
|
||||
height: 24
|
||||
|
||||
Layout.rightMargin: 8
|
||||
}
|
||||
}
|
||||
|
||||
ButtonGroup.group: buttonGroup
|
||||
checked: menuContent.currentIndex === index
|
||||
|
||||
onClicked: {
|
||||
menuContent.currentIndex = index
|
||||
menuContent.selectedText = name
|
||||
if (clickedFunction && typeof clickedFunction === "function") {
|
||||
clickedFunction()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DividerType {
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 16
|
||||
|
||||
visible: dividerVisible
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (menuContent.currentIndex === index) {
|
||||
menuContent.selectedText = name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -23,12 +23,6 @@ RadioButton {
|
|||
property string defaultBodredColor: "transparent"
|
||||
property int borderWidth: 0
|
||||
|
||||
property string defaultCircleBorderColor: "#878B91"
|
||||
property string selectedCircleBorderColor: "#A85809"
|
||||
property string pressedCircleBorderColor: Qt.rgba(251/255, 178/255, 106/255, 0.3)
|
||||
|
||||
property string defaultInnerCircleColor: "#FBB26A"
|
||||
|
||||
property string imageSource
|
||||
property bool showImage
|
||||
|
||||
|
@ -61,80 +55,38 @@ RadioButton {
|
|||
}
|
||||
|
||||
Image {
|
||||
source: imageSource
|
||||
visible: showImage
|
||||
source: {
|
||||
if (showImage) {
|
||||
return imageSource
|
||||
} else if (root.pressed) {
|
||||
return "qrc:/images/controls/radio-button-inner-circle-pressed.png"
|
||||
} else if (root.checked) {
|
||||
return "qrc:/images/controls/radio-button-inner-circle.png"
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
width: 24
|
||||
height: 24
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: outerCircle
|
||||
|
||||
width: 24
|
||||
height: 24
|
||||
radius: 16
|
||||
|
||||
visible: !showImage
|
||||
Image {
|
||||
source: {
|
||||
if (showImage) {
|
||||
return ""
|
||||
} else if (root.pressed || root.checked) {
|
||||
return "qrc:/images/controls/radio-button-pressed.svg"
|
||||
} else {
|
||||
return "qrc:/images/controls/radio-button.svg"
|
||||
}
|
||||
}
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
color: "transparent"
|
||||
border.color: {
|
||||
if (root.enabled) {
|
||||
if (root.pressed) {
|
||||
return pressedCircleBorderColor
|
||||
} else if (root.checked) {
|
||||
return selectedCircleBorderColor
|
||||
}
|
||||
}
|
||||
return defaultCircleBorderColor
|
||||
}
|
||||
|
||||
border.width: 1
|
||||
|
||||
Behavior on border.color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: innerCircle
|
||||
|
||||
width: 12
|
||||
height: 12
|
||||
radius: 16
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
color: "transparent"
|
||||
border.color: defaultInnerCircleColor
|
||||
border.width: {
|
||||
if (root.enabled) {
|
||||
if(root.checked) {
|
||||
return 6
|
||||
}
|
||||
return root.pressed ? 6 : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on border.width {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
anchors.fill: innerCircle
|
||||
horizontalOffset: 0
|
||||
verticalOffset: 0
|
||||
radius: 12
|
||||
samples: 13
|
||||
color: "#FBB26A"
|
||||
source: innerCircle
|
||||
}
|
||||
width: 24
|
||||
height: 24
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue