-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
b5b73b0 qml: use NavigationBar2 in SettingsBlockClockDisplayMode (João Barbosa) a8cbe34 qml: use NavigationBar2 in SettingsDisplay (João Barbosa) 06ac24e qml: use NavigationBar2 in NodeSettings (João Barbosa) 3881dbc qml: use NavigationBar2 in SettingsProxy (João Barbosa) e0376f8 qml: use NavigationBar2 in SettingsTheme (João Barbosa) d3e3c0c qml: use NavigationBar2 in NodeRunner (João Barbosa) 416c994 qml: use NavigationBar2 in Peers (João Barbosa) 3505b2c qml: add NavigationBar2 (João Barbosa) Pull request description: This is an alternative to the existing `NavigationBar` component. The layout is such that the center section is horizontally centered when possible, and the right section is right aligned. Also, `Loader`s are avoided with this new approach. Since the approach is quite different from the other navigation bar, a full refactor would be substantial, harder to test and subject to breaking changes. For that reason, both implementations will be available for a short period of time. More pull requests will follow to replace the old implementation once this is accepted. Finally, the new navigation bar is used on the `Peers`, `NodeRunner`, and `ThemeSettings` pages. ACKs for top commit: jarolrod: tACK b5b73b0 Tree-SHA512: 91c072b715a4d6eafc520bee6ed1e820efc3c91541b3c7f56dab7617a13d1fd934d46ab11350e187aa22f8e29ce5e18eb4382b4b2784b1b3cdb7d79060866e21
- Loading branch information
Showing
12 changed files
with
172 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// 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 | ||
|
||
Pane { | ||
property alias leftItem: left_section.contentItem | ||
property alias centerItem: center_section.contentItem | ||
property alias rightItem: right_section.contentItem | ||
|
||
background: null | ||
padding: 4 | ||
contentItem: RowLayout { | ||
Div { | ||
id: left_div | ||
Layout.preferredWidth: Math.floor(Math.max(left_div.implicitWidth, right_div.implicitWidth)) | ||
contentItem: RowLayout { | ||
Section { | ||
id: left_section | ||
} | ||
Spacer { | ||
} | ||
} | ||
} | ||
Section { | ||
id: center_section | ||
} | ||
Div { | ||
id: right_div | ||
Layout.preferredWidth: Math.floor(Math.max(left_div.implicitWidth, right_div.implicitWidth)) | ||
contentItem: RowLayout { | ||
Spacer { | ||
} | ||
Section { | ||
id: right_section | ||
} | ||
} | ||
} | ||
} | ||
|
||
component Div: Pane { | ||
Layout.alignment: Qt.AlignCenter | ||
Layout.fillWidth: true | ||
Layout.minimumWidth: implicitWidth | ||
background: null | ||
padding: 0 | ||
} | ||
|
||
component Section: Pane { | ||
Layout.alignment: Qt.AlignCenter | ||
Layout.minimumWidth: implicitWidth | ||
background: null | ||
padding: 0 | ||
} | ||
|
||
component Spacer: Item { | ||
Layout.alignment: Qt.AlignCenter | ||
Layout.fillWidth: true | ||
height: 1 | ||
} | ||
} |
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
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
Oops, something went wrong.