From c8cd9a5f3be052eda3204f73ca299fba516680ec Mon Sep 17 00:00:00 2001 From: NotRin7 Date: Thu, 20 Nov 2025 15:58:58 +0100 Subject: [PATCH 1/5] fix --- src/qt/palladiumgui.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/qt/palladiumgui.cpp b/src/qt/palladiumgui.cpp index d92832a..2c2ee3c 100644 --- a/src/qt/palladiumgui.cpp +++ b/src/qt/palladiumgui.cpp @@ -122,21 +122,33 @@ PalladiumGUI::PalladiumGUI(interfaces::Node& node, const PlatformStyle *_platfor rpcConsole = new RPCConsole(node, _platformStyle, nullptr); helpMessageDialog = new HelpMessageDialog(node, this, false); + + // --- UPDATE CHECKER LAYOUT SETUP --- + QWidget* mainContainer = new QWidget(this); + QVBoxLayout* mainLayout = new QVBoxLayout(mainContainer); + mainLayout->setContentsMargins(0,0,0,0); + mainLayout->setSpacing(0); + + updateAlertWidget = new QWidget(mainContainer); + updateAlertWidget->setVisible(false); + mainLayout->addWidget(updateAlertWidget); + #ifdef ENABLE_WALLET if(enableWallet) { /** Create wallet frame and make it the central widget */ walletFrame = new WalletFrame(_platformStyle, this); - setCentralWidget(walletFrame); + mainLayout->addWidget(walletFrame); } else #endif // ENABLE_WALLET { /* When compiled without wallet or -disablewallet is provided, * the central widget is the rpc console. */ - setCentralWidget(rpcConsole); + mainLayout->addWidget(rpcConsole); Q_EMIT consoleShown(rpcConsole); } + setCentralWidget(mainContainer); // Accept D&D of URIs setAcceptDrops(true); @@ -244,16 +256,7 @@ PalladiumGUI::PalladiumGUI(interfaces::Node& node, const PlatformStyle *_platfor networkManager = new QNetworkAccessManager(this); connect(networkManager, &QNetworkAccessManager::finished, this, &PalladiumGUI::onUpdateResult); - updateAlertWidget = new QWidget(this); - updateAlertWidget->setVisible(false); - - // Versuche das Widget oben im Layout des zentralen Widgets einzufügen - if (this->centralWidget() && this->centralWidget()->layout()) { - QBoxLayout* layout = qobject_cast(this->centralWidget()->layout()); - if (layout) { - layout->insertWidget(0, updateAlertWidget); - } - } + // updateAlertWidget is already initialized and added to layout above // Check beim Start ausführen checkUpdate(); @@ -1566,6 +1569,9 @@ void PalladiumGUI::onUpdateResult(QNetworkReply* reply) // Aktuelle Client Version holen QString currentVersionStr = QString::fromStdString(FormatFullVersion()); + if(currentVersionStr.startsWith("v")) { + currentVersionStr.remove(0, 1); + } // Bereinige currentVersionStr falls nötig, FormatFullVersion gibt oft sowas wie "1.0.0-beta" zurück // Einfacher String Vergleich oder QVersionNumber (besser) From 372c7b44dbff19d4d703916a50e7534a7914993b Mon Sep 17 00:00:00 2001 From: NotRin7 Date: Thu, 20 Nov 2025 17:33:32 +0100 Subject: [PATCH 2/5] fix 2.0 --- src/qt/palladiumgui.cpp | 53 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 5 deletions(-) diff --git a/src/qt/palladiumgui.cpp b/src/qt/palladiumgui.cpp index 2c2ee3c..692374c 100644 --- a/src/qt/palladiumgui.cpp +++ b/src/qt/palladiumgui.cpp @@ -101,10 +101,23 @@ PalladiumGUI::PalladiumGUI(interfaces::Node& node, const PlatformStyle *_platfor qApp->setStyleSheet(ts.readAll()); f.close(); } - // Wichtig: Den Haken im Menü setzen! - if(themeAction) { - themeAction->setChecked(true); - } + + // Palette setzen + QPalette darkPalette; + darkPalette.setColor(QPalette::Window, QColor(53, 53, 53)); + darkPalette.setColor(QPalette::WindowText, Qt::white); + darkPalette.setColor(QPalette::Base, QColor(25, 25, 25)); + darkPalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53)); + darkPalette.setColor(QPalette::ToolTipBase, Qt::white); + darkPalette.setColor(QPalette::ToolTipText, Qt::white); + darkPalette.setColor(QPalette::Text, Qt::white); + darkPalette.setColor(QPalette::Button, QColor(53, 53, 53)); + darkPalette.setColor(QPalette::ButtonText, Qt::white); + darkPalette.setColor(QPalette::BrightText, Qt::red); + darkPalette.setColor(QPalette::Link, QColor(42, 130, 218)); + darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); + darkPalette.setColor(QPalette::HighlightedText, Qt::black); + qApp->setPalette(darkPalette); } //QSettings settings; @@ -157,6 +170,10 @@ PalladiumGUI::PalladiumGUI(interfaces::Node& node, const PlatformStyle *_platfor // Needs walletFrame to be initialized createActions(); + if (isDark && themeAction) { + themeAction->setChecked(true); + } + // Create application menu bar createMenuBar(); @@ -1530,11 +1547,31 @@ void PalladiumGUI::toggleTheme() qApp->setStyleSheet(ts.readAll()); f.close(); } + + // Palette setzen für bessere Kompatibilität + QPalette darkPalette; + darkPalette.setColor(QPalette::Window, QColor(53, 53, 53)); + darkPalette.setColor(QPalette::WindowText, Qt::white); + darkPalette.setColor(QPalette::Base, QColor(25, 25, 25)); + darkPalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53)); + darkPalette.setColor(QPalette::ToolTipBase, Qt::white); + darkPalette.setColor(QPalette::ToolTipText, Qt::white); + darkPalette.setColor(QPalette::Text, Qt::white); + darkPalette.setColor(QPalette::Button, QColor(53, 53, 53)); + darkPalette.setColor(QPalette::ButtonText, Qt::white); + darkPalette.setColor(QPalette::BrightText, Qt::red); + darkPalette.setColor(QPalette::Link, QColor(42, 130, 218)); + darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); + darkPalette.setColor(QPalette::HighlightedText, Qt::black); + qApp->setPalette(darkPalette); + // 2. Speichern, dass er an ist settings.setValue("darkModeEnabled", true); } else { // 1. Standard Theme (Weiß) qApp->setStyleSheet(""); + qApp->setPalette(style()->standardPalette()); + // 2. Speichern, dass er aus ist settings.setValue("darkModeEnabled", false); } @@ -1602,7 +1639,13 @@ void PalladiumGUI::onUpdateResult(QNetworkReply* reply) QPushButton *btn = new QPushButton(tr("Download"), updateAlertWidget); btn->setStyleSheet("background-color: white; color: #d9534f; font-weight: bold; border-radius: 3px; padding: 3px 10px;"); - connect(btn, &QPushButton::clicked, this, &PalladiumGUI::openUpdateLink); + + QString url = latestVersionUrl; + connect(btn, &QPushButton::clicked, [this, url]() { + if(!QDesktopServices::openUrl(QUrl(url))) { + QMessageBox::information(this, tr("Update Available"), tr("Please visit: %1").arg(url)); + } + }); QPushButton *btnClose = new QPushButton("X", updateAlertWidget); btnClose->setFlat(true); From 4afc3365c4ab585b58cb8b0b82d573b71ad2c2a9 Mon Sep 17 00:00:00 2001 From: NotRin7 Date: Thu, 20 Nov 2025 17:43:40 +0100 Subject: [PATCH 3/5] Update palladiumgui.cpp --- src/qt/palladiumgui.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/qt/palladiumgui.cpp b/src/qt/palladiumgui.cpp index 692374c..cc4f56f 100644 --- a/src/qt/palladiumgui.cpp +++ b/src/qt/palladiumgui.cpp @@ -257,6 +257,9 @@ PalladiumGUI::PalladiumGUI(interfaces::Node& node, const PlatformStyle *_platfor }); modalOverlay = new ModalOverlay(enableWallet, this->centralWidget()); + if (themeAction->isChecked()) { + modalOverlay->setStyleSheet("background-color: #2b2b2b; color: white;"); + } connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &PalladiumGUI::showModalOverlay); connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &PalladiumGUI::showModalOverlay); #ifdef ENABLE_WALLET @@ -1567,6 +1570,10 @@ void PalladiumGUI::toggleTheme() // 2. Speichern, dass er an ist settings.setValue("darkModeEnabled", true); + + if (modalOverlay) { + modalOverlay->setStyleSheet("background-color: #2b2b2b; color: white;"); + } } else { // 1. Standard Theme (Weiß) qApp->setStyleSheet(""); @@ -1574,6 +1581,10 @@ void PalladiumGUI::toggleTheme() // 2. Speichern, dass er aus ist settings.setValue("darkModeEnabled", false); + + if (modalOverlay) { + modalOverlay->setStyleSheet(""); + } } } From d59e9d6451394589a85820c65aff73b2a4012ce5 Mon Sep 17 00:00:00 2001 From: NotRin7 Date: Thu, 20 Nov 2025 17:50:26 +0100 Subject: [PATCH 4/5] add combine script --- docker-build/build-menu.sh | 89 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 docker-build/build-menu.sh diff --git a/docker-build/build-menu.sh b/docker-build/build-menu.sh new file mode 100644 index 0000000..2cabeb2 --- /dev/null +++ b/docker-build/build-menu.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Directory where this script is located +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" + +# Function to run a build script +run_build() { + local script_name="$1" + local description="$2" + + echo "============================================================" + echo "Starting build for: $description" + echo "Script: $script_name" + echo "============================================================" + + if [[ -f "${SCRIPT_DIR}/${script_name}" ]]; then + # Ensure it's executable + chmod +x "${SCRIPT_DIR}/${script_name}" + "${SCRIPT_DIR}/${script_name}" + else + echo "Error: Script ${script_name} not found!" + fi + + echo "============================================================" + echo "Finished build for: $description" + echo "============================================================" + echo "" +} + +show_menu() { + echo "Palladium Core Docker Build System" + echo "----------------------------------" + echo "1) Linux x86_64" + echo "2) Linux aarch64 (ARM64)" + echo "3) Linux armv7l (ARM 32-bit)" + echo "4) Windows x86_64" + echo "5) Build ALL" + echo "0) Exit" + echo "" +} + +show_menu +read -p "Enter your choice(s) separated by space (e.g. '1 4' for Linux and Windows): " choices + +# Convert string to array +read -ra ADDR <<< "$choices" + +# Check if '5' (ALL) is selected +do_all=false +for choice in "${ADDR[@]}"; do + if [[ "$choice" == "5" ]]; then + do_all=true + break + fi +done + +if [ "$do_all" = true ]; then + run_build "build-linux-x86_64.sh" "Linux x86_64" + run_build "build-linux-aarch64.sh" "Linux aarch64" + run_build "build-linux-armv7l.sh" "Linux armv7l" + run_build "build-windows.sh" "Windows x86_64" +else + for choice in "${ADDR[@]}"; do + case "$choice" in + 1) + run_build "build-linux-x86_64.sh" "Linux x86_64" + ;; + 2) + run_build "build-linux-aarch64.sh" "Linux aarch64" + ;; + 3) + run_build "build-linux-armv7l.sh" "Linux armv7l" + ;; + 4) + run_build "build-windows.sh" "Windows x86_64" + ;; + 0) + echo "Exiting." + exit 0 + ;; + *) + echo "Invalid option: $choice" + ;; + esac + done +fi + +echo "All selected builds completed." From 8bd7bc2ff89d58a76c0f4e67d75e4c9f7492ff24 Mon Sep 17 00:00:00 2001 From: NotRin7 Date: Thu, 20 Nov 2025 17:53:49 +0100 Subject: [PATCH 5/5] cod update --- docker-build/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docker-build/README.md b/docker-build/README.md index 5494f08..e742534 100644 --- a/docker-build/README.md +++ b/docker-build/README.md @@ -6,6 +6,26 @@ - **Docker**: Installed and running ([installation guide](https://docs.docker.com/get-docker/)) - **Disk Space**: At least 15 GB free +## Unified Build Menu (Recommended) + +The easiest way to build binaries for one or multiple platforms is using the interactive menu script. + +### Usage + +```bash +cd docker-build +./build-menu.sh +``` + +You will be prompted to select the target platforms: +- `1`: Linux x86_64 +- `2`: Linux aarch64 +- `3`: Linux ARMv7l +- `4`: Windows x86_64 +- `5`: Build ALL targets + +You can also select multiple targets by separating them with spaces (e.g., `1 4`). + ## Linux x86_64 Creates native Linux 64-bit binaries using a Docker container based on Ubuntu 20.04.