Merge pull request #2 from logos-blockchain/feat/useDesignSystemControls

feat: Use the new Design syste which also exposes Controls
This commit is contained in:
Khushboo-dev-cpp 2026-02-16 16:04:54 +05:30 committed by GitHub
commit dc260dc9eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 31 additions and 60 deletions

6
flake.lock generated
View File

@ -594,11 +594,11 @@
]
},
"locked": {
"lastModified": 1770997148,
"narHash": "sha256-plHuPEFyOPrUv1Dyk/2D9Ppc71Xby0LiCIOAzbFCi+I=",
"lastModified": 1771237838,
"narHash": "sha256-UcdHiZ5IdfCSOy17WTz04ZV1n4qqycVfwYzI7BkXeuc=",
"owner": "logos-co",
"repo": "logos-design-system",
"rev": "ede76f156852321f3793fa417295813994e6c9e4",
"rev": "596811cbb0a0644322267368e87fab80e34203d8",
"type": "github"
},
"original": {

View File

@ -217,11 +217,16 @@ pkgs.stdenv.mkDerivation rec {
cp -L "${logosBlockchainUI}/lib/blockchain_ui.$OS_EXT" "$out/"
fi
# Copy design system QML module (Logos/DesignSystem) for runtime
if [ -d "${logosDesignSystem}/lib/Logos/DesignSystem" ]; then
# Copy design system QML modules (Logos.Theme, Logos.Controls) for runtime
if [ -d "${logosDesignSystem}/lib/Logos/Theme" ]; then
mkdir -p "$out/lib/Logos"
cp -R "${logosDesignSystem}/lib/Logos/DesignSystem" "$out/lib/Logos/"
echo "Copied Logos Design System to lib/Logos/DesignSystem/"
cp -R "${logosDesignSystem}/lib/Logos/Theme" "$out/lib/Logos/"
echo "Copied Logos.Theme to lib/Logos/Theme/"
fi
if [ -d "${logosDesignSystem}/lib/Logos/Controls" ]; then
mkdir -p "$out/lib/Logos"
cp -R "${logosDesignSystem}/lib/Logos/Controls" "$out/lib/Logos/"
echo "Copied Logos.Controls to lib/Logos/Controls/"
fi
# Create a README for reference

View File

@ -1,8 +1,6 @@
<RCC>
<qresource prefix="/">
<file>qml/BlockchainView.qml</file>
<file>qml/controls/qmldir</file>
<file>qml/controls/LogosButton.qml</file>
<file>qml/views/qmldir</file>
<file>qml/views/StatusConfigView.qml</file>
<file>qml/views/LogsView.qml</file>

View File

@ -5,7 +5,7 @@ import QtQuick.Dialogs
import QtCore
import BlockchainBackend
import Logos.DesignSystem
import Logos.Theme
import views

View File

@ -1,20 +0,0 @@
import QtQuick
import QtQuick.Controls
import Logos.DesignSystem
Button {
implicitWidth: 200
implicitHeight: 50
background: Rectangle {
color: parent.pressed || parent.hovered ?
Theme.palette.backgroundMuted :
Theme.palette.backgroundSecondary
radius: Theme.spacing.radiusXlarge
border.color: parent.pressed || parent.hovered ?
Theme.palette.overlayOrange :
Theme.palette.border
border.width: 1
}
}

View File

@ -1,2 +0,0 @@
module controls
LogosButton 1.0 LogosButton.qml

View File

@ -2,9 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Logos.DesignSystem
import controls
import Logos.Theme
import Logos.Controls
Control {
id: root
@ -29,11 +28,10 @@ Control {
Layout.preferredHeight: implicitHeight
spacing: Theme.spacing.medium
Text {
LogosText {
text: qsTr("Logs")
font.pixelSize: Theme.typography.secondaryText
font.bold: true
color: Theme.palette.text
}
Item { Layout.fillWidth: true }
@ -62,16 +60,14 @@ Control {
model: root.logModel
spacing: 2
delegate: Text {
delegate: LogosText {
width: logsListView.width
text: model.text
font.pixelSize: Theme.typography.secondaryText
font.family: Theme.typography.publicSans
color: Theme.palette.text
width: logsListView.width
wrapMode: Text.Wrap
}
Text {
LogosText {
visible: !root.logModel || root.logModel.count === 0
anchors.centerIn: parent
text: qsTr("No logs yet...")

View File

@ -2,8 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Logos.DesignSystem
import controls
import Logos.Theme
import Logos.Controls
ColumnLayout {
id: root
@ -41,15 +41,14 @@ ColumnLayout {
anchors.margins: Theme.spacing.large
spacing: Theme.spacing.medium
Text {
LogosText {
Layout.alignment: Qt.AlignLeft
font.pixelSize: Theme.typography.primaryText
font.bold: true
text: root.statusText
color: root.statusColor
}
Text {
LogosText {
Layout.alignment: Qt.AlignLeft
Layout.topMargin: -Theme.spacing.medium
text: qsTr("Mainnet - chain ID 1")
@ -87,14 +86,12 @@ ColumnLayout {
anchors.margins: Theme.spacing.large
spacing: Theme.spacing.medium
Text {
LogosText {
text: qsTr("Current Config: ")
font.pixelSize: Theme.typography.primaryText
font.bold: true
color: Theme.palette.text
}
Text {
LogosText {
Layout.fillWidth: true
Layout.topMargin: -Theme.spacing.medium
text: root.configPath || qsTr("No file selected")

View File

@ -2,9 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Logos.DesignSystem
import controls
import Logos.Theme
import Logos.Controls
ColumnLayout {
id: root
@ -38,11 +37,10 @@ ColumnLayout {
anchors.margins: Theme.spacing.large
spacing: Theme.spacing.large
Text {
LogosText {
text: qsTr("Get balance")
font.pixelSize: Theme.typography.secondaryText
font.bold: true
color: Theme.palette.text
}
CustomTextFeild {
@ -56,7 +54,7 @@ ColumnLayout {
onClicked: root.getBalanceRequested(balanceAddressField.text)
}
Text {
LogosText {
id: balanceResultText
Layout.fillWidth: true
font.pixelSize: Theme.typography.secondaryText
@ -83,11 +81,10 @@ ColumnLayout {
anchors.margins: Theme.spacing.large
spacing: Theme.spacing.large
Text {
LogosText {
text: qsTr("Transfer funds")
font.pixelSize: Theme.typography.secondaryText
font.bold: true
color: Theme.palette.text
}
CustomTextFeild {
@ -109,7 +106,7 @@ ColumnLayout {
onClicked: root.transferRequested(transferFromField.text, transferToField.text, transferAmountField.text)
}
Text {
LogosText {
id: transferResultText
Layout.fillWidth: true
font.pixelSize: Theme.typography.secondaryText