From 2a19773cc0ec0247bac5ac7677a6dd0cc3235b19 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 10 Jun 2020 21:33:54 +0200 Subject: [PATCH 01/16] qt: Draw a border around net traffic graph --- src/qt/trafficgraphwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp index 0754dc9c1b31..c371e5800a0f 100644 --- a/src/qt/trafficgraphwidget.cpp +++ b/src/qt/trafficgraphwidget.cpp @@ -79,6 +79,9 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *) { QPainter painter(this); QRect drawRect = rect(); + // First draw the border + painter.fillRect(drawRect, GUIUtil::getThemedQColor(GUIUtil::ThemedColor::BORDER_WIDGET)); + drawRect.adjust(1, 1, -1, -1); painter.fillRect(drawRect, GUIUtil::getThemedQColor(GUIUtil::ThemedColor::BACKGROUND_WIDGET)); if(fMax <= 0.0f) return; From 567e038797a770717f70d9bc162f847f1d4db608 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 1 Jul 2020 17:26:21 +0200 Subject: [PATCH 02/16] qt: ReceiveRequestDialog - Improve QR code image - Fix issue with bluriness - Refine sizing/layout of QR code and address - Adjust coloring to match the themes --- src/qt/receiverequestdialog.cpp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp index 2d42b01beb6e..b8dd10517184 100644 --- a/src/qt/receiverequestdialog.cpp +++ b/src/qt/receiverequestdialog.cpp @@ -165,34 +165,39 @@ void ReceiveRequestDialog::update() ui->lblQRCode->setText(tr("Error encoding URI into QR Code.")); return; } - QImage qrImage = QImage(code->width + 8, code->width + 8, QImage::Format_RGB32); + QImage qrImage = QImage(code->width + 6, code->width + 6, QImage::Format_RGB32); qrImage.fill(GUIUtil::getThemedQColor(GUIUtil::ThemedColor::BACKGROUND_WIDGET)); unsigned char *p = code->data; for (int y = 0; y < code->width; y++) { for (int x = 0; x < code->width; x++) { - qrImage.setPixel(x + 4, y + 4, ((*p & 1) ? GUIUtil::getThemedQColor(GUIUtil::ThemedColor::QR_PIXEL).rgb() : GUIUtil::getThemedQColor(GUIUtil::ThemedColor::BACKGROUND_WIDGET).rgb())); + qrImage.setPixel(x + 3, y + 3, ((*p & 1) ? GUIUtil::getThemedQColor(GUIUtil::ThemedColor::QR_PIXEL).rgb() : GUIUtil::getThemedQColor(GUIUtil::ThemedColor::BACKGROUND_WIDGET).rgb())); p++; } } QRcode_free(code); - - QImage qrAddrImage = QImage(QR_IMAGE_SIZE, QR_IMAGE_SIZE+20, QImage::Format_RGB32); - qrAddrImage.fill(GUIUtil::getThemedQColor(GUIUtil::ThemedColor::BORDER_WIDGET)); + // Create the image with respect to the device pixel ratio + int qrAddrImageWidth = QR_IMAGE_SIZE; + int qrAddrImageHeight = QR_IMAGE_SIZE + 20; + qreal scale = qApp->devicePixelRatio(); + QImage qrAddrImage = QImage(qrAddrImageWidth * scale, qrAddrImageHeight * scale, QImage::Format_RGB32); + qrAddrImage.setDevicePixelRatio(scale); QPainter painter(&qrAddrImage); - QRect paddedRect = qrAddrImage.rect().adjusted(1, 1, -1, -1); + // Fill the whole image with border color + qrAddrImage.fill(GUIUtil::getThemedQColor(GUIUtil::ThemedColor::BORDER_WIDGET)); + // Create a 2px/2px smaller rect and fill it with background color to keep the 1px border with the border color + QRect paddedRect = QRect(1, 1, qrAddrImageWidth - 2, qrAddrImageHeight - 2); painter.fillRect(paddedRect, GUIUtil::getThemedQColor(GUIUtil::ThemedColor::BACKGROUND_WIDGET)); - painter.drawImage(1, 1, qrImage.scaled(QR_IMAGE_SIZE - 2, QR_IMAGE_SIZE - 2)); - QFont font = GUIUtil::fixedPitchFont(); - + painter.drawImage(2, 2, qrImage.scaled(QR_IMAGE_SIZE - 4, QR_IMAGE_SIZE - 4)); // calculate ideal font size - qreal font_size = GUIUtil::calculateIdealFontSize(paddedRect.width() - 20, info.address, font); + QFont font = GUIUtil::fixedPitchFont(); + qreal font_size = GUIUtil::calculateIdealFontSize((paddedRect.width() - 20), info.address, font); font.setPointSizeF(font_size); - + // paint the address painter.setFont(font); - paddedRect.setHeight(QR_IMAGE_SIZE); painter.setPen(GUIUtil::getThemedQColor(GUIUtil::ThemedColor::QR_PIXEL)); + paddedRect.setHeight(QR_IMAGE_SIZE + 3); painter.drawText(paddedRect, Qt::AlignBottom|Qt::AlignCenter, info.address); painter.end(); From 67f7a7238685f287ed24ffdf1af3517a1d742deb Mon Sep 17 00:00:00 2001 From: xdustinface Date: Fri, 5 Jun 2020 21:11:04 +0200 Subject: [PATCH 03/16] qt: Give the TransactionView's instantsendWidget a name Required to access it in css --- src/qt/transactionview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 982c6a3edba2..7578cb2cdef1 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -69,6 +69,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa instantsendWidget->addItem(tr("All"), TransactionFilterProxy::InstantSendFilter_All); instantsendWidget->addItem(tr("Locked by InstantSend"), TransactionFilterProxy::InstantSendFilter_Yes); instantsendWidget->addItem(tr("Not locked by InstantSend"), TransactionFilterProxy::InstantSendFilter_No); + instantsendWidget->setObjectName("instantsendWidget"); hlayout->addWidget(instantsendWidget); dateWidget = new QComboBox(this); From 148611f6120e22ec6e1680dac2c2a68a011fb519 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Tue, 9 Jun 2020 15:55:25 +0200 Subject: [PATCH 04/16] qt: Rename conflicting label in SendCoinsDialog - Was named the same as the the label in EditAddressDialog so it couldn't be accessed properly in css --- src/qt/forms/sendcoinsdialog.ui | 2 +- src/qt/sendcoinsdialog.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui index b1e08ca05c93..2d302bc20fd9 100644 --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -1136,7 +1136,7 @@ 3 - + Balance: diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index d2cf188c0b89..7119a6d33308 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -78,7 +78,7 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p }, GUIUtil::FontWeight::Bold); GUIUtil::setFont({ui->labelBalance, - ui->label + ui->labelBalanceText }, GUIUtil::FontWeight::Bold, 14); GUIUtil::setFont({ui->labelCoinControlFeatures From 522c0c3dc2dd984ed06a6ae0139aacf76f45ddf0 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Tue, 9 Jun 2020 02:01:42 +0200 Subject: [PATCH 05/16] qt: Give the TransactionView's search field the first focus on startup --- src/qt/transactionview.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 7578cb2cdef1..d1151c3f121f 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -722,6 +722,14 @@ bool TransactionView::eventFilter(QObject *obj, QEvent *event) return true; } } + if (event->type() == QEvent::Show) { + //Give the search field the first focus on startup + static bool fGotFirstFocus = false; + if (!fGotFirstFocus) { + search_widget->setFocus(); + fGotFirstFocus = true; + } + } return QWidget::eventFilter(obj, event); } From d1600a84a31f16f9b2c5820b276cebd1d680a32d Mon Sep 17 00:00:00 2001 From: xdustinface Date: Tue, 9 Jun 2020 13:27:54 +0200 Subject: [PATCH 06/16] qt: Some updates to the PrivateSend widget on the OverviewPage - Hide denom labels if inactive - Enable wordwrap for denom label - Add some spacer - Make sure it gets its basic initialization on startup --- src/qt/forms/overviewpage.ui | 87 ++++++++++++++++++++++++++++-------- src/qt/overviewpage.cpp | 19 +++++++- src/qt/overviewpage.h | 2 +- 3 files changed, 86 insertions(+), 22 deletions(-) diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index 3be30dad4a46..616a6c151813 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -475,37 +475,86 @@ n/a + + true + + + + + (Last Message) + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + - - - (Last Message) - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true + + + 0 - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + Start/Stop Mixing + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - 0 - 0 - + + + Qt::Vertical - - Start/Stop Mixing + + + 20 + 40 + - + diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index c44b1c998f97..4e82f79acb2b 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -305,6 +305,9 @@ void OverviewPage::setWalletModel(WalletModel *model) // explicitly update PS frame and transaction list to reflect actual settings updateAdvancedPSUI(model->getOptionsModel()->getShowAdvancedPSUI()); + // Initialize PS UI + privateSendStatus(true); + if(!privateSendClient.fEnablePrivateSend) return; connect(model->getOptionsModel(), SIGNAL(privateSendRoundsChanged()), this, SLOT(updatePrivateSendProgress())); @@ -470,12 +473,22 @@ void OverviewPage::updateAdvancedPSUI(bool fShowAdvancedPSUI) { ui->labelPrivateSendLastMessage->setVisible(fShowAdvancedPSUI); } -void OverviewPage::privateSendStatus() +void OverviewPage::privateSendStatus(bool fForce) { - if(!masternodeSync.IsBlockchainSynced() || ShutdownRequested()) return; + if (!fForce && (!masternodeSync.IsBlockchainSynced() || ShutdownRequested())) return; if(!walletModel) return; + auto tempWidgets = {ui->labelSubmittedDenomText, + ui->labelSubmittedDenom, + ui->labelPrivateSendLastMessage}; + + auto setWidgetsVisible = [&](bool fVisible) { + for (const auto& it : tempWidgets) { + it->setVisible(fVisible); + } + }; + static int64_t nLastDSProgressBlockTime = 0; int nBestHeight = clientModel->getNumBlocks(); @@ -496,6 +509,7 @@ void OverviewPage::privateSendStatus() } ui->labelPrivateSendLastMessage->setText(""); + setWidgetsVisible(false); ui->togglePrivateSend->setText(tr("Start Mixing")); QString strEnabled = tr("Disabled"); @@ -581,6 +595,7 @@ void OverviewPage::privateSendStatus() if(s != ui->labelPrivateSendLastMessage->text()) LogPrint(BCLog::PRIVATESEND, "OverviewPage::privateSendStatus -- Last PrivateSend message: %s\n", strStatus.toStdString()); + setWidgetsVisible(true); ui->labelPrivateSendLastMessage->setText(s); ui->labelSubmittedDenom->setText(QString(privateSendClient.GetSessionDenoms().c_str())); diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h index b77ad49c70bf..ff64edfe501f 100644 --- a/src/qt/overviewpage.h +++ b/src/qt/overviewpage.h @@ -38,7 +38,7 @@ class OverviewPage : public QWidget void showOutOfSyncWarning(bool fShow); public Q_SLOTS: - void privateSendStatus(); + void privateSendStatus(bool fForce = false); void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, const CAmount& anonymizedBalance, const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance); From 4d28b6097df6de4d8361d46e0933c7ab9abe9db3 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 17 Jun 2020 01:49:40 +0200 Subject: [PATCH 07/16] qt: Fix some layout issues in SendCoinsDialog's UI file. - Added some margins for fee selection radio buttons to align them centered to their options - Removed a weird placed spacer --- src/qt/forms/sendcoinsdialog.ui | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui index 2d302bc20fd9..4341f2297688 100644 --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -778,8 +778,11 @@ 6 + + 3 + - + @@ -855,6 +858,12 @@ + + 20 + + + 3 + @@ -885,6 +894,9 @@ + + 30 + @@ -916,7 +928,10 @@ 6 - 2 + 0 + + + 3 @@ -976,19 +991,6 @@ - - - - Qt::Vertical - - - - 1 - 1 - - - - From 71381014d09a2fb4eee37bf59a86569daf6004e3 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Tue, 23 Jun 2020 01:35:30 +0200 Subject: [PATCH 08/16] qt: Fix vertical alignment of the two balance labels in SendCoinsDialog --- src/qt/forms/sendcoinsdialog.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui index 4341f2297688..432f3018f513 100644 --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -1147,7 +1147,7 @@ - + 0 0 From 8ad2aeeebbd2f6dd550ed89c33f50c1765c0c084 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Thu, 11 Jun 2020 16:10:51 +0200 Subject: [PATCH 09/16] qt: Add newline in textedit of receiverequest --- src/qt/receiverequestdialog.cpp | 2 +- src/qt/test/wallettests.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp index b8dd10517184..441d3662da9a 100644 --- a/src/qt/receiverequestdialog.cpp +++ b/src/qt/receiverequestdialog.cpp @@ -137,7 +137,7 @@ void ReceiveRequestDialog::update() ui->btnSaveAs->setEnabled(false); QString html; html += ""; - html += ""+tr("Payment information")+"
"; + html += "" + tr("Payment information") + "

"; html += ""+tr("URI")+": "; html += QString("" + GUIUtil::HtmlEscape(uri) + "
"; diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index 693e1f051f49..2e3a537486f1 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -185,11 +185,11 @@ void TestGUI() QString paymentText = rlist->toPlainText(); QStringList paymentTextList = paymentText.split('\n'); QCOMPARE(paymentTextList.at(0), QString("Payment information")); - QVERIFY(paymentTextList.at(1).indexOf(QString("URI: dash:")) != -1); - QVERIFY(paymentTextList.at(2).indexOf(QString("Address:")) != -1); - QCOMPARE(paymentTextList.at(3), QString("Amount: 0.00000001 ") + BitcoinUnits::name(unit)); - QCOMPARE(paymentTextList.at(4), QString("Label: TEST_LABEL_1")); - QCOMPARE(paymentTextList.at(5), QString("Message: TEST_MESSAGE_1")); + QVERIFY(paymentTextList.at(2).indexOf(QString("URI: dash:")) != -1); + QVERIFY(paymentTextList.at(3).indexOf(QString("Address:")) != -1); + QCOMPARE(paymentTextList.at(4), QString("Amount: 0.00000001 ") + BitcoinUnits::name(unit)); + QCOMPARE(paymentTextList.at(5), QString("Label: TEST_LABEL_1")); + QCOMPARE(paymentTextList.at(6), QString("Message: TEST_MESSAGE_1")); } } From 450e08d42c77f7ac03ff9bd634e85b63d4c6a376 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Tue, 23 Jun 2020 03:35:39 +0200 Subject: [PATCH 10/16] qt: OptionsDialog - Hide override hint if there is nothing overridden --- src/qt/optionsdialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index e8616864852e..33cae4e18fa4 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -163,9 +163,11 @@ void OptionsDialog::setModel(OptionsModel *_model) showRestartWarning(true); QString strLabel = _model->getOverriddenByCommandLine(); - if (strLabel.isEmpty()) - strLabel = tr("none"); - ui->overriddenByCommandLineLabel->setText(strLabel); + if (strLabel.isEmpty()) { + ui->frame->setHidden(true); + } else { + ui->overriddenByCommandLineLabel->setText(strLabel); + } mapper->setModel(_model); setMapper(); From efae41e8bb48201c6814b26adfe66f10f556520b Mon Sep 17 00:00:00 2001 From: xdustinface Date: Sun, 14 Jun 2020 19:08:13 +0200 Subject: [PATCH 11/16] qt: Allow stylesheet modifications for auto completition popup - Inheritance doesn't work here obviously because of QCompleter is parent of the popup - QStyledItemDelegate delegate is required. Without its not possible to access `::item` selectors from css. --- src/qt/rpcconsole.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 79493dab5fe6..a2268948e2d7 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -39,6 +39,7 @@ #include #include #include +#include // TODO: add a scrollback limit, as there is currently none // TODO: make it possible to filter out categories (esp debug messages when implemented) @@ -717,6 +718,9 @@ void RPCConsole::setClientModel(ClientModel *model) wordList << "help-console"; wordList.sort(); autoCompleter = new QCompleter(wordList, this); + autoCompleter->popup()->setItemDelegate(new QStyledItemDelegate(this)); + autoCompleter->popup()->setObjectName("rpcAutoCompleter"); + GUIUtil::loadStyleSheet(autoCompleter->popup()); autoCompleter->setModelSorting(QCompleter::CaseSensitivelySortedModel); ui->lineEdit->setCompleter(autoCompleter); autoCompleter->popup()->installEventFilter(this); From 35c3386c8826e0b74fd47aed722388412bfc99e2 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Mon, 13 Jul 2020 15:17:36 +0200 Subject: [PATCH 12/16] qt: Make the progress label in the status bar accessible in css --- src/qt/bitcoingui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 0418d9f88fee..f83ae398d9c3 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -218,6 +218,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle * // Progress bar and label for blocks download progressBarLabel = new QLabel(); progressBarLabel->setVisible(true); + progressBarLabel->setObjectName("lblStatusBarProgress"); progressBar = new GUIUtil::ProgressBar(); progressBar->setAlignment(Qt::AlignCenter); progressBar->setVisible(true); From 0ff45ec2c8a9fdefb1a3074659a1291c71da9bc9 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 24 Jun 2020 00:18:53 +0200 Subject: [PATCH 13/16] qt: Update weekend colors of QCalendarWidget on style changes Its obviously not possible to do this in stylesheets thats why i added this as workaround. --- src/qt/transactionview.cpp | 25 +++++++++++++++++++++++++ src/qt/transactionview.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index d1151c3f121f..3ceae8bec0bc 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -19,6 +19,7 @@ #include +#include #include #include #include @@ -33,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -646,9 +648,25 @@ QWidget *TransactionView::createDateRangeWidget() connect(dateFrom, SIGNAL(dateChanged(QDate)), this, SLOT(dateRangeChanged())); connect(dateTo, SIGNAL(dateChanged(QDate)), this, SLOT(dateRangeChanged())); + updateCalendarWidgets(); + return dateRangeWidget; } +void TransactionView::updateCalendarWidgets() +{ + auto adjustWeekEndColors = [](QCalendarWidget* w) { + QTextCharFormat format = w->weekdayTextFormat(Qt::Saturday); + format.setForeground(QBrush(GUIUtil::getThemedQColor(GUIUtil::ThemedColor::DEFAULT), Qt::SolidPattern)); + + w->setWeekdayTextFormat(Qt::Saturday, format); + w->setWeekdayTextFormat(Qt::Sunday, format); + }; + + adjustWeekEndColors(dateFrom->calendarWidget()); + adjustWeekEndColors(dateTo->calendarWidget()); +} + void TransactionView::dateRangeChanged() { if(!transactionProxyModel) @@ -710,6 +728,13 @@ void TransactionView::resizeEvent(QResizeEvent* event) columnResizingFixer->stretchColumnWidth(TransactionTableModel::ToAddress); } +void TransactionView::changeEvent(QEvent* e) +{ + if (e->type() == QEvent::StyleChange) { + updateCalendarWidgets(); + } +} + // Need to override default Ctrl+C action for amount as default behaviour is just to copy DisplayRole text bool TransactionView::eventFilter(QObject *obj, QEvent *event) { diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h index 9591027f9a35..5d4833b24213 100644 --- a/src/qt/transactionview.h +++ b/src/qt/transactionview.h @@ -82,10 +82,12 @@ class TransactionView : public QWidget QAction *abandonAction; QWidget *createDateRangeWidget(); + void updateCalendarWidgets(); GUIUtil::TableViewLastColumnResizingFixer *columnResizingFixer; virtual void resizeEvent(QResizeEvent* event) override; + void changeEvent(QEvent* e) override; bool eventFilter(QObject *obj, QEvent *event) override; From cc31977a78ffe36295dbc6c95db78e45a268707e Mon Sep 17 00:00:00 2001 From: xdustinface Date: Mon, 13 Jul 2020 15:19:01 +0200 Subject: [PATCH 14/16] qt: Load stylesheets for Intro This is the datadir selection dialog. --- src/qt/intro.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index e5be69d03cbb..0084dbf28390 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -206,6 +206,7 @@ bool Intro::pickDataDirectory() /* Let the user choose one */ Intro intro; GUIUtil::disableMacFocusRect(&intro); + GUIUtil::loadStyleSheet(&intro); intro.setDataDirectory(dataDirDefaultCurrent); intro.setWindowIcon(QIcon(":icons/bitcoin")); From 9a25fb39f6b22de389831ce9a50a0d1f76344128 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 16 Jul 2020 15:07:05 +0300 Subject: [PATCH 15/16] Drop labelPrivateSendLastMessage --- src/qt/forms/overviewpage.ui | 13 ------------- src/qt/overviewpage.cpp | 13 +------------ src/qt/res/css/general.css | 6 ------ 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index 616a6c151813..b19e91a685c5 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -482,19 +482,6 @@
- - - - (Last Message) - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 4e82f79acb2b..46e2fc69f619 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -470,7 +470,6 @@ void OverviewPage::updateAdvancedPSUI(bool fShowAdvancedPSUI) { ui->privateSendProgress->setVisible(fShowAdvancedPSUI); ui->labelSubmittedDenomText->setVisible(fShowAdvancedPSUI); ui->labelSubmittedDenom->setVisible(fShowAdvancedPSUI); - ui->labelPrivateSendLastMessage->setVisible(fShowAdvancedPSUI); } void OverviewPage::privateSendStatus(bool fForce) @@ -480,8 +479,7 @@ void OverviewPage::privateSendStatus(bool fForce) if(!walletModel) return; auto tempWidgets = {ui->labelSubmittedDenomText, - ui->labelSubmittedDenom, - ui->labelPrivateSendLastMessage}; + ui->labelSubmittedDenom}; auto setWidgetsVisible = [&](bool fVisible) { for (const auto& it : tempWidgets) { @@ -508,7 +506,6 @@ void OverviewPage::privateSendStatus(bool fForce) updatePrivateSendProgress(); } - ui->labelPrivateSendLastMessage->setText(""); setWidgetsVisible(false); ui->togglePrivateSend->setText(tr("Start Mixing")); @@ -588,15 +585,7 @@ void OverviewPage::privateSendStatus(bool fForce) updatePrivateSendProgress(); } - QString strStatus = QString(privateSendClient.GetStatuses().c_str()); - - QString s = tr("Last PrivateSend message:\n") + strStatus; - - if(s != ui->labelPrivateSendLastMessage->text()) - LogPrint(BCLog::PRIVATESEND, "OverviewPage::privateSendStatus -- Last PrivateSend message: %s\n", strStatus.toStdString()); - setWidgetsVisible(true); - ui->labelPrivateSendLastMessage->setText(s); ui->labelSubmittedDenom->setText(QString(privateSendClient.GetSessionDenoms().c_str())); } diff --git a/src/qt/res/css/general.css b/src/qt/res/css/general.css index eaa4ec341d06..b17163b6f110 100644 --- a/src/qt/res/css/general.css +++ b/src/qt/res/css/general.css @@ -1487,12 +1487,6 @@ QWidget .QFrame#framePrivateSend .QWidget#layoutWidgetLastMessageAndButtons { max-width: 451px; } -QWidget .QFrame#framePrivateSend .QLabel#labelPrivateSendLastMessage { /* PrivateSend Status Notifications */ - qproperty-alignment: 'AlignVCenter | AlignLeft'; - min-width: 288px; - min-height: 50px; -} - QWidget .QFrame#framePrivateSend .QPushButton#togglePrivateSend { /* Start PrivateSend Mixing */ margin-top: 5px; } From 81e090868e2b9a09d8778ed4fb8090d535589daf Mon Sep 17 00:00:00 2001 From: dustinface <35775977+xdustinface@users.noreply.github.com> Date: Sat, 18 Jul 2020 18:54:17 +0200 Subject: [PATCH 16/16] Add a space Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com> --- src/qt/transactionview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 3ceae8bec0bc..3ef3f3935173 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -748,7 +748,7 @@ bool TransactionView::eventFilter(QObject *obj, QEvent *event) } } if (event->type() == QEvent::Show) { - //Give the search field the first focus on startup + // Give the search field the first focus on startup static bool fGotFirstFocus = false; if (!fGotFirstFocus) { search_widget->setFocus();