|
| 1 | +// Copyright (c) 2023 The Bitcoin Core developers |
| 2 | +// Distributed under the MIT software license, see the accompanying |
| 3 | +// file COPYING or http://www.opensource.org/licenses/mit-license.php. |
| 4 | + |
| 5 | +import QtQuick 2.15 |
| 6 | +import QtQuick.Controls 2.15 |
| 7 | +import QtQuick.Layouts 1.15 |
| 8 | +import "../../controls" |
| 9 | +import "../../components" |
| 10 | + |
| 11 | +Item { |
| 12 | + property alias navLeftDetail: displaySettingsView.navLeftDetail |
| 13 | + property alias navMiddleDetail: displaySettingsView.navMiddleDetail |
| 14 | + StackView { |
| 15 | + id: displaySettingsView |
| 16 | + property alias navLeftDetail: displaySettings.navLeftDetail |
| 17 | + property alias navMiddleDetail: displaySettings.navMiddleDetail |
| 18 | + property bool newcompilebool: false |
| 19 | + anchors.fill: parent |
| 20 | + |
| 21 | + |
| 22 | + initialItem: Page { |
| 23 | + id: displaySettings |
| 24 | + property alias navLeftDetail: navbar.leftDetail |
| 25 | + property alias navMiddleDetail: navbar.middleDetail |
| 26 | + background: null |
| 27 | + implicitWidth: 450 |
| 28 | + leftPadding: 20 |
| 29 | + rightPadding: 20 |
| 30 | + topPadding: 30 |
| 31 | + |
| 32 | + header: NavigationBar { |
| 33 | + id: navbar |
| 34 | + } |
| 35 | + ColumnLayout { |
| 36 | + spacing: 4 |
| 37 | + width: Math.min(parent.width, 450) |
| 38 | + anchors.horizontalCenter: parent.horizontalCenter |
| 39 | + Setting { |
| 40 | + id: gotoTheme |
| 41 | + Layout.fillWidth: true |
| 42 | + header: qsTr("Theme") |
| 43 | + actionItem: CaretRightButton { |
| 44 | + stateColor: gotoTheme.stateColor |
| 45 | + onClicked: { |
| 46 | + nodeSettingsView.push(theme_page) |
| 47 | + } |
| 48 | + } |
| 49 | + onClicked: loadedItem.clicked() |
| 50 | + } |
| 51 | + Separator { Layout.fillWidth: true } |
| 52 | + Setting { |
| 53 | + id: gotoBlockClockSize |
| 54 | + Layout.fillWidth: true |
| 55 | + header: qsTr("Block clock display mode") |
| 56 | + actionItem: CaretRightButton { |
| 57 | + stateColor: gotoBlockClockSize.stateColor |
| 58 | + onClicked: { |
| 59 | + nodeSettingsView.push(blockclocksize_page) |
| 60 | + } |
| 61 | + } |
| 62 | + onClicked: loadedItem.clicked() |
| 63 | + } |
| 64 | + } |
| 65 | + } |
| 66 | + } |
| 67 | + Component { |
| 68 | + id: theme_page |
| 69 | + SettingsTheme { |
| 70 | + navLeftDetail: NavButton { |
| 71 | + iconSource: "image://images/caret-left" |
| 72 | + text: qsTr("Back") |
| 73 | + onClicked: { |
| 74 | + nodeSettingsView.pop() |
| 75 | + } |
| 76 | + } |
| 77 | + navMiddleDetail: Header { |
| 78 | + headerBold: true |
| 79 | + headerSize: 18 |
| 80 | + header: qsTr("Theme") |
| 81 | + } |
| 82 | + } |
| 83 | + } |
| 84 | + Component { |
| 85 | + id: blockclocksize_page |
| 86 | + SettingsBlockClockDisplayMode { |
| 87 | + navLeftDetail: NavButton { |
| 88 | + iconSource: "image://images/caret-left" |
| 89 | + text: qsTr("Back") |
| 90 | + onClicked: { |
| 91 | + nodeSettingsView.pop() |
| 92 | + } |
| 93 | + } |
| 94 | + navMiddleDetail: Header { |
| 95 | + headerBold: true |
| 96 | + headerSize: 18 |
| 97 | + header: qsTr("Block clock display mode") |
| 98 | + } |
| 99 | + } |
| 100 | + } |
| 101 | +} |
0 commit comments