diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2019-11-13 09:03:51 -0600 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2019-11-13 09:03:51 -0600 |
| commit | 47bc0f2a3cdbefb2db9b740788f2273deb3943d6 (patch) | |
| tree | 4e34e9052c1d4a70cd8c78716d8ed61ddf967b0a /components | |
| parent | 8bd820b9099679f91fb0c542eb9edfd71a720332 (diff) | |
| parent | 0e3f3c13a10032122a4678e617c82ff2f8ff536a (diff) | |
| download | monzero-gui-47bc0f2a3cdbefb2db9b740788f2273deb3943d6.tar.gz monzero-gui-47bc0f2a3cdbefb2db9b740788f2273deb3943d6.tar.xz monzero-gui-47bc0f2a3cdbefb2db9b740788f2273deb3943d6.zip | |
Merge pull request #2435
0e3f3c1 SettingsWallet: refactor list items into separate component (xiphon)
Diffstat (limited to 'components')
| -rw-r--r-- | components/SettingsListItem.qml | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/components/SettingsListItem.qml b/components/SettingsListItem.qml new file mode 100644 index 00000000..8442e9c3 --- /dev/null +++ b/components/SettingsListItem.qml @@ -0,0 +1,65 @@ +import QtQuick 2.9 +import QtQuick.Layouts 1.1 + +import "../components" as MoneroComponents + +ColumnLayout { + property alias buttonText: button.text + property alias description: description.text + property alias title: title.text + signal clicked() + + id: settingsListItem + Layout.fillWidth: true + spacing: 0 + + Rectangle { + // divider + Layout.preferredHeight: 1 + Layout.fillWidth: true + Layout.bottomMargin: 8 + color: MoneroComponents.Style.dividerColor + opacity: MoneroComponents.Style.dividerOpacity + } + + RowLayout { + Layout.fillWidth: true + spacing: 0 + + ColumnLayout { + Layout.fillWidth: true + Layout.alignment: Qt.AlignVCenter + spacing: 0 + + MoneroComponents.TextPlain { + id: title + Layout.fillWidth: true + Layout.preferredHeight: 20 + Layout.topMargin: 8 + color: MoneroComponents.Style.defaultFontColor + opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8 + font.bold: true + font.family: MoneroComponents.Style.fontRegular.name + font.pixelSize: 16 + } + + MoneroComponents.TextPlainArea { + id: description + color: MoneroComponents.Style.dimmedFontColor + colorBlackTheme: MoneroComponents.Style._b_dimmedFontColor + colorWhiteTheme: MoneroComponents.Style._w_dimmedFontColor + Layout.fillWidth: true + horizontalAlignment: TextInput.AlignLeft + } + } + + MoneroComponents.StandardButton { + id: button + small: true + onClicked: { + settingsListItem.clicked() + } + width: 135 + } + } +} |
