diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 117f701c2d..78cdd390cc 100755 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -287,10 +287,6 @@ GRIDCOINRESEARCH_QT_CPP = \ RES_ICONS = \ qt/res/icons/add.png \ - qt/res/icons/beacon_green.svg \ - qt/res/icons/beacon_grey.svg \ - qt/res/icons/beacon_red.svg \ - qt/res/icons/beacon_yellow.svg \ qt/res/icons/block.png \ qt/res/icons/chat.png \ qt/res/icons/clock1.png \ @@ -311,26 +307,21 @@ RES_ICONS = \ qt/res/icons/ex.png \ qt/res/icons/export.png \ qt/res/icons/filesave.png \ - qt/res/icons/gray_scraper.svg \ - qt/res/icons/green_check.svg \ - qt/res/icons/green_scraper.svg \ qt/res/icons/gridcoin.ico \ qt/res/icons/gridcoin_testnet.ico \ qt/res/icons/key.png \ qt/res/icons/message.svg \ - qt/res/icons/notsynced.svg \ qt/res/icons/qrcode.png \ qt/res/icons/quit.png \ qt/res/icons/remove.png \ qt/res/icons/round_gray_x.svg \ qt/res/icons/round_green_check.svg \ - qt/res/icons/staking_off.svg \ - qt/res/icons/staking_on.svg \ - qt/res/icons/staking_unable.svg \ qt/res/icons/superblock.svg \ qt/res/icons/transaction_conflicted.png \ qt/res/icons/transaction0.png \ - qt/res/icons/transaction2.png \ + qt/res/icons/transaction2.svg \ + qt/res/icons/tx_contract_beacon.svg \ + qt/res/icons/tx_contract_voting.svg \ qt/res/icons/tx_inout.svg \ qt/res/icons/tx_input.svg \ qt/res/icons/tx_output.svg \ @@ -343,30 +334,84 @@ RES_ICONS = \ qt/res/icons/warning.svg \ qt/res/icons/white_and_red_x.svg \ qt/res/icons/www.png \ - qt/res/icons/icons_native/overview.svg \ - qt/res/icons/icons_light/overview.svg \ - qt/res/icons/icons_dark/overview.svg \ - qt/res/icons/icons_native/Voting.svg \ - qt/res/icons/icons_native/address-book.svg \ - qt/res/icons/icons_native/lock_closed.svg \ - qt/res/icons/icons_native/lock_open.svg \ - qt/res/icons/icons_native/receive.svg \ - qt/res/icons/icons_native/send.svg \ - qt/res/icons/icons_light/Voting.svg \ - qt/res/icons/icons_light/address-book.svg \ - qt/res/icons/icons_light/lock_closed.svg \ - qt/res/icons/icons_light/lock_open.svg \ - qt/res/icons/icons_light/receive.svg \ - qt/res/icons/icons_light/send.svg \ - qt/res/icons/icons_dark/Voting.svg \ - qt/res/icons/icons_dark/address-book.svg \ - qt/res/icons/icons_dark/lock_closed.svg \ - qt/res/icons/icons_dark/lock_open.svg \ - qt/res/icons/icons_dark/receive.svg \ - qt/res/icons/icons_dark/send.svg \ + qt/res/icons/icons_light/sidebar_favorites_active.svg \ + qt/res/icons/icons_light/sidebar_favorites_inactive.svg \ + qt/res/icons/icons_light/sidebar_history_active.svg \ + qt/res/icons/icons_light/sidebar_history_inactive.svg \ + qt/res/icons/icons_light/sidebar_locked_active.svg \ + qt/res/icons/icons_light/sidebar_locked_inactive.svg \ + qt/res/icons/icons_light/sidebar_overview_active.svg \ + qt/res/icons/icons_light/sidebar_overview_inactive.svg \ + qt/res/icons/icons_light/sidebar_receive_active.svg \ + qt/res/icons/icons_light/sidebar_receive_inactive.svg \ + qt/res/icons/icons_light/sidebar_send_active.svg \ + qt/res/icons/icons_light/sidebar_send_inactive.svg \ + qt/res/icons/icons_light/sidebar_unlocked_active.svg \ + qt/res/icons/icons_light/sidebar_unlocked_inactive.svg \ + qt/res/icons/icons_light/sidebar_voting_active.svg \ + qt/res/icons/icons_light/sidebar_voting_inactive.svg \ + qt/res/icons/icons_light/status_beacon_green.svg \ + qt/res/icons/icons_light/status_beacon_gray.svg \ + qt/res/icons/icons_light/status_beacon_red.svg \ + qt/res/icons/icons_light/status_beacon_yellow.svg \ + qt/res/icons/icons_light/status_connections_average.svg \ + qt/res/icons/icons_light/status_connections_good.svg \ + qt/res/icons/icons_light/status_connections_none.svg \ + qt/res/icons/icons_light/status_connections_normal.svg \ + qt/res/icons/icons_light/status_connections_poor.svg \ + qt/res/icons/icons_light/status_encryption_none.svg \ + qt/res/icons/icons_light/status_encryption_locked.svg \ + qt/res/icons/icons_light/status_encryption_unlocked.svg \ + qt/res/icons/icons_light/status_scraper_inactive.svg \ + qt/res/icons/icons_light/status_scraper_no_convergence.svg \ + qt/res/icons/icons_light/status_scraper_ok.svg \ + qt/res/icons/icons_light/status_scraper_waiting.svg \ + qt/res/icons/icons_light/status_staking_no.svg \ + qt/res/icons/icons_light/status_staking_problem.svg \ + qt/res/icons/icons_light/status_staking_yes.svg \ + qt/res/icons/icons_light/status_sync_done.svg \ + qt/res/icons/icons_light/status_sync_stalled.svg \ + qt/res/icons/icons_light/status_sync_syncing.svg \ + qt/res/icons/icons_dark/sidebar_favorites_active.svg \ + qt/res/icons/icons_dark/sidebar_favorites_inactive.svg \ + qt/res/icons/icons_dark/sidebar_history_active.svg \ + qt/res/icons/icons_dark/sidebar_history_inactive.svg \ + qt/res/icons/icons_dark/sidebar_locked_active.svg \ + qt/res/icons/icons_dark/sidebar_locked_inactive.svg \ + qt/res/icons/icons_dark/sidebar_overview_active.svg \ + qt/res/icons/icons_dark/sidebar_overview_inactive.svg \ + qt/res/icons/icons_dark/sidebar_receive_active.svg \ + qt/res/icons/icons_dark/sidebar_receive_inactive.svg \ + qt/res/icons/icons_dark/sidebar_send_active.svg \ + qt/res/icons/icons_dark/sidebar_send_inactive.svg \ + qt/res/icons/icons_dark/sidebar_unlocked_active.svg \ + qt/res/icons/icons_dark/sidebar_unlocked_inactive.svg \ + qt/res/icons/icons_dark/sidebar_voting_active.svg \ + qt/res/icons/icons_dark/sidebar_voting_inactive.svg \ + qt/res/icons/icons_dark/status_beacon_green.svg \ + qt/res/icons/icons_dark/status_beacon_gray.svg \ + qt/res/icons/icons_dark/status_beacon_red.svg \ + qt/res/icons/icons_dark/status_beacon_yellow.svg \ + qt/res/icons/icons_dark/status_connections_average.svg \ + qt/res/icons/icons_dark/status_connections_good.svg \ + qt/res/icons/icons_dark/status_connections_none.svg \ + qt/res/icons/icons_dark/status_connections_normal.svg \ + qt/res/icons/icons_dark/status_connections_poor.svg \ + qt/res/icons/icons_dark/status_encryption_none.svg \ + qt/res/icons/icons_dark/status_encryption_locked.svg \ + qt/res/icons/icons_dark/status_encryption_unlocked.svg \ + qt/res/icons/icons_dark/status_scraper_inactive.svg \ + qt/res/icons/icons_dark/status_scraper_no_convergence.svg \ + qt/res/icons/icons_dark/status_scraper_ok.svg \ + qt/res/icons/icons_dark/status_scraper_waiting.svg \ + qt/res/icons/icons_dark/status_staking_no.svg \ + qt/res/icons/icons_dark/status_staking_problem.svg \ + qt/res/icons/icons_dark/status_staking_yes.svg \ + qt/res/icons/icons_dark/status_sync_done.svg \ + qt/res/icons/icons_dark/status_sync_stalled.svg \ + qt/res/icons/icons_dark/status_sync_syncing.svg \ qt/res/icons/icons_dark/transactions.svg \ qt/res/icons/icons_light/transactions.svg \ - qt/res/icons/icons_native/transactions.svg \ qt/res/icons/icons_light/chevron_down.svg \ qt/res/icons/icons_light/chevron_up.svg \ qt/res/icons/icons_dark/chevron_down.svg \ @@ -390,12 +435,10 @@ RES_IMAGES = \ RES_FONTS = \ qt/res/fonts/Inconsolata-Regular.ttf \ - qt/res/fonts/Inter-Bold.ttf \ - qt/res/fonts/Inter-Regular.ttf + qt/res/fonts/Inter-VariableFont.ttf RES_STYLESHEETS = \ qt/res/stylesheets/light_stylesheet.qss \ - qt/res/stylesheets/native_stylesheet.qss \ qt/res/stylesheets/dark_stylesheet.qss diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index bfca9de0a2..acd317009b 100755 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -560,9 +560,9 @@ int StartGridcoinQt(int argc, char *argv[], QApplication& app, OptionsModel& opt WalletModel walletModel(pwalletMain, &optionsModel); ResearcherModel researcherModel; + window.setResearcherModel(&researcherModel); window.setClientModel(&clientModel); window.setWalletModel(&walletModel); - window.setResearcherModel(&researcherModel); // If -min option passed, start window minimized. if(GetBoolArg("-min")) diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc index 9db02b2518..ce952cc27b 100644 --- a/src/qt/bitcoin.qrc +++ b/src/qt/bitcoin.qrc @@ -2,7 +2,7 @@ res/icons/quit.png res/icons/transaction0.png - res/icons/transaction2.png + res/icons/transaction2.svg res/icons/transaction_conflicted.png res/icons/clock1.png res/icons/clock2.png @@ -28,60 +28,140 @@ res/icons/tx_input.svg res/icons/tx_pos.svg res/icons/tx_output.svg - res/icons/icons_native/overview.svg - res/icons/icons_light/overview.svg - res/icons/icons_dark/overview.svg - res/icons/icons_native/Voting.svg - res/icons/icons_native/address-book.svg - res/icons/icons_native/lock_closed.svg - res/icons/icons_native/lock_open.svg - res/icons/icons_native/receive.svg - res/icons/icons_native/send.svg - res/icons/icons_light/Voting.svg - res/icons/icons_light/address-book.svg - res/icons/icons_light/lock_closed.svg - res/icons/icons_light/lock_open.svg - res/icons/icons_light/receive.svg - res/icons/icons_light/send.svg - res/icons/icons_dark/Voting.svg - res/icons/icons_dark/address-book.svg - res/icons/icons_dark/lock_closed.svg - res/icons/icons_dark/lock_open.svg - res/icons/icons_dark/receive.svg - res/icons/icons_dark/send.svg - res/icons/icons_dark/transactions.svg - res/icons/icons_light/transactions.svg - res/icons/icons_native/transactions.svg + + + + + res/icons/icons_light/sidebar_favorites_inactive.svg + res/icons/icons_light/sidebar_favorites_active.svg + res/icons/icons_light/sidebar_history_inactive.svg + res/icons/icons_light/sidebar_history_active.svg + res/icons/icons_light/sidebar_locked_inactive.svg + res/icons/icons_light/sidebar_locked_active.svg + res/icons/icons_light/sidebar_unlocked_inactive.svg + res/icons/icons_light/sidebar_unlocked_active.svg + res/icons/icons_light/sidebar_overview_inactive.svg + res/icons/icons_light/sidebar_overview_active.svg + res/icons/icons_light/sidebar_receive_inactive.svg + res/icons/icons_light/sidebar_receive_active.svg + res/icons/icons_light/sidebar_send_inactive.svg + res/icons/icons_light/sidebar_send_active.svg + res/icons/icons_light/sidebar_voting_inactive.svg + res/icons/icons_light/sidebar_voting_active.svg + + + res/icons/icons_light/status_beacon_green.svg + res/icons/icons_light/status_beacon_gray.svg + res/icons/icons_light/status_beacon_red.svg + res/icons/icons_light/status_beacon_yellow.svg + + + res/icons/icons_light/status_sync_done.svg + res/icons/icons_light/status_sync_stalled.svg + res/icons/icons_light/status_sync_syncing.svg + + + res/icons/icons_light/status_staking_no.svg + res/icons/icons_light/status_staking_problem.svg + res/icons/icons_light/status_staking_yes.svg + + + res/icons/icons_light/status_connections_none.svg + res/icons/icons_light/status_connections_poor.svg + res/icons/icons_light/status_connections_average.svg + res/icons/icons_light/status_connections_normal.svg + res/icons/icons_light/status_connections_good.svg + + + res/icons/icons_light/status_scraper_inactive.svg + res/icons/icons_light/status_scraper_no_convergence.svg + res/icons/icons_light/status_scraper_ok.svg + res/icons/icons_light/status_scraper_waiting.svg + + + res/icons/icons_light/status_encryption_locked.svg + res/icons/icons_light/status_encryption_none.svg + res/icons/icons_light/status_encryption_unlocked.svg + + + res/icons/icons_light/chevron_down.svg + res/icons/icons_light/chevron_up.svg + + + + + res/icons/icons_dark/sidebar_favorites_inactive.svg + res/icons/icons_dark/sidebar_favorites_active.svg + res/icons/icons_dark/sidebar_history_inactive.svg + res/icons/icons_dark/sidebar_history_active.svg + res/icons/icons_dark/sidebar_locked_inactive.svg + res/icons/icons_dark/sidebar_locked_active.svg + res/icons/icons_dark/sidebar_unlocked_inactive.svg + res/icons/icons_dark/sidebar_unlocked_active.svg + res/icons/icons_dark/sidebar_overview_inactive.svg + res/icons/icons_dark/sidebar_overview_active.svg + res/icons/icons_dark/sidebar_receive_inactive.svg + res/icons/icons_dark/sidebar_receive_active.svg + res/icons/icons_dark/sidebar_send_inactive.svg + res/icons/icons_dark/sidebar_send_active.svg + res/icons/icons_dark/sidebar_voting_inactive.svg + res/icons/icons_dark/sidebar_voting_active.svg + + + res/icons/icons_dark/status_beacon_green.svg + res/icons/icons_dark/status_beacon_gray.svg + res/icons/icons_dark/status_beacon_red.svg + res/icons/icons_dark/status_beacon_yellow.svg + + + res/icons/icons_dark/status_sync_done.svg + res/icons/icons_dark/status_sync_stalled.svg + res/icons/icons_dark/status_sync_syncing.svg + + + res/icons/icons_dark/status_staking_no.svg + res/icons/icons_dark/status_staking_problem.svg + res/icons/icons_dark/status_staking_yes.svg + + + res/icons/icons_dark/status_connections_none.svg + res/icons/icons_dark/status_connections_poor.svg + res/icons/icons_dark/status_connections_average.svg + res/icons/icons_dark/status_connections_normal.svg + res/icons/icons_dark/status_connections_good.svg + + + res/icons/icons_dark/status_scraper_inactive.svg + res/icons/icons_dark/status_scraper_no_convergence.svg + res/icons/icons_dark/status_scraper_ok.svg + res/icons/icons_dark/status_scraper_waiting.svg + + + res/icons/icons_dark/status_encryption_locked.svg + res/icons/icons_dark/status_encryption_none.svg + res/icons/icons_dark/status_encryption_unlocked.svg + + + res/icons/icons_dark/chevron_down.svg + res/icons/icons_dark/chevron_up.svg + res/icons/tx_pos_ss.svg res/icons/tx_por.svg res/icons/tx_por_ss.svg - res/icons/beacon_green.svg - res/icons/beacon_grey.svg - res/icons/beacon_red.svg - res/icons/beacon_yellow.svg - res/icons/staking_off.svg - res/icons/staking_on.svg - res/icons/gray_scraper.svg - res/icons/green_scraper.svg - res/icons/connect0.svg - res/icons/connect1.svg - res/icons/connect2.svg - res/icons/connect3.svg - res/icons/connect4.svg - res/icons/notsynced.svg - res/icons/green_check.svg res/icons/white_and_red_x.svg - res/icons/staking_unable.svg res/icons/superblock.svg res/icons/warning.svg res/icons/round_green_check.svg res/icons/round_gray_x.svg res/icons/tx_pos_ss_sent.svg res/icons/tx_por_ss_sent.svg + res/icons/tx_contract_beacon.svg + res/icons/tx_contract_voting.svg res/icons/message.svg - res/icons/icons_light/chevron_down.svg - res/icons/icons_light/chevron_up.svg - res/icons/icons_dark/chevron_down.svg res/images/splash3.png @@ -101,13 +181,11 @@ res/fonts/Inconsolata-Regular.ttf - res/fonts/Inter-Bold.ttf - res/fonts/Inter-Regular.ttf + res/fonts/Inter-VariableFont.ttf res/stylesheets/light_stylesheet.qss - res/stylesheets/native_stylesheet.qss res/stylesheets/dark_stylesheet.qss diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 2801c8baed..566d1f0524 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -109,8 +109,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): * 0.4,QDesktopWidget().availableGeometry(this))); } - QFontDatabase::addApplicationFont(":/fonts/inter-bold"); - QFontDatabase::addApplicationFont(":/fonts/inter-regular"); + QFontDatabase::addApplicationFont(":/fonts/inter-variable"); QFontDatabase::addApplicationFont(":/fonts/inconsolata-regular"); #ifndef Q_OS_MAC @@ -124,6 +123,21 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): qApp->setFont(appFont); #endif + // Qt paints some decorations directly and provides no stylesheet hooks to + // customize appearance (for example: the rulers in a QWizardPage). We set + // certain application palette colors to fully-transparent to render these + // aspects invisible so that the painted features do not clash with visual + // designs of the application's themes. Important display elements provide + // the ability to customize appearances using stylesheets which override a + // palette set for the application, so we do not risk concealing the vital + // UI components, but consider removing the override to debug an obstinate + // display issue. This code must run before loading a stylesheet: + // + QPalette pal(qApp->palette()); + pal.setColor(QPalette::Base, QColor(0, 0, 0, 0)); + pal.setColor(QPalette::Mid, pal.color(QPalette::Base)); + qApp->setPalette(pal); + setWindowTitle(tr("Gridcoin") + " " + tr("Wallet")); #ifndef Q_OS_MAC @@ -164,9 +178,17 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): vbox->addWidget(transactionView); transactionsPage->setLayout(vbox); - addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab); + addressBookPage = new QWidget(this); + addressBook = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab); + QVBoxLayout *addressBookPageLayout = new QVBoxLayout(); + addressBookPageLayout->addWidget(addressBook); + addressBookPage->setLayout(addressBookPageLayout); - receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab); + receiveCoinsPage = new QWidget(this); + receiveAddressBook = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab); + QVBoxLayout *receiveCoinsPageLayout = new QVBoxLayout(); + receiveCoinsPageLayout->addWidget(receiveAddressBook); + receiveCoinsPage->setLayout(receiveCoinsPageLayout); sendCoinsPage = new SendCoinsDialog(this); @@ -174,6 +196,11 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): signVerifyMessageDialog = new SignVerifyMessageDialog(this); + QVBoxLayout *centralVbox = new QVBoxLayout(this); + centralVbox->setContentsMargins(0, 0, 0, 0); + centralVbox->setSpacing(0); + centralVbox->addWidget(appMenuBar); + centralWidget = new QStackedWidget(this); centralWidget->addWidget(overviewPage); centralWidget->addWidget(transactionsPage); @@ -181,10 +208,17 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): centralWidget->addWidget(receiveCoinsPage); centralWidget->addWidget(sendCoinsPage); centralWidget->addWidget(votingPage); - setCentralWidget(centralWidget); + centralVbox->addWidget(centralWidget); + + QWidget* centralWidgetWrapper = new QWidget(this); + centralWidgetWrapper->setLayout(centralVbox); + setCentralWidget(centralWidgetWrapper); // Create status bar - // statusBar(); + statusBar(); + + // Disable size grip because it looks ugly and nobody needs it + statusBar()->setSizeGripEnabled(false); // Clicking on a transaction on the overview page simply sends you to transaction history page connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage())); @@ -247,11 +281,19 @@ void BitcoinGUI::setOptionsStyleSheet(QString qssFileName) qApp->setStyleSheet(sMainWindowHTML); } + sSheet=qssFileName; setIcons(); + // reset encryption status to apply icon color changes - if(walletModel) + if (walletModel) { setEncryptionStatus(walletModel->getEncryptionStatus()); + } + + // Reapply the appropriate beacon icon color scheme: + if (researcherModel) { + researcherModel->setTheme(sSheet); + } } @@ -274,12 +316,12 @@ void BitcoinGUI::createActions() receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); - historyAction = new QAction(tr("&Transactions"), tabGroup); + historyAction = new QAction(tr("&History"), tabGroup); historyAction->setToolTip(tr("Browse transaction history")); historyAction->setCheckable(true); historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); - addressBookAction = new QAction(tr("&Address Book"), tabGroup); + addressBookAction = new QAction(tr("&Favorites"), tabGroup); addressBookAction->setToolTip(tr("Edit the list of stored addresses and labels")); addressBookAction->setCheckable(true); addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); @@ -394,17 +436,59 @@ void BitcoinGUI::createActions() void BitcoinGUI::setIcons() { - overviewAction->setIcon(QPixmap(":/icons/overview_"+sSheet)); - sendCoinsAction->setIcon(QPixmap(":/icons/send_"+sSheet)); - receiveCoinsAction->setIcon(QPixmap(":/icons/receiving_addresses_"+sSheet)); - historyAction->setIcon(QPixmap(":/icons/history_"+sSheet)); - addressBookAction->setIcon(QPixmap(":/icons/address-book_"+sSheet)); - votingAction->setIcon(QPixmap(":/icons/voting_"+sSheet)); - unlockWalletAction->setIcon(QPixmap(":/icons/lock_open_"+sSheet)); - lockWalletAction->setIcon(QPixmap(":/icons/lock_closed_"+sSheet)); + const QToolBar* toolbar = findChild(); + const int toolbar_icon_size = 16 * logicalDpiX() / 96; + + ToolbarButtonIconFilter::apply( + this, + overviewAction, + toolbar->widgetForAction(overviewAction), + toolbar_icon_size, + ":/icons/overview_" + sSheet); + ToolbarButtonIconFilter::apply( + this, + sendCoinsAction, + toolbar->widgetForAction(sendCoinsAction), + toolbar_icon_size, + ":/icons/send_" + sSheet); + ToolbarButtonIconFilter::apply( + this, + receiveCoinsAction, + toolbar->widgetForAction(receiveCoinsAction), + toolbar_icon_size, + ":/icons/receive_" + sSheet); + ToolbarButtonIconFilter::apply( + this, + historyAction, + toolbar->widgetForAction(historyAction), + toolbar_icon_size, + ":/icons/history_" + sSheet); + ToolbarButtonIconFilter::apply( + this, + addressBookAction, + toolbar->widgetForAction(addressBookAction), + toolbar_icon_size, + ":/icons/address-book_" + sSheet); + ToolbarButtonIconFilter::apply( + this, + votingAction, + toolbar->widgetForAction(votingAction), + toolbar_icon_size, + ":/icons/voting_" + sSheet); + ToolbarButtonIconFilter::apply( + this, + unlockWalletAction, + toolbar->widgetForAction(unlockWalletAction), + toolbar_icon_size, + ":/icons/lock_open_" + sSheet); + ToolbarButtonIconFilter::apply( + this, + lockWalletAction, + toolbar->widgetForAction(lockWalletAction), + toolbar_icon_size, + ":/icons/lock_closed_" + sSheet); encryptWalletAction->setIcon(QPixmap(":/icons/lock_closed_"+sSheet)); - bxAction->setIcon(QPixmap(":/icons/block")); exchangeAction->setIcon(QPixmap(":/icons/ex")); websiteAction->setIcon(QPixmap(":/icons/www")); @@ -443,14 +527,13 @@ void BitcoinGUI::createMenuBar() file->addAction(exportAction); file->addAction(signMessageAction); file->addAction(verifyMessageAction); + file->addSeparator(); if (!GetBoolArg("-testnet", false)) { - file->addSeparator(); file->addAction(snapshotAction); } - file->addSeparator(); file->addAction(resetblockchainAction); file->addSeparator(); @@ -486,6 +569,17 @@ void BitcoinGUI::createMenuBar() void BitcoinGUI::createToolBars() { + ClickLabel *logoLabel = new ClickLabel(); + logoLabel->setObjectName("toolbarLogoLabel"); + connect(logoLabel, SIGNAL(clicked()), this, SLOT(websiteClicked())); + + QWidget *boincLabelSpacer = new QWidget(); + boincLabelSpacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + + ClickLabel *boincLabel = new ClickLabel(); + boincLabel->setObjectName("toolbarBoincLabel"); + connect(logoLabel, SIGNAL(clicked()), this, SLOT(boincClicked())); + // "Tabs" toolbar (vertical, aligned on left side of overview screen). QToolBar *toolbar = addToolBar("Tabs toolbar"); toolbar->setObjectName("toolbar"); @@ -494,43 +588,44 @@ void BitcoinGUI::createToolBars() toolbar->setMovable(false); toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); toolbar->setContextMenuPolicy(Qt::PreventContextMenu); - toolbar->setIconSize(QSize(50 * logicalDpiX() / 96, 25 * logicalDpiX() / 96)); + // Setting a taller height than the rendered icon provides additional + // padding between the icon and the button text: + toolbar->setIconSize(QSize(16 * logicalDpiX() / 96, 24 * logicalDpiX() / 96)); + toolbar->addWidget(logoLabel); toolbar->addAction(overviewAction); toolbar->addAction(sendCoinsAction); toolbar->addAction(receiveCoinsAction); toolbar->addAction(historyAction); toolbar->addAction(addressBookAction); toolbar->addAction(votingAction); - - QWidget* spacer = new QWidget(); - spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - toolbar->addWidget(spacer); - spacer->setObjectName("spacer"); - // Unlock Wallet + toolbar->addSeparator(); toolbar->addAction(unlockWalletAction); toolbar->addAction(lockWalletAction); + toolbar->addWidget(boincLabelSpacer); + toolbar->addWidget(boincLabel); + toolbar->layout()->setAlignment(boincLabel, Qt::AlignHCenter | Qt::AlignBottom); addToolBarBreak(Qt::LeftToolBarArea); - // Status bar notification icons (Status toolbar) - QToolBar *toolbar2 = addToolBar("Status toolbar"); - addToolBar(Qt::LeftToolBarArea, toolbar2); - toolbar2->setOrientation(Qt::Vertical); - //toolbar2->setGeometry(0, 0, STATUSBAR_ICONSIZE, 0); - toolbar2->setMinimumWidth(STATUSBAR_ICONSIZE); - toolbar2->setContentsMargins(0, 0, 0, 0); - toolbar2->setMovable(false); - toolbar2->setObjectName("toolbar2"); - QFrame *frameBlocks = new QFrame(); + // Show a red label in the status bar for testnet: + if (GetBoolArg("-testnet")) { + QLabel *testnetLabel = new QLabel(); + testnetLabel->setObjectName("testnetStatusLabel"); + testnetLabel->setText("TESTNET"); + + statusBar()->addWidget(testnetLabel); + } + frameBlocks->setContentsMargins(0,0,0,0); - frameBlocks->setMinimumWidth(STATUSBAR_ICONSIZE); + frameBlocks->setMinimumHeight(STATUSBAR_ICONSIZE); - QVBoxLayout *frameBlocksLayout = new QVBoxLayout(frameBlocks); - frameBlocksLayout->setContentsMargins(1,0,1,0); - frameBlocksLayout->setSpacing(-1); + QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks); + frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); + frameBlocksLayout->setContentsMargins(5, 0, 5, 0); + frameBlocksLayout->setSpacing(3); labelEncryptionIcon = new QLabel(); labelStakingIcon = new QLabel(); labelConnectionsIcon = new ClickLabel(); @@ -540,12 +635,12 @@ void BitcoinGUI::createToolBars() labelBeaconIcon = new ClickLabel(); connect(labelBeaconIcon, SIGNAL(clicked()), this, SLOT(researcherClicked())); - frameBlocksLayout->addWidget(labelEncryptionIcon); + frameBlocksLayout->addWidget(labelBeaconIcon); + frameBlocksLayout->addWidget(labelBlocksIcon); frameBlocksLayout->addWidget(labelStakingIcon); frameBlocksLayout->addWidget(labelConnectionsIcon); - frameBlocksLayout->addWidget(labelBlocksIcon); frameBlocksLayout->addWidget(labelScraperIcon); - frameBlocksLayout->addWidget(labelBeaconIcon); + frameBlocksLayout->addWidget(labelEncryptionIcon); //12-21-2015 Prevent Lock from falling off the page frameBlocksLayout->addStretch(); @@ -557,47 +652,13 @@ void BitcoinGUI::createToolBars() timerStakingIcon->start(MODEL_UPDATE_DELAY); // Instead of calling updateStakingIcon here, simply set the icon to staking off. // This is to prevent problems since this GUI code can initialize before the core. - labelStakingIcon->setPixmap(QIcon(":/icons/staking_off").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelStakingIcon->setPixmap(QIcon(":/icons/status_staking_no_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); labelStakingIcon->setToolTip(tr("Not staking: Miner is not initialized.")); } - toolbar2->addWidget(frameBlocks); + statusBar()->addPermanentWidget(frameBlocks); addToolBarBreak(Qt::TopToolBarArea); - - - // Top tool bar (clickable Gridcoin and BOINC logos) - QToolBar *toolbar3 = addToolBar("Logo bar"); - addToolBar(Qt::TopToolBarArea, toolbar3); - toolbar3->setOrientation(Qt::Horizontal); - toolbar3->setMovable(false); - toolbar3->setObjectName("toolbar3"); - ClickLabel *grcLogoLabel = new ClickLabel(); - grcLogoLabel->setObjectName("gridcoinLogoHorizontal"); - connect(grcLogoLabel, SIGNAL(clicked()), this, SLOT(websiteClicked())); - toolbar3->addWidget(grcLogoLabel); - QWidget* logoSpacer = new QWidget(); - logoSpacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - toolbar3->addWidget(logoSpacer); - logoSpacer->setObjectName("logoSpacer"); - ClickLabel *boincLogoLabel = new ClickLabel(); - boincLogoLabel->setObjectName("boincLogo"); - connect(boincLogoLabel, SIGNAL(clicked()), this, SLOT(boincClicked())); - toolbar3->addWidget(boincLogoLabel); - - // Use a red color for the toolbars background if on testnet. - if (GetBoolArg("-testnet")) - { - toolbar2->setStyleSheet("background-color:darkRed"); - toolbar3->setStyleSheet("background-color:darkRed"); - } - else - { - toolbar2->setStyleSheet("background-color:rgb(65,0,127)"); - toolbar3->setStyleSheet("background-color:rgb(65,0,127)"); - } - - } void BitcoinGUI::setClientModel(ClientModel *clientModel) @@ -625,6 +686,10 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) aboutAction->setIcon(QPixmap(":/images/gridcoin_testnet")); } + // set stylesheet + setOptionsStyleSheet(this->clientModel->getOptionsModel()->getCurrentStyle()); + connect(this->clientModel->getOptionsModel(),SIGNAL(walletStylesheetChanged(QString)),this,SLOT(setOptionsStyleSheet(QString))); + // Keep up to date with client setNumConnections(clientModel->getNumConnections()); connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int))); @@ -639,13 +704,9 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) // Report errors from network/worker thread connect(clientModel, SIGNAL(error(QString,QString,bool)), this, SLOT(error(QString,QString,bool))); - // set stylesheet - setOptionsStyleSheet(this->clientModel->getOptionsModel()->getCurrentStyle()); - connect(this->clientModel->getOptionsModel(),SIGNAL(walletStylesheetChanged(QString)),this,SLOT(setOptionsStyleSheet(QString))); - rpcConsole->setClientModel(clientModel); - addressBookPage->setOptionsModel(clientModel->getOptionsModel()); - receiveCoinsPage->setOptionsModel(clientModel->getOptionsModel()); + addressBook->setOptionsModel(clientModel->getOptionsModel()); + receiveAddressBook->setOptionsModel(clientModel->getOptionsModel()); } } @@ -665,8 +726,8 @@ void BitcoinGUI::setWalletModel(WalletModel *walletModel) transactionView->setModel(walletModel); overviewPage->setWalletModel(walletModel); - addressBookPage->setModel(walletModel->getAddressTableModel()); - receiveCoinsPage->setModel(walletModel->getAddressTableModel()); + addressBook->setModel(walletModel->getAddressTableModel()); + receiveAddressBook->setModel(walletModel->getAddressTableModel()); sendCoinsPage->setModel(walletModel); votingPage->setModel(walletModel); signVerifyMessageDialog->setModel(walletModel); @@ -814,16 +875,19 @@ void BitcoinGUI::setNumConnections(int n) QString icon; switch (n) { - case 0: icon = ":/icons/connect_0"; break; - case 1: case 2: case 3: icon = ":/icons/connect_1"; break; - case 4: case 5: case 6: icon = ":/icons/connect_2"; break; - case 7: case 8: case 9: icon = ":/icons/connect_3"; break; - default: icon = ":/icons/connect_4"; break; + case 0: icon = ":/icons/status_connection_0"; break; + case 1: case 2: icon = ":/icons/status_connection_1"; break; + case 3: case 4: case 5: icon = ":/icons/status_connection_2"; break; + case 6: case 7: case 8: case 9: icon = ":/icons/status_connection_3"; break; + default: icon = ":/icons/status_connection_4"; break; } + + icon.append("_").append(sSheet); labelConnectionsIcon->setPixmap(QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); if (n == 0) { + setNumBlocks(0, 0); // Counts don't matter--just make it red labelConnectionsIcon->setToolTip(tr("No active connections to the Gridcoin network. " "If this persists more than a few minutes, please check your configuration " "and your network connectivity.")); @@ -839,6 +903,8 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) // return if we have no connection to the network if (!clientModel || clientModel->getNumConnections() == 0) { + labelBlocksIcon->setPixmap(QIcon(":/icons/status_sync_stalled_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelBlocksIcon->setToolTip(tr("Sync: no connections.")); return; } @@ -875,13 +941,13 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) if(secs < 90*60 && count >= nTotalBlocks) { tooltip = tr("Up to date") + QString(".
") + tooltip; - labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelBlocksIcon->setPixmap(QIcon(":/icons/status_sync_done_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); overviewPage->showOutOfSyncWarning(false); } else { - labelBlocksIcon->setPixmap(QIcon(":/icons/notsynced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelBlocksIcon->setPixmap(QIcon(":/icons/status_sync_syncing_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); tooltip = tr("Catching up...") + QString("
") + tooltip; overviewPage->showOutOfSyncWarning(true); @@ -1165,7 +1231,7 @@ void BitcoinGUI::gotoAddressBookPage() exportAction->setEnabled(true); disconnect(exportAction, SIGNAL(triggered()), 0, 0); - connect(exportAction, SIGNAL(triggered()), addressBookPage, SLOT(exportClicked())); + connect(exportAction, SIGNAL(triggered()), addressBook, SLOT(exportClicked())); } void BitcoinGUI::gotoReceiveCoinsPage() @@ -1175,7 +1241,7 @@ void BitcoinGUI::gotoReceiveCoinsPage() exportAction->setEnabled(true); disconnect(exportAction, SIGNAL(triggered()), 0, 0); - connect(exportAction, SIGNAL(triggered()), receiveCoinsPage, SLOT(exportClicked())); + connect(exportAction, SIGNAL(triggered()), receiveAddressBook, SLOT(exportClicked())); } void BitcoinGUI::gotoSendCoinsPage() @@ -1190,7 +1256,6 @@ void BitcoinGUI::gotoSendCoinsPage() void BitcoinGUI::gotoVotingPage() { votingAction->setChecked(true); - //votingPage->loadPolls(false); centralWidget->setCurrentWidget(votingPage); exportAction->setEnabled(false); @@ -1261,7 +1326,8 @@ void BitcoinGUI::setEncryptionStatus(int status) switch(status) { case WalletModel::Unencrypted: - labelEncryptionIcon->hide(); + labelEncryptionIcon->setPixmap(QIcon(":/icons/status_encryption_none_" + sSheet).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + labelEncryptionIcon->setToolTip(tr("Wallet is not encrypted!")); encryptWalletAction->setChecked(false); changePassphraseAction->setEnabled(false); unlockWalletAction->setVisible(false); @@ -1269,8 +1335,11 @@ void BitcoinGUI::setEncryptionStatus(int status) encryptWalletAction->setEnabled(true); break; case WalletModel::Unlocked: - labelEncryptionIcon->show(); - labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_open_"+sSheet).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + if (fWalletUnlockStakingOnly) { + labelEncryptionIcon->setPixmap(QIcon(":/icons/status_encryption_unlocked_" + sSheet).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + } else { + labelEncryptionIcon->setPixmap(QIcon(":/icons/status_encryption_none_" + sSheet).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + } labelEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently %1 ").arg(fWalletUnlockStakingOnly ? tr("unlocked for staking only") : tr("fully unlocked"))); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true); @@ -1279,8 +1348,7 @@ void BitcoinGUI::setEncryptionStatus(int status) encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported break; case WalletModel::Locked: - labelEncryptionIcon->show(); - labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_closed_"+sSheet).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + labelEncryptionIcon->setPixmap(QIcon(":/icons/status_encryption_locked_" + sSheet).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); labelEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently locked")); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true); @@ -1465,7 +1533,7 @@ void BitcoinGUI::updateStakingIcon() if (globalStatus.staking) { - labelStakingIcon->setPixmap(QIcon(":/icons/staking_on").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelStakingIcon->setPixmap(QIcon(":/icons/status_staking_yes_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); labelStakingIcon->setToolTip(tr("Staking.
Your weight is %1
Network weight is %2
Estimated staking frequency is %3.") .arg(QString::number(globalStatus.coinWeight, 'f', 0)) .arg(QString::number(globalStatus.netWeight, 'f', 0)) @@ -1482,7 +1550,7 @@ void BitcoinGUI::updateStakingIcon() } else if (!globalStatus.staking && !globalStatus.able_to_stake) { - labelStakingIcon->setPixmap(QIcon(":/icons/staking_unable").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelStakingIcon->setPixmap(QIcon(":/icons/status_staking_problem_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); //Part of this string won't be translated :( labelStakingIcon->setToolTip(tr("Unable to stake: %1") .arg(QString(globalStatus.ReasonNotStaking.c_str()))); @@ -1498,7 +1566,7 @@ void BitcoinGUI::updateStakingIcon() } else { - labelStakingIcon->setPixmap(QIcon(":/icons/staking_off").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelStakingIcon->setPixmap(QIcon(":/icons/status_staking_no_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); //Part of this string won't be translated :( labelStakingIcon->setToolTip(tr("Not staking currently: %1, Estimated staking frequency is %2.") .arg(QString(globalStatus.ReasonNotStaking.c_str())) @@ -1573,23 +1641,23 @@ void BitcoinGUI::updateScraperIcon(int scraperEventtype, int status) if (scraperEventtype == (int)scrapereventtypes::OutOfSync && status == CT_UPDATING) { - labelScraperIcon->setPixmap(QIcon(":/icons/notsynced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelScraperIcon->setPixmap(QIcon(":/icons/status_scraper_waiting_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); labelScraperIcon->setToolTip(tr("Scraper: waiting on wallet to sync.")); } else if (scraperEventtype == (int)scrapereventtypes::Sleep && status == CT_NEW) { - labelScraperIcon->setPixmap(QIcon(":/icons/gray_scraper").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelScraperIcon->setPixmap(QIcon(":/icons/status_scraper_inactive_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); labelScraperIcon->setToolTip(tr("Scraper: superblock not needed - inactive.")); } else if (scraperEventtype == (int)scrapereventtypes::Stats && (status == CT_NEW || status == CT_UPDATED || status == CT_UPDATING)) { - labelScraperIcon->setPixmap(QIcon(":/icons/notsynced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelScraperIcon->setPixmap(QIcon(":/icons/status_scraper_waiting_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); labelScraperIcon->setToolTip(tr("Scraper: downloading and processing stats.")); } else if ((scraperEventtype == (int)scrapereventtypes::Convergence || scraperEventtype == (int)scrapereventtypes::SBContract) && (status == CT_NEW || status == CT_UPDATED) && nConvergenceTime) { - labelScraperIcon->setPixmap(QIcon(":/icons/green_scraper").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelScraperIcon->setPixmap(QIcon(":/icons/status_scraper_ok_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); if (bDisplayScrapers) { @@ -1615,7 +1683,7 @@ void BitcoinGUI::updateScraperIcon(int scraperEventtype, int status) else if ((scraperEventtype == (int)scrapereventtypes::Convergence || scraperEventtype == (int)scrapereventtypes::SBContract) && status == CT_DELETED) { - labelScraperIcon->setPixmap(QIcon(":/icons/white_and_red_x").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelScraperIcon->setPixmap(QIcon(":/icons/status_scraper_no_convergence_" + sSheet).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); labelScraperIcon->setToolTip(tr("Scraper: No convergence able to be achieved. Will retry in a few minutes.")); } @@ -1646,3 +1714,60 @@ void BitcoinGUI::updateBeaconIcon() .arg(researcherModel->formatTimeToBeaconExpiration()) .arg(researcherModel->formatBeaconStatus())); } + +// ----------------------------------------------------------------------------- +// Class: ToolbarButtonIconFilter +// ----------------------------------------------------------------------------- + +ToolbarButtonIconFilter::ToolbarButtonIconFilter( + QObject* parent, + QIcon resting_icon, + QIcon hover_icon) + : QObject(parent) + , m_resting_icon(std::move(resting_icon)) + , m_hover_icon(std::move(hover_icon)) +{ +} + +void ToolbarButtonIconFilter::apply( + QObject* parent, + QAction* tool_action, + QWidget* tool_button, + const int icon_size, + const QString& base_icon_path) +{ + const QPixmap inactive_pixmap = QIcon(base_icon_path).pixmap(icon_size, icon_size); + const QPixmap active_pixmap = QIcon(base_icon_path + "_active").pixmap(icon_size, icon_size); + + QIcon hover_icon(active_pixmap); + QIcon resting_icon; + resting_icon.addPixmap(inactive_pixmap, QIcon::Normal, QIcon::Off); + resting_icon.addPixmap(active_pixmap, QIcon::Normal, QIcon::On); + + tool_action->setIcon(resting_icon); + tool_button->installEventFilter(new ToolbarButtonIconFilter( + parent, + std::move(resting_icon), + std::move(hover_icon))); +} + +bool ToolbarButtonIconFilter::eventFilter(QObject* target, QEvent* event) +{ + QToolButton* button = qobject_cast(target); + + if (!button || button->isChecked()) { + return false; + } + + if (event->type() == QEvent::Enter) { + button->setIcon(m_hover_icon); + return true; + } + + if (event->type() == QEvent::Leave) { + button->setIcon(m_resting_icon); + return true; + } + + return false; +} diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index 771ba376ea..f9a32b5110 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -79,8 +79,8 @@ class BitcoinGUI : public QMainWindow OverviewPage *overviewPage; QWidget *transactionsPage; - AddressBookPage *addressBookPage; - AddressBookPage *receiveCoinsPage; + QWidget *addressBookPage; + QWidget *receiveCoinsPage; SendCoinsDialog *sendCoinsPage; VotingDialog *votingPage; SignVerifyMessageDialog *signVerifyMessageDialog; @@ -128,6 +128,8 @@ class BitcoinGUI : public QMainWindow QMenu *trayIconMenu; Notificator *notificator; TransactionView *transactionView; + AddressBookPage *addressBook; + AddressBookPage *receiveAddressBook; RPCConsole *rpcConsole; DiagnosticsDialog *diagnosticsDialog; @@ -263,4 +265,34 @@ private slots: void updateGlobalStatus(); }; +//! +//! \brief Sets up and toggles hover states for the main toolbar icons. +//! +//! Qt stylesheets do not provide a way to manage QToolButton resting, active +//! and hover states for the button icons in a way that scales for a high-DPI +//! desktop. This class provides an event filter implementation that switches +//! the tool button icons in response to hover events. +//! +class ToolbarButtonIconFilter : public QObject +{ + Q_OBJECT + +public: + explicit ToolbarButtonIconFilter(QObject* parent, QIcon resting_icon, QIcon hover_icon); + virtual ~ToolbarButtonIconFilter() { } + + static void apply( + QObject* parent, + QAction* tool_action, + QWidget* tool_button, + const int icon_size, + const QString& base_icon_path); + + bool eventFilter(QObject* watched, QEvent* event) override; + +private: + QIcon m_resting_icon; + QIcon m_hover_icon; +}; // ToolbarButtonIconFilter + #endif diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui index 06659e4a4a..07c016ab55 100644 --- a/src/qt/forms/addressbookpage.ui +++ b/src/qt/forms/addressbookpage.ui @@ -47,6 +47,9 @@ QAbstractItemView::SelectRows + + false + true diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index 9a27155c90..319cf0007b 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -39,10 +39,10 @@ 6 - + - + 0 0 @@ -535,7 +535,7 @@ - :/icons/warning + :/icons/warning true @@ -576,25 +576,25 @@ + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 10000 + + + + - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 20 - - - - @@ -775,8 +775,6 @@
clicklabel.h
- - - + diff --git a/src/qt/forms/researcherwizardbeaconpage.ui b/src/qt/forms/researcherwizardbeaconpage.ui index 09c6d22cce..b076108f24 100644 --- a/src/qt/forms/researcherwizardbeaconpage.ui +++ b/src/qt/forms/researcherwizardbeaconpage.ui @@ -65,9 +65,6 @@ - - :/icons/beacon_grey - true @@ -201,7 +198,7 @@ - :/icons/synced + :/icons/round_green_check true diff --git a/src/qt/forms/researcherwizardpoolsummarypage.ui b/src/qt/forms/researcherwizardpoolsummarypage.ui index 19529892a3..cc9a84e639 100644 --- a/src/qt/forms/researcherwizardpoolsummarypage.ui +++ b/src/qt/forms/researcherwizardpoolsummarypage.ui @@ -264,7 +264,7 @@ QAbstractItemView::SelectRows - true + false Qt::SolidLine diff --git a/src/qt/forms/researcherwizardprojectspage.ui b/src/qt/forms/researcherwizardprojectspage.ui index dbf81a937f..7808c7a5b2 100644 --- a/src/qt/forms/researcherwizardprojectspage.ui +++ b/src/qt/forms/researcherwizardprojectspage.ui @@ -56,7 +56,7 @@ QAbstractItemView::SelectRows - true + false Qt::SolidLine diff --git a/src/qt/forms/researcherwizardsummarypage.ui b/src/qt/forms/researcherwizardsummarypage.ui index 0a95056716..d4e744588e 100644 --- a/src/qt/forms/researcherwizardsummarypage.ui +++ b/src/qt/forms/researcherwizardsummarypage.ui @@ -65,7 +65,7 @@ 20 - 20 + 10 @@ -152,7 +152,7 @@ - :/icons/synced + :/icons/round_green_check true @@ -281,7 +281,7 @@ - :/images/ic_solo_active + :/images/ic_solo_active true @@ -455,9 +455,6 @@ - - :/icons/beacon_grey - true @@ -790,7 +787,7 @@ - :/icons/white_and_red_x + :/icons/white_and_red_x true @@ -859,7 +856,7 @@ QAbstractItemView::SelectRows - true + false Qt::SolidLine @@ -893,8 +890,6 @@
- - - + diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui index f2b64d9a1e..2b4ff8be2c 100755 --- a/src/qt/forms/rpcconsole.ui +++ b/src/qt/forms/rpcconsole.ui @@ -712,6 +712,12 @@ false + + true + + + false + true @@ -767,6 +773,12 @@ false + + true + + + false + true diff --git a/src/qt/forms/sendcoinsentry.ui b/src/qt/forms/sendcoinsentry.ui index 1e714bbb42..f9bb87325e 100644 --- a/src/qt/forms/sendcoinsentry.ui +++ b/src/qt/forms/sendcoinsentry.ui @@ -13,12 +13,6 @@ Form - - QFrame::StyledPanel - - - QFrame::Sunken - 12 diff --git a/src/qt/forms/signverifymessagedialog.ui b/src/qt/forms/signverifymessagedialog.ui index e6e8bfd883..bbd86e4b67 100644 --- a/src/qt/forms/signverifymessagedialog.ui +++ b/src/qt/forms/signverifymessagedialog.ui @@ -43,7 +43,7 @@ - 0 + 5 @@ -59,7 +59,7 @@ - + Choose an address from the address book @@ -67,19 +67,16 @@ - - :/icons/address-book:/icons/address-book + + :/icons/address-book_light:/icons/address-book_light Alt+A - - false - - + Paste address from clipboard @@ -93,9 +90,6 @@ Alt+P - - false - @@ -110,7 +104,7 @@ - 0 + 5 @@ -123,7 +117,7 @@ - + Copy the current signature to the system clipboard @@ -134,9 +128,6 @@ :/icons/editcopy:/icons/editcopy - - false - @@ -241,7 +232,7 @@ - 0 + 5 @@ -257,7 +248,7 @@ - + Choose an address from the address book @@ -265,15 +256,12 @@ - - :/icons/address-book:/icons/address-book + + :/icons/address-book_light:/icons/address-book_light Alt+A - - false - diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 85745a860b..c2b582065e 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -73,9 +73,8 @@ OptionsDialog::OptionsDialog(QWidget *parent) : ui->unit->setModel(new BitcoinUnits(this)); - ui->styleComboBox->addItem(tr("Light"),QVariant("light")); - ui->styleComboBox->addItem(tr("Dark"),QVariant("dark")); - ui->styleComboBox->addItem(tr("Native"),QVariant("native")); + ui->styleComboBox->addItem(tr("Dark"), QVariant("dark")); + ui->styleComboBox->addItem(tr("Light"), QVariant("light")); /* Widget-to-option mapper */ diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 840539641e..a75287463d 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -53,7 +53,7 @@ void OptionsModel::Init() limitTxnDate = settings.value("limitTxnDate", QDate()).toDate(); nReserveBalance = settings.value("nReserveBalance").toLongLong(); language = settings.value("language", "").toString(); - walletStylesheet = settings.value("walletStylesheet", "light").toString(); + walletStylesheet = settings.value("walletStylesheet", "dark").toString(); // These are shared with core Bitcoin; we want // command-line options to override the GUI settings: @@ -123,12 +123,12 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const return QVariant((qint64) nReserveBalance); case DisplayUnit: return QVariant(nDisplayUnit); - case DisplayAddresses: + case DisplayAddresses: return QVariant(bDisplayAddresses); case Language: return settings.value("language", ""); case WalletStylesheet: - return settings.value("walletStylesheet", "light"); + return settings.value("walletStylesheet", "dark"); case CoinControlFeatures: return QVariant(fCoinControlFeatures); case LimitTxnDisplay: @@ -232,9 +232,9 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in settings.setValue("nDisplayUnit", nDisplayUnit); emit displayUnitChanged(nDisplayUnit); break; - case DisplayAddresses: - bDisplayAddresses = value.toBool(); - settings.setValue("bDisplayAddresses", bDisplayAddresses); + case DisplayAddresses: + bDisplayAddresses = value.toBool(); + settings.setValue("bDisplayAddresses", bDisplayAddresses); break; case Language: settings.setValue("language", value); @@ -339,13 +339,18 @@ int OptionsModel::getDisplayUnit() return nDisplayUnit; } -bool OptionsModel::getDisplayAddresses() -{ - return bDisplayAddresses; +bool OptionsModel::getDisplayAddresses() +{ + return bDisplayAddresses; } QString OptionsModel::getCurrentStyle() { + // Native stylesheet removed for now: + if (walletStylesheet == "native") { + return "dark"; + } + return walletStylesheet; } diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 533cc290d4..265a39febb 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -128,7 +128,6 @@ OverviewPage::OverviewPage(QWidget *parent) : QRect verticalSpacerSpacing(0, 0, 20, 20 * this->logicalDpiY() / 96); ui->verticalSpacer->setGeometry(verticalSpacerSpacing); ui->researcherSectionVerticalSpacer->setGeometry(verticalSpacerSpacing); - ui->verticalSpacer_2->setGeometry(verticalSpacerSpacing); // Recent transactions ui->listTransactions->setItemDelegate(txdelegate); diff --git a/src/qt/res/fonts/Inter-Bold.ttf b/src/qt/res/fonts/Inter-Bold.ttf deleted file mode 100644 index 847ffd191b..0000000000 Binary files a/src/qt/res/fonts/Inter-Bold.ttf and /dev/null differ diff --git a/src/qt/res/fonts/Inter-Regular.ttf b/src/qt/res/fonts/Inter-Regular.ttf deleted file mode 100644 index 3b7e686e54..0000000000 Binary files a/src/qt/res/fonts/Inter-Regular.ttf and /dev/null differ diff --git a/src/qt/res/fonts/Inter-VariableFont.ttf b/src/qt/res/fonts/Inter-VariableFont.ttf new file mode 100644 index 0000000000..3b642151ed Binary files /dev/null and b/src/qt/res/fonts/Inter-VariableFont.ttf differ diff --git a/src/qt/res/icons/beacon_green.svg b/src/qt/res/icons/beacon_green.svg deleted file mode 100755 index 3e984eeadd..0000000000 --- a/src/qt/res/icons/beacon_green.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/src/qt/res/icons/beacon_grey.svg b/src/qt/res/icons/beacon_grey.svg deleted file mode 100755 index b6497992f0..0000000000 --- a/src/qt/res/icons/beacon_grey.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/src/qt/res/icons/beacon_red.svg b/src/qt/res/icons/beacon_red.svg deleted file mode 100755 index 53863edbc5..0000000000 --- a/src/qt/res/icons/beacon_red.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/src/qt/res/icons/beacon_yellow.svg b/src/qt/res/icons/beacon_yellow.svg deleted file mode 100755 index ca09fe0cd4..0000000000 --- a/src/qt/res/icons/beacon_yellow.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/qt/res/icons/gray_scraper.svg b/src/qt/res/icons/gray_scraper.svg deleted file mode 100755 index 1fcfec46a0..0000000000 --- a/src/qt/res/icons/gray_scraper.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/src/qt/res/icons/green_check.svg b/src/qt/res/icons/green_check.svg deleted file mode 100755 index befa76b85c..0000000000 --- a/src/qt/res/icons/green_check.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/qt/res/icons/green_scraper.svg b/src/qt/res/icons/green_scraper.svg deleted file mode 100755 index 4a2d9cc927..0000000000 --- a/src/qt/res/icons/green_scraper.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - diff --git a/src/qt/res/icons/icons_dark/sidebar_favorites_active.svg b/src/qt/res/icons/icons_dark/sidebar_favorites_active.svg new file mode 100644 index 0000000000..fb9f0509c1 --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_favorites_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_favorites_inactive.svg b/src/qt/res/icons/icons_dark/sidebar_favorites_inactive.svg new file mode 100644 index 0000000000..97193305e7 --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_favorites_inactive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_history_active.svg b/src/qt/res/icons/icons_dark/sidebar_history_active.svg new file mode 100644 index 0000000000..a2e1f932f1 --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_history_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_history_inactive.svg b/src/qt/res/icons/icons_dark/sidebar_history_inactive.svg new file mode 100644 index 0000000000..c95f70a137 --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_history_inactive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_locked_active.svg b/src/qt/res/icons/icons_dark/sidebar_locked_active.svg new file mode 100644 index 0000000000..c131b6f61e --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_locked_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_locked_inactive.svg b/src/qt/res/icons/icons_dark/sidebar_locked_inactive.svg new file mode 100644 index 0000000000..0c66323d1b --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_locked_inactive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_overview_active.svg b/src/qt/res/icons/icons_dark/sidebar_overview_active.svg new file mode 100644 index 0000000000..0b33cd3244 --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_overview_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_overview_inactive.svg b/src/qt/res/icons/icons_dark/sidebar_overview_inactive.svg new file mode 100644 index 0000000000..abdfb03bd6 --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_overview_inactive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_receive_active.svg b/src/qt/res/icons/icons_dark/sidebar_receive_active.svg new file mode 100644 index 0000000000..1eeb2fc6bc --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_receive_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_receive_inactive.svg b/src/qt/res/icons/icons_dark/sidebar_receive_inactive.svg new file mode 100644 index 0000000000..fcf9ba8719 --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_receive_inactive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_send_active.svg b/src/qt/res/icons/icons_dark/sidebar_send_active.svg new file mode 100644 index 0000000000..65e15adc3e --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_send_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_send_inactive.svg b/src/qt/res/icons/icons_dark/sidebar_send_inactive.svg new file mode 100644 index 0000000000..d9513289ac --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_send_inactive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_unlocked_active.svg b/src/qt/res/icons/icons_dark/sidebar_unlocked_active.svg new file mode 100644 index 0000000000..ab79a7a091 --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_unlocked_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_unlocked_inactive.svg b/src/qt/res/icons/icons_dark/sidebar_unlocked_inactive.svg new file mode 100644 index 0000000000..ad565cad36 --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_unlocked_inactive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_voting_active.svg b/src/qt/res/icons/icons_dark/sidebar_voting_active.svg new file mode 100644 index 0000000000..b0b4bf419e --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_voting_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/sidebar_voting_inactive.svg b/src/qt/res/icons/icons_dark/sidebar_voting_inactive.svg new file mode 100644 index 0000000000..7c1c411cef --- /dev/null +++ b/src/qt/res/icons/icons_dark/sidebar_voting_inactive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/status_beacon_gray.svg b/src/qt/res/icons/icons_dark/status_beacon_gray.svg new file mode 100644 index 0000000000..56a3279ff5 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_beacon_gray.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/qt/res/icons/icons_dark/status_beacon_green.svg b/src/qt/res/icons/icons_dark/status_beacon_green.svg new file mode 100644 index 0000000000..f7bd7de822 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_beacon_green.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/qt/res/icons/icons_dark/status_beacon_red.svg b/src/qt/res/icons/icons_dark/status_beacon_red.svg new file mode 100644 index 0000000000..3e95687c37 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_beacon_red.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/qt/res/icons/icons_dark/status_beacon_yellow.svg b/src/qt/res/icons/icons_dark/status_beacon_yellow.svg new file mode 100644 index 0000000000..d5dd341cc4 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_beacon_yellow.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/qt/res/icons/icons_dark/status_connections_average.svg b/src/qt/res/icons/icons_dark/status_connections_average.svg new file mode 100644 index 0000000000..82de7793ed --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_connections_average.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/qt/res/icons/icons_dark/status_connections_good.svg b/src/qt/res/icons/icons_dark/status_connections_good.svg new file mode 100644 index 0000000000..6c26b912b0 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_connections_good.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/status_connections_none.svg b/src/qt/res/icons/icons_dark/status_connections_none.svg new file mode 100644 index 0000000000..21d27d69c6 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_connections_none.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/qt/res/icons/icons_dark/status_connections_normal.svg b/src/qt/res/icons/icons_dark/status_connections_normal.svg new file mode 100644 index 0000000000..5561b4b717 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_connections_normal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/status_connections_poor.svg b/src/qt/res/icons/icons_dark/status_connections_poor.svg new file mode 100644 index 0000000000..dc09ab73a8 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_connections_poor.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/qt/res/icons/icons_dark/status_encryption_locked.svg b/src/qt/res/icons/icons_dark/status_encryption_locked.svg new file mode 100644 index 0000000000..07520365d5 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_encryption_locked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/status_encryption_none.svg b/src/qt/res/icons/icons_dark/status_encryption_none.svg new file mode 100644 index 0000000000..fdc84cb50a --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_encryption_none.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/status_encryption_unlocked.svg b/src/qt/res/icons/icons_dark/status_encryption_unlocked.svg new file mode 100644 index 0000000000..deb789895a --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_encryption_unlocked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/status_scraper_inactive.svg b/src/qt/res/icons/icons_dark/status_scraper_inactive.svg new file mode 100644 index 0000000000..eed7a104e9 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_scraper_inactive.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/qt/res/icons/icons_dark/status_scraper_no_convergence.svg b/src/qt/res/icons/icons_dark/status_scraper_no_convergence.svg new file mode 100644 index 0000000000..0f2a2742e7 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_scraper_no_convergence.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/qt/res/icons/icons_dark/status_scraper_ok.svg b/src/qt/res/icons/icons_dark/status_scraper_ok.svg new file mode 100644 index 0000000000..68d43aa5c7 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_scraper_ok.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/qt/res/icons/icons_dark/status_scraper_waiting.svg b/src/qt/res/icons/icons_dark/status_scraper_waiting.svg new file mode 100644 index 0000000000..ebf5438a43 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_scraper_waiting.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/qt/res/icons/icons_dark/status_staking_no.svg b/src/qt/res/icons/icons_dark/status_staking_no.svg new file mode 100644 index 0000000000..11442fe376 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_staking_no.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/status_staking_problem.svg b/src/qt/res/icons/icons_dark/status_staking_problem.svg new file mode 100644 index 0000000000..c95102b923 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_staking_problem.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_dark/status_staking_yes.svg b/src/qt/res/icons/icons_dark/status_staking_yes.svg new file mode 100644 index 0000000000..fb44cceefe --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_staking_yes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/status_sync_done.svg b/src/qt/res/icons/icons_dark/status_sync_done.svg new file mode 100644 index 0000000000..9fbe197480 --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_sync_done.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_dark/status_sync_stalled.svg b/src/qt/res/icons/icons_dark/status_sync_stalled.svg new file mode 100644 index 0000000000..1683352d6b --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_sync_stalled.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_dark/status_sync_syncing.svg b/src/qt/res/icons/icons_dark/status_sync_syncing.svg new file mode 100644 index 0000000000..c7cea578cf --- /dev/null +++ b/src/qt/res/icons/icons_dark/status_sync_syncing.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/sidebar_favorites_active.svg b/src/qt/res/icons/icons_light/sidebar_favorites_active.svg new file mode 100644 index 0000000000..97193305e7 --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_favorites_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/sidebar_favorites_inactive.svg b/src/qt/res/icons/icons_light/sidebar_favorites_inactive.svg new file mode 100644 index 0000000000..d95ed661fc --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_favorites_inactive.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/sidebar_history_active.svg b/src/qt/res/icons/icons_light/sidebar_history_active.svg new file mode 100644 index 0000000000..c95f70a137 --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_history_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/sidebar_history_inactive.svg b/src/qt/res/icons/icons_light/sidebar_history_inactive.svg new file mode 100644 index 0000000000..1a8f4fd122 --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_history_inactive.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/sidebar_locked_active.svg b/src/qt/res/icons/icons_light/sidebar_locked_active.svg new file mode 100644 index 0000000000..0c66323d1b --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_locked_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/sidebar_locked_inactive.svg b/src/qt/res/icons/icons_light/sidebar_locked_inactive.svg new file mode 100644 index 0000000000..e99ab48924 --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_locked_inactive.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/sidebar_overview_active.svg b/src/qt/res/icons/icons_light/sidebar_overview_active.svg new file mode 100644 index 0000000000..abdfb03bd6 --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_overview_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/sidebar_overview_inactive.svg b/src/qt/res/icons/icons_light/sidebar_overview_inactive.svg new file mode 100644 index 0000000000..7a4a18dac7 --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_overview_inactive.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/sidebar_receive_active.svg b/src/qt/res/icons/icons_light/sidebar_receive_active.svg new file mode 100644 index 0000000000..fcf9ba8719 --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_receive_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/sidebar_receive_inactive.svg b/src/qt/res/icons/icons_light/sidebar_receive_inactive.svg new file mode 100644 index 0000000000..91fc2684c9 --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_receive_inactive.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/sidebar_send_active.svg b/src/qt/res/icons/icons_light/sidebar_send_active.svg new file mode 100644 index 0000000000..d9513289ac --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_send_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/sidebar_send_inactive.svg b/src/qt/res/icons/icons_light/sidebar_send_inactive.svg new file mode 100644 index 0000000000..eaab28b289 --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_send_inactive.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/sidebar_unlocked_active.svg b/src/qt/res/icons/icons_light/sidebar_unlocked_active.svg new file mode 100644 index 0000000000..ad565cad36 --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_unlocked_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/sidebar_unlocked_inactive.svg b/src/qt/res/icons/icons_light/sidebar_unlocked_inactive.svg new file mode 100644 index 0000000000..f710854d0b --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_unlocked_inactive.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/sidebar_voting_active.svg b/src/qt/res/icons/icons_light/sidebar_voting_active.svg new file mode 100644 index 0000000000..7c1c411cef --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_voting_active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/sidebar_voting_inactive.svg b/src/qt/res/icons/icons_light/sidebar_voting_inactive.svg new file mode 100644 index 0000000000..b3357b457d --- /dev/null +++ b/src/qt/res/icons/icons_light/sidebar_voting_inactive.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/status_beacon_gray.svg b/src/qt/res/icons/icons_light/status_beacon_gray.svg new file mode 100644 index 0000000000..9e0979d8e6 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_beacon_gray.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/qt/res/icons/icons_light/status_beacon_green.svg b/src/qt/res/icons/icons_light/status_beacon_green.svg new file mode 100644 index 0000000000..0f55289004 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_beacon_green.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/qt/res/icons/icons_light/status_beacon_red.svg b/src/qt/res/icons/icons_light/status_beacon_red.svg new file mode 100644 index 0000000000..3e95687c37 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_beacon_red.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/qt/res/icons/icons_light/status_beacon_yellow.svg b/src/qt/res/icons/icons_light/status_beacon_yellow.svg new file mode 100644 index 0000000000..cabd5152ad --- /dev/null +++ b/src/qt/res/icons/icons_light/status_beacon_yellow.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/qt/res/icons/icons_light/status_connections_average.svg b/src/qt/res/icons/icons_light/status_connections_average.svg new file mode 100644 index 0000000000..552438ceca --- /dev/null +++ b/src/qt/res/icons/icons_light/status_connections_average.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/qt/res/icons/icons_light/status_connections_good.svg b/src/qt/res/icons/icons_light/status_connections_good.svg new file mode 100644 index 0000000000..a2b31b53c2 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_connections_good.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/status_connections_none.svg b/src/qt/res/icons/icons_light/status_connections_none.svg new file mode 100644 index 0000000000..a5fecfbcb3 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_connections_none.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/qt/res/icons/icons_light/status_connections_normal.svg b/src/qt/res/icons/icons_light/status_connections_normal.svg new file mode 100644 index 0000000000..e24b3f4e59 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_connections_normal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/status_connections_poor.svg b/src/qt/res/icons/icons_light/status_connections_poor.svg new file mode 100644 index 0000000000..dc09ab73a8 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_connections_poor.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/qt/res/icons/icons_light/status_encryption_locked.svg b/src/qt/res/icons/icons_light/status_encryption_locked.svg new file mode 100644 index 0000000000..529b4a1f9a --- /dev/null +++ b/src/qt/res/icons/icons_light/status_encryption_locked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/status_encryption_none.svg b/src/qt/res/icons/icons_light/status_encryption_none.svg new file mode 100644 index 0000000000..fdc84cb50a --- /dev/null +++ b/src/qt/res/icons/icons_light/status_encryption_none.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/status_encryption_unlocked.svg b/src/qt/res/icons/icons_light/status_encryption_unlocked.svg new file mode 100644 index 0000000000..1380174796 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_encryption_unlocked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/status_scraper_inactive.svg b/src/qt/res/icons/icons_light/status_scraper_inactive.svg new file mode 100644 index 0000000000..d9b4f0ba65 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_scraper_inactive.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/qt/res/icons/icons_light/status_scraper_no_convergence.svg b/src/qt/res/icons/icons_light/status_scraper_no_convergence.svg new file mode 100644 index 0000000000..0f2a2742e7 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_scraper_no_convergence.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/qt/res/icons/icons_light/status_scraper_ok.svg b/src/qt/res/icons/icons_light/status_scraper_ok.svg new file mode 100644 index 0000000000..eed7a104e9 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_scraper_ok.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/qt/res/icons/icons_light/status_scraper_waiting.svg b/src/qt/res/icons/icons_light/status_scraper_waiting.svg new file mode 100644 index 0000000000..ebf5438a43 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_scraper_waiting.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/qt/res/icons/icons_light/status_staking_no.svg b/src/qt/res/icons/icons_light/status_staking_no.svg new file mode 100644 index 0000000000..1919e4bcf5 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_staking_no.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/status_staking_problem.svg b/src/qt/res/icons/icons_light/status_staking_problem.svg new file mode 100644 index 0000000000..c95102b923 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_staking_problem.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/status_staking_yes.svg b/src/qt/res/icons/icons_light/status_staking_yes.svg new file mode 100644 index 0000000000..11442fe376 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_staking_yes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/status_sync_done.svg b/src/qt/res/icons/icons_light/status_sync_done.svg new file mode 100644 index 0000000000..9fbe197480 --- /dev/null +++ b/src/qt/res/icons/icons_light/status_sync_done.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/qt/res/icons/icons_light/status_sync_stalled.svg b/src/qt/res/icons/icons_light/status_sync_stalled.svg new file mode 100644 index 0000000000..1683352d6b --- /dev/null +++ b/src/qt/res/icons/icons_light/status_sync_stalled.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_light/status_sync_syncing.svg b/src/qt/res/icons/icons_light/status_sync_syncing.svg new file mode 100644 index 0000000000..c7cea578cf --- /dev/null +++ b/src/qt/res/icons/icons_light/status_sync_syncing.svg @@ -0,0 +1 @@ + diff --git a/src/qt/res/icons/icons_native/address-book.svg b/src/qt/res/icons/icons_native/address-book.svg deleted file mode 100644 index 1938e43e40..0000000000 --- a/src/qt/res/icons/icons_native/address-book.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/qt/res/icons/icons_native/lock_closed.svg b/src/qt/res/icons/icons_native/lock_closed.svg deleted file mode 100644 index 728bb2ac43..0000000000 --- a/src/qt/res/icons/icons_native/lock_closed.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/qt/res/icons/icons_native/lock_open.svg b/src/qt/res/icons/icons_native/lock_open.svg deleted file mode 100644 index 2cda9a38eb..0000000000 --- a/src/qt/res/icons/icons_native/lock_open.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/qt/res/icons/icons_native/overview.svg b/src/qt/res/icons/icons_native/overview.svg deleted file mode 100644 index ddbfd8a1e9..0000000000 --- a/src/qt/res/icons/icons_native/overview.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/qt/res/icons/icons_native/receive.svg b/src/qt/res/icons/icons_native/receive.svg deleted file mode 100644 index 423917e1f6..0000000000 --- a/src/qt/res/icons/icons_native/receive.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/qt/res/icons/icons_native/send.svg b/src/qt/res/icons/icons_native/send.svg deleted file mode 100644 index 0642a1e780..0000000000 --- a/src/qt/res/icons/icons_native/send.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/qt/res/icons/icons_native/transactions.svg b/src/qt/res/icons/icons_native/transactions.svg deleted file mode 100644 index 12b2992f23..0000000000 --- a/src/qt/res/icons/icons_native/transactions.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/qt/res/icons/notsynced.svg b/src/qt/res/icons/notsynced.svg deleted file mode 100755 index 8d3f17a5a7..0000000000 --- a/src/qt/res/icons/notsynced.svg +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/src/qt/res/icons/staking_off.svg b/src/qt/res/icons/staking_off.svg deleted file mode 100755 index 014225057f..0000000000 --- a/src/qt/res/icons/staking_off.svg +++ /dev/null @@ -1,132 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/qt/res/icons/staking_on.svg b/src/qt/res/icons/staking_on.svg deleted file mode 100755 index 85e7374ea1..0000000000 --- a/src/qt/res/icons/staking_on.svg +++ /dev/null @@ -1,110 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/qt/res/icons/staking_unable.svg b/src/qt/res/icons/staking_unable.svg deleted file mode 100644 index 8cbd8bc5e2..0000000000 --- a/src/qt/res/icons/staking_unable.svg +++ /dev/null @@ -1,132 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/qt/res/icons/transaction2.png b/src/qt/res/icons/transaction2.png deleted file mode 100644 index 8a804b05ac..0000000000 Binary files a/src/qt/res/icons/transaction2.png and /dev/null differ diff --git a/src/qt/res/icons/transaction2.svg b/src/qt/res/icons/transaction2.svg new file mode 100644 index 0000000000..9fa23557ae --- /dev/null +++ b/src/qt/res/icons/transaction2.svg @@ -0,0 +1,4 @@ + + + diff --git a/src/qt/res/icons/tx_contract_beacon.svg b/src/qt/res/icons/tx_contract_beacon.svg new file mode 100644 index 0000000000..b1a0095a1d --- /dev/null +++ b/src/qt/res/icons/tx_contract_beacon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/qt/res/icons/icons_native/Voting.svg b/src/qt/res/icons/tx_contract_voting.svg similarity index 100% rename from src/qt/res/icons/icons_native/Voting.svg rename to src/qt/res/icons/tx_contract_voting.svg diff --git a/src/qt/res/images/boinc_logo_white.svg b/src/qt/res/images/boinc_logo_white.svg index 6a6a68c68c..a5ee85273d 100644 --- a/src/qt/res/images/boinc_logo_white.svg +++ b/src/qt/res/images/boinc_logo_white.svg @@ -1,88 +1,10 @@ - - -image/svg+xml - - - - - - - - - + + + + + + + + + diff --git a/src/qt/res/images/gridcoin.svg b/src/qt/res/images/gridcoin.svg index 7913f2c77e..0bcb9a0129 100644 --- a/src/qt/res/images/gridcoin.svg +++ b/src/qt/res/images/gridcoin.svg @@ -1,9 +1,8 @@ - - - + + QWidget > QWidget, +QTreeWidget { + background-color: transparent; + border: none; +} + +.QFrame, +AddressBookPage, +QGroupBox, +QTabWidget::pane, +#SendCoinsEntry, +TransactionView { + background: rgb(23, 30, 40); + border: none; + border-radius: 0.26em; + padding: 0.75em; } /* HLine */ QFrame[frameShape="4"] { - border-top: 0.065em solid rgb(67, 74, 80); + border-top: 0.065em solid rgb(58, 70, 94); } /* VLine */ QFrame[frameShape="5"] { - border-left: 0.065em solid rgb(67, 74, 80); + border-left: 0.065em solid rgb(58, 70, 94); } -QToolBar#toolbar QToolButton { - color: white; - background-color: rgb(49,54,59); - border: none; - border-radius: 0; +QMenu { + border: 0.065em solid rgb(58, 70, 94); } -QToolBar#toolbar QToolButton:hover { - color:white; - background-color: rgb(65,0,127); +QMenu::item { + padding: 0.25em 1.5em 0.25em 1.5em; } -QToolBar#toolbar QToolButton:checked { - background-color: rgb(64,68,82); +QMenu::icon { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + margin-left: 0.5em; } -QToolBar#toolbar QToolButton:checked:hover { - background-color: rgb(65,0,127); +QMenu::separator { + background: none; + border-top: 0.065em solid rgb(58, 70, 94); + height: 0.065em; + margin: 0.13em 0 0.065em 0; } QMenuBar { - background: rgb(49,54,59); - color: white; + spacing: 0; } QMenuBar::item { - padding-bottom:0.5em; - padding-top:0.5em; - padding-left:1em; - padding-right:1em; - color: white; - background-color: rgb(49,54,59); + margin: 0; + padding: 0.25em 1em; + border: none; } -QMenuBar::item:selected { - background-color:rgb(65,0,127); +QMenu::item::selected, +QMenuBar::item::selected { + background-color: rgb(26, 145, 235); + border: none; color: white; } -QMenu { - background: rgb(49,54,59); - color: white; - padding-bottom:0.625; +QMenu::item:disabled, +QMenuBar::item:disabled { + color: rgb(153, 161, 163); } -QMenu::item { - color: white; - background-color: transparent; +QScrollBar:horizontal, +QScrollBar::vertical { + background: rgb(16, 21, 28); + margin: 0; + border-radius: 0.26em; } -QMenu::item:selected { - background-color:rgb(65,0,127); - color:white; +QScrollBar:horizontal { + height: 0.5em; } -QScrollArea > QWidget > QWidget { - background-color: rgb(49,54,59); +QScrollBar:vertical { + width: 0.5em; } -/* horizontal scrollbar */ - -QScrollBar:horizontal { - background: rgb(49,54,59); - height: 0.625em; - margin: 0 0 0 0; +QScrollBar::handle:horizontal, +QScrollBar::handle:vertical { + background: rgb(20, 67, 124); + border: none; + border-radius: 0.26em; } QScrollBar::handle:horizontal { - background: rgb(150,150,150); - border: 0.065em rgb(150,150,150); - border-radius: 0.19em; - min-width: 1.25wm; + min-width: 1.5em; } -QScrollBar::handle:horizontal:hover { - background: rgb(65,0,127); - border: 0.065em rgb(65,0,127); - border-radius: 0.19em; - min-width: 1.25em; +QScrollBar::handle:vertical { + min-height: 1.5em; } -QScrollBar::add-line:horizontal { - border: none; - background-color: rgb(49,54,59); - width: 0; - height: 0; +QScrollBar::handle:horizontal:hover, +QScrollBar::handle:vertical:hover { + background: rgb(75, 143, 226); +} + +QScrollBar::handle:horizontal:pressed, +QScrollBar::handle:vertical:pressed { + background: rgb(58, 132, 223); +} + +QScrollBar::add-page:horizontal, +QScrollBar::sub-page:horizontal, +QScrollBar::add-page:vertical, +QScrollBar::sub-page:vertical { + background: none; } -QScrollBar::sub-line:horizontal { +QScrollBar::add-line:horizontal, +QScrollBar::sub-line:horizontal, +QScrollBar::add-line:vertical, +QScrollBar::sub-line:vertical { border: none; - background-color: rgb(49,54,59); + background: transparent; width: 0; height: 0; } -/* vertical scrollbar */ +QSplitter::handle { + background: rgba(58, 70, 94, 0.4); +} -QScrollBar:vertical { - background: rgb(49,54,59); - width: 0.625em; - margin: 0 0 0 0; +QSplitter::handle:hover, +QSplitter::handle:pressed { + background: rgb(58, 70, 94); } -QScrollBar::handle:vertical { - background: rgb(150,150,150); - border: 0.065em rgb(150,150,150); - border-radius: 0.19em; - min-height: 1.25em; +QToolTip { + color: white; + background-color: rgb(64,68,82); + border: none; } -QScrollBar::handle:vertical:hover { - background: rgb(65,0,127); - border: 0.065em rgb(65,0,127); - border-radius: 0.19em; - min-height: 1.25em; +QGroupBox { + padding-top: 1.5em; } -QScrollBar::add-line:vertical { - border: none; - background-color: rgb(49,54,59); - width: 0; - height: 0; +QGroupBox::title { + margin: 0.75em; + font-weight: bold; } -QScrollBar::sub-line:vertical { - border: none; - background-color: rgb(49,54,59); - width: 0; - height: 0; +QListWidget, +QTableView, +QTreeWidget { + border: 0.065em solid rgb(58, 70, 94); + border-radius: 0.26em; } -QToolTip { - color: white; - background-color: rgb(64,68,82); +QListWidget::item, +QTableView::item { + background-color: transparent; border: none; } -QTableView{ - background-color: rgb(49,54,59); - color:white; - alternate-background-color:rgb(35,38,41); +QListWidget::item { + height: 1.5em; + padding-left: 0.5em; + padding-right: 0.5em; } -QTableView::item{ - background-color: transparent; - color:white; +QListWidget QScrollBar:horizontal, +QTableView QScrollBar:horizontal, +QTreeWidget QScrollBar:horizontal { + border-top: 0.065em solid rgb(33, 44, 58); + border-top-left-radius: 0; + border-top-right-radius: 0; } -QTableView::item:selected{ - background-color: rgb(65,0,127); - color:white; +QListWidget QScrollBar:vertical, +QTableView QScrollBar:vertical, +QTreeWidget QScrollBar:vertical { + border-left: 0.065em solid rgb(33, 44, 58); + border-top-left-radius: 0; + border-bottom-left-radius: 0; } -QTableView::item:hover{ - background-color: rgb(65,0,127); - color:white; +QHeaderView::section, +QTableView QTableCornerButton::section { + background-color: rgb(23, 30, 38); + border: none; + border-bottom: 0.065em solid rgb(33, 44, 58); + padding: 0.25em; + color: rgb(115, 131, 161); } -QHeaderView{ - background-color: rgb(64,68,82); +QHeaderView::section:first, +QTableView QTableCornerButton::section { + border-top-left-radius: 0.26em; } -QHeaderView::section { - background-color:rgb(64,68,82); - color:white; +QHeaderView::section:last { + border-top-right-radius: 0.26em; } QHeaderView::section:hover { - background-color:rgb(65,0,127); - color:white; + color: white; } QComboBox, @@ -245,6 +288,10 @@ QToolButton:disabled { color: rgb(174, 180, 182); } +QLineEdit::text { + color: rgb(174, 180, 182); +} + QComboBox::drop-down, QDateTimeEdit::drop-down { background-color: transparent; @@ -261,9 +308,8 @@ QComboBox QAbstractItemView { selection-color: white; } -QAbstractItemView::item:selected { - background-color:rgb(65,0,127); - color: white; +QAbstractItemView { + alternate-background-color: rgb(23, 33, 43); } QAbstractItemView::item:checked, @@ -273,23 +319,6 @@ QAbstractItemView::item:selected { color: white; } -QDateTimeEdit QAbstractItemView { - background-color:rgb(49,54,59); -} - -QDateTimeEdit QAbstractItemView::item:checked { - background-color:rgb(65,0,127); -} - -QDateTimeEdit QAbstractItemView::item:selected { - background-color:rgb(65,0,127); - color: white; -} - -QDialog{ - background-color: rgb(49,54,59); -} - QPushButton { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgb(44, 160, 247), stop: 1 rgb(26, 145, 235)); border: 0.065em solid rgb(23, 137, 223); @@ -317,32 +346,6 @@ QPushButton:disabled { color: rgb(211, 232, 248); } -QTreeWidget{ - color: rgb(255,255,255); - background-color: rgb(49,54,59); - alternate-background-color: rgb(35,38,41); -} - -QListView { - background: rgb(49,54,59); - alternate-background-color: rgb(35,38,41); -} - -QListView::item { - background-color:transparent; - color:white; -} - -QListView::item:selected { - background-color:rgb(65,0,127); - color:white; -} - -QListView::item:checked { - background-color:rgb(65,0,127); - color:white; -} - QToolButton { padding: 0.25em; } @@ -374,51 +377,41 @@ QSpinBox::down-button { QDateEdit::up-arrow, QDoubleSpinBox::up-arrow, QSpinBox::up-arrow { - image: url(:/icons/light_chevron_up); + image: url(:/icons/dark_chevron_up); } QDateEdit::down-arrow, QDoubleSpinBox::down-arrow, QSpinBox::down-arrow { - image: url(:/icons/light_chevron_down); + image: url(:/icons/dark_chevron_down); } QTabWidget::tab-bar { left: 0.5em; } -QTabWidget::pane { /* The tab widget frame */ - background-color: rgb(58, 64, 69); - border: 0.065em solid rgb(67, 74, 80); +QTabBar { + color: rgb(220, 220, 220); + font-weight: 500; } QTabBar::tab { - background-color: rgb(49, 54, 59); - border: 0.065em solid rgb(67, 74, 80); - border-bottom: none; + background-color: transparent; + border-bottom: 0.195em solid transparent; min-height: 1.25em; min-width: 0.5em; - padding: 0.125em 1em; + padding: 0.5em 0; + margin-bottom: 0.5em; + margin-right: 1.5em; } -QTabBar::tab:!first { - margin-left: -0.065em; -} - - QTabBar::tab:selected { - background-color: rgb(58, 64, 69); - border-bottom-color: rgb(58, 64, 69); - border-top-color: rgb(120, 20, 255); - border-top-width: 0.13em; -} - -QTabBar::tab:!selected { - margin-top: 0.13em; + border-bottom-color: rgb(75, 143, 226); + color: rgb(75, 143, 226); } QTabBar::tab:!selected:hover { - background-color: rgb(58, 64, 69); + border-bottom-color: rgb(75, 143, 226); } /* RPC Console */ @@ -426,81 +419,79 @@ QTabBar::tab:!selected:hover { font-family: "Inconsolata"; } -QGroupBox{ - background-color: rgb(49,54,59); -} +/* Main Window*/ -QListWidget{ - color:white; - background-color:rgb(49,54,59); +QToolBar#toolbar { + border-right: 0.065em solid rgb(18, 26, 34); + height: 100%; } -/* Main Window*/ +QToolBar#toolbar QToolButton { + width: 100%; + min-width: 6em; + background-color: transparent; + border: none; + font-weight: 500; + padding: 0.3em 0 0.25em 0; +} -#toolbar { - border:none; - padding-top:1.25em; - min-width:8.5em; - height:100%; - color: white; +QToolBar#toolbar QToolButton:hover, +QToolBar#toolbar QToolButton:checked { + color: rgb(26, 145, 235); } -#toolbar2 { - border:none; - min-width:1.625em; - max-width:3em; - color: white; +QToolBar#toolbar::separator { + background: none; + border-top: 0.065em solid rgb(204, 208, 209); + height: 0.065em; + margin: 0.25em 1.5em; } -#toolbar3 { - border:none; - min-height:3.25em; - max-height:3.25em; +#toolbarLogoLabel { + image: url(:/images/gridcoin); + border-bottom: 0.065em solid rgb(18, 26, 34); + min-width: 2.75em; + min-height: 2.75em; + padding: 1em 1.5em; } -QToolBar#toolbar QToolButton { - padding-left:1.25em; - padding-right:1.25em; - padding-top:0.5em; - padding-bottom:0.5em; - margin:0.25em; - width:100%; +#toolbarBoincLabel { + image: url(:/images/boinc_w); + min-width: 4em; + min-height: 1.68em; + padding: 1em; } -QToolBar#toolbar2 QLabel{ - border:none; - padding-top:1em; - padding-bottom:1em; - qproperty-alignment: AlignCenter; +QStatusBar { + background: rgb(23, 23, 23); + border-top: 0.065em solid rgb(19, 19, 19); } -QToolBar#toolbar2 QToolTip { - color:white +QStatusBar::item { + border: none; } -QToolBar#toolbar3 QLabel{ - margin:0.5em; +QStatusBar .QFrame { + background: transparent; + padding: 0; + margin: 0.25em 0; } -#spacer { - background-color:transparent; - border:none; +QStatusBar .QFrame QLabel { + border: none; + margin: 0 0.25em; } -#boincLogo{ - image:url(:/images/boinc_w); - min-width:5.38em; - max-width:5.38em; - min-height:2.25em; - max-height:2.25em; +QStatusBar QToolTip { + color: white } -#gridcoinLogoHorizontal{ - image:url(:/images/logo_hz); - min-width:9.225em; - max-width:9.225em; - min-height:2.25em; - max-height:2.25em; +#testnetStatusLabel { + background-color: rgb(237, 81, 68); + border-radius: 0.25em; + padding: 0.1em 0.2em; + color: white; + font-weight: bold; } #aboutLogoLabel{ @@ -517,8 +508,9 @@ QToolBar#toolbar3 QLabel{ #researcherHeaderLabel, #stakingHeaderLabel, #recentTransLabel { - font-size:15pt; - font-weight:bold; + font-size: 15pt; + font-weight: bold; + color: rgb(250, 250, 250); } #availableLabel, @@ -576,10 +568,6 @@ QToolBar#toolbar3 QLabel{ font-weight:bold; } -#SendCoinsEntry { - background-color: rgb(49,54,59); -} - /* options dialog */ #OptionsDialog #statusLabel{ diff --git a/src/qt/res/stylesheets/light_stylesheet.qss b/src/qt/res/stylesheets/light_stylesheet.qss index d56eace429..b4d9569055 100644 --- a/src/qt/res/stylesheets/light_stylesheet.qss +++ b/src/qt/res/stylesheets/light_stylesheet.qss @@ -1,186 +1,242 @@ +/* Copyright (c) 2014-2021 The Gridcoin developers + * Distributed under the MIT/X11 software license, see the accompanying + * file COPYING or http://www.opensource.org/licenses/mit-license.php. + */ + /* general */ -* { - font-family: "Inter"; +QWidget { + color: rgb(58, 70, 93); + font-family: "SF Pro Display", "Segoe UI", "Inter"; } QMainWindow { - background-color:rgb(240,240,240); - border:none; - font-family: "Inter"; + border: none; } -QWidget { - color: rgb(88, 92, 107); +QMainWindow, +QBalloonTip, +QDialog { + background-color: rgb(235, 236, 238); } -QToolBar#toolbar QToolButton { - color: black; +QHeaderView, +QListView, +QListView::item, +QMenuBar, +QScrollArea, +QScrollArea > QWidget > QWidget, +QTreeWidget { background-color: transparent; - border: none; - border-radius: 0; } -QToolBar#toolbar QToolButton:hover { - color:white; - background-color: rgb(65,0,127); +.QFrame, +AddressBookPage, +QGroupBox, +QTabWidget::pane, +#SendCoinsEntry, +TransactionView { + background: white; + border: none; + border-radius: 0.26em; + padding: 0.75em; } -QToolBar#toolbar QToolButton:checked { - background-color: rgb(200,200,200); +/* HLine */ +QFrame[frameShape="4"] { + border-top: 0.065em solid rgb(234, 237, 237); } -QToolBar#toolbar QToolButton:checked:hover { - background-color: rgb(65,0,127); +/* VLine */ +QFrame[frameShape="5"] { + border-left: 0.065em solid rgb(234, 237, 237); } -QMenuBar { - background: rgb(240,240,240); - color: black; +QMenu { + background-color: white; + border: 0.065em solid rgb(224, 227, 227); } -QMenuBar::item { - padding-bottom:0.5em; - padding-top:0.5em; - padding-left:1em; - padding-right:1em; - color: black; - background-color: rgb(240,240,240); +QMenu::item { + padding: 0.25em 1.5em 0.25em 1.5em; } -QMenuBar::item:selected { - background-color:rgb(65,0,127); - color: white; +QMenu::item:selected { + border: none; } -QMenu { - background: rgb(240,240,240); - color: black; - padding-bottom:0.625; +QMenu::icon { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + margin-left: 0.5em; } -QMenu::item { - color: black; - background-color: transparent; +QMenu::separator { + background: none; + border-top: 0.065em solid rgb(234, 237, 237); + height: 0.065em; + margin: 0.13em 0 0.065em 0; } -QMenu::item:selected { - background-color:rgb(65,0,127); - color:white; +QMenuBar { + spacing: 0; } -/* horizontal scrollbar */ +QMenuBar::item { + margin: 0; + padding: 0.25em 1em; + border: none; +} -QScrollBar:horizontal { - background: rgb(240,240,240); - height: 0.625em; - margin: 0 0 0 0; +QMenu::item:disabled, +QMenuBar::item:disabled { + color: rgb(140, 140, 140); } -QScrollBar::handle:horizontal { - background: rgb(180,180,180); - border: 0.065em rgb(180,180,180); - border-radius: 0.19em; - min-width: 1.25wm; +QScrollArea { + border: none; } -QScrollBar::handle:horizontal:hover { - background: rgb(65,0,127); - border: 0.065em rgb(65,0,127); - border-radius: 0.19em; - min-width: 1.25em; +QScrollBar:horizontal, +QScrollBar:vertical { + background: rgb(245, 246, 248); + margin: 0; + border-radius: 0.26em; } -QScrollBar::add-line:horizontal { - border: none; - background-color: rgb(240,240,240); - width: 0; - height: 0; +QScrollBar:horizontal { + height: 0.5em; } -QScrollBar::sub-line:horizontal { - border: none; - background-color: rgb(240,240,240); - width: 0; - height: 0; +QScrollBar:vertical { + width: 0.5em; } -/* vertical scrollbar */ +QScrollBar::handle:horizontal, +QScrollBar::handle:vertical { + background: rgb(210, 210, 211); + border: none; + border-radius: 0.26em; +} -QScrollBar:vertical { - background: rgb(240,240,240); - width: 0.625em; - margin: 0 0 0 0; +QScrollBar::handle:horizontal { + min-width: 1.5em; } QScrollBar::handle:vertical { - background: rgb(180,180,180); - border: 0.065em rgb(180,180,180); - border-radius: 0.19em; - min-height: 1.25em; + min-height: 1.5em; } +QScrollBar::handle:horizontal:hover, QScrollBar::handle:vertical:hover { - background: rgb(65,0,127); - border: 0.065em rgb(65,0,127); - border-radius: 0.19em; - min-height: 1.25em; + background: rgb(180, 180, 180); } -QScrollBar::add-line:vertical { - border: none; - background-color: rgb(240,240,240); - width: 0; - height: 0; +QScrollBar::handle:horizontal:pressed, +QScrollBar::handle:vertical:pressed { + background: rgb(160, 160, 160); +} + +QScrollBar::add-page:horizontal, +QScrollBar::sub-page:horizontal, +QScrollBar::add-page:vertical, +QScrollBar::sub-page:vertical { + background: none; } +QScrollBar::add-line:horizontal, +QScrollBar::sub-line:horizontal, +QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical { border: none; - background-color: rgb(240,240,240); + background: transparent; width: 0; height: 0; } +QSplitter::handle { + background: rgba(224, 227, 227, 0.5); +} + +QSplitter::handle:hover, +QSplitter::handle:pressed { + background: rgb(224, 227, 227); +} + QToolTip { color: black; background-color: rgb(245,245,245); border: none; } +QGroupBox { + padding-top: 1.5em; +} + +QGroupBox::title { + margin: 0.75em; + font-weight: bold; +} -QTableView{ - background-color: rgb(240,240,240); - color:black; - alternate-background-color:white; +QListWidget, +QTableView, +QTreeWidget { + background-color: white; + border: 0.065em solid rgb(194, 199, 205); + border-radius: 0.26em; } -QTableView::item{ +QListWidget::item, +QTableView::item { background-color: transparent; - color:black; + border: none; +} + +QListWidget::item { + height: 1.5em; + padding-left: 0.5em; + padding-right: 0.5em; } -QTableView::item:selected{ - background-color: rgb(65,0,127); - color:white; +QListWidget QScrollBar:horizontal, +QTableView QScrollBar:horizontal, +QTreeWidget QScrollBar:horizontal { + border-top: 0.065em solid rgb(194, 199, 205); + border-top-left-radius: 0; + border-top-right-radius: 0; } -QTableView::item:hover{ - background-color: rgb(65,0,127); - color:white; +QListWidget QScrollBar:vertical, +QTableView QScrollBar:vertical, +QTreeWidget QScrollBar:vertical { + border-left: 0.065em solid rgb(194, 199, 205); + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +QHeaderView::section, +QTableView QTableCornerButton::section { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgb(255, 255, 255), stop: 1 rgb(244, 245, 249)); + border: none; + border-bottom: 0.065em solid rgb(194, 199, 205); + padding: 0.25em; + color: rgb(58, 70, 94); } -QHeaderView{ - background-color: rgb(220,220,220); +QHeaderView::section:first, +QTableView QTableCornerButton::section { + border-top-left-radius: 0.26em; } -QHeaderView::section { - background-color:rgb(220,220,220); - color:black; +QHeaderView::section:last { + border-top-right-radius: 0.26em; } QHeaderView::section:hover { - background-color:rgb(65,0,127); - color:white; + color: black; } QComboBox, @@ -233,7 +289,7 @@ QSpinBox:disabled, QTextEdit:disabled, QToolButton:disabled { background-color: rgb(240, 240, 240); - color: rgb(140, 140, 140); + color: rgb(130, 130, 130); } QComboBox, @@ -277,41 +333,23 @@ QComboBox:selected { } QComboBox QAbstractItemView { - background-color:white; - color: rgb(88, 92, 107); + background-color: white; + color: rgb(70, 73, 85); } -QAbstractItemView::item:selected { - background-color:rgb(65,0,127); - color: white; +QAbstractItemView { + alternate-background-color: rgb(248, 248, 250); } QAbstractItemView::item:checked, QAbstractItemView::item:hover, -QAbstractItemView::item:selected { +QAbstractItemView::item:selected, +QMenu::item:selected, +QMenuBar::item:selected { background: rgb(241, 245, 247); color: black; } -QDateTimeEdit QAbstractItemView { - background-color:white; - color: black; -} - -QDateTimeEdit QAbstractItemView::item:checked { - background-color:rgb(65,0,127); - color: white; -} - -QDateTimeEdit QAbstractItemView::item:selected { - background-color:rgb(65,0,127); - color: white; -} - -QDialog{ - background-color: rgb(240,240,240); -} - QPushButton { padding: 0.2em 1.25em; color: rgb(97, 101, 118); @@ -322,32 +360,6 @@ QToolButton { color: rgb(97, 101, 118); } -QTreeWidget{ - color: rgb(0,0,0); - background-color: rgb(240,240,240); - alternate-background-color: white; -} - -QListView { - background: rgb(240,240,240); - alternate-background-color: white; -} - -QListView::item { - background-color:transparent; - color:black; -} - -QListView::item:selected { - background-color:rgb(65,0,127); - color:white; -} - -QListView::item:checked { - background-color:rgb(65,0,127); - color:white; -} - QDateEdit::up-button, QDateEdit::down-button, QDoubleSpinBox::up-button, @@ -388,37 +400,28 @@ QTabWidget::tab-bar { left: 0.5em; } -QTabWidget::pane { /* The tab widget frame */ - background-color: rgb(255, 255, 255); - border: 0.065em solid rgb(200, 200, 200); +QTabBar { + color: rgb(113, 121, 140); + font-weight: 500; } QTabBar::tab { - background-color: rgb(240, 240, 240); - border: 0.065em solid rgb(200, 200, 200); - border-bottom: none; + background-color: transparent; + border-bottom: 0.195em solid transparent; min-height: 1.25em; min-width: 0.5em; - padding: 0.125em 1em; -} - -QTabBar::tab:!first { - margin-left: -0.065em; + padding: 0.5em 0; + margin-bottom: 0.5em; + margin-right: 1.5em; } QTabBar::tab:selected { - background-color: rgb(255, 255, 255); - border-bottom-color: rgb(255, 255, 255); - border-top-color: rgb(120, 20, 255); - border-top-width: 0.13em; -} - -QTabBar::tab:!selected { - margin-top: 0.13em; + border-bottom-color: rgb(120, 20, 255); + color: rgb(120, 20, 255); } QTabBar::tab:!selected:hover { - background: rgb(255, 255, 255); + border-bottom-color: rgb(113, 121, 140); } /* RPC Console */ @@ -426,81 +429,78 @@ QTabBar::tab:!selected:hover { font-family: "Inconsolata"; } -QGroupBox{ - background-color: rgb(240,240,240); -} +/* Main Window*/ -QListWidget{ - color:black; - background-color:rgb(240,240,240); +QToolBar#toolbar { + background-color: rgb(54, 1, 102); + border: none; + height: 100%; } -/* Main Window*/ - -#toolbar { - border:none; - padding-top:1.25em; - min-width:8.5em; - height:100%; - color: black; +QToolBar#toolbar QToolButton { + width: 100%; + min-width: 6em; + background-color: transparent; + border: none; + color: rgb(154, 128, 178); + font-weight: 500; + padding: 0.3em 0 0.25em 0; } -#toolbar2 { - border:none; - min-width:1.625em; - max-width:3em; +QToolBar#toolbar QToolButton:hover, +QToolBar#toolbar QToolButton:checked { color: white; } -#toolbar3 { - border:none; - min-height:3.25em; - max-height:3.25em; +QToolBar#toolbar::separator { + background: none; + border-top: 0.065em solid rgb(154, 128, 178); + height: 0.065em; + margin: 0.25em 1.5em; } -QToolBar#toolbar QToolButton { - padding-left:1.25em; - padding-right:1.25em; - padding-top:0.5em; - padding-bottom:0.5em; - margin:0.25em; - width:100%; +#toolbarLogoLabel { + image: url(:/images/gridcoin); + background-color: rgb(48, 11, 82); + border-bottom: 0.065em solid rgb(74, 26, 117); + min-width: 2.75em; + min-height: 2.75em; + padding: 1em 1.5em; } -QToolBar#toolbar2 QLabel{ - border:none; - padding-top:1em; - padding-bottom:1em; - qproperty-alignment: AlignCenter; +#toolbarBoincLabel { + image: url(:/images/boinc_w); + min-width: 4em; + min-height: 1.68em; + padding: 1em; } -QToolBar#toolbar2 QToolTip { - color:white +QStatusBar { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgb(243, 243, 243), stop: 1 rgb(212, 212, 212)); + border-top: 0.065em solid rgb(230, 230, 230); } -QToolBar#toolbar3 QLabel{ - margin:0.5em; +QStatusBar::item { + border: none; } -#spacer { - background-color:transparent; - border:none; +QStatusBar .QFrame { + background: transparent; + padding: 0; + margin: 0.25em 0; } -#boincLogo{ - image:url(:/images/boinc_w); - min-width:5.38em; - max-width:5.38em; - min-height:2.25em; - max-height:2.25em; +QStatusBar .QFrame QLabel { + border: none; + margin: 0 0.25em; } -#gridcoinLogoHorizontal{ - image:url(:/images/logo_hz); - min-width:9.225em; - max-width:9.225em; - min-height:2.25em; - max-height:2.25em; +#testnetStatusLabel { + background-color: rgb(237, 81, 68); + border-radius: 0.25em; + padding: 0.1em 0.2em; + color: white; + font-weight: bold; } #aboutLogoLabel{ @@ -517,8 +517,9 @@ QToolBar#toolbar3 QLabel{ #researcherHeaderLabel, #stakingHeaderLabel, #recentTransLabel { - font-size:15pt; - font-weight:bold; + font-size: 15pt; + font-weight: bold; + color: rgb(43, 52, 69); } #availableLabel, diff --git a/src/qt/res/stylesheets/native_stylesheet.qss b/src/qt/res/stylesheets/native_stylesheet.qss deleted file mode 100644 index 9eefeba001..0000000000 --- a/src/qt/res/stylesheets/native_stylesheet.qss +++ /dev/null @@ -1,197 +0,0 @@ -/* general */ - -* { - font-family: "Inter"; -} - -QMainWindow { - font-family: "Inter"; -} - -QMenuBar { - background: rgb(240,240,240); - color: black; -} - -QMenuBar::item { - padding-bottom:0.5em; - padding-top:0.5em; - padding-left:1em; - padding-right:1em; - color: black; - background-color: rgb(240,240,240); -} - -QTextEdit { - background-color: white; -} - -/* RPC Console */ -#messagesWidget, #lineEdit, #scraper_log { - font-family: "Inconsolata"; -} - -/* Main Window*/ - -#toolbar { - border:none; - padding-top:1.25em; - min-width:8.5em; - height:100%; -} - -#toolbar2 { - border:none; - min-width:1.625em; - max-width:3em; -} - -#toolbar3 { - border:none; - min-height:3.25em; - max-height:3.25em; -} - -QToolBar#toolbar QToolButton { - padding-left:1.25em; - padding-right:1.25em; - padding-top:0.5em; - padding-bottom:0.5em; - margin:0.25em; - width:100%; -} - -QToolBar#toolbar2 QLabel{ - border:none; - padding-top:1em; - padding-bottom:1em; - qproperty-alignment: AlignCenter; -} - -QToolBar#toolbar3 QLabel{ - margin:0.5em; -} - -#spacer { - background-color:transparent; - border:none; -} - -#listTransactions{ - background-color:transparent; -} - -#boincLogo{ - image:url(:/images/boinc_w); - min-width:5.38em; - max-width:5.38em; - min-height:2.25em; - max-height:2.25em; -} - -#gridcoinLogoHorizontal{ - image:url(:/images/logo_hz); - min-width:9.225em; - max-width:9.225em; - min-height:2.25em; - max-height:2.25em; -} - -#aboutLogoLabel{ - image:url(:/images/about_light); - min-width:2.25em; - max-width:2.25em; - min-height:9.225em; - max-height:9.225em; -} - -/* overview page */ - -#overviewWalletLabel, -#researcherHeaderLabel, -#stakingHeaderLabel, -#recentTransLabel { - font-size:15pt; - font-weight:bold; -} - -#availableLabel, -#immatureTextLabel, -#totalBalanceLabel { - font-weight:bold; -} - -#walletStatusLabel, -#transactionsStatusLabel, -#researcherAlertLabel { - color: red; -} - -/* coincontrol dialog*/ - -#coinControlFeaturesLabel{ - font-weight:bold; -} - -#coinControlInsuffFundsLabel{ - color:red; - font-weight:bold; -} - -#coinControlBytesTextLabel{ - font-weight:bold; -} - -#coinControlQuantityTextLabel{ - font-weight:bold; -} - -#coinControlAmountTextLabel{ - font-weight:bold; -} - -#coinControlPriorityTextLabel{ - font-weight:bold; -} - -#coinControlFeeTextLabel{ - font-weight:bold; -} - -#coinControlLowOutputTextLabel{ - font-weight:bold; -} - -#coinControlAfterFeeTextLabel{ - font-weight:bold; -} - -#coinControlChangeTextLabel{ - font-weight:bold; -} - -/* options dialog */ - -#OptionsDialog #statusLabel{ - font-weight:bold; -} - -/* sign verify message dialog */ - -#signatureOut_SM{ - font-style: italic; -} - -#statusLabel_SM{ - font-weight:bold; -} - -#statusLabel_VM{ - font-weight:bold; -} - -/* ask passphrase dialog */ - -#capsLabel{ - font-weight:bold; -} diff --git a/src/qt/researcher/projecttablemodel.cpp b/src/qt/researcher/projecttablemodel.cpp index 3bbdf7086d..b1deda12ad 100644 --- a/src/qt/researcher/projecttablemodel.cpp +++ b/src/qt/researcher/projecttablemodel.cpp @@ -176,12 +176,12 @@ QVariant ProjectTableModel::data(const QModelIndex &index, int role) const switch (index.column()) { case Eligible: if (row->m_error.isEmpty()) { - return QIcon(":/icons/synced"); + return QIcon(":/icons/round_green_check"); } break; case Whitelisted: if (row->m_whitelisted) { - return QIcon(":/icons/synced"); + return QIcon(":/icons/round_green_check"); } break; } diff --git a/src/qt/researcher/researchermodel.cpp b/src/qt/researcher/researchermodel.cpp index 80603b1163..5708cf1d54 100644 --- a/src/qt/researcher/researchermodel.cpp +++ b/src/qt/researcher/researchermodel.cpp @@ -87,6 +87,7 @@ ResearcherModel::ResearcherModel() , m_configured_for_investor_mode(false) , m_wizard_open(false) , m_out_of_sync(true) + , m_theme_suffix("_dark") { qRegisterMetaType("GRC::ResearcherPtr"); @@ -141,27 +142,31 @@ QString ResearcherModel::mapBeaconStatus(const BeaconStatus status) assert(false); // Suppress warning } -QIcon ResearcherModel::mapBeaconStatusIcon(const BeaconStatus status) +QIcon ResearcherModel::mapBeaconStatusIcon(const BeaconStatus status) const { - constexpr char success[] = ":/icons/beacon_green"; - constexpr char warning[] = ":/icons/beacon_yellow"; - constexpr char danger[] = ":/icons/beacon_red"; - constexpr char inactive[] = ":/icons/beacon_grey"; + constexpr char success[] = ":/icons/status_beacon_green"; + constexpr char warning[] = ":/icons/status_beacon_yellow"; + constexpr char danger[] = ":/icons/status_beacon_red"; + constexpr char inactive[] = ":/icons/status_beacon_gray"; + + const auto make_icon = [this](const char* const icon) { + return QIcon(icon + m_theme_suffix); + }; switch (status) { - case BeaconStatus::ACTIVE: return QIcon(success); - case BeaconStatus::ERROR_INSUFFICIENT_FUNDS: return QIcon(danger); - case BeaconStatus::ERROR_MISSING_KEY: return QIcon(danger); - case BeaconStatus::ERROR_NOT_NEEDED: return QIcon(success); - case BeaconStatus::ERROR_TX_FAILED: return QIcon(danger); - case BeaconStatus::ERROR_WALLET_LOCKED: return QIcon(danger); - case BeaconStatus::NO_BEACON: return QIcon(inactive); - case BeaconStatus::NO_CPID: return QIcon(inactive); - case BeaconStatus::NO_MAGNITUDE: return QIcon(warning); - case BeaconStatus::PENDING: return QIcon(warning); - case BeaconStatus::RENEWAL_NEEDED: return QIcon(danger); - case BeaconStatus::RENEWAL_POSSIBLE: return QIcon(warning); - case BeaconStatus::UNKNOWN: return QIcon(inactive); + case BeaconStatus::ACTIVE: return make_icon(success); + case BeaconStatus::ERROR_INSUFFICIENT_FUNDS: return make_icon(danger); + case BeaconStatus::ERROR_MISSING_KEY: return make_icon(danger); + case BeaconStatus::ERROR_NOT_NEEDED: return make_icon(success); + case BeaconStatus::ERROR_TX_FAILED: return make_icon(danger); + case BeaconStatus::ERROR_WALLET_LOCKED: return make_icon(danger); + case BeaconStatus::NO_BEACON: return make_icon(inactive); + case BeaconStatus::NO_CPID: return make_icon(inactive); + case BeaconStatus::NO_MAGNITUDE: return make_icon(warning); + case BeaconStatus::PENDING: return make_icon(warning); + case BeaconStatus::RENEWAL_NEEDED: return make_icon(danger); + case BeaconStatus::RENEWAL_POSSIBLE: return make_icon(warning); + case BeaconStatus::UNKNOWN: return make_icon(inactive); } assert(false); // Suppress warning @@ -190,6 +195,13 @@ void ResearcherModel::showWizard(WalletModel* wallet_model) wizard->show(); } +void ResearcherModel::setTheme(const QString& theme_name) +{ + m_theme_suffix = "_" + theme_name; + + emit beaconChanged(); +} + bool ResearcherModel::configuredForInvestorMode() const { return m_configured_for_investor_mode; diff --git a/src/qt/researcher/researchermodel.h b/src/qt/researcher/researchermodel.h index 40f6b9c469..2267d781f1 100644 --- a/src/qt/researcher/researchermodel.h +++ b/src/qt/researcher/researchermodel.h @@ -77,9 +77,10 @@ class ResearcherModel : public QObject ~ResearcherModel(); static QString mapBeaconStatus(const BeaconStatus status); - static QIcon mapBeaconStatusIcon(const BeaconStatus status); + QIcon mapBeaconStatusIcon(const BeaconStatus status) const; void showWizard(WalletModel* wallet_model); + void setTheme(const QString& theme_name); bool configuredForInvestorMode() const; bool outOfSync() const; @@ -119,6 +120,7 @@ class ResearcherModel : public QObject bool m_configured_for_investor_mode; bool m_wizard_open; bool m_out_of_sync; + QString m_theme_suffix; void subscribeToCoreSignals(); void unsubscribeFromCoreSignals(); diff --git a/src/qt/researcher/researcherwizardbeaconpage.cpp b/src/qt/researcher/researcherwizardbeaconpage.cpp index 7425b98c3e..1b786de2ed 100644 --- a/src/qt/researcher/researcherwizardbeaconpage.cpp +++ b/src/qt/researcher/researcherwizardbeaconpage.cpp @@ -113,7 +113,7 @@ void ResearcherWizardBeaconPage::advertiseBeacon() } updateBeaconStatus(ResearcherModel::mapBeaconStatus(status)); - updateBeaconIcon(ResearcherModel::mapBeaconStatusIcon(status)); + updateBeaconIcon(m_researcher_model->mapBeaconStatusIcon(status)); } void ResearcherWizardBeaconPage::updateBeaconStatus(const QString& status) diff --git a/src/qt/researcher/researcherwizardpoolsummarypage.cpp b/src/qt/researcher/researcherwizardpoolsummarypage.cpp index 6750f7f086..0dadc02d7a 100644 --- a/src/qt/researcher/researcherwizardpoolsummarypage.cpp +++ b/src/qt/researcher/researcherwizardpoolsummarypage.cpp @@ -78,7 +78,7 @@ void ResearcherWizardPoolSummaryPage::refresh() if (m_researcher_model->hasPoolProjects()) { ui->poolStatusLabel->setText(tr("Pool projects detected")); ui->poolStatusIconLabel->setPixmap( - QIcon(":/icons/synced").pixmap(icon_size, icon_size)); + QIcon(":/icons/round_green_check").pixmap(icon_size, icon_size)); } else { ui->poolStatusLabel->setText(tr("No pool projects detected")); ui->poolStatusIconLabel->setPixmap( diff --git a/src/qt/researcher/researcherwizardprojectspage.cpp b/src/qt/researcher/researcherwizardprojectspage.cpp index f4ce0c770e..96bf4dd4de 100644 --- a/src/qt/researcher/researcherwizardprojectspage.cpp +++ b/src/qt/researcher/researcherwizardprojectspage.cpp @@ -86,7 +86,7 @@ void ResearcherWizardProjectsPage::refresh() if (m_researcher_model->hasEligibleProjects()) { ui->selectedCpidIconLabel->setPixmap( - QIcon(":/icons/synced").pixmap(icon_size, icon_size)); + QIcon(":/icons/round_green_check").pixmap(icon_size, icon_size)); } else { ui->selectedCpidIconLabel->setPixmap( QIcon(":/icons/white_and_red_x").pixmap(icon_size, icon_size)); diff --git a/src/qt/researcher/researcherwizardsummarypage.cpp b/src/qt/researcher/researcherwizardsummarypage.cpp index 5ec691aa2e..a1d43952ab 100644 --- a/src/qt/researcher/researcherwizardsummarypage.cpp +++ b/src/qt/researcher/researcherwizardsummarypage.cpp @@ -114,19 +114,19 @@ void ResearcherWizardSummaryPage::refreshOverallStatus() if (m_researcher_model->outOfSync()) { status = tr("Waiting for sync..."); - icon = QIcon(":/icons/notsynced"); + icon = QIcon(":/icons/status_sync_syncing_light"); } else if (m_researcher_model->hasPendingBeacon()) { status = tr("Beacon awaiting confirmation."); - icon = QIcon(":/icons/notsynced"); + icon = QIcon(":/icons/transaction_3"); } else if (m_researcher_model->hasRenewableBeacon()) { status = tr("Beacon renewal available."); icon = QIcon(":/icons/warning"); } else if (!m_researcher_model->hasMagnitude()) { status = tr("Waiting for magnitude."); - icon = QIcon(":/icons/notsynced"); + icon = QIcon(":/icons/scraper_waiting_light"); } else { status = tr("Everything looks good."); - icon = QIcon(":/icons/synced"); + icon = QIcon(":/icons/round_green_check"); } ui->overallStatusLabel->setText(status); @@ -147,7 +147,7 @@ void ResearcherWizardSummaryPage::refreshProjects() if (m_researcher_model->hasEligibleProjects()) { ui->selectedCpidIconLabel->setPixmap( - QIcon(":/icons/synced").pixmap(icon_size, icon_size)); + QIcon(":/icons/round_green_check").pixmap(icon_size, icon_size)); } else { ui->selectedCpidIconLabel->setPixmap( QIcon(":/icons/white_and_red_x").pixmap(icon_size, icon_size)); diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index 3fa908274b..ddc5fa1198 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -17,9 +17,8 @@ SendCoinsEntry::SendCoinsEntry(QWidget *parent) : { ui->setupUi(this); -#ifdef Q_OS_MAC ui->payToLayout->setSpacing(4); -#endif + setFocusPolicy(Qt::TabFocus); setFocusProxy(ui->payTo); diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 861b8697c9..3692ae5a2c 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -476,10 +476,10 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx case TransactionRecord::SendToOther: return QIcon(":/icons/tx_output"); case TransactionRecord::BeaconAdvertisement: - return QIcon(":/icons/beacon_grey"); + return QIcon(":/icons/tx_contract_beacon"); case TransactionRecord::Poll: case TransactionRecord::Vote: - return QIcon(":/icons/voting_native"); + return QIcon(":/icons/tx_contract_voting"); case TransactionRecord::Message: return QIcon(":/icons/message"); default: diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index fa2b9c9abb..429ad9b6f6 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -30,7 +30,7 @@ #include TransactionView::TransactionView(QWidget *parent) : - QWidget(parent), model(0), transactionProxyModel(0), + QFrame(parent), model(0), transactionProxyModel(0), transactionView(0) { // Build filter row @@ -38,13 +38,8 @@ TransactionView::TransactionView(QWidget *parent) : QHBoxLayout *hlayout = new QHBoxLayout(); hlayout->setContentsMargins(0,0,0,0); -#ifdef Q_OS_MAC hlayout->setSpacing(5); hlayout->addSpacing(26); -#else - hlayout->setSpacing(0); - hlayout->addSpacing(23); -#endif dateWidget = new QComboBox(this); #ifdef Q_OS_MAC @@ -52,7 +47,7 @@ TransactionView::TransactionView(QWidget *parent) : #else dateWidget->setFixedWidth(120); #endif - dateWidget->addItem(tr("All"), All); + dateWidget->addItem(tr("All Time"), All); dateWidget->addItem(tr("Today"), Today); dateWidget->addItem(tr("This week"), ThisWeek); dateWidget->addItem(tr("This month"), ThisMonth); @@ -68,7 +63,7 @@ TransactionView::TransactionView(QWidget *parent) : typeWidget->setFixedWidth(120); #endif - typeWidget->addItem(tr("All"), TransactionFilterProxy::ALL_TYPES); + typeWidget->addItem(tr("All Types"), TransactionFilterProxy::ALL_TYPES); typeWidget->addItem(tr("Received with"), TransactionFilterProxy::TYPE(TransactionRecord::RecvWithAddress) | TransactionFilterProxy::TYPE(TransactionRecord::RecvFromOther)); typeWidget->addItem(tr("Sent to"), TransactionFilterProxy::TYPE(TransactionRecord::SendToAddress) | @@ -98,13 +93,12 @@ TransactionView::TransactionView(QWidget *parent) : QVBoxLayout *vlayout = new QVBoxLayout(this); vlayout->setContentsMargins(0,0,0,0); - vlayout->setSpacing(0); QTableView *view = new QTableView(this); vlayout->addLayout(hlayout); vlayout->addWidget(createDateRangeWidget()); vlayout->addWidget(view); - vlayout->setSpacing(0); + vlayout->setSpacing(5); int width = view->verticalScrollBar()->sizeHint().width(); // Cover scroll bar width with spacing #ifdef Q_OS_MAC @@ -116,6 +110,7 @@ TransactionView::TransactionView(QWidget *parent) : view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); view->setTabKeyNavigation(false); view->setContextMenuPolicy(Qt::CustomContextMenu); + view->setShowGrid(false); transactionView = view; diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h index 81b4f056e0..a256c8c63e 100644 --- a/src/qt/transactionview.h +++ b/src/qt/transactionview.h @@ -1,7 +1,7 @@ #ifndef TRANSACTIONVIEW_H #define TRANSACTIONVIEW_H -#include +#include class WalletModel; class TransactionFilterProxy; @@ -19,7 +19,7 @@ QT_END_NAMESPACE /** Widget showing the transaction list for a wallet, including a filter row. Using the filter row, the user can view or export a subset of the transactions. */ -class TransactionView : public QWidget +class TransactionView : public QFrame { Q_OBJECT public: diff --git a/src/qt/votingdialog.cpp b/src/qt/votingdialog.cpp index 7c86da59b2..52c1504e95 100644 --- a/src/qt/votingdialog.cpp +++ b/src/qt/votingdialog.cpp @@ -392,19 +392,16 @@ VotingDialog::VotingDialog(QWidget *parent) QPushButton *resetButton = new QPushButton(); resetButton->setText(tr("Reload Polls")); - resetButton->setMaximumWidth(150); groupboxhlayout->addWidget(resetButton); connect(resetButton, SIGNAL(clicked()), this, SLOT(resetData())); QPushButton *histButton = new QPushButton(); histButton->setText(tr("Load History")); - histButton->setMaximumWidth(150); groupboxhlayout->addWidget(histButton); connect(histButton, SIGNAL(clicked()), this, SLOT(loadHistory())); QPushButton *newPollButton = new QPushButton(); newPollButton->setText(tr("Create Poll")); - newPollButton->setMaximumWidth(150); groupboxhlayout->addWidget(newPollButton); connect(newPollButton, SIGNAL(clicked()), this, SLOT(showNewPollDialog())); @@ -422,6 +419,7 @@ VotingDialog::VotingDialog(QWidget *parent) tableView_->setSortingEnabled(true); tableView_->sortByColumn(VotingTableModel::RowNumber, Qt::DescendingOrder); tableView_->verticalHeader()->hide(); + tableView_->setShowGrid(false); tableView_->setModel(proxyModel_); tableView_->setFont(QFont("Arial", 10)); @@ -996,7 +994,7 @@ NewPollDialog::NewPollDialog(QWidget *parent) QGridLayout *glayout = new QGridLayout(); glayout->setHorizontalSpacing(0); - glayout->setVerticalSpacing(0); + glayout->setVerticalSpacing(5); glayout->setColumnStretch(0, 1); glayout->setColumnStretch(1, 3); glayout->setColumnStretch(2, 5);