status-desktop/storybook/pages/NetworkSelectItemDelegatePage.qml
Lukáš Tinkl d9d6d90dc9 [Style] remove legacy Style and its themes
- legacy Style and ThemePalette removed
- moved and deduplicated font definitions into `Theme` (unrelated to a
color palette)
- `Style.current.foo` -> `Theme.foo`
- `Style.current.fooColor` -> `Theme.palette.fooColor`
- upgrade the imports to 5.15
- removed some mode dead components

Fixes #16514
2024-10-22 15:54:31 +02:00

98 lines
2.4 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQml 2.15
import StatusQ.Core 0.1
import StatusQ.Core.Utils 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1
import AppLayouts.Wallet.controls 1.0
import Models 1.0
import Storybook 1.0
import SortFilterProxyModel 0.2
import utils 1.0
SplitView {
id: root
Item {
implicitWidth: delegate.width
NetworkSelectItemDelegate {
id: delegate
title: "Ethereum"
iconUrl: Theme.svg("network/Network=Ethereum")
showIndicator: true
multiSelection: true
checkState: checkStateSelector.checkState
nextCheckState: checkState === Qt.Unchecked ? Qt.PartiallyChecked :
checkState === Qt.PartiallyChecked ? Qt.Checked : Qt.Unchecked
onCheckStateChanged: {
checkStateSelector.checkState = checkState
}
}
}
Pane {
id: pane
SplitView.fillWidth: true
ColumnLayout {
CheckBox {
text: "showIndicator"
checked: delegate.showIndicator
onCheckedChanged: {
delegate.showIndicator = checked
}
}
CheckBox {
text: "multiSelection"
checked: delegate.multiSelection
onCheckedChanged: {
delegate.multiSelection = checked
}
}
Label {
text: "title"
}
TextField {
text: delegate.title
onTextChanged: {
delegate.title = text
}
}
Label {
text: "iconUrl"
}
TextField {
text: delegate.iconUrl
onTextChanged: {
delegate.iconUrl = text
}
}
CheckBox {
id: checkStateSelector
text: "checkedState"
tristate: true
checked: true
onCheckStateChanged: {
if(delegate.checkState !== checkState) {
delegate.checkState = checkState
}
}
}
}
}
}
// category: Controls