Skip to content

Commit

Permalink
Fix build and run issues with --disable-wallet configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
levoncrypto committed Oct 27, 2024
1 parent 9fecae3 commit 60a9ef9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
4 changes: 4 additions & 0 deletions src/qt/bitcoinaddressvalidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
#define BITCOIN_QT_BITCOINADDRESSVALIDATOR_H

#include <QValidator>

#ifdef ENABLE_WALLET
#include "../spark/sparkwallet.h"
#endif

#include "../spark/state.h"

/** Base58 entry widget validator, checks for valid characters and
Expand Down
27 changes: 14 additions & 13 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1481,19 +1481,20 @@ void BitcoinGUI::resizeEvent(QResizeEvent* event) {

// Retrieve new dimensions from the resize event
int newWidth = event->size().width();
int newHeight = event->size().height();
int actionWidth = newWidth / 6;

// Set widths for each action dynamically
QWidget* overviewWidget = toolbar->widgetForAction(overviewAction);
QWidget* receiveWidget = toolbar->widgetForAction(receiveCoinsAction);
QWidget* historyWidget = toolbar->widgetForAction(historyAction);
QWidget* sendCoinsWidget = toolbar->widgetForAction(sendCoinsAction);
QWidget* masternodeWidget = toolbar->widgetForAction(masternodeAction);

overviewWidget->setMinimumWidth(actionWidth);
receiveWidget->setMinimumWidth(actionWidth);
historyWidget->setMinimumWidth(actionWidth);
sendCoinsWidget->setMinimumWidth(actionWidth);
masternodeWidget->setMinimumWidth(actionWidth);
if (toolbar) {
// Set widths for each action dynamically
QWidget* overviewWidget = overviewAction ? toolbar->widgetForAction(overviewAction) : nullptr;
QWidget* receiveWidget = receiveCoinsAction ? toolbar->widgetForAction(receiveCoinsAction) : nullptr;
QWidget* historyWidget = historyAction ? toolbar->widgetForAction(historyAction) : nullptr;
QWidget* sendCoinsWidget = sendCoinsAction ? toolbar->widgetForAction(sendCoinsAction) : nullptr;
QWidget* masternodeWidget = masternodeAction ? toolbar->widgetForAction(masternodeAction) : nullptr;

if (overviewWidget) overviewWidget->setMinimumWidth(actionWidth);
if (receiveWidget) receiveWidget->setMinimumWidth(actionWidth);
if (historyWidget) historyWidget->setMinimumWidth(actionWidth);
if (sendCoinsWidget) sendCoinsWidget->setMinimumWidth(actionWidth);
if (masternodeWidget) masternodeWidget->setMinimumWidth(actionWidth);
}
}
1 change: 1 addition & 0 deletions src/wallet/coincontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define BITCOIN_WALLET_COINCONTROL_H

#include "primitives/transaction.h"
#include "base58.h"

enum class CoinType
{
Expand Down

0 comments on commit 60a9ef9

Please sign in to comment.