Added scroll bar for DropDownType
This commit is contained in:
parent
c7acd63ea7
commit
68b27451f2
1 changed files with 79 additions and 64 deletions
|
@ -19,7 +19,6 @@ Item {
|
||||||
|
|
||||||
property alias menuModel: menuContent.model
|
property alias menuModel: menuContent.model
|
||||||
|
|
||||||
width: buttonContent.implicitWidth
|
|
||||||
height: buttonContent.implicitHeight
|
height: buttonContent.implicitHeight
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -136,89 +135,105 @@ Item {
|
||||||
color: Qt.rgba(14/255, 14/255, 17/255, 0.8)
|
color: Qt.rgba(14/255, 14/255, 17/255, 0.8)
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Header2TextType {
|
||||||
|
id: header
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
|
text: "Данные для подключения"
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 16
|
anchors.topMargin: 16
|
||||||
|
anchors.leftMargin: 16
|
||||||
|
anchors.rightMargin: 16
|
||||||
|
}
|
||||||
|
|
||||||
spacing: 16
|
FlickableType {
|
||||||
|
anchors.top: header.bottom
|
||||||
|
anchors.topMargin: 16
|
||||||
|
contentHeight: col.implicitHeight
|
||||||
|
|
||||||
Header2TextType {
|
Column {
|
||||||
width: parent.width
|
id: col
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
text: "Данные для подключения"
|
spacing: 16
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
|
|
||||||
leftPadding: 16
|
ButtonGroup {
|
||||||
rightPadding: 16
|
id: radioButtonGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonGroup {
|
ListView {
|
||||||
id: radioButtonGroup
|
id: menuContent
|
||||||
}
|
width: parent.width
|
||||||
|
height: menuContent.contentItem.height
|
||||||
|
|
||||||
ListView {
|
currentIndex: -1
|
||||||
id: menuContent
|
|
||||||
width: parent.width
|
|
||||||
height: menuContent.contentItem.height
|
|
||||||
|
|
||||||
currentIndex: -1
|
clip: true
|
||||||
|
interactive: false
|
||||||
|
|
||||||
clip: true
|
delegate: Item {
|
||||||
interactive: false
|
implicitWidth: menuContent.width
|
||||||
|
implicitHeight: radioButton.implicitHeight
|
||||||
|
|
||||||
delegate: Item {
|
RadioButton {
|
||||||
implicitWidth: menuContent.width
|
id: radioButton
|
||||||
implicitHeight: radioButton.implicitHeight
|
|
||||||
|
|
||||||
RadioButton {
|
implicitWidth: parent.width
|
||||||
id: radioButton
|
implicitHeight: radioButtonContent.implicitHeight
|
||||||
|
|
||||||
implicitWidth: parent.width
|
hoverEnabled: true
|
||||||
implicitHeight: radioButtonContent.implicitHeight
|
|
||||||
|
|
||||||
hoverEnabled: true
|
ButtonGroup.group: radioButtonGroup
|
||||||
|
|
||||||
ButtonGroup.group: radioButtonGroup
|
indicator: Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
indicator: Rectangle {
|
color: radioButton.hovered ? "#2C2D30" : "#1C1D21"
|
||||||
anchors.fill: parent
|
|
||||||
color: radioButton.hovered ? "#2C2D30" : "#1C1D21"
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: radioButtonContent
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
anchors.rightMargin: 16
|
|
||||||
anchors.leftMargin: 16
|
|
||||||
|
|
||||||
z: 1
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: text
|
|
||||||
|
|
||||||
text: modelData
|
|
||||||
color: "#D7D8DB"
|
|
||||||
font.pixelSize: 16
|
|
||||||
font.weight: 400
|
|
||||||
font.family: "PT Root UI VF"
|
|
||||||
|
|
||||||
height: 24
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 20
|
|
||||||
Layout.bottomMargin: 20
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
RowLayout {
|
||||||
source: "qrc:/images/controls/check.svg"
|
id: radioButtonContent
|
||||||
visible: radioButton.checked
|
anchors.fill: parent
|
||||||
width: 24
|
|
||||||
height: 24
|
|
||||||
|
|
||||||
Layout.rightMargin: 8
|
anchors.rightMargin: 16
|
||||||
|
anchors.leftMargin: 16
|
||||||
|
|
||||||
|
z: 1
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: text
|
||||||
|
|
||||||
|
text: modelData
|
||||||
|
color: "#D7D8DB"
|
||||||
|
font.pixelSize: 16
|
||||||
|
font.weight: 400
|
||||||
|
font.family: "PT Root UI VF"
|
||||||
|
|
||||||
|
height: 24
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Layout.bottomMargin: 20
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
source: "qrc:/images/controls/check.svg"
|
||||||
|
visible: radioButton.checked
|
||||||
|
width: 24
|
||||||
|
height: 24
|
||||||
|
|
||||||
|
Layout.rightMargin: 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
root.text = modelData
|
||||||
|
menu.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue