diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 854257d03cf1..36cc1b17879b 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -352,8 +352,27 @@ RES_CSS = \ qt/res/css/dark.css \ qt/res/css/general.css \ qt/res/css/light.css \ - qt/res/css/scrollbars.css \ - qt/res/css/trad.css + qt/res/css/traditional.css + +RES_FONTS = \ + qt/res/fonts/Montserrat/Montserrat-Black.otf \ + qt/res/fonts/Montserrat/Montserrat-BlackItalic.otf \ + qt/res/fonts/Montserrat/Montserrat-Bold.otf \ + qt/res/fonts/Montserrat/Montserrat-BoldItalic.otf \ + qt/res/fonts/Montserrat/Montserrat-ExtraBold.otf \ + qt/res/fonts/Montserrat/Montserrat-ExtraBoldItalic.otf \ + qt/res/fonts/Montserrat/Montserrat-ExtraLight.otf \ + qt/res/fonts/Montserrat/Montserrat-ExtraLightItalic.otf \ + qt/res/fonts/Montserrat/Montserrat-Italic.otf \ + qt/res/fonts/Montserrat/Montserrat-Light.otf \ + qt/res/fonts/Montserrat/Montserrat-LightItalic.otf \ + qt/res/fonts/Montserrat/Montserrat-Medium.otf \ + qt/res/fonts/Montserrat/Montserrat-MediumItalic.otf \ + qt/res/fonts/Montserrat/Montserrat-Regular.otf \ + qt/res/fonts/Montserrat/Montserrat-SemiBold.otf \ + qt/res/fonts/Montserrat/Montserrat-SemiBoldItalic.otf \ + qt/res/fonts/Montserrat/Montserrat-Thin.otf \ + qt/res/fonts/Montserrat/Montserrat-ThinItalic.otf RES_MOVIES = $(wildcard $(srcdir)/qt/res/movies/spinner-*.png) @@ -367,7 +386,7 @@ qt_libdashqt_a_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS) qt_libdashqt_a_OBJCXXFLAGS = $(AM_OBJCXXFLAGS) $(QT_PIE_FLAGS) qt_libdashqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \ - $(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_MOVIES) + $(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_FONTS) $(RES_MOVIES) nodist_qt_libdashqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \ $(PROTOBUF_H) $(QT_QRC_CPP) $(QT_QRC_LOCALE_CPP) @@ -430,7 +449,7 @@ $(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM) $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@ @rm $(@D)/temp_$( $@ diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index 34a553540ae2..5a5fe1ac3cc9 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -143,6 +143,8 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode, connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(accept())); + + GUIUtil::updateFonts(); } AddressBookPage::~AddressBookPage() diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp index edad38b8e6a9..e156ac157378 100644 --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -28,6 +29,12 @@ AskPassphraseDialog::AskPassphraseDialog(Mode _mode, QWidget *parent) : { ui->setupUi(this); + GUIUtil::setFont({ui->capsLabel}, GUIUtil::Weight::Bold); + + GUIUtil::updateFonts(); + + GUIUtil::disableMacFocusRect(this); + ui->passEdit1->setMinimumSize(ui->passEdit1->sizeHint()); ui->passEdit2->setMinimumSize(ui->passEdit2->sizeHint()); ui->passEdit3->setMinimumSize(ui->passEdit3->sizeHint()); diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp index ab582e925970..d04594c92d6e 100644 --- a/src/qt/bitcoinamountfield.cpp +++ b/src/qt/bitcoinamountfield.cpp @@ -6,7 +6,6 @@ #include #include -#include #include #include @@ -14,71 +13,98 @@ #include #include -/** QSpinBox that uses fixed-point numbers internally and uses our own - * formatting/parsing functions. +/** + * Parse a string into a number of base monetary units and + * return validity. + * @note Must return 0 if !valid. */ -class AmountSpinBox: public QAbstractSpinBox +static CAmount parse(const QString &text, int nUnit, bool *valid_out=0) { - Q_OBJECT - -public: - explicit AmountSpinBox(QWidget *parent): - QAbstractSpinBox(parent), - currentUnit(BitcoinUnits::DASH), - singleStep(100000) // satoshis + CAmount val = 0; + bool valid = BitcoinUnits::parse(nUnit, text, &val); + if(valid) { - setAlignment(Qt::AlignRight); - - connect(lineEdit(), SIGNAL(textEdited(QString)), this, SIGNAL(valueChanged())); + if(val < 0 || val > BitcoinUnits::maxMoney()) + valid = false; } + if(valid_out) + *valid_out = valid; + return valid ? val : 0; +} + +/** Amount widget validator, checks for valid CAmount value. + */ +class AmountValidator : public QValidator +{ + Q_OBJECT + int currentUnit; +public: + explicit AmountValidator(QObject *parent) : + QValidator(parent), + currentUnit(BitcoinUnits::DASH) {} - QValidator::State validate(QString &text, int &pos) const + State validate(QString &input, int &pos) const { - if(text.isEmpty()) + if(input.isEmpty()) return QValidator::Intermediate; bool valid = false; - parse(text, &valid); + parse(input, currentUnit, &valid); /* Make sure we return Intermediate so that fixup() is called on defocus */ return valid ? QValidator::Intermediate : QValidator::Invalid; } - void fixup(QString &input) const + void updateUnit(int nUnit) + { + currentUnit = nUnit; + } +}; + +/** QLineEdit that uses fixed-point numbers internally and uses our own + * formatting/parsing functions. + */ +class AmountLineEdit: public QLineEdit +{ + Q_OBJECT + AmountValidator* amountValidator; +public: + explicit AmountLineEdit(QWidget *parent): + QLineEdit(parent), + currentUnit(BitcoinUnits::DASH) + { + setAlignment(Qt::AlignLeft); + amountValidator = new AmountValidator(this); + setValidator(amountValidator); + connect(this, SIGNAL(textEdited(QString)), this, SIGNAL(valueChanged())); + } + + void fixup(const QString &input) { bool valid = false; - CAmount val = parse(input, &valid); + CAmount val = parse(input, currentUnit, &valid); if(valid) { - input = BitcoinUnits::format(currentUnit, val, false, BitcoinUnits::separatorAlways); - lineEdit()->setText(input); + setText(BitcoinUnits::format(currentUnit, val, false, BitcoinUnits::separatorAlways)); } } CAmount value(bool *valid_out=0) const { - return parse(text(), valid_out); + return parse(text(), currentUnit, valid_out); } void setValue(const CAmount& value) { - lineEdit()->setText(BitcoinUnits::format(currentUnit, value, false, BitcoinUnits::separatorAlways)); + setText(BitcoinUnits::format(currentUnit, value, false, BitcoinUnits::separatorAlways)); Q_EMIT valueChanged(); } - void stepBy(int steps) - { - bool valid = false; - CAmount val = value(&valid); - val = val + steps * singleStep; - val = qMin(qMax(val, CAmount(0)), BitcoinUnits::maxMoney()); - setValue(val); - } - void setDisplayUnit(int unit) { bool valid = false; CAmount val = value(&valid); currentUnit = unit; + amountValidator->updateUnit(unit); if(valid) setValue(val); @@ -86,67 +112,19 @@ class AmountSpinBox: public QAbstractSpinBox clear(); } - void setSingleStep(const CAmount& step) - { - singleStep = step; - } - QSize minimumSizeHint() const { - if(cachedMinimumSizeHint.isEmpty()) - { - ensurePolished(); - - const QFontMetrics fm(fontMetrics()); - int h = lineEdit()->minimumSizeHint().height(); - int w = fm.width(BitcoinUnits::format(BitcoinUnits::DASH, BitcoinUnits::maxMoney(), false, BitcoinUnits::separatorAlways)); - w += 2; // cursor blinking space - - QStyleOptionSpinBox opt; - initStyleOption(&opt); - QSize hint(w, h); - QSize extra(35, 6); - opt.rect.setSize(hint + extra); - extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt, - QStyle::SC_SpinBoxEditField, this).size(); - // get closer to final result by repeating the calculation - opt.rect.setSize(hint + extra); - extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt, - QStyle::SC_SpinBoxEditField, this).size(); - hint += extra; - hint.setHeight(h); - - opt.rect = rect(); - - cachedMinimumSizeHint = style()->sizeFromContents(QStyle::CT_SpinBox, &opt, hint, this) - .expandedTo(QApplication::globalStrut()); - } - return cachedMinimumSizeHint; + ensurePolished(); + const QFontMetrics fm(fontMetrics()); + int h = 0; + int w = fm.width(BitcoinUnits::format(BitcoinUnits::DASH, BitcoinUnits::maxMoney(), false, BitcoinUnits::separatorAlways)); + w += 2; // cursor blinking space + w += GUIUtil::dashThemeActive() ? 24 : 0; // counteract padding from css + return QSize(w, h); } private: int currentUnit; - CAmount singleStep; - mutable QSize cachedMinimumSizeHint; - - /** - * Parse a string into a number of base monetary units and - * return validity. - * @note Must return 0 if !valid. - */ - CAmount parse(const QString &text, bool *valid_out=0) const - { - CAmount val = 0; - bool valid = BitcoinUnits::parse(currentUnit, text, &val); - if(valid) - { - if(val < 0 || val > BitcoinUnits::maxMoney()) - valid = false; - } - if(valid_out) - *valid_out = valid; - return valid ? val : 0; - } protected: bool event(QEvent *event) @@ -158,30 +136,18 @@ class AmountSpinBox: public QAbstractSpinBox { // Translate a comma into a period QKeyEvent periodKeyEvent(event->type(), Qt::Key_Period, keyEvent->modifiers(), ".", keyEvent->isAutoRepeat(), keyEvent->count()); - return QAbstractSpinBox::event(&periodKeyEvent); + return QLineEdit::event(&periodKeyEvent); + } + if(keyEvent->key() == Qt::Key_Enter || keyEvent->key() == Qt::Key_Return) + { + clearFocus(); } } - return QAbstractSpinBox::event(event); - } - - StepEnabled stepEnabled() const - { - if (isReadOnly()) // Disable steps when AmountSpinBox is read-only - return StepNone; - if (text().isEmpty()) // Allow step-up with empty field - return StepUpEnabled; - - StepEnabled rv = 0; - bool valid = false; - CAmount val = value(&valid); - if(valid) + if (event->type() == QEvent::FocusOut) { - if(val > 0) - rv |= StepDownEnabled; - if(val < BitcoinUnits::maxMoney()) - rv |= StepUpEnabled; + fixup(text()); } - return rv; + return QLineEdit::event(event); } Q_SIGNALS: @@ -194,18 +160,17 @@ BitcoinAmountField::BitcoinAmountField(QWidget *parent) : QWidget(parent), amount(0) { - amount = new AmountSpinBox(this); + amount = new AmountLineEdit(this); amount->setLocale(QLocale::c()); amount->installEventFilter(this); - amount->setMaximumWidth(170); + amount->setMaximumWidth(300); + + units = new BitcoinUnits(this); QHBoxLayout *layout = new QHBoxLayout(this); + layout->setSpacing(0); + layout->setMargin(0); layout->addWidget(amount); - unit = new QValueComboBox(this); - unit->setModel(new BitcoinUnits(this)); - layout->addWidget(unit); - layout->addStretch(1); - layout->setContentsMargins(0,0,0,0); setLayout(layout); @@ -214,22 +179,16 @@ BitcoinAmountField::BitcoinAmountField(QWidget *parent) : // If one if the widgets changes, the combined content changes as well connect(amount, SIGNAL(valueChanged()), this, SIGNAL(valueChanged())); - connect(unit, SIGNAL(currentIndexChanged(int)), this, SLOT(unitChanged(int))); - - // Set default based on configuration - unitChanged(unit->currentIndex()); } void BitcoinAmountField::clear() { amount->clear(); - unit->setCurrentIndex(0); } void BitcoinAmountField::setEnabled(bool fEnabled) { amount->setEnabled(fEnabled); - unit->setEnabled(fEnabled); } bool BitcoinAmountField::validate() @@ -261,8 +220,7 @@ bool BitcoinAmountField::eventFilter(QObject *object, QEvent *event) QWidget *BitcoinAmountField::setupTabChain(QWidget *prev) { QWidget::setTabOrder(prev, amount); - QWidget::setTabOrder(amount, unit); - return unit; + return amount; } CAmount BitcoinAmountField::value(bool *valid_out) const @@ -283,20 +241,17 @@ void BitcoinAmountField::setReadOnly(bool fReadOnly) void BitcoinAmountField::unitChanged(int idx) { // Use description tooltip for current unit for the combobox - unit->setToolTip(unit->itemData(idx, Qt::ToolTipRole).toString()); + amount->setToolTip(units->data(idx, Qt::ToolTipRole).toString()); // Determine new unit ID - int newUnit = unit->itemData(idx, BitcoinUnits::UnitRole).toInt(); + int newUnit = units->data(idx, BitcoinUnits::UnitRole).toInt(); + + amount->setPlaceholderText(tr("Amount in ") + units->data(idx,Qt::DisplayRole).toString()); amount->setDisplayUnit(newUnit); } void BitcoinAmountField::setDisplayUnit(int newUnit) { - unit->setValue(newUnit); -} - -void BitcoinAmountField::setSingleStep(const CAmount& step) -{ - amount->setSingleStep(step); + unitChanged(newUnit); } diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h index 659ecb416ba7..8d7d44221327 100644 --- a/src/qt/bitcoinamountfield.h +++ b/src/qt/bitcoinamountfield.h @@ -7,9 +7,11 @@ #include +#include #include -class AmountSpinBox; +class AmountLineEdit; +class BitcoinUnits; QT_BEGIN_NAMESPACE class QValueComboBox; @@ -31,9 +33,6 @@ class BitcoinAmountField: public QWidget CAmount value(bool *value=0) const; void setValue(const CAmount& value); - /** Set single step in satoshis **/ - void setSingleStep(const CAmount& step); - /** Make read-only **/ void setReadOnly(bool fReadOnly); @@ -64,12 +63,10 @@ class BitcoinAmountField: public QWidget bool eventFilter(QObject *object, QEvent *event); private: - AmountSpinBox *amount; - QValueComboBox *unit; + AmountLineEdit *amount; + BitcoinUnits *units; -private Q_SLOTS: void unitChanged(int idx); - }; #endif // BITCOIN_QT_BITCOINAMOUNTFIELD_H diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index ef76c7aa7a6c..a4c58b62b71c 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -55,6 +56,7 @@ #include #include #include +#include #include #include @@ -118,13 +120,11 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle * rpcConsole(0), helpMessageDialog(0), modalOverlay(0), + tabGroup(0), prevBlocks(0), spinnerFrame(0), platformStyle(_platformStyle) { - /* Open CSS when configured */ - this->setStyleSheet(GUIUtil::loadStyleSheet()); - QSettings settings; if (!restoreGeometry(settings.value("MainWindowGeometry").toByteArray())) { // Restore failed (perhaps missing setting), center the window @@ -148,7 +148,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle * setWindowIcon(networkStyle->getTrayAndWindowIcon()); setWindowTitle(windowTitle); - rpcConsole = new RPCConsole(_platformStyle, 0); + rpcConsole = new RPCConsole(_platformStyle, this); helpMessageDialog = new HelpMessageDialog(this, HelpMessageDialog::cmdline); #ifdef ENABLE_WALLET if(enableWallet) @@ -216,6 +216,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); @@ -279,13 +280,15 @@ BitcoinGUI::~BitcoinGUI() #endif delete rpcConsole; + delete tabGroup; } void BitcoinGUI::createActions() { - QActionGroup *tabGroup = new QActionGroup(this); + tabGroup = new QButtonGroup(this); - overviewAction = new QAction(tr("&Overview"), this); + overviewAction = new QToolButton(this); + overviewAction->setText(tr("&Overview")); overviewAction->setStatusTip(tr("Show general overview of wallet")); overviewAction->setToolTip(overviewAction->statusTip()); overviewAction->setCheckable(true); @@ -294,9 +297,10 @@ void BitcoinGUI::createActions() #else overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); #endif - tabGroup->addAction(overviewAction); + tabGroup->addButton(overviewAction); - sendCoinsAction = new QAction(tr("&Send"), this); + sendCoinsAction = new QToolButton(this); + sendCoinsAction->setText(tr("&Send")); sendCoinsAction->setStatusTip(tr("Send coins to a Dash address")); sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); sendCoinsAction->setCheckable(true); @@ -305,13 +309,14 @@ void BitcoinGUI::createActions() #else sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); #endif - tabGroup->addAction(sendCoinsAction); + tabGroup->addButton(sendCoinsAction); sendCoinsMenuAction = new QAction(QIcon(":/icons/send"), sendCoinsAction->text(), this); sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip()); sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip()); - privateSendCoinsAction = new QAction(tr("&PrivateSend"), this); + privateSendCoinsAction = new QToolButton(this); + privateSendCoinsAction->setText(tr("&PrivateSend")); privateSendCoinsAction->setStatusTip(tr("PrivateSend coins to a Dash address")); privateSendCoinsAction->setToolTip(privateSendCoinsAction->statusTip()); privateSendCoinsAction->setCheckable(true); @@ -320,13 +325,14 @@ void BitcoinGUI::createActions() #else privateSendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); #endif - tabGroup->addAction(privateSendCoinsAction); + tabGroup->addButton(privateSendCoinsAction); privateSendCoinsMenuAction = new QAction(QIcon(":/icons/send"), privateSendCoinsAction->text(), this); privateSendCoinsMenuAction->setStatusTip(privateSendCoinsAction->statusTip()); privateSendCoinsMenuAction->setToolTip(privateSendCoinsMenuAction->statusTip()); - receiveCoinsAction = new QAction(tr("&Receive"), this); + receiveCoinsAction = new QToolButton(this); + receiveCoinsAction->setText(tr("&Receive")); receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and dash: URIs)")); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setCheckable(true); @@ -335,13 +341,14 @@ void BitcoinGUI::createActions() #else receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); #endif - tabGroup->addAction(receiveCoinsAction); + tabGroup->addButton(receiveCoinsAction); receiveCoinsMenuAction = new QAction(QIcon(":/icons/receiving_addresses"), receiveCoinsAction->text(), this); receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip()); receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip()); - historyAction = new QAction(tr("&Transactions"), this); + historyAction = new QToolButton(this); + historyAction->setText(tr("&Transactions")); historyAction->setStatusTip(tr("Browse transaction history")); historyAction->setToolTip(historyAction->statusTip()); historyAction->setCheckable(true); @@ -350,12 +357,13 @@ void BitcoinGUI::createActions() #else historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); #endif - tabGroup->addAction(historyAction); + tabGroup->addButton(historyAction); #ifdef ENABLE_WALLET QSettings settings; if (settings.value("fShowMasternodesTab").toBool()) { - masternodeAction = new QAction(tr("&Masternodes"), this); + masternodeAction = new QToolButton(this); + masternodeAction->setText(tr("&Masternodes")); masternodeAction->setStatusTip(tr("Browse masternodes")); masternodeAction->setToolTip(masternodeAction->statusTip()); masternodeAction->setCheckable(true); @@ -364,29 +372,35 @@ void BitcoinGUI::createActions() #else masternodeAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6)); #endif - tabGroup->addAction(masternodeAction); - connect(masternodeAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); - connect(masternodeAction, SIGNAL(triggered()), this, SLOT(gotoMasternodePage())); + tabGroup->addButton(masternodeAction); + connect(masternodeAction, SIGNAL(clicked()), this, SLOT(showNormalIfMinimized())); + connect(masternodeAction, SIGNAL(clicked()), this, SLOT(gotoMasternodePage())); } // These showNormalIfMinimized are needed because Send Coins and Receive Coins // can be triggered from the tray menu, and need to show the GUI to be useful. - connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); - connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); - connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); - connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); + connect(overviewAction, SIGNAL(clicked()), this, SLOT(showNormalIfMinimized())); + connect(overviewAction, SIGNAL(clicked()), this, SLOT(gotoOverviewPage())); + connect(sendCoinsAction, SIGNAL(clicked()), this, SLOT(showNormalIfMinimized())); + connect(sendCoinsAction, SIGNAL(clicked()), this, SLOT(gotoSendCoinsPage())); connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); - connect(privateSendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); - connect(privateSendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoPrivateSendCoinsPage())); + connect(privateSendCoinsAction, SIGNAL(clicked()), this, SLOT(showNormalIfMinimized())); + connect(privateSendCoinsAction, SIGNAL(clicked()), this, SLOT(gotoPrivateSendCoinsPage())); connect(privateSendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(privateSendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoPrivateSendCoinsPage())); - connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); - connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); + connect(receiveCoinsAction, SIGNAL(clicked()), this, SLOT(showNormalIfMinimized())); + connect(receiveCoinsAction, SIGNAL(clicked()), this, SLOT(gotoReceiveCoinsPage())); connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); - connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); - connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); + connect(historyAction, SIGNAL(clicked()), this, SLOT(showNormalIfMinimized())); + connect(historyAction, SIGNAL(clicked()), this, SLOT(gotoHistoryPage())); + + for (auto button : tabGroup->buttons()) { + GUIUtil::setFont({button}, GUIUtil::Weight::Normal, 16); + } + // Give the selected tab button a bolder font. + connect(tabGroup, SIGNAL(buttonToggled(QAbstractButton *, bool)), this, SLOT(highlightTabButton(QAbstractButton *, bool))); #endif // ENABLE_WALLET quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this); @@ -575,32 +589,33 @@ void BitcoinGUI::createToolBars() { QToolBar *toolbar = new QToolBar(tr("Tabs toolbar")); toolbar->setContextMenuPolicy(Qt::PreventContextMenu); - toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - toolbar->addAction(overviewAction); - toolbar->addAction(sendCoinsAction); - toolbar->addAction(privateSendCoinsAction); - toolbar->addAction(receiveCoinsAction); - toolbar->addAction(historyAction); + toolbar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + toolbar->setToolButtonStyle(Qt::ToolButtonTextOnly); + + overviewAction->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + sendCoinsAction->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + privateSendCoinsAction->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + receiveCoinsAction->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + historyAction->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + + toolbar->addWidget(overviewAction); + toolbar->addWidget(sendCoinsAction); + toolbar->addWidget(privateSendCoinsAction); + toolbar->addWidget(receiveCoinsAction); + toolbar->addWidget(historyAction); + QSettings settings; if (settings.value("fShowMasternodesTab").toBool() && masternodeAction) { - toolbar->addAction(masternodeAction); + masternodeAction->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + toolbar->addWidget(masternodeAction); } toolbar->setMovable(false); // remove unused icon in upper left corner overviewAction->setChecked(true); - // Add Dash logo on the right side - QWidget* spacer = new QWidget(); - spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - toolbar->addWidget(spacer); - QLabel *logoLabel = new QLabel(); - QString logoImage = ":/images/dash_logo_toolbar"; - if (!GUIUtil::dashThemeActive()) { - logoImage = ":/images/dash_logo_toolbar_blue"; - } + logoLabel->setObjectName("lblToolbarLogo"); + logoLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - QPixmap logoPixmap(logoImage); - logoLabel->setPixmap(logoPixmap); toolbar->addWidget(logoLabel); /** Create additional container for toolbar and walletFrame and make it the central widget. @@ -828,6 +843,7 @@ void BitcoinGUI::optionsClicked() OptionsDialog dlg(this, enableWallet); dlg.setModel(clientModel->getOptionsModel()); + connect(&dlg, &OptionsDialog::themeChanged, [=](){GUIUtil::loadTheme();}); dlg.exec(); } @@ -909,6 +925,11 @@ void BitcoinGUI::openClicked() } } +void BitcoinGUI::highlightTabButton(QAbstractButton *button, bool checked) +{ + GUIUtil::setFont({button}, checked ? GUIUtil::Weight::Bold : GUIUtil::Weight::Normal, 16); +} + void BitcoinGUI::gotoOverviewPage() { overviewAction->setChecked(true); @@ -1508,8 +1529,7 @@ void BitcoinGUI::showProgress(const QString &title, int nProgress) { if (nProgress == 0) { - progressDialog = new QProgressDialog(title, "", 0, 100); - progressDialog->setStyleSheet(GUIUtil::loadStyleSheet()); + progressDialog = new QProgressDialog(title, "", 0, 100, this); progressDialog->setWindowModality(Qt::ApplicationModal); progressDialog->setMinimumDuration(0); progressDialog->setCancelButton(0); @@ -1595,7 +1615,7 @@ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl(const PlatformStyle *pl setToolTip(tr("Unit to show amounts in. Click to select another unit.")); QList units = BitcoinUnits::availableUnits(); int max_width = 0; - const QFontMetrics fm(font()); + const QFontMetrics fm(GUIUtil::getFontNormal()); for (const BitcoinUnits::Unit unit : units) { max_width = qMax(max_width, fm.width(BitcoinUnits::name(unit))); diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index e927210773ff..4083cf6a654d 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -40,6 +40,7 @@ QT_BEGIN_NAMESPACE class QAction; class QProgressBar; class QProgressDialog; +class QToolButton; QT_END_NAMESPACE /** @@ -95,20 +96,20 @@ class BitcoinGUI : public QMainWindow QProgressDialog *progressDialog; QMenuBar *appMenuBar; - QAction *overviewAction; - QAction *historyAction; - QAction *masternodeAction; + QToolButton *overviewAction; + QToolButton *historyAction; + QToolButton *masternodeAction; QAction *quitAction; - QAction *sendCoinsAction; + QToolButton *sendCoinsAction; QAction *sendCoinsMenuAction; - QAction *privateSendCoinsAction; + QToolButton *privateSendCoinsAction; QAction *privateSendCoinsMenuAction; QAction *usedSendingAddressesAction; QAction *usedReceivingAddressesAction; QAction *signMessageAction; QAction *verifyMessageAction; QAction *aboutAction; - QAction *receiveCoinsAction; + QToolButton *receiveCoinsAction; QAction *receiveCoinsMenuAction; QAction *optionsAction; QAction *toggleHideAction; @@ -136,6 +137,7 @@ class BitcoinGUI : public QMainWindow RPCConsole *rpcConsole; HelpMessageDialog *helpMessageDialog; ModalOverlay *modalOverlay; + QButtonGroup *tabGroup; #ifdef Q_OS_MAC CAppNapInhibitor* m_app_nap_inhibitor = nullptr; @@ -251,6 +253,9 @@ private Q_SLOTS: /** Show open dialog */ void openClicked(); + + /** Highlight checked tab button */ + void highlightTabButton(QAbstractButton *button, bool checked); #endif // ENABLE_WALLET /** Show configuration dialog */ void optionsClicked(); diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp index 54607806f1a9..b6c9e2fc57b6 100644 --- a/src/qt/bitcoinunits.cpp +++ b/src/qt/bitcoinunits.cpp @@ -246,7 +246,11 @@ int BitcoinUnits::rowCount(const QModelIndex &parent) const QVariant BitcoinUnits::data(const QModelIndex &index, int role) const { - int row = index.row(); + return data(index.row(), role); +} + +QVariant BitcoinUnits::data(const int &row, int role) const +{ if(row >= 0 && row < unitlist.size()) { Unit unit = unitlist.at(row); diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h index cc16cacc0229..54d132d98db5 100644 --- a/src/qt/bitcoinunits.h +++ b/src/qt/bitcoinunits.h @@ -111,6 +111,7 @@ class BitcoinUnits: public QAbstractListModel }; int rowCount(const QModelIndex &parent) const; QVariant data(const QModelIndex &index, int role) const; + QVariant data(const int &row, int role) const; ///@} static QString removeSpaces(QString text) diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 606465b3d1e0..a922d57812a7 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -51,9 +51,19 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *_platformStyle, QWidge { ui->setupUi(this); - /* Open CSS when configured */ - this->setStyleSheet(GUIUtil::loadStyleSheet()); - + GUIUtil::setFont({ui->labelCoinControlQuantityText, + ui->labelCoinControlBytesText, + ui->labelCoinControlAmountText, + ui->labelCoinControlLowOutputText, + ui->labelCoinControlFeeText, + ui->labelCoinControlAfterFeeText, + ui->labelCoinControlChangeText + }, GUIUtil::Weight::Bold); + + GUIUtil::updateFonts(); + + GUIUtil::disableMacFocusRect(this); + // context menu actions QAction *copyAddressAction = new QAction(tr("Copy address"), this); QAction *copyLabelAction = new QAction(tr("Copy label"), this); @@ -224,9 +234,8 @@ void CoinControlDialog::buttonToggleLockClicked() CoinControlDialog::updateLabels(model, this); } else{ - QMessageBox msgBox; + QMessageBox msgBox(this); msgBox.setObjectName("lockMessageBox"); - msgBox.setStyleSheet(GUIUtil::loadStyleSheet()); msgBox.setText(tr("Please switch to \"List mode\" to use this function.")); msgBox.exec(); } diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp index fee5ad059fa4..601c2171d33c 100644 --- a/src/qt/dash.cpp +++ b/src/qt/dash.cpp @@ -272,6 +272,11 @@ bool BitcoinCore::baseInitialize() { return false; } + if (!GUIUtil::loadFonts()) + { + return false; + } + GUIUtil::loadTheme(); return true; } @@ -395,6 +400,8 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle) { window = new BitcoinGUI(platformStyle, networkStyle, 0); + GUIUtil::loadTheme(window); + pollShutdownTimer = new QTimer(window); connect(pollShutdownTimer, SIGNAL(timeout()), window, SLOT(detectShutdown())); } @@ -691,6 +698,76 @@ int main(int argc, char *argv[]) // Load GUI settings from QSettings app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false)); + // Validate/set normal font weight + if (gArgs.IsArgSet("-font-weight-normal")) { + QFont::Weight weight; + if (!GUIUtil::weightFromArg(gArgs.GetArg("-font-weight-normal", GUIUtil::weightToArg(GUIUtil::getFontWeightNormal())), weight)) { + QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), + QObject::tr("Error: Specified font-weight-normal invalid. Valid range 0 to 8.")); + return EXIT_FAILURE; + } + GUIUtil::setFontWeightNormal(weight); + } + // Validate/set bold font weight + if (gArgs.IsArgSet("-font-weight-bold")) { + QFont::Weight weight; + if (!GUIUtil::weightFromArg(gArgs.GetArg("-font-weight-bold", GUIUtil::weightToArg(GUIUtil::getFontWeightBold())), weight)) { + QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), + QObject::tr("Error: Specified font-weight-bold invalid. Valid range 0 to 8.")); + return EXIT_FAILURE; + } + GUIUtil::setFontWeightBold(weight); + } + // Validate/set font scale + if (gArgs.IsArgSet("-font-scale")) { + const int nScaleMin = -100, nScaleMax = 100; + int nScale = gArgs.GetArg("-font-scale", GUIUtil::getFontScale()); + if (nScale < nScaleMin || nScale > nScaleMax) { + QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), + QObject::tr("Error: Specified font-scale invalid. Valid range %1 to %2.").arg(nScaleMin).arg(nScaleMax)); + return EXIT_FAILURE; + } + GUIUtil::setFontScale(nScale); + } + + if (gArgs.IsArgSet("-custom-css-dir")) { + + fs::path path = fs::path(gArgs.GetArg("-custom-css-dir", "")); + std::vector vecRequiredCSSFiles = GUIUtil::listStyleSheets(); + QString strMissing; + + if (!fs::is_directory(path)) { + QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), + QObject::tr("Error: Invalid custom css directory path: %1.").arg(QString::fromStdString(path.string()))); + return EXIT_FAILURE; + } + + for (auto it = fs::directory_iterator(path); it != fs::directory_iterator(); ++it) { + + if (fs::is_regular_file(*it) && it->path().extension() == ".css") { + std::string test = it->path().filename().string(); + auto css = std::find(vecRequiredCSSFiles.begin(), vecRequiredCSSFiles.end(), + QString::fromStdString(test)); + + if (css != vecRequiredCSSFiles.end()) { + vecRequiredCSSFiles.erase(css); + } else { + strMissing += QString::fromStdString(it->path().filename().string()) + "\n"; + } + } + } + + if (vecRequiredCSSFiles.size()) { + QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), + QObject::tr("Error: %1 CSS file(s) missig in custom css directory.\n\n%2") + .arg(vecRequiredCSSFiles.size()) + .arg(strMissing)); + return EXIT_FAILURE; + } + + GUIUtil::setStyleSheetDirectory(QString::fromStdString(path.string())); + } + // Subscribe to global signals from core uiInterface.InitMessage.connect(InitMessage); diff --git a/src/qt/dash.qrc b/src/qt/dash.qrc index b66c470d61ac..4877def6f61a 100644 --- a/src/qt/dash.qrc +++ b/src/qt/dash.qrc @@ -56,12 +56,29 @@ res/css/general.css - res/css/scrollbars.css - - res/css/dark.css res/css/light.css - res/css/trad.css + res/css/traditional.css + + + res/fonts/Montserrat/Montserrat-Black.otf + res/fonts/Montserrat/Montserrat-BlackItalic.otf + res/fonts/Montserrat/Montserrat-Bold.otf + res/fonts/Montserrat/Montserrat-BoldItalic.otf + res/fonts/Montserrat/Montserrat-ExtraBold.otf + res/fonts/Montserrat/Montserrat-ExtraBoldItalic.otf + res/fonts/Montserrat/Montserrat-ExtraLight.otf + res/fonts/Montserrat/Montserrat-ExtraLightItalic.otf + res/fonts/Montserrat/Montserrat-Italic.otf + res/fonts/Montserrat/Montserrat-Light.otf + res/fonts/Montserrat/Montserrat-LightItalic.otf + res/fonts/Montserrat/Montserrat-Medium.otf + res/fonts/Montserrat/Montserrat-MediumItalic.otf + res/fonts/Montserrat/Montserrat-Regular.otf + res/fonts/Montserrat/Montserrat-SemiBold.otf + res/fonts/Montserrat/Montserrat-SemiBoldItalic.otf + res/fonts/Montserrat/Montserrat-Thin.otf + res/fonts/Montserrat/Montserrat-ThinItalic.otf res/images/arrow_down_normal.png diff --git a/src/qt/editaddressdialog.cpp b/src/qt/editaddressdialog.cpp index 2f49a13aadaa..1c1f0f9126c8 100644 --- a/src/qt/editaddressdialog.cpp +++ b/src/qt/editaddressdialog.cpp @@ -21,6 +21,8 @@ EditAddressDialog::EditAddressDialog(Mode _mode, QWidget *parent) : { ui->setupUi(this); + GUIUtil::disableMacFocusRect(this); + GUIUtil::setupAddressWidget(ui->addressEdit, this); switch(mode) diff --git a/src/qt/forms/askpassphrasedialog.ui b/src/qt/forms/askpassphrasedialog.ui index 69803989cd13..67fee3cd3dea 100644 --- a/src/qt/forms/askpassphrasedialog.ui +++ b/src/qt/forms/askpassphrasedialog.ui @@ -101,12 +101,6 @@ - - - 75 - true - - diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui index e5cf02c62c41..7d226fd6a226 100644 --- a/src/qt/forms/coincontroldialog.ui +++ b/src/qt/forms/coincontroldialog.ui @@ -38,12 +38,6 @@ - - - 75 - true - - Quantity: @@ -67,12 +61,6 @@ - - - 75 - true - - Bytes: @@ -112,12 +100,6 @@ - - - 75 - true - - Amount: @@ -144,12 +126,6 @@ false - - - 75 - true - - Dust: @@ -192,12 +168,6 @@ - - - 75 - true - - Fee: @@ -237,12 +207,6 @@ - - - 75 - true - - After Fee: @@ -269,12 +233,6 @@ false - - - 75 - true - - Change: diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index ee3f74dbe159..9df65c113916 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -15,26 +15,83 @@ - + + + 0 + + + 0 + + + + + &Information + + + true + + + + + + + &Console + + + true + + + + + + + &Network Traffic + + + true + + + + + + + &Peers + + + true + + + + + + + &Wallet Repair + + + true + + + + + + + + + + 0 + 0 + + 0 - - - &Information - + 12 - - - 75 - true - - General @@ -165,17 +222,11 @@ - - - - 75 - true - - - - Network - - + + + Network + + @@ -248,12 +299,6 @@ - - - 75 - true - - Block chain @@ -307,12 +352,6 @@ - - - 75 - true - - Memory Pool @@ -442,10 +481,7 @@ - - - &Console - + 3 @@ -479,14 +515,14 @@ 24 - - - Decrease font size + + + - + :/icons/fontsmaller:/icons/fontsmaller @@ -518,7 +554,7 @@ - + :/icons/fontbigger:/icons/fontbigger @@ -553,7 +589,7 @@ - + :/icons/console_remove:/icons/console_remove @@ -608,7 +644,7 @@ - + :/icons/prompticon :/icons/prompticon:/icons/prompticon @@ -637,10 +673,7 @@ - - - &Network Traffic - + @@ -890,10 +923,7 @@ - - - &Peers - + @@ -936,11 +966,6 @@ 32 - - - 12 - - IBeamCursor @@ -996,13 +1021,6 @@ 32 - - - 10 - 75 - true - - IBeamCursor @@ -1464,10 +1482,7 @@ - - - &Wallet Repair - + @@ -1572,12 +1587,6 @@ 41 - - - 50 - false - - The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions. @@ -1674,13 +1683,6 @@ 16 - - - 10 - 75 - true - - Wallet repair options. @@ -1746,8 +1748,6 @@ - - - + diff --git a/src/qt/forms/modaloverlay.ui b/src/qt/forms/modaloverlay.ui index 7bf5a7a1f853..b39222017986 100644 --- a/src/qt/forms/modaloverlay.ui +++ b/src/qt/forms/modaloverlay.ui @@ -140,12 +140,6 @@ - - - 75 - true - - Attempting to spend Dash that are affected by not-yet-displayed transactions will not be accepted by the network. @@ -203,12 +197,6 @@ - - - 75 - true - - Number of blocks left @@ -223,12 +211,6 @@ - - - 75 - true - - Last block time @@ -249,12 +231,6 @@ - - - 75 - true - - Progress @@ -283,12 +259,6 @@ - - - 75 - true - - Progress increase per hour @@ -303,12 +273,6 @@ - - - 75 - true - - Estimated time left until synced diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui index 03d446e415cc..609449de13e4 100644 --- a/src/qt/forms/optionsdialog.ui +++ b/src/qt/forms/optionsdialog.ui @@ -18,14 +18,87 @@ - + + + 0 + + + 0 + + + + + &Main + + + true + + + + + + + W&allet + + + true + + + + + + + &Network + + + true + + + + + + + &Window + + + true + + + + + + + &Display + + + true + + + + + + + &Appearance + + + true + + + + + + + + + + 0 + 0 + + 0 - - - &Main - + @@ -132,10 +205,7 @@ - - - W&allet - + @@ -300,10 +370,7 @@ - - - &Network - + @@ -618,10 +685,7 @@ - - - &Window - + @@ -668,17 +732,14 @@ - - - &Display - + - User Interface &language: + Language: Qt::PlainText @@ -726,20 +787,6 @@ https://www.transifex.com/projects/p/dash/ - - - - - - User Interface Theme: - - - - - - - - @@ -824,6 +871,278 @@ https://www.transifex.com/projects/p/dash/ + + + + + + + + Theme: + + + + + + + + + + + + + + Font Family: + + + + + + + + + + + + 0 + + + + + Font Scale: + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 80 + 20 + + + + + + + + Smaller + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 150 + 0 + + + + + 150 + 16777215 + + + + -30 + + + 30 + + + Qt::Horizontal + + + + + + + Bigger + + + + + + + + + 0 + + + + + Font Weight Normal: + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 80 + 20 + + + + + + + + Lighter + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 150 + 0 + + + + + 150 + 16777215 + + + + 0 + + + 5 + + + 0 + + + Qt::Horizontal + + + + + + + Bolder + + + + + + + + + 0 + + + + + Font Weight Bold: + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 80 + 20 + + + + + + + + Lighter + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 150 + 0 + + + + + 150 + 16777215 + + + + 3 + + + 8 + + + 3 + + + Qt::Horizontal + + + + + + + Bolder + + + + + + + @@ -908,12 +1227,6 @@ https://www.transifex.com/projects/p/dash/ 0 - - - 75 - true - - diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index af5626b88f56..616a6c151813 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -56,12 +56,6 @@ - - - 75 - true - - Balances @@ -102,12 +96,6 @@ - - - 75 - true - - IBeamCursor @@ -127,12 +115,6 @@ - - - 75 - true - - IBeamCursor @@ -152,12 +134,6 @@ - - - 75 - true - - IBeamCursor @@ -210,12 +186,6 @@ - - - 75 - true - - IBeamCursor @@ -255,12 +225,6 @@ - - - 75 - true - - IBeamCursor @@ -280,12 +244,6 @@ - - - 75 - true - - IBeamCursor @@ -322,12 +280,6 @@ - - - 75 - true - - IBeamCursor @@ -347,12 +299,6 @@ - - - 75 - true - - IBeamCursor @@ -408,12 +354,6 @@ - - - 75 - true - - PrivateSend @@ -501,12 +441,6 @@ - - - 75 - true - - 0 DASH @@ -541,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 + - + @@ -608,12 +591,6 @@ - - - 75 - true - - Recent transactions diff --git a/src/qt/forms/qrdialog.ui b/src/qt/forms/qrdialog.ui index 8366b7c857a6..dae494ccc825 100644 --- a/src/qt/forms/qrdialog.ui +++ b/src/qt/forms/qrdialog.ui @@ -13,12 +13,6 @@ - - - 75 - true - - QR-Code Title diff --git a/src/qt/forms/receivecoinsdialog.ui b/src/qt/forms/receivecoinsdialog.ui index 5ee764446afc..3293e9e6f48e 100644 --- a/src/qt/forms/receivecoinsdialog.ui +++ b/src/qt/forms/receivecoinsdialog.ui @@ -97,19 +97,6 @@ - - - - - 80 - 0 - - - - An optional amount to request. Leave this empty or zero to not request a specific amount. - - - @@ -166,6 +153,36 @@ + + + + 0 + + + 0 + + + + + An optional amount to request. Leave this empty or zero to not request a specific amount. + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + @@ -201,12 +218,6 @@ - - - 75 - true - - Requested payments history @@ -297,8 +308,6 @@ showRequestButton removeRequestButton - - - + diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui index 4f00c759ad94..432f3018f513 100644 --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -77,15 +77,6 @@ 0 - - - 75 - true - - - - font-weight:bold; - Coin Control Features @@ -126,15 +117,6 @@ - - - 75 - true - - - - font-weight:bold; - Insufficient funds! @@ -218,12 +200,6 @@ - - - 75 - true - - Quantity: @@ -253,12 +229,6 @@ - - - 75 - true - - Bytes: @@ -301,12 +271,6 @@ - - - 75 - true - - Amount: @@ -333,12 +297,6 @@ - - - 75 - true - - Dust: @@ -381,12 +339,6 @@ - - - 75 - true - - Fee: @@ -432,12 +384,6 @@ - - - 75 - true - - After Fee: @@ -464,12 +410,6 @@ - - - 75 - true - - Change: @@ -714,15 +654,6 @@ 0 - - - 75 - true - - - - font-weight:bold; - Transaction Fee: @@ -762,12 +693,6 @@ Using the fallbackfee can result in sending a transaction that will take several hours or days (or never) to confirm. Consider choosing your fee manually or wait until you have validated the complete chain. - - - 75 - true - - Note: Not enough data for fee estimation, using the fallback fee instead. @@ -853,8 +778,11 @@ 6 + + 3 + - + @@ -930,6 +858,12 @@ + + 20 + + + 3 + @@ -960,6 +894,9 @@ + + 30 + @@ -991,7 +928,10 @@ 6 - 2 + 0 + + + 3 @@ -1051,19 +991,6 @@ - - - - Qt::Vertical - - - - 1 - 1 - - - - @@ -1211,7 +1138,7 @@ 3 - + Balance: @@ -1220,7 +1147,7 @@ - + 0 0 diff --git a/src/qt/forms/signverifymessagedialog.ui b/src/qt/forms/signverifymessagedialog.ui index 90446e553dca..278c9c7733c0 100644 --- a/src/qt/forms/signverifymessagedialog.ui +++ b/src/qt/forms/signverifymessagedialog.ui @@ -18,14 +18,47 @@ - + + + 0 + + + 0 + + + + + &Sign Message + + + true + + + + + + + &Verify Message + + + true + + + + + + + + + + 0 + 0 + + 0 - - - &Sign Message - + @@ -110,11 +143,6 @@ - - - true - - true @@ -178,12 +206,6 @@ - - - 75 - true - - @@ -209,10 +231,7 @@ - - - &Verify Message - + @@ -309,12 +328,6 @@ - - - 75 - true - - diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 9f69e9dd9835..ebd9d2ca83d3 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -16,6 +17,7 @@ #include #include