-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qml: introduce Display Settings page
- Loading branch information
Showing
5 changed files
with
133 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
// Copyright (c) 2023 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
import "../../controls" | ||
import "../../components" | ||
|
||
Item { | ||
property alias navLeftDetail: displaySettingsView.navLeftDetail | ||
property alias navMiddleDetail: displaySettingsView.navMiddleDetail | ||
StackView { | ||
id: displaySettingsView | ||
property alias navLeftDetail: displaySettings.navLeftDetail | ||
property alias navMiddleDetail: displaySettings.navMiddleDetail | ||
property bool newcompilebool: false | ||
anchors.fill: parent | ||
|
||
|
||
initialItem: Page { | ||
id: displaySettings | ||
property alias navLeftDetail: navbar.leftDetail | ||
property alias navMiddleDetail: navbar.middleDetail | ||
background: null | ||
implicitWidth: 450 | ||
leftPadding: 20 | ||
rightPadding: 20 | ||
topPadding: 30 | ||
|
||
header: NavigationBar { | ||
id: navbar | ||
} | ||
ColumnLayout { | ||
spacing: 4 | ||
width: Math.min(parent.width, 450) | ||
anchors.horizontalCenter: parent.horizontalCenter | ||
Setting { | ||
id: gotoTheme | ||
Layout.fillWidth: true | ||
header: qsTr("Theme") | ||
actionItem: CaretRightButton { | ||
stateColor: gotoTheme.stateColor | ||
onClicked: { | ||
nodeSettingsView.push(theme_page) | ||
} | ||
} | ||
onClicked: loadedItem.clicked() | ||
} | ||
Separator { Layout.fillWidth: true } | ||
Setting { | ||
id: gotoBlockClockSize | ||
Layout.fillWidth: true | ||
header: qsTr("Block clock display mode") | ||
actionItem: CaretRightButton { | ||
stateColor: gotoBlockClockSize.stateColor | ||
onClicked: { | ||
nodeSettingsView.push(blockclocksize_page) | ||
} | ||
} | ||
onClicked: loadedItem.clicked() | ||
} | ||
} | ||
} | ||
} | ||
Component { | ||
id: theme_page | ||
SettingsTheme { | ||
navLeftDetail: NavButton { | ||
iconSource: "image://images/caret-left" | ||
text: qsTr("Back") | ||
onClicked: { | ||
nodeSettingsView.pop() | ||
} | ||
} | ||
navMiddleDetail: Header { | ||
headerBold: true | ||
headerSize: 18 | ||
header: qsTr("Theme") | ||
} | ||
} | ||
} | ||
Component { | ||
id: blockclocksize_page | ||
SettingsBlockClockDisplayMode { | ||
navLeftDetail: NavButton { | ||
iconSource: "image://images/caret-left" | ||
text: qsTr("Back") | ||
onClicked: { | ||
nodeSettingsView.pop() | ||
} | ||
} | ||
navMiddleDetail: Header { | ||
headerBold: true | ||
headerSize: 18 | ||
header: qsTr("Block clock display mode") | ||
} | ||
} | ||
} | ||
} |