diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index c59a4d561e..7e473ec6a3 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -355,7 +355,18 @@ RES_ICONS = \ qt/res/darkstyle/icon_radiobutton_checked_pressed.png \ qt/res/darkstyle/icon_radiobutton_unchecked_pressed.png \ qt/res/darkstyle/icon_radiobutton_checked_disabled.png \ - qt/res/darkstyle/icon_radiobutton_unchecked_disabled.png + qt/res/darkstyle/icon_radiobutton_unchecked_disabled.png \ + qt/res/fonts/OpenSans-Bold.ttf \ + qt/res/fonts/OpenSans-BoldItalic.ttf \ + qt/res/fonts/OpenSans-ExtraBold.ttf \ + qt/res/fonts/OpenSans-ExtraBoldItalic.ttf \ + qt/res/fonts/OpenSans-Italic.ttf \ + qt/res/fonts/OpenSans-Light.ttf \ + qt/res/fonts/OpenSans-LightItalic.ttf \ + qt/res/fonts/OpenSans-Regular.ttf \ + qt/res/fonts/OpenSans-SemiBold.ttf \ + qt/res/fonts/OpenSans-SemiBoldItalic.ttf + RAVEN_QT_BASE_CPP = \ qt/bantablemodel.cpp \ diff --git a/src/qt/assetsdialog.cpp b/src/qt/assetsdialog.cpp index 75f06663d7..af906caeea 100644 --- a/src/qt/assetsdialog.cpp +++ b/src/qt/assetsdialog.cpp @@ -119,17 +119,6 @@ AssetsDialog::AssetsDialog(const PlatformStyle *_platformStyle, QWidget *parent) minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool()); /** RVN START */ - // If the network is regtest. Add some helper buttons to the asset GUI - if (Params().NetworkIDString() != "regtest") { - ui->mineButton->hide(); - ui->mineBlocksCount->hide(); - } else { - ui->mineButton->setText(tr("Mine Block(s)")); - ui->mineButton->setToolTip(tr("Mine some number of blocks")); - ui->mineBlocksCount->setToolTip(tr("The number of blocks to mine")); - connect(ui->mineButton, SIGNAL(clicked()), this, SLOT(mineButtonClicked())); - } - setupAssetControlFrame(platformStyle); setupScrollView(platformStyle); setupFeeControl(platformStyle); @@ -269,6 +258,18 @@ void AssetsDialog::setupAssetControlFrame(const PlatformStyle *platformStyle) // Align the Custom change address checkbox ui->checkBoxAssetControlChange->setStyleSheet(QString(".QCheckBox{ %1; }").arg(COLOR_LABEL_STRING)); + ui->labelAssetControlQuantity->setFont(GUIUtil::getSubLabelFont()); + ui->labelAssetControlAmount->setFont(GUIUtil::getSubLabelFont()); + ui->labelAssetControlFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelAssetControlAfterFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelAssetControlBytes->setFont(GUIUtil::getSubLabelFont()); + ui->labelAssetControlLowOutput->setFont(GUIUtil::getSubLabelFont()); + ui->labelAssetControlChange->setFont(GUIUtil::getSubLabelFont()); + ui->checkBoxAssetControlChange->setFont(GUIUtil::getSubLabelFont()); + ui->lineEditAssetControlChange->setFont(GUIUtil::getSubLabelFont()); + ui->labelAssetControlInsuffFunds->setFont(GUIUtil::getSubLabelFont()); + ui->labelAssetControlAutomaticallySelected->setFont(GUIUtil::getSubLabelFont()); + } void AssetsDialog::setupScrollView(const PlatformStyle *platformStyle) @@ -299,6 +300,25 @@ void AssetsDialog::setupFeeControl(const PlatformStyle *platformStyle) ui->radioCustomFee->setStyleSheet(COLOR_LABEL_STRING); ui->checkBoxMinimumFee->setStyleSheet(QString(".QCheckBox{ %1; }").arg(COLOR_LABEL_STRING)); + ui->buttonChooseFee->setFont(GUIUtil::getSubLabelFont()); + ui->fallbackFeeWarningLabel->setFont(GUIUtil::getSubLabelFont()); + ui->buttonMinimizeFee->setFont(GUIUtil::getSubLabelFont()); + ui->radioSmartFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee2->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee3->setFont(GUIUtil::getSubLabelFont()); + ui->confTargetSelector->setFont(GUIUtil::getSubLabelFont()); + ui->radioCustomFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelCustomPerKilobyte->setFont(GUIUtil::getSubLabelFont()); + ui->customFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelMinFeeWarning->setFont(GUIUtil::getSubLabelFont()); + ui->optInRBF->setFont(GUIUtil::getSubLabelFont()); + ui->sendButton->setFont(GUIUtil::getSubLabelFont()); + ui->clearButton->setFont(GUIUtil::getSubLabelFont()); + ui->addButton->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelFeeEstimation->setFont(GUIUtil::getSubLabelFont()); + ui->labelFeeMinimized->setFont(GUIUtil::getSubLabelFont()); + } void AssetsDialog::on_sendButton_clicked() @@ -615,6 +635,9 @@ void AssetsDialog::setBalance(const CAmount& balance, const CAmount& unconfirmed Q_UNUSED(watchUnconfirmedBalance); Q_UNUSED(watchImmatureBalance); + ui->labelBalance->setFont(GUIUtil::getSubLabelFont()); + ui->label->setFont(GUIUtil::getSubLabelFont()); + if(model && model->getOptionsModel()) { ui->labelBalance->setText(RavenUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), balance)); @@ -962,28 +985,6 @@ void AssetsDialog::assetControlUpdateLabels() } /** RVN START */ -void AssetsDialog::mineButtonClicked() -{ - - int num_generate = ui->mineBlocksCount->value(); - uint64_t max_tries = 1000000; - - std::shared_ptr coinbase_script; - model->getWallet()->GetScriptForMining(coinbase_script); - - // If the keypool is exhausted, no script is returned at all. Catch this. - if (!coinbase_script) { - return; - } - - //throw an error if no script was provided - if (coinbase_script->reserveScript.empty()) { - return; - } - - generateBlocks(coinbase_script, num_generate, max_tries, true); -} - void AssetsDialog::assetControlUpdateSendCoinsDialog() { for(int i = 0; i < ui->entries->count(); ++i) diff --git a/src/qt/assetsdialog.h b/src/qt/assetsdialog.h index 681d3f4976..a993f427c3 100644 --- a/src/qt/assetsdialog.h +++ b/src/qt/assetsdialog.h @@ -103,7 +103,6 @@ private Q_SLOTS: void customFeeFeatureChanged(bool); /** RVN START */ - void mineButtonClicked(); void assetControlUpdateSendCoinsDialog(); void focusAsset(const QModelIndex& index); /** RVN END */ diff --git a/src/qt/createassetdialog.cpp b/src/qt/createassetdialog.cpp index 80152093e0..c068587d3a 100644 --- a/src/qt/createassetdialog.cpp +++ b/src/qt/createassetdialog.cpp @@ -27,6 +27,7 @@ #include #include #include "assets/assettypes.h" +#include "assettablemodel.h" #include #include @@ -353,6 +354,24 @@ void CreateAssetDialog::setupFeeControl(const PlatformStyle *platformStyle) ui->radioCustomFee->setStyleSheet(COLOR_LABEL_STRING); ui->checkBoxMinimumFee->setStyleSheet(QString(".QCheckBox{ %1; }").arg(COLOR_LABEL_STRING)); + ui->buttonChooseFee->setFont(GUIUtil::getSubLabelFont()); + ui->fallbackFeeWarningLabel->setFont(GUIUtil::getSubLabelFont()); + ui->buttonMinimizeFee->setFont(GUIUtil::getSubLabelFont()); + ui->radioSmartFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee2->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee3->setFont(GUIUtil::getSubLabelFont()); + ui->confTargetSelector->setFont(GUIUtil::getSubLabelFont()); + ui->radioCustomFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelCustomPerKilobyte->setFont(GUIUtil::getSubLabelFont()); + ui->customFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelMinFeeWarning->setFont(GUIUtil::getSubLabelFont()); + ui->optInRBF->setFont(GUIUtil::getSubLabelFont()); + ui->createAssetButton->setFont(GUIUtil::getSubLabelFont()); + ui->clearButton->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelFeeEstimation->setFont(GUIUtil::getSubLabelFont()); + ui->labelFeeMinimized->setFont(GUIUtil::getSubLabelFont()); + } void CreateAssetDialog::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, @@ -364,6 +383,9 @@ void CreateAssetDialog::setBalance(const CAmount& balance, const CAmount& unconf Q_UNUSED(watchUnconfirmedBalance); Q_UNUSED(watchImmatureBalance); + ui->labelBalance->setFont(GUIUtil::getSubLabelFont()); + ui->label->setFont(GUIUtil::getSubLabelFont()); + if(model && model->getOptionsModel()) { ui->labelBalance->setText(RavenUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), balance)); @@ -1205,4 +1227,30 @@ void CreateAssetDialog::clear() void CreateAssetDialog::onClearButtonClicked() { clear(); +} + +void CreateAssetDialog::focusSubAsset(const QModelIndex &index) +{ + selectTypeName(1,index.data(AssetTableModel::AssetNameRole).toString()); +} + +void CreateAssetDialog::focusUniqueAsset(const QModelIndex &index) +{ + selectTypeName(2,index.data(AssetTableModel::AssetNameRole).toString()); +} + +void CreateAssetDialog::selectTypeName(int type, QString name) +{ + clear(); + + if (IsAssetNameAnOwner(name.toStdString())) + name = name.left(name.size() - 1); + + ui->assetType->setCurrentIndex(type); + onAssetTypeActivated(type); + + ui->assetList->setCurrentIndex(ui->assetList->findText(name)); + onAssetListActivated(ui->assetList->currentIndex()); + + ui->nameText->setFocus(); } \ No newline at end of file diff --git a/src/qt/createassetdialog.h b/src/qt/createassetdialog.h index 8599f0a374..085aa63126 100644 --- a/src/qt/createassetdialog.h +++ b/src/qt/createassetdialog.h @@ -48,6 +48,7 @@ Q_OBJECT void updateAssetList(); void clear(); + void selectTypeName(int type, QString name); QStringListModel* stringModel; QSortFilterProxyModel* proxy; @@ -129,6 +130,10 @@ private Q_SLOTS: const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance); void updateDisplayUnit(); + + void focusSubAsset(const QModelIndex& index); + void focusUniqueAsset(const QModelIndex& index); + protected: bool eventFilter( QObject* sender, QEvent* event); diff --git a/src/qt/forms/assetsdialog.ui b/src/qt/forms/assetsdialog.ui index 009d4160db..ffe44aafe0 100644 --- a/src/qt/forms/assetsdialog.ui +++ b/src/qt/forms/assetsdialog.ui @@ -34,52 +34,6 @@ 40 - - - - QLayout::SetDefaultConstraint - - - - - Mine Block - - - - - - - 1 - - - 1000 - - - 10 - - - 1 - - - 10 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - @@ -651,7 +605,7 @@ 0 0 964 - 98 + 165 diff --git a/src/qt/forms/createassetdialog.ui b/src/qt/forms/createassetdialog.ui index 0420d94ef6..b9280bf965 100644 --- a/src/qt/forms/createassetdialog.ui +++ b/src/qt/forms/createassetdialog.ui @@ -723,61 +723,45 @@ - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 60 - 20 - - - - - - - - - - - - Units: - - - - - - - How divisble the assets will be (e.g. 8 = 1.00000000, 2 = 1.00) - - - 8 - - - - - - - e.g. 1 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + Units: + + + + + + + How divisble the assets will be (e.g. 8 = 1.00000000, 2 = 1.00) + + + 8 + + + + + + + e.g. 1 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + @@ -865,6 +849,21 @@ QFrame::Raised + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + @@ -1344,6 +1343,12 @@ + + + 150 + 0 + + Create Asset diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui index ac89239f87..b5dabc91c3 100644 --- a/src/qt/forms/optionsdialog.ui +++ b/src/qt/forms/optionsdialog.ui @@ -20,7 +20,7 @@ - 4 + 0 @@ -638,6 +638,9 @@ Enable Dark Mode + + true + diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index 10a3c83c6f..bb39e4adc6 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -17,966 +17,835 @@ false - - - - true - - - QLabel { background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop:0 #F0D0A0, stop:1 #F8D488); color:#000000; } - - - true - - - 3 - - - Qt::TextSelectableByMouse - - - - + - 34 - - - QLayout::SetMaximumSize + 0 - 40 + 0 - 40 + 0 - 40 + 0 - 40 + 0 - + + + 40 + + + 40 + + + + + PushButton + + + false + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 34 + + QLayout::SetMaximumSize + + + 40 + + + 40 + - 0 + 40 + + + 40 - - - - 0 - 0 - + + + 34 - - QFrame::NoFrame - - - QFrame::Raised - - - 10 + + 0 - - - 12 - - - + + + + + 0 + 0 + + + + QFrame::NoFrame + + + QFrame::Raised + + + 10 + + + + 12 + - - - - 75 - true - - - - RVN Balances - - + + + + + + 75 + true + + + + RVN Balances + + + + + + + true + + + + 30 + 16777215 + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Raven network after a connection is established, but this process has not completed yet. + + + + + + + :/icons/warning + :/icons/warning:/icons/warning + + + + 24 + 24 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Qt::LeftArrow + + + + - - - true - - - - 30 - 16777215 - - - - The displayed information may be out of date. Your wallet automatically synchronizes with the Raven network after a connection is established, but this process has not completed yet. - - - - - - - :/icons/warning - :/icons/warning:/icons/warning - - - - 24 - 24 - - - - true + + + Qt::Horizontal - + + + 12 + + + + + + 50 + false + + + + IBeamCursor + + + Mined balance in watch-only addresses that has not yet matured + + + 0.000 000 00 RVN + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Available: + + + + + + + + 50 + false + + + + IBeamCursor + + + Your current balance in watch-only addresses + + + 0.000 000 00 RVN + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 50 + false + + + + IBeamCursor + + + Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance + + + 0.000 000 00 RVN + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 0 + 0 + + + + + 140 + 0 + + + + Qt::Horizontal + + + + + + + Spendable: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Immature: + + + + + + + + 75 + true + + + + IBeamCursor + + + Current total balance in watch-only addresses + + + 0.000 000 00 RVN + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Horizontal + + + + + + + Watch-only: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 75 + true + + + + IBeamCursor + + + Your current total balance + + + 0.000 000 00 RVN + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 50 + false + + + + IBeamCursor + + + Your current spendable balance + + + 0.000 000 00 RVN + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Pending: + + + + + + + Total: + + + + + + + + 50 + false + + + + IBeamCursor + + + Mined balance that has not yet matured + + + 0.000 000 00 RVN + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 50 + false + + + + IBeamCursor + + + Unconfirmed transactions to watch-only addresses + + + 0.000 000 00 RVN + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + + + + + false + + + + - Qt::Horizontal + Qt::Vertical - 40 - 20 + 20 + 87 - - - - - Qt::Horizontal - - - - - + + + + + + true + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + 12 - - - - - 50 - false - - - - IBeamCursor - - - Mined balance in watch-only addresses that has not yet matured - - - 0.000 000 00 RVN - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Available: - - - - - - - - 50 - false - - - - IBeamCursor - - - Your current balance in watch-only addresses - - - 0.000 000 00 RVN - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 50 - false - - - - IBeamCursor - - - Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance - - - 0.000 000 00 RVN - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 0 - 0 - - - - - 140 - 0 - - - - Qt::Horizontal - - - - - - - Spendable: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Immature: - - - - - - - - 75 - true - - - - IBeamCursor - - - Current total balance in watch-only addresses - - - 0.000 000 00 RVN - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - + + + + + + + 75 + true + + + + Asset Balances + + + + + + + true + + + + 30 + 16777215 + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Raven network after a connection is established, but this process has not completed yet. + + + + + + + :/icons/warning + :/icons/warning:/icons/warning + + + + 24 + 24 + + + + true + + + + + + + + 0 + 0 + + + + + 0 + 30 + + + + + 16777215 + 30 + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 13 + + + + 32 + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + Search + + + true + + + + - - + + Qt::Horizontal - - - - Watch-only: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 75 - true - - - - IBeamCursor - - - Your current total balance - - - 0.000 000 00 RVN - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 50 - false - - - - IBeamCursor - - - Your current spendable balance - - - 0.000 000 00 RVN - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - Pending: - - - - - - - Total: - - - - - - - - 50 - false - - - - IBeamCursor - - - Mined balance that has not yet matured - - - 0.000 000 00 RVN - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 50 - false - - - - IBeamCursor - - - Unconfirmed transactions to watch-only addresses - - - 0.000 000 00 RVN - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - - - - - false - - - - - - Qt::Vertical - - - - 20 - 87 - - - - - - - - - - - true - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - - 12 - - - - - - - - 75 - true - - - - Asset Balances - - - - - - true + + + QFrame::NoFrame - - - 30 - 16777215 - - - - The displayed information may be out of date. Your wallet automatically synchronizes with the Raven network after a connection is established, but this process has not completed yet. - - - - - - - :/icons/warning - :/icons/warning:/icons/warning - - - - 24 - 24 - + + 0 - - true + + QAbstractItemView::ScrollPerItem - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 0 - 30 - - - - - 16777215 - 30 - - - - - 0 - 0 - - - - - 13 - - - - 32 - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - Search - - - true - + + + false + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + - - - - - Qt::Horizontal - - - - - - - QFrame::NoFrame - - - 0 - - - QAbstractItemView::ScrollPerItem - - - - - - - false - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - + + + - - - - - - 34 - - - 0 - - - - QFrame::NoFrame - - - QFrame::Plain + + + 34 - + 0 - - - 12 - - - - - Qt::Vertical - - - - 20 - 40 - + + + + + 0 + 0 + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + + 12 - - - - - - - - - 75 - true - - - - Recent transactions - - + + + + + + + 75 + true + + + + Recent transactions + + + + + + + true + + + + 30 + 16777215 + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Raven network after a connection is established, but this process has not completed yet. + + + + + + + :/icons/warning + :/icons/warning:/icons/warning + + + + 24 + 24 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - true - - - - 30 - 16777215 - + + + + QListView { background: transparent; } - - The displayed information may be out of date. Your wallet automatically synchronizes with the Raven network after a connection is established, but this process has not completed yet. + + QFrame::NoFrame - - + + Qt::ScrollBarAlwaysOff - - - :/icons/warning - :/icons/warning:/icons/warning + + Qt::ScrollBarAlwaysOff - - - 24 - 24 - - - - true + + QAbstractItemView::NoSelection - - + + Qt::Horizontal - - - 40 - 20 - - - + - - - - - QListView { background: transparent; } - - - QFrame::NoFrame - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractItemView::NoSelection - - - - - - - Qt::Horizontal - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - TextLabel - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - TextLabel - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - TextLabel - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - TextLabel - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - TextLabel - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - + + - Qt::Horizontal + Qt::Vertical - 40 - 20 + 20 + 40 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::LeftToRight - - - Asset Information - - - Qt::AlignCenter - - - - - - - TextLabel - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - TextLabel - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - + + + + true + + + QLabel { background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop:0 #F0D0A0, stop:1 #F8D488); color:#000000; } + + + true + + + 3 + + + Qt::TextSelectableByMouse + + + diff --git a/src/qt/forms/receiverequestdialog.ui b/src/qt/forms/receiverequestdialog.ui index 4163f4189c..df197d6c3e 100644 --- a/src/qt/forms/receiverequestdialog.ui +++ b/src/qt/forms/receiverequestdialog.ui @@ -6,8 +6,8 @@ 0 0 - 487 - 597 + 478 + 446 diff --git a/src/qt/forms/reissueassetdialog.ui b/src/qt/forms/reissueassetdialog.ui index 1fff836f90..0a8899b28a 100644 --- a/src/qt/forms/reissueassetdialog.ui +++ b/src/qt/forms/reissueassetdialog.ui @@ -6,8 +6,8 @@ 0 0 - 1144 - 1088 + 932 + 1051 @@ -991,13 +991,28 @@ QFrame::Raised + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + 0 - 0 + 10 0 @@ -1470,6 +1485,12 @@ + + + 150 + 0 + + Reissue Asset diff --git a/src/qt/forms/sendassetsentry.ui b/src/qt/forms/sendassetsentry.ui index f9da2a5ebd..b70d7e120d 100644 --- a/src/qt/forms/sendassetsentry.ui +++ b/src/qt/forms/sendassetsentry.ui @@ -21,7 +21,7 @@ - This is a normal payment. + This is an asset payment QFrame::NoFrame @@ -39,24 +39,14 @@ 8 - - - - - - - - - + + - &Label: + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - addAsLabel - @@ -66,6 +56,16 @@ + + + + Asset: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + @@ -89,20 +89,30 @@ - - + + + + + + + + + - + &Label: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + addAsLabel + - - + + - Asset: + Message: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -143,26 +153,6 @@ - - - - A message that was attached to the raven: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Raven network. - - - Qt::PlainText - - - - - - - Message: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - @@ -250,6 +240,16 @@ + + + + A message that was attached to the raven: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Raven network. + + + Qt::PlainText + + + diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index e8868bfa60..a8d7d2164a 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -86,20 +86,50 @@ namespace GUIUtil { QFont getSubLabelFont() { QFont labelSubFont; - labelSubFont.setFamily("Arial"); + labelSubFont.setFamily("Open Sans"); + labelSubFont.setWeight(QFont::Weight::ExtraLight); labelSubFont.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.6); labelSubFont.setPixelSize(14); - labelSubFont.setBold(false); return labelSubFont; } +QFont getSubLabelFontBolded() +{ + QFont labelSubFont; + labelSubFont.setFamily("Open Sans"); + labelSubFont.setWeight(QFont::Weight::Bold); + labelSubFont.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.6); + labelSubFont.setPixelSize(14); + return labelSubFont; +} + +QFont getTopLabelFontBolded() +{ + QFont labelTopFont; + labelTopFont.setFamily("Open Sans"); + labelTopFont.setWeight(QFont::Weight::Bold); + labelTopFont.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.6); + labelTopFont.setPixelSize(18); + return labelTopFont; +} + +QFont getTopLabelFont(int weight, int pxsize) +{ + QFont labelTopFont; + labelTopFont.setFamily("Open Sans"); + labelTopFont.setWeight(weight); + labelTopFont.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.6); + labelTopFont.setPixelSize(pxsize); + return labelTopFont; +} + QFont getTopLabelFont() { QFont labelTopFont; - labelTopFont.setFamily("Arial"); - labelTopFont.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, 0.3); + labelTopFont.setFamily("Open Sans"); + labelTopFont.setWeight(QFont::Weight::Light); + labelTopFont.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.6); labelTopFont.setPixelSize(18); - labelTopFont.setBold(true); return labelTopFont; } @@ -159,7 +189,7 @@ void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent) { parent->setFocusProxy(widget); - widget->setFont(fixedPitchFont()); + widget->setFont(getSubLabelFont()); #if QT_VERSION >= 0x040700 // We don't want translators to use own addresses in translations // and this is the only place, where this address is supplied. @@ -642,8 +672,9 @@ TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer(QTableView* t lastColumnIndex = columnCount - 1; secondToLastColumnIndex = columnCount - 2; tableView->horizontalHeader()->setMinimumSectionSize(allColumnsMinimumWidth); - setViewHeaderResizeMode(secondToLastColumnIndex, QHeaderView::Interactive); - setViewHeaderResizeMode(lastColumnIndex, QHeaderView::Interactive); + setViewHeaderResizeMode(columnCount - 3, QHeaderView::ResizeToContents); + setViewHeaderResizeMode(secondToLastColumnIndex, QHeaderView::ResizeToContents); + setViewHeaderResizeMode(lastColumnIndex, QHeaderView::Stretch); } #ifdef WIN32 diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index bf5d9c6e3a..6a9454f918 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -37,9 +37,12 @@ namespace GUIUtil { // Get the font for the sub labels QFont getSubLabelFont(); + QFont getSubLabelFontBolded(); // Get the font for the main labels QFont getTopLabelFont(); + QFont getTopLabelFontBolded(); + QFont getTopLabelFont(int weight, int pxsize); QGraphicsDropShadowEffect* getShadowEffect(); diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index cef026cc9a..cc5d3c8375 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -77,6 +77,7 @@ class TxViewDelegate : public QAbstractItemDelegate amountText = QString("[") + amountText + QString("]"); } + painter->setFont(GUIUtil::getSubLabelFont()); // Concatenate the strings if needed before painting GUIUtil::concatenate(painter, address, painter->fontMetrics().width(amountText), addressRect.left(), addressRect.right()); @@ -209,16 +210,16 @@ Q_OBJECT /** Create the font that is used for painting the asset name */ QFont nameFont; - nameFont.setFamily("Arial"); + nameFont.setFamily("Open Sans"); nameFont.setPixelSize(18); - nameFont.setWeight(400); + nameFont.setWeight(QFont::Weight::Normal); nameFont.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.4); /** Create the font that is used for painting the asset amount */ QFont amountFont; - amountFont.setFamily("Arial"); + amountFont.setFamily("Open Sans"); amountFont.setPixelSize(14); - amountFont.setWeight(600); + amountFont.setWeight(QFont::Weight::Normal); amountFont.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.3); /** Get the name and formatted amount from the data */ @@ -226,29 +227,30 @@ Q_OBJECT QString amountText = index.data(AssetTableModel::FormattedAmountRole).toString(); // Setup the pens - QPen penAmount(COLOR_ASSET_TEXT, 10, Qt::SolidLine, Qt::FlatCap, Qt::RoundJoin); - QPen penAssetName(COLOR_ASSET_TEXT, 10, Qt::SolidLine, Qt::FlatCap, Qt::RoundJoin); + QColor textColor = COLOR_WHITE; + if (darkModeEnabled) + textColor = COLOR_TOOLBAR_SELECTED_TEXT_DARK_MODE; + + QPen penName(textColor); /** Start Concatenation of Asset Name */ // Get the width in pixels that the amount takes up (because they are different font, // we need to do this before we call the concatenate function painter->setFont(amountFont); - painter->setPen(penAmount); int amount_width = painter->fontMetrics().width(amountText); // Set the painter for the font used for the asset name, so that the concatenate function estimated width correctly painter->setFont(nameFont); - painter->setPen(penAssetName); GUIUtil::concatenate(painter, name, amount_width, assetNameRect.left(), amountRect.right()); /** Paint the asset name */ + painter->setPen(penName); painter->drawText(assetNameRect, Qt::AlignLeft|Qt::AlignVCenter, name); + /** Paint the amount */ - painter->setPen(penAmount); painter->setFont(amountFont); - painter->setOpacity(0.65); painter->drawText(amountRect, Qt::AlignRight|Qt::AlignVCenter, amountText); painter->restore(); @@ -265,6 +267,7 @@ Q_OBJECT }; #include "overviewpage.moc" #include "ravengui.h" +#include OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent) : QWidget(parent), @@ -301,7 +304,6 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent) ui->listAssets->setMinimumHeight(5 * (42 + 2)); ui->listAssets->viewport()->setAutoFillBackground(false); - // Delay before filtering assetes in ms static const int input_filter_delay = 200; @@ -314,6 +316,8 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent) connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SLOT(handleTransactionClicked(QModelIndex))); connect(ui->listAssets, SIGNAL(clicked(QModelIndex)), this, SLOT(handleAssetClicked(QModelIndex))); + connect(ui->testTotalRaven, SIGNAL(clicked()), this, SLOT(totalRVNClicked())); + connect(ui->rvnBalanceBack, SIGNAL(clicked()), this, SLOT(totalBackRVNClicked())); // start with displaying the "out of sync" warnings showOutOfSyncWarning(true); @@ -326,9 +330,6 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent) ui->frame->setStyleSheet(QString(".QFrame {background-color: %1; padding-bottom: 10px; padding-right: 5px;}").arg(platformStyle->WidgetBackGroundColor().name())); ui->frame_2->setStyleSheet(QString(".QFrame {background-color: %1; padding-left: 5px;}").arg(platformStyle->WidgetBackGroundColor().name())); -// ui->verticalLayout_2->setSpacing(10); -// ui->verticalLayout_3->setSpacing(10); - /** Create the shadow effects on the frames */ ui->assetFrame->setGraphicsEffect(GUIUtil::getShadowEffect()); ui->frame->setGraphicsEffect(GUIUtil::getShadowEffect()); @@ -350,6 +351,25 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent) ui->assetBalanceLabel->setFont(GUIUtil::getTopLabelFont()); ui->recentTransactionsLabel->setFont(GUIUtil::getTopLabelFont()); + /** Update the sub labels font */ + ui->labelBalanceText->setFont(GUIUtil::getSubLabelFont()); + ui->labelPendingText->setFont(GUIUtil::getSubLabelFont()); + ui->labelImmatureText->setFont(GUIUtil::getSubLabelFont()); + ui->labelSpendable->setFont(GUIUtil::getSubLabelFont()); + ui->labelWatchonly->setFont(GUIUtil::getSubLabelFont()); + ui->labelBalance->setFont(GUIUtil::getSubLabelFont()); + ui->labelUnconfirmed->setFont(GUIUtil::getSubLabelFont()); + ui->labelImmature->setFont(GUIUtil::getSubLabelFont()); + ui->labelWatchAvailable->setFont(GUIUtil::getSubLabelFont()); + ui->labelWatchPending->setFont(GUIUtil::getSubLabelFont()); + ui->labelWatchImmature->setFont(GUIUtil::getSubLabelFont()); + ui->labelTotalText->setFont(GUIUtil::getSubLabelFont()); + ui->labelTotal->setFont(GUIUtil::getTopLabelFontBolded()); + ui->labelWatchTotal->setFont(GUIUtil::getTopLabelFontBolded()); + + /** Hide the asset total frame */ + ui->frame->hide(); + /** Create the search bar for assets */ ui->assetSearch->setAttribute(Qt::WA_MacShowFocusRect, 0); ui->assetSearch->setStyleSheet(".QLineEdit {border: 1px solid #4960ad; border-radius: 5px;}"); @@ -361,40 +381,36 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent) QFontMetrics fm = QFontMetrics(ui->assetSearch->font()); ui->assetSearch->setFixedHeight(fm.height()+ 5); - /** Setup the asset info grid labels and values */ - ui->assetInfoTitleLabel->setText("" + tr("Asset Activation Status") + ""); - ui->assetInfoPercentageLabel->setText(tr("Current Percentage") + ":"); - ui->assetInfoStatusLabel->setText(tr("Status") + ":"); - ui->assetInfoBlockLabel->setText(tr("Target Percentage") + ":"); - ui->assetInfoPossibleLabel->setText(tr("Could Vote Pass") + ":"); - ui->assetInfoBlocksLeftLabel->setText(tr("Voting Block Cycle") + ":"); - - ui->assetInfoTitleLabel->setStyleSheet("background-color: transparent"); - ui->assetInfoPercentageLabel->setStyleSheet("background-color: transparent"); - ui->assetInfoStatusLabel->setStyleSheet("background-color: transparent"); - ui->assetInfoBlockLabel->setStyleSheet("background-color: transparent"); - ui->assetInfoPossibleLabel->setStyleSheet("background-color: transparent"); - ui->assetInfoBlocksLeftLabel->setStyleSheet("background-color: transparent"); - - ui->assetInfoPercentageValue->setStyleSheet("background-color: transparent"); - ui->assetInfoStatusValue->setStyleSheet("background-color: transparent"); - ui->assetInfoBlockValue->setStyleSheet("background-color: transparent"); - ui->assetInfoPossibleValue->setStyleSheet("background-color: transparent"); - ui->assetInfoBlocksLeftValue->setStyleSheet("background-color: transparent"); - - /** Setup the RVN Balance Colors for darkmode */ - QString labelColor = QString(".QLabel { color: %1 }").arg(platformStyle->TextColor().name()); - ui->labelBalance->setStyleSheet(labelColor); - ui->labelUnconfirmed->setStyleSheet(labelColor); - ui->labelImmature->setStyleSheet(labelColor); - ui->labelTotal->setStyleSheet(labelColor); - ui->labelWatchAvailable->setStyleSheet(labelColor); - ui->labelWatchPending->setStyleSheet(labelColor); - ui->labelWatchImmature->setStyleSheet(labelColor); - ui->labelWatchTotal->setStyleSheet(labelColor); - // Trigger the call to show the assets table if assets are active showAssets(); + + + // context menu actions + sendAction = new QAction(tr("Send Asset"), this); + QAction *copyAmountAction = new QAction(tr("Copy Amount"), this); + QAction *copyNameAction = new QAction(tr("Copy Name"), this); + issueSub = new QAction(tr("Issue Sub Asset"), this); + issueUnique = new QAction(tr("Issue Unique Asset"), this); + reissue = new QAction(tr("Reissue Asset"), this); + + + sendAction->setObjectName("Send"); + issueSub->setObjectName("Sub"); + issueUnique->setObjectName("Unique"); + reissue->setObjectName("Reissue"); + copyNameAction->setObjectName("Copy Name"); + copyAmountAction->setObjectName("Copy Amount"); + + // context menu + contextMenu = new QMenu(this); + contextMenu->addAction(sendAction); + contextMenu->addAction(issueSub); + contextMenu->addAction(issueUnique); + contextMenu->addAction(reissue); + contextMenu->addSeparator(); + contextMenu->addAction(copyNameAction); + contextMenu->addAction(copyAmountAction); + // context menu signals } void OverviewPage::handleTransactionClicked(const QModelIndex &index) @@ -405,8 +421,52 @@ void OverviewPage::handleTransactionClicked(const QModelIndex &index) void OverviewPage::handleAssetClicked(const QModelIndex &index) { - if(assetFilter) - Q_EMIT assetClicked(assetFilter->mapToSource(index)); + if(assetFilter) { + + + QString name = index.data(AssetTableModel::AssetNameRole).toString(); + bool fOwner = false; + if (IsAssetNameAnOwner(name.toStdString())) { + fOwner = true; + name = name.left(name.size() - 1); + sendAction->setDisabled(true); + } else { + sendAction->setDisabled(false); + } + + if (!index.data(AssetTableModel::AdministratorRole).toBool()) { + issueSub->setDisabled(true); + issueUnique->setDisabled(true); + reissue->setDisabled(true); + } else { + issueSub->setDisabled(false); + issueUnique->setDisabled(false); + reissue->setDisabled(true); + CNewAsset asset; + if (passets && passets->GetAssetMetaDataIfExists(name.toStdString(), asset)) + if (asset.nReissuable) + reissue->setDisabled(false); + + } + + QAction* action = contextMenu->exec(QCursor::pos()); + + if (action) { + if (action->objectName() == "Send") + Q_EMIT assetSendClicked(assetFilter->mapToSource(index)); + else if (action->objectName() == "Sub") + Q_EMIT assetIssueSubClicked(assetFilter->mapToSource(index)); + else if (action->objectName() == "Unique") + Q_EMIT assetIssueUniqueClicked(assetFilter->mapToSource(index)); + else if (action->objectName() == "Reissue") + Q_EMIT assetReissueClicked(assetFilter->mapToSource(index)); + else if (action->objectName() == "Copy Name") + GUIUtil::setClipboard(index.data(AssetTableModel::AssetNameRole).toString()); + else if (action->objectName() == "Copy Amount") + GUIUtil::setClipboard(index.data(AssetTableModel::FormattedAmountRole).toString()); + } + } + } void OverviewPage::handleOutOfSyncWarningClicks() @@ -437,6 +497,9 @@ void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmed ui->labelWatchImmature->setText(RavenUnits::formatWithUnit(unit, watchImmatureBalance, false, RavenUnits::separatorAlways)); ui->labelWatchTotal->setText(RavenUnits::formatWithUnit(unit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, RavenUnits::separatorAlways)); + ui->testTotalRaven->setText(RavenUnits::formatWithUnit(unit, balance + unconfirmedBalance + immatureBalance, false, RavenUnits::separatorAlways)); + ui->testTotalRaven->setFont(GUIUtil::getTopLabelFont(QFont::Weight::Bold, 26)); + // only show immature (newly mined) balance if it's non-zero, so as not to complicate things // for the non-mining users bool showImmature = immatureBalance != 0; @@ -564,130 +627,23 @@ void OverviewPage::showAssets() ui->assetVerticalSpaceWidget->show(); ui->assetVerticalSpaceWidget2->show(); } - - displayAssetInfo(); } -void OverviewPage::displayAssetInfo() +void OverviewPage::assetSearchChanged() { - const ThresholdState thresholdState = VersionBitsTipState(Params().GetConsensus(), - Consensus::DeploymentPos::DEPLOYMENT_ASSETS); - auto startTime = Params().GetConsensus().vDeployments[Consensus::DeploymentPos::DEPLOYMENT_ASSETS].nStartTime * 1000; - auto currentTime = GetTimeMillis(); - auto date = GUIUtil::dateTimeStr(startTime / 1000); - - QString status; - switch (thresholdState) { - case THRESHOLD_DEFINED: - if (currentTime < startTime) - status = tr("Waiting until ") + date; - else { - auto cycleWidth = Params().GetConsensus().nMinerConfirmationWindow; - QString currentCount; - currentCount.sprintf("%d of %d blocks", chainActive.Height() % cycleWidth, cycleWidth); - status = tr("Waiting - ") + currentCount; - } - break; - case THRESHOLD_STARTED: - status = tr("Voting Started"); - break; - case THRESHOLD_LOCKED_IN: - status = tr("Locked in - Not Active"); - break; - case THRESHOLD_ACTIVE: - status = tr("Active"); - break; - case THRESHOLD_FAILED: - status = tr("Failed"); - break; - } - - if (thresholdState == THRESHOLD_ACTIVE) { - hideAssetInfo(); + if (!assetFilter) return; - } - - ui->assetInfoStatusValue->setText(status); - - // Get the current height of the chain - auto currentheight = chainActive.Height(); - - auto heightLockedIn = VersionBitsTipStateSinceHeight(Params().GetConsensus(), - Consensus::DeploymentPos::DEPLOYMENT_ASSETS); - auto cycleWidth = Params().GetConsensus().nMinerConfirmationWindow; - auto difference = (currentheight - heightLockedIn + 1) % cycleWidth; - QString currentCount; - currentCount.sprintf("%d/%d blocks", difference, cycleWidth); - - if (thresholdState == THRESHOLD_STARTED) { - BIP9Stats statsStruct = VersionBitsTipStatistics(Params().GetConsensus(), - Consensus::DeploymentPos::DEPLOYMENT_ASSETS); - - double targetDouble = double(statsStruct.threshold) / double(statsStruct.period); - QString targetPercentage; - targetPercentage.sprintf("%0.2f%%", targetDouble * 100); - ui->assetInfoBlockValue->setText(targetPercentage); - - double currentDouble = double(statsStruct.count) / double(statsStruct.period); - QString currentPercentage; - currentPercentage.sprintf("%0.2f%%", currentDouble * 100); - ui->assetInfoPercentageValue->setText(currentPercentage); - - QString possible = statsStruct.possible ? tr("yes") : tr("no"); - ui->assetInfoPossibleValue->setText(possible); - - ui->assetInfoBlocksLeftValue->setText(currentCount); - - ui->assetInfoPercentageValue->show(); - ui->assetInfoBlockValue->show(); - ui->assetInfoPercentageLabel->show(); - ui->assetInfoBlockLabel->show(); - ui->assetInfoPossibleLabel->show(); - ui->assetInfoPossibleValue->show(); - ui->assetInfoBlocksLeftLabel->show(); - ui->assetInfoBlocksLeftValue->show(); - } else if (thresholdState == THRESHOLD_LOCKED_IN) { - - ui->assetInfoBlockLabel->setText(tr("Active in") + ":"); - ui->assetInfoBlockValue->setText(currentCount); - - ui->assetInfoPercentageValue->hide(); - ui->assetInfoPercentageLabel->hide(); - ui->assetInfoPossibleLabel->hide(); - ui->assetInfoPossibleValue->hide(); - ui->assetInfoBlocksLeftLabel->hide(); - ui->assetInfoBlocksLeftValue->hide(); - } else { - ui->assetInfoPercentageValue->hide(); - ui->assetInfoBlockValue->hide(); - ui->assetInfoPercentageLabel->hide(); - ui->assetInfoBlockLabel->hide(); - ui->assetInfoPossibleLabel->hide(); - ui->assetInfoPossibleValue->hide(); - ui->assetInfoBlocksLeftLabel->hide(); - ui->assetInfoBlocksLeftValue->hide(); - } + assetFilter->setAssetNamePrefix(ui->assetSearch->text()); } -void OverviewPage::hideAssetInfo() +void OverviewPage::totalRVNClicked() { - ui->assetInfoPercentageValue->hide(); - ui->assetInfoBlockValue->hide(); - ui->assetInfoStatusValue->hide(); - ui->assetInfoPossibleValue->hide(); - ui->assetInfoBlocksLeftValue->hide(); - - ui->assetInfoTitleLabel->hide(); - ui->assetInfoBlockLabel->hide(); - ui->assetInfoStatusLabel->hide(); - ui->assetInfoPercentageLabel->hide(); - ui->assetInfoPossibleLabel->hide(); - ui->assetInfoBlocksLeftLabel->hide(); + ui->frame->show(); + ui->testTotalRaven->hide(); } -void OverviewPage::assetSearchChanged() +void OverviewPage::totalBackRVNClicked() { - if (!assetFilter) - return; - assetFilter->setAssetNamePrefix(ui->assetSearch->text()); + ui->frame->hide(); + ui->testTotalRaven->show(); } diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h index 105164a058..aa5ffbc4a2 100644 --- a/src/qt/overviewpage.h +++ b/src/qt/overviewpage.h @@ -10,6 +10,7 @@ #include #include +#include #include class ClientModel; @@ -42,8 +43,6 @@ class OverviewPage : public QWidget void setWalletModel(WalletModel *walletModel); void showOutOfSyncWarning(bool fShow); void showAssets(); - void displayAssetInfo(); - void hideAssetInfo(); public Q_SLOTS: void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, @@ -51,7 +50,10 @@ public Q_SLOTS: Q_SIGNALS: void transactionClicked(const QModelIndex &index); - void assetClicked(const QModelIndex &index); + void assetSendClicked(const QModelIndex &index); + void assetIssueSubClicked(const QModelIndex &index); + void assetIssueUniqueClicked(const QModelIndex &index); + void assetReissueClicked(const QModelIndex &index); void outOfSyncWarningClicked(); private: @@ -70,6 +72,12 @@ public Q_SLOTS: std::unique_ptr assetFilter; AssetViewDelegate *assetdelegate; + QMenu *contextMenu; + QAction *sendAction; + QAction *issueSub; + QAction *issueUnique; + QAction *reissue; + private Q_SLOTS: void updateDisplayUnit(); @@ -79,6 +87,8 @@ private Q_SLOTS: void updateWatchOnlyLabels(bool showWatchOnly); void handleOutOfSyncWarningClicks(); void assetSearchChanged(); + void totalRVNClicked(); + void totalBackRVNClicked(); }; #endif // RAVEN_QT_OVERVIEWPAGE_H diff --git a/src/qt/platformstyle.cpp b/src/qt/platformstyle.cpp index f146a75715..dcf71f93f5 100644 --- a/src/qt/platformstyle.cpp +++ b/src/qt/platformstyle.cpp @@ -157,7 +157,7 @@ QIcon PlatformStyle::TextColorIcon(const QIcon& icon) const QColor PlatformStyle::TextColor() const { if (darkModeEnabled) - return COLOR_ASSET_TEXT; + return COLOR_TOOLBAR_SELECTED_TEXT_DARK_MODE; return textColor; } diff --git a/src/qt/raven.cpp b/src/qt/raven.cpp index add0d2ba16..5b2bd19bcc 100644 --- a/src/qt/raven.cpp +++ b/src/qt/raven.cpp @@ -54,6 +54,7 @@ #include #include #include +#include #if defined(QT_STATICPLUGIN) #include @@ -394,8 +395,8 @@ void RavenApplication::createOptionsModel(bool resetSettings) void RavenApplication::createWindow(const NetworkStyle *networkStyle) { window = new RavenGUI(platformStyle, networkStyle, 0); - window->setMinimumSize(900,900); - window->setBaseSize(900,900); + window->setMinimumSize(200,200); + window->setBaseSize(640,640); pollShutdownTimer = new QTimer(window); connect(pollShutdownTimer, SIGNAL(timeout()), window, SLOT(detectShutdown())); @@ -706,6 +707,7 @@ int main(int argc, char *argv[]) } else { app.setStyle(""); } + // Subscribe to global signals from core uiInterface.InitMessage.connect(InitMessage); diff --git a/src/qt/raven.qrc b/src/qt/raven.qrc index 51521ad169..6ad8abf2fd 100644 --- a/src/qt/raven.qrc +++ b/src/qt/raven.qrc @@ -133,4 +133,16 @@ res/darkstyle/icon_radiobutton_checked_disabled.png res/darkstyle/icon_radiobutton_unchecked_disabled.png + + res/fonts/OpenSans-Bold.ttf + res/fonts/OpenSans-BoldItalic.ttf + res/fonts/OpenSans-ExtraBold.ttf + res/fonts/OpenSans-ExtraBoldItalic.ttf + res/fonts/OpenSans-Italic.ttf + res/fonts/OpenSans-Light.ttf + res/fonts/OpenSans-LightItalic.ttf + res/fonts/OpenSans-Regular.ttf + res/fonts/OpenSans-SemiBold.ttf + res/fonts/OpenSans-SemiBoldItalic.ttf + diff --git a/src/qt/ravengui.cpp b/src/qt/ravengui.cpp index 1c28174bc8..e6a76055a6 100644 --- a/src/qt/ravengui.cpp +++ b/src/qt/ravengui.cpp @@ -75,6 +75,7 @@ #include #include #include +#include #endif @@ -209,6 +210,10 @@ RavenGUI::RavenGUI(const PlatformStyle *_platformStyle, const NetworkStyle *netw // Accept D&D of URIs setAcceptDrops(true); + loadFonts(); + + this->setFont(QFont("Open Sans")); + // Create actions for the toolbar, menu bar and tray/dock icon // Needs walletFrame to be initialized createActions(); @@ -316,13 +321,28 @@ RavenGUI::~RavenGUI() delete rpcConsole; } +void RavenGUI::loadFonts() +{ + QFontDatabase::addApplicationFont(":/fonts/opensans-bold"); + QFontDatabase::addApplicationFont(":/fonts/opensans-bolditalic"); + QFontDatabase::addApplicationFont(":/fonts/opensans-extrabold"); + QFontDatabase::addApplicationFont(":/fonts/opensans-extrabolditalic"); + QFontDatabase::addApplicationFont(":/fonts/opensans-italic"); + QFontDatabase::addApplicationFont(":/fonts/opensans-light"); + QFontDatabase::addApplicationFont(":/fonts/opensans-lightitalic"); + QFontDatabase::addApplicationFont(":/fonts/opensans-regular"); + QFontDatabase::addApplicationFont(":/fonts/opensans-semibold"); + QFontDatabase::addApplicationFont(":/fonts/opensans-semibolditalic"); +} + + void RavenGUI::createActions() { QFont font = QFont(); - font.setPixelSize(25); - font.setWeight(400); - font.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.8); - font.setFamily("Arial"); + font.setPixelSize(22); + font.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.43); + font.setFamily("Open Sans"); + font.setWeight(QFont::Weight::ExtraLight); QActionGroup *tabGroup = new QActionGroup(this); @@ -591,7 +611,7 @@ void RavenGUI::createToolBars() /** RVN START */ QString tbStyleSheet = ".QToolBar {background-color : transparent; border-color: transparent; } " ".QToolButton {background-color: transparent; border-color: transparent; width: 249px; color: %1; border: none;} " - ".QToolButton:checked {background: none; background-color: none; selection-background-color: none; color: %2; border: none;} " + ".QToolButton:checked {background: none; background-color: none; selection-background-color: none; color: %2; border: none; font: normal 22pt \"Open Sans\";} " ".QToolButton:hover {background: none; background-color: none; border: none; color: %3;} " ".QToolButton:disabled {color: gray;}"; @@ -620,9 +640,9 @@ void RavenGUI::createToolBars() /** Create the shadow effects for the main wallet frame. Make it so it puts a shadow on the tool bar */ QGraphicsDropShadowEffect *walletFrameShadow = new QGraphicsDropShadowEffect; - walletFrameShadow->setBlurRadius(8.0); - walletFrameShadow->setColor(platformStyle->ShadowColor()); - walletFrameShadow->setXOffset(-9.0); + walletFrameShadow->setBlurRadius(50); + walletFrameShadow->setColor(darkModeEnabled ? QColor("8E8E8E") : COLOR_SHADOW_LIGHT); + walletFrameShadow->setXOffset(-8.0); walletFrameShadow->setYOffset(0); mainWalletWidget->setGraphicsEffect(walletFrameShadow); @@ -635,7 +655,8 @@ void RavenGUI::createToolBars() headerWidget->setFixedHeight(75); QFont currentMarketFont; - currentMarketFont.setFamily("Arial"); + currentMarketFont.setFamily("Open Sans"); + currentMarketFont.setWeight(QFont::Weight::Normal); currentMarketFont.setLetterSpacing(QFont::SpacingType::AbsoluteSpacing, -0.6); currentMarketFont.setPixelSize(18); @@ -649,7 +670,7 @@ void RavenGUI::createToolBars() labelCurrentMarket->setAlignment(Qt::AlignVCenter); labelCurrentMarket->setStyleSheet(COLOR_LABEL_STRING); labelCurrentMarket->setFont(currentMarketFont); - labelCurrentMarket->setText(tr("Market Price")); + labelCurrentMarket->setText(tr("Ravencoin Market Price ")); QString currentPriceStyleSheet = ".QLabel{color: %1;}"; labelCurrentPrice->setContentsMargins(25,0,0,0); @@ -1076,12 +1097,6 @@ void RavenGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVerif modalOverlay->tipUpdate(count, blockDate, nVerificationProgress); } -#ifdef ENABLE_WALLET - if(walletFrame) - { - walletFrame->displayAssetInfo(); - } -#endif // ENABLE_WALLET if (!clientModel) return; diff --git a/src/qt/ravengui.h b/src/qt/ravengui.h index 9a31a15222..2f206316b0 100644 --- a/src/qt/ravengui.h +++ b/src/qt/ravengui.h @@ -142,6 +142,8 @@ class RavenGUI : public QMainWindow const PlatformStyle *platformStyle; + /** Load the custome open sans fonts into the font database */ + void loadFonts(); /** Create the main UI actions. */ void createActions(); /** Create the menu bar and sub-menus. */ diff --git a/src/qt/receivecoinsdialog.cpp b/src/qt/receivecoinsdialog.cpp index 590f348046..aece98a57b 100644 --- a/src/qt/receivecoinsdialog.cpp +++ b/src/qt/receivecoinsdialog.cpp @@ -151,7 +151,18 @@ void ReceiveCoinsDialog::setupRequestFrame(const PlatformStyle *platformStyle) ui->label_7->setStyleSheet(COLOR_LABEL_STRING); ui->label_7->setFont(GUIUtil::getSubLabelFont()); - ui->reuseAddress->setStyleSheet(COLOR_LABEL_STRING); + ui->reuseAddress->setStyleSheet(QString(".QCheckBox{ %1; }").arg(COLOR_LABEL_STRING)); + ui->reqLabel->setFont(GUIUtil::getSubLabelFont()); + ui->reqAmount->setFont(GUIUtil::getSubLabelFont()); + ui->reqMessage->setFont(GUIUtil::getSubLabelFont()); + ui->receiveButton->setFont(GUIUtil::getSubLabelFont()); + ui->clearButton->setFont(GUIUtil::getSubLabelFont()); + ui->recentRequestsView->setFont(GUIUtil::getSubLabelFont()); + ui->showRequestButton->setFont(GUIUtil::getSubLabelFont()); + ui->removeRequestButton->setFont(GUIUtil::getSubLabelFont()); + ui->label_5->setFont(GUIUtil::getSubLabelFont()); + + ui->label_6->setFont(GUIUtil::getSubLabelFontBolded()); } void ReceiveCoinsDialog::setupHistoryFrame(const PlatformStyle *platformStyle) @@ -167,6 +178,8 @@ void ReceiveCoinsDialog::setupHistoryFrame(const PlatformStyle *platformStyle) ui->recentRequestsView->setGraphicsEffect(GUIUtil::getShadowEffect()); ui->recentRequestsView->setStyleSheet(".QTableView {border: none;}"); + contextMenu->setFont(GUIUtil::getSubLabelFont()); + } void ReceiveCoinsDialog::updateDisplayUnit() diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp index 6481fdfad5..b56a2f4cc5 100644 --- a/src/qt/receiverequestdialog.cpp +++ b/src/qt/receiverequestdialog.cpp @@ -103,6 +103,12 @@ ReceiveRequestDialog::ReceiveRequestDialog(QWidget *parent) : #endif connect(ui->btnSaveAs, SIGNAL(clicked()), ui->lblQRCode, SLOT(saveImage())); + + ui->outUri->setFont(GUIUtil::getSubLabelFont()); + ui->btnCopyURI->setFont(GUIUtil::getSubLabelFont()); + ui->btnCopyAddress->setFont(GUIUtil::getSubLabelFont()); + ui->btnSaveAs->setFont(GUIUtil::getSubLabelFont()); + ui->buttonBox->setFont(GUIUtil::getSubLabelFont()); } ReceiveRequestDialog::~ReceiveRequestDialog() diff --git a/src/qt/reissueassetdialog.cpp b/src/qt/reissueassetdialog.cpp index e1268c25b9..3b7ef1cc78 100644 --- a/src/qt/reissueassetdialog.cpp +++ b/src/qt/reissueassetdialog.cpp @@ -8,6 +8,7 @@ #include "ui_reissueassetdialog.h" #include "platformstyle.h" #include "walletmodel.h" +#include "assettablemodel.h" #include "addresstablemodel.h" #include "core_io.h" #include "univalue.h" @@ -292,6 +293,18 @@ void ReissueAssetDialog::setupCoinControlFrame(const PlatformStyle *platformStyl // Align the Custom change address checkbox ui->checkBoxCoinControlChange->setStyleSheet(QString(".QCheckBox{ %1; }").arg(COLOR_LABEL_STRING)); + ui->labelCoinControlQuantity->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlAmount->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlAfterFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlBytes->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlLowOutput->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlChange->setFont(GUIUtil::getSubLabelFont()); + ui->checkBoxCoinControlChange->setFont(GUIUtil::getSubLabelFont()); + ui->lineEditCoinControlChange->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlInsuffFunds->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlAutomaticallySelected->setFont(GUIUtil::getSubLabelFont()); + } void ReissueAssetDialog::setupAssetDataView(const PlatformStyle *platformStyle) @@ -347,6 +360,24 @@ void ReissueAssetDialog::setupFeeControl(const PlatformStyle *platformStyle) ui->radioCustomFee->setStyleSheet(COLOR_LABEL_STRING); ui->checkBoxMinimumFee->setStyleSheet(QString(".QCheckBox{ %1; }").arg(COLOR_LABEL_STRING)); + ui->buttonChooseFee->setFont(GUIUtil::getSubLabelFont()); + ui->fallbackFeeWarningLabel->setFont(GUIUtil::getSubLabelFont()); + ui->buttonMinimizeFee->setFont(GUIUtil::getSubLabelFont()); + ui->radioSmartFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee2->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee3->setFont(GUIUtil::getSubLabelFont()); + ui->confTargetSelector->setFont(GUIUtil::getSubLabelFont()); + ui->radioCustomFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelCustomPerKilobyte->setFont(GUIUtil::getSubLabelFont()); + ui->customFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelMinFeeWarning->setFont(GUIUtil::getSubLabelFont()); + ui->optInRBF->setFont(GUIUtil::getSubLabelFont()); + ui->reissueAssetButton->setFont(GUIUtil::getSubLabelFont()); + ui->clearButton->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelFeeEstimation->setFont(GUIUtil::getSubLabelFont()); + ui->labelFeeMinimized->setFont(GUIUtil::getSubLabelFont()); + } void ReissueAssetDialog::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, @@ -358,6 +389,9 @@ void ReissueAssetDialog::setBalance(const CAmount& balance, const CAmount& uncon Q_UNUSED(watchUnconfirmedBalance); Q_UNUSED(watchImmatureBalance); + ui->labelBalance->setFont(GUIUtil::getSubLabelFont()); + ui->label->setFont(GUIUtil::getSubLabelFont()); + if(model && model->getOptionsModel()) { ui->labelBalance->setText(RavenUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), balance)); @@ -1163,3 +1197,17 @@ void ReissueAssetDialog::onClearButtonClicked() { clear(); } + +void ReissueAssetDialog::focusReissueAsset(const QModelIndex &index) +{ + clear(); + + QString name = index.data(AssetTableModel::AssetNameRole).toString(); + if (IsAssetNameAnOwner(name.toStdString())) + name = name.left(name.size() - 1); + + ui->comboBox->setCurrentIndex(ui->comboBox->findText(name)); + onAssetSelected(ui->comboBox->currentIndex()); + + ui->quantitySpinBox->setFocus(); +} diff --git a/src/qt/reissueassetdialog.h b/src/qt/reissueassetdialog.h index e01ad8a73d..a9e57cc7f7 100644 --- a/src/qt/reissueassetdialog.h +++ b/src/qt/reissueassetdialog.h @@ -123,6 +123,8 @@ private Q_SLOTS: const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance); void updateDisplayUnit(); + void focusReissueAsset(const QModelIndex &index); + Q_SIGNALS: // Fired when a message should be reported to the user void message(const QString &title, const QString &message, unsigned int style); diff --git a/src/qt/res/fonts/OpenSans-Bold.ttf b/src/qt/res/fonts/OpenSans-Bold.ttf new file mode 100755 index 0000000000..7b52945603 Binary files /dev/null and b/src/qt/res/fonts/OpenSans-Bold.ttf differ diff --git a/src/qt/res/fonts/OpenSans-BoldItalic.ttf b/src/qt/res/fonts/OpenSans-BoldItalic.ttf new file mode 100755 index 0000000000..a670e14265 Binary files /dev/null and b/src/qt/res/fonts/OpenSans-BoldItalic.ttf differ diff --git a/src/qt/res/fonts/OpenSans-ExtraBold.ttf b/src/qt/res/fonts/OpenSans-ExtraBold.ttf new file mode 100755 index 0000000000..3660681d39 Binary files /dev/null and b/src/qt/res/fonts/OpenSans-ExtraBold.ttf differ diff --git a/src/qt/res/fonts/OpenSans-ExtraBoldItalic.ttf b/src/qt/res/fonts/OpenSans-ExtraBoldItalic.ttf new file mode 100755 index 0000000000..8c4c15d88a Binary files /dev/null and b/src/qt/res/fonts/OpenSans-ExtraBoldItalic.ttf differ diff --git a/src/qt/res/fonts/OpenSans-Italic.ttf b/src/qt/res/fonts/OpenSans-Italic.ttf new file mode 100755 index 0000000000..e6c5414173 Binary files /dev/null and b/src/qt/res/fonts/OpenSans-Italic.ttf differ diff --git a/src/qt/res/fonts/OpenSans-Light.ttf b/src/qt/res/fonts/OpenSans-Light.ttf new file mode 100755 index 0000000000..563872c768 Binary files /dev/null and b/src/qt/res/fonts/OpenSans-Light.ttf differ diff --git a/src/qt/res/fonts/OpenSans-LightItalic.ttf b/src/qt/res/fonts/OpenSans-LightItalic.ttf new file mode 100755 index 0000000000..5ebe2a2994 Binary files /dev/null and b/src/qt/res/fonts/OpenSans-LightItalic.ttf differ diff --git a/src/qt/res/fonts/OpenSans-Regular.ttf b/src/qt/res/fonts/OpenSans-Regular.ttf new file mode 100755 index 0000000000..2e31d02424 Binary files /dev/null and b/src/qt/res/fonts/OpenSans-Regular.ttf differ diff --git a/src/qt/res/fonts/OpenSans-SemiBold.ttf b/src/qt/res/fonts/OpenSans-SemiBold.ttf new file mode 100755 index 0000000000..99db86aa02 Binary files /dev/null and b/src/qt/res/fonts/OpenSans-SemiBold.ttf differ diff --git a/src/qt/res/fonts/OpenSans-SemiBoldItalic.ttf b/src/qt/res/fonts/OpenSans-SemiBoldItalic.ttf new file mode 100755 index 0000000000..8cad4e32f3 Binary files /dev/null and b/src/qt/res/fonts/OpenSans-SemiBoldItalic.ttf differ diff --git a/src/qt/sendassetsentry.cpp b/src/qt/sendassetsentry.cpp index c23088221f..1366f34228 100644 --- a/src/qt/sendassetsentry.cpp +++ b/src/qt/sendassetsentry.cpp @@ -116,6 +116,17 @@ SendAssetsEntry::SendAssetsEntry(const PlatformStyle *_platformStyle, const QStr ui->payAssetAmount->setUnit(MAX_UNIT); ui->payAssetAmount->setDisabled(false); + + ui->administratorCheckbox->setStyleSheet(QString(".QCheckBox{ %1; }").arg(COLOR_LABEL_STRING)); + + ui->assetSelectionBox->setFont(GUIUtil::getSubLabelFont()); + ui->administratorCheckbox->setFont(GUIUtil::getSubLabelFont()); + ui->payTo->setFont(GUIUtil::getSubLabelFont()); + ui->addAsLabel->setFont(GUIUtil::getSubLabelFont()); + ui->payAssetAmount->setFont(GUIUtil::getSubLabelFont()); + ui->messageTextLabel->setFont(GUIUtil::getSubLabelFont()); + ui->assetAmountLabel->setFont(GUIUtil::getSubLabelFont()); + ui->ownershipWarningMessage->setFont(GUIUtil::getSubLabelFont()); } SendAssetsEntry::~SendAssetsEntry() diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 9efe6a95be..f0168c8e20 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -242,6 +242,19 @@ void SendCoinsDialog::setupCoinControl(const PlatformStyle *platformStyle) // Align the Custom change address checkbox ui->checkBoxCoinControlChange->setStyleSheet(COLOR_LABEL_STRING); + + ui->labelCoinControlQuantity->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlAmount->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlAfterFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlBytes->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlLowOutput->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlChange->setFont(GUIUtil::getSubLabelFont()); + ui->checkBoxCoinControlChange->setFont(GUIUtil::getSubLabelFont()); + ui->lineEditCoinControlChange->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlInsuffFunds->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlAutomaticallySelected->setFont(GUIUtil::getSubLabelFont()); + ui->labelCoinControlChangeLabel->setFont(GUIUtil::getSubLabelFontBolded()); } void SendCoinsDialog::setupScrollView(const PlatformStyle *platformStyle) @@ -272,6 +285,25 @@ void SendCoinsDialog::setupFeeControl(const PlatformStyle *platformStyle) ui->radioCustomFee->setStyleSheet(COLOR_LABEL_STRING); ui->checkBoxMinimumFee->setStyleSheet(COLOR_LABEL_STRING); + + ui->buttonChooseFee->setFont(GUIUtil::getSubLabelFont()); + ui->fallbackFeeWarningLabel->setFont(GUIUtil::getSubLabelFont()); + ui->buttonMinimizeFee->setFont(GUIUtil::getSubLabelFont()); + ui->radioSmartFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee2->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee3->setFont(GUIUtil::getSubLabelFont()); + ui->confTargetSelector->setFont(GUIUtil::getSubLabelFont()); + ui->radioCustomFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelCustomPerKilobyte->setFont(GUIUtil::getSubLabelFont()); + ui->customFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelMinFeeWarning->setFont(GUIUtil::getSubLabelFont()); + ui->optInRBF->setFont(GUIUtil::getSubLabelFont()); + ui->sendButton->setFont(GUIUtil::getSubLabelFont()); + ui->clearButton->setFont(GUIUtil::getSubLabelFont()); + ui->addButton->setFont(GUIUtil::getSubLabelFont()); + ui->labelSmartFee->setFont(GUIUtil::getSubLabelFont()); + ui->labelFeeEstimation->setFont(GUIUtil::getSubLabelFont()); + ui->labelFeeMinimized->setFont(GUIUtil::getSubLabelFont()); } void SendCoinsDialog::on_sendButton_clicked() @@ -574,6 +606,10 @@ void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfir Q_UNUSED(watchUnconfirmedBalance); Q_UNUSED(watchImmatureBalance); + + ui->labelBalance->setFont(GUIUtil::getSubLabelFont()); + ui->label->setFont(GUIUtil::getSubLabelFont()); + if(model && model->getOptionsModel()) { ui->labelBalance->setText(RavenUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), balance)); diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index 5c8918eaa8..b96c86c480 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -44,7 +44,7 @@ SendCoinsEntry::SendCoinsEntry(const PlatformStyle *_platformStyle, QWidget *par // normal raven address field GUIUtil::setupAddressWidget(ui->payTo, this); // just a label for displaying raven address(es) - ui->payTo_is->setFont(GUIUtil::fixedPitchFont()); + ui->payTo_is->setFont(GUIUtil::getSubLabelFont()); // Connect signals connect(ui->payAmount, SIGNAL(valueChanged()), this, SIGNAL(payAmountChanged())); @@ -69,7 +69,11 @@ SendCoinsEntry::SendCoinsEntry(const PlatformStyle *_platformStyle, QWidget *par ui->messageLabel->setStyleSheet(COLOR_LABEL_STRING); ui->messageLabel->setFont(GUIUtil::getSubLabelFont()); - ui->checkboxSubtractFeeFromAmount->setStyleSheet(COLOR_LABEL_STRING); + ui->checkboxSubtractFeeFromAmount->setStyleSheet(QString(".QCheckBox{ %1; }").arg(COLOR_LABEL_STRING)); + ui->payTo->setFont(GUIUtil::getSubLabelFont()); + ui->addAsLabel->setFont(GUIUtil::getSubLabelFont()); + ui->payAmount->setFont(GUIUtil::getSubLabelFont()); + ui->messageTextLabel->setFont(GUIUtil::getSubLabelFont()); } SendCoinsEntry::~SendCoinsEntry() diff --git a/src/qt/transactiondescdialog.cpp b/src/qt/transactiondescdialog.cpp index 163d0634bd..bc7f778e4d 100644 --- a/src/qt/transactiondescdialog.cpp +++ b/src/qt/transactiondescdialog.cpp @@ -8,6 +8,7 @@ #include "transactiontablemodel.h" +#include "guiutil.h" #include TransactionDescDialog::TransactionDescDialog(const QModelIndex &idx, QWidget *parent) : @@ -18,6 +19,8 @@ TransactionDescDialog::TransactionDescDialog(const QModelIndex &idx, QWidget *pa setWindowTitle(tr("Details for %1").arg(idx.data(TransactionTableModel::TxIDRole).toString())); QString desc = idx.data(TransactionTableModel::LongDescriptionRole).toString(); ui->detailText->setHtml(desc); + + ui->detailText->setFont(GUIUtil::getSubLabelFont()); } TransactionDescDialog::~TransactionDescDialog() diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 7e28a18ec7..5f42762d02 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -228,6 +228,15 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa // Trigger the call to show the assets table if assets are active showingAssets = false; showAssets(); + + dateWidget->setFont(GUIUtil::getSubLabelFont()); + typeWidget->setFont(GUIUtil::getSubLabelFont()); + addressWidget->setFont(GUIUtil::getSubLabelFont()); + amountWidget->setFont(GUIUtil::getSubLabelFont()); + assetNameWidget->setFont(GUIUtil::getSubLabelFont()); + contextMenu->setFont(GUIUtil::getSubLabelFont()); + transactionView->setFont(GUIUtil::getSubLabelFont()); + } void TransactionView::setModel(WalletModel *_model) @@ -257,6 +266,7 @@ void TransactionView::setModel(WalletModel *_model) transactionView->setColumnWidth(TransactionTableModel::Date, DATE_COLUMN_WIDTH); transactionView->setColumnWidth(TransactionTableModel::Type, TYPE_COLUMN_WIDTH); transactionView->setColumnWidth(TransactionTableModel::Amount, AMOUNT_MINIMUM_COLUMN_WIDTH); + transactionView->setColumnWidth(TransactionTableModel::AssetName, AMOUNT_MINIMUM_COLUMN_WIDTH); columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(transactionView, AMOUNT_MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH, this); diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index 392c16309e..88b87ae51c 100644 --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -226,10 +226,3 @@ void WalletFrame::gotoManageAssetsPage() for (i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i) i.value()->gotoManageAssetsPage(); } - -void WalletFrame::displayAssetInfo() -{ - QMap::const_iterator i; - for (i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i) - i.value()->displayAssetInfo(); -} diff --git a/src/qt/walletframe.h b/src/qt/walletframe.h index 866a43098c..061269fee8 100644 --- a/src/qt/walletframe.h +++ b/src/qt/walletframe.h @@ -46,8 +46,6 @@ class WalletFrame : public QFrame void showOutOfSyncWarning(bool fShow); - void displayAssetInfo(); - Q_SIGNALS: /** Notify that the user has requested more information about the out-of-sync warning */ void requestedSyncWarningInfo(); diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index 01a67d48b7..a2de45fb95 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -59,7 +59,6 @@ WalletView::WalletView(const PlatformStyle *_platformStyle, QWidget *parent): hbox_buttons->addWidget(exportButton); vbox->addLayout(hbox_buttons); transactionsPage->setLayout(vbox); - receiveCoinsPage = new ReceiveCoinsDialog(platformStyle); sendCoinsPage = new SendCoinsDialog(platformStyle); @@ -100,7 +99,10 @@ WalletView::WalletView(const PlatformStyle *_platformStyle, QWidget *parent): connect(assetsPage, SIGNAL(message(QString,QString,unsigned int)), this, SIGNAL(message(QString,QString,unsigned int))); connect(createAssetsPage, SIGNAL(message(QString,QString,unsigned int)), this, SIGNAL(message(QString,QString,unsigned int))); connect(manageAssetsPage, SIGNAL(message(QString,QString,unsigned int)), this, SIGNAL(message(QString,QString,unsigned int))); - connect(overviewPage, SIGNAL(assetClicked(QModelIndex)), assetsPage, SLOT(focusAsset(QModelIndex))); + connect(overviewPage, SIGNAL(assetSendClicked(QModelIndex)), assetsPage, SLOT(focusAsset(QModelIndex))); + connect(overviewPage, SIGNAL(assetIssueSubClicked(QModelIndex)), createAssetsPage, SLOT(focusSubAsset(QModelIndex))); + connect(overviewPage, SIGNAL(assetIssueUniqueClicked(QModelIndex)), createAssetsPage, SLOT(focusUniqueAsset(QModelIndex))); + connect(overviewPage, SIGNAL(assetReissueClicked(QModelIndex)), manageAssetsPage, SLOT(focusReissueAsset(QModelIndex))); /** RNV END */ } @@ -115,8 +117,17 @@ void WalletView::setRavenGUI(RavenGUI *gui) // Clicking on a transaction on the overview page simply sends you to transaction history page connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), gui, SLOT(gotoHistoryPage())); - // Clicking on a asset on the overviewpage simply sends you to the assets page - connect(overviewPage, SIGNAL(assetClicked(QModelIndex)), gui, SLOT(gotoAssetsPage())); + // Clicking on a asset menu item Send + connect(overviewPage, SIGNAL(assetSendClicked(QModelIndex)), gui, SLOT(gotoAssetsPage())); + + // Clicking on a asset menu item Issue Sub + connect(overviewPage, SIGNAL(assetIssueSubClicked(QModelIndex)), gui, SLOT(gotoCreateAssetsPage())); + + // Clicking on a asset menu item Issue Unique + connect(overviewPage, SIGNAL(assetIssueUniqueClicked(QModelIndex)), gui, SLOT(gotoCreateAssetsPage())); + + // Clicking on a asset menu item Reissue + connect(overviewPage, SIGNAL(assetReissueClicked(QModelIndex)), gui, SLOT(gotoManageAssetsPage())); // Receive and report messages connect(this, SIGNAL(message(QString,QString,unsigned int)), gui, SLOT(message(QString,QString,unsigned int))); @@ -401,10 +412,4 @@ void WalletView::gotoManageAssetsPage() { setCurrentWidget(manageAssetsPage); } - -void WalletView::displayAssetInfo() -{ - overviewPage->displayAssetInfo(); - Q_EMIT checkAssets(); -} /** RVN END */ \ No newline at end of file diff --git a/src/qt/walletview.h b/src/qt/walletview.h index 2d3ce25984..69b171fbb9 100644 --- a/src/qt/walletview.h +++ b/src/qt/walletview.h @@ -58,8 +58,6 @@ class WalletView : public QStackedWidget void showOutOfSyncWarning(bool fShow); - void displayAssetInfo(); - private: ClientModel *clientModel; WalletModel *walletModel;