Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.8 styling #35

Merged
merged 10 commits into from
Sep 25, 2018
5 changes: 1 addition & 4 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ void HandleSIGHUP(int)
fReopenDebugLog = true;
}





//////////////////////////////////////////////////////////////////////////////
//
// Start
Expand Down Expand Up @@ -761,6 +757,7 @@ bool AppInit2()

if (GetBoolArg("-zapwallettxes", false)) {
uiInterface.InitMessage(_("Zapping all transactions from wallet..."));
printf("Zapping all transactions from wallet...\n");
pwalletMain = new CWallet(strWalletFileName);
DBErrors nZapWalletRet = pwalletMain->ZapWalletTx();
if (nZapWalletRet != DB_LOAD_OK) {
Expand Down
2 changes: 1 addition & 1 deletion src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static void InitMessage(const std::string &message)
{
if(splashref)
{
splashref->showMessage(QString::fromStdString(message), Qt::AlignBottom|Qt::AlignHCenter, QColor(255,255,255));
splashref->showMessage(QString::fromStdString(message), Qt::AlignBottom|Qt::AlignHCenter, QColor(1,132,87));
QApplication::instance()->processEvents();
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/qt/bitcoin.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@
<file alias="about">res/images/about.png</file>
<file alias="splash_testnet">res/images/splash_testnet.png</file>
</qresource>
<qresource prefix="/movies">
<file alias="update_spinner">res/movies/update_spinner.mng</file>
</qresource>
<qresource prefix="/translations">
<file alias="af_ZA">locale/bitcoin_af_ZA.qm</file>
<file alias="ar">locale/bitcoin_ar.qm</file>
Expand Down
1 change: 1 addition & 0 deletions src/qt/bitcoinamountfield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ BitcoinAmountField::BitcoinAmountField(QWidget *parent):

setFocusPolicy(Qt::TabFocus);
setFocusProxy(amount);
amount->setStyleSheet("QDoubleSpinBox {background-color: 1ab06c;}");

// If one if the widgets changes, the combined content changes as well
connect(amount, SIGNAL(valueChanged(QString)), this, SIGNAL(textChanged()));
Expand Down
16 changes: 8 additions & 8 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include <QProgressBar>
#include <QStackedWidget>
#include <QDateTime>
#include <QMovie>
#include <QFileDialog>
#include <QDesktopServices>
#include <QTimer>
Expand Down Expand Up @@ -86,7 +85,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
{

resize(1000, 600);
setWindowTitle(tr("EverGreenCoin") );
setWindowTitle(tr("EverGreenCoin® Core - Wallet v1.8") );
#ifndef Q_OS_MAC
qApp->setWindowIcon(QIcon(":icons/evergreencoin"));
setWindowIcon(QIcon(":icons/evergreencoin"));
Expand Down Expand Up @@ -166,6 +165,9 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
frameBlocks->setObjectName("frameBlocks");
frameBlocks->setContentsMargins(0,0,0,0);
frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
frameBlocks->setFrameStyle(QFrame::NoFrame);
//frameBlocks->setFrameStyle(QFrame::StyledPanel);
frameBlocks->setFrameShadow(QFrame::Plain);
QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
frameBlocksLayout->setContentsMargins(3,0,3,0);
frameBlocksLayout->setSpacing(4);
Expand Down Expand Up @@ -197,6 +199,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
// Progress bar and label for blocks download
progressBarLabel = new QLabel();
progressBarLabel->setVisible(false);
progressBarLabel->setStyleSheet("color: #ffffff;");
progressBar = new QProgressBar();
progressBar->setAlignment(Qt::AlignCenter);
progressBar->setVisible(false);
Expand All @@ -213,8 +216,6 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
statusBar()->addWidget(progressBar);
statusBar()->addPermanentWidget(frameBlocks);

syncIconMovie = new QMovie(":/movies/update_spinner", "mng", this);

// Clicking on a transaction on the overview page simply sends you to transaction history page
connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage()));
connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex)));
Expand Down Expand Up @@ -321,7 +322,7 @@ void BitcoinGUI::createActions()
aboutAction = new QAction(QIcon(":/icons/evergreencoin"), tr("&About EverGreenCoin"), this);
aboutAction->setToolTip(tr("Show information about EverGreenCoin"));
aboutAction->setMenuRole(QAction::AboutRole);
aboutQtAction = new QAction(QIcon(":/icons/qtlogo.png"), tr("About &Qt"), this);
aboutQtAction = new QAction(QIcon(":/icons/qtlogo"), tr("About &Qt"), this);
aboutQtAction->setToolTip(tr("Show information about Qt"));
aboutQtAction->setMenuRole(QAction::AboutQtRole);
optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this);
Expand Down Expand Up @@ -432,7 +433,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
#endif
if(trayIcon)
{
trayIcon->setToolTip(tr("EverGreenCoin") + QString(" ") + tr("[testnet]"));
trayIcon->setToolTip(tr("EverGreenCoin® Core - Wallet v1.8") + QString(" ") + tr("[testnet]"));
trayIcon->setIcon(QIcon(":/icons/toolbar_testnet"));
toggleHideAction->setIcon(QIcon(":/icons/toolbar_testnet"));
}
Expand Down Expand Up @@ -654,8 +655,7 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks)
else
{
tooltip = tr("Catching up...") + QString("<br>") + tooltip;
labelBlocksIcon->setMovie(syncIconMovie);
syncIconMovie->start();
labelBlocksIcon->setPixmap(QIcon(":/icons/connect_0").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); // EGC STS - Removed sync movie (src/qt/res/movies/update_spinner.mng). Replace with connect_0 icon (red exclamation)

overviewPage->showOutOfSyncWarning(true);
}
Expand Down
2 changes: 0 additions & 2 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ class BitcoinGUI : public QMainWindow
TransactionView *transactionView;
RPCConsole *rpcConsole;

QMovie *syncIconMovie;

/** Create the main UI actions. */
void createActions();
/** Create the menu bar and sub-menus. */
Expand Down
32 changes: 18 additions & 14 deletions src/qt/charitydialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void StakeForCharityDialog::setModel(WalletModel *model)
int nPer;
qint64 nMin;
qint64 nMax;
charitiesThanks[0]="Thank you for donating to the <a href='https://evergreencoin.org/EGCFoundation/'>EverGreenCoin Foundation, Inc.</a>";
charitiesThanks[0]="Thank you for donating to the <a href='https://evergreencoin.org/EGCFoundation/' style='color: #1ab06c;'>EverGreenCoin Foundation, Inc.</a>";

model->getStakeForCharity(nPer, strAddress, strChangeAddress, nMin, nMax);

Expand All @@ -71,7 +71,7 @@ void StakeForCharityDialog::setModel(WalletModel *model)

if (strAddress.ToString().c_str() == QString(FOUNDATION) || strAddress.ToString().c_str() == QString(FOUNDATION_TEST) )
{
ui->message->setStyleSheet("QLabel { color: green; font-weight: 900; }");
ui->message->setStyleSheet("QLabel { color: #1ab06c; font-weight: 900; }");
ui->message->setText(tr("Thank you for giving to The EverGreenCoin Foundation \n\n"));
ui->comboBox->setCurrentIndex(1);
}
Expand All @@ -83,15 +83,15 @@ void StakeForCharityDialog::setModel(WalletModel *model)
{
if ( QString::compare(charitiesAddress[i].toStdString().c_str(), strAddress.ToString().c_str(), Qt::CaseSensitive) == 0 )
{ if (fTestNet) qDebug() << charitiesAddress[i].toStdString().c_str() ;
ui->message->setStyleSheet("QLabel { color: green; font-weight: 900; }");
ui->message->setStyleSheet("QLabel { color: #1ab06c; font-weight: 900; }");
ui->message->setText(charitiesThanks[i]);
ui->comboBox->setCurrentIndex(i+1);
break;
}
}
if (i==100) // STS EGC must be a 'manual' entered address
{
ui->message->setStyleSheet("QLabel { color: green; font-weight: 900; }");
ui->message->setStyleSheet("QLabel { color: #1ab06c; font-weight: 900; }");
ui->message->setText(tr("You are manually sending to: ") + strAddress.ToString().c_str());
ui->comboBox->setCurrentIndex(0);
}
Expand Down Expand Up @@ -148,7 +148,7 @@ void StakeForCharityDialog::loadCharities()
if (fTestNet) qDebug() << json_obj["thanksOnly"].toString();
i++;
}
ui->comboBox->setItemData(1, "Your donation will be used by the <a href='https://evergreencoin.org/EGCFoundation/'>EverGreenCoin Foundation, Inc.</a> <br />under the guidance of the board and community.", Qt::ToolTipRole);
ui->comboBox->setItemData(1, "Your donation will be used by the <a href='https://evergreencoin.org/EGCFoundation/' style='color: #ffffff;'>EverGreenCoin Foundation, Inc.</a> <br />under the guidance of the board and community.", Qt::ToolTipRole);
ui->comboBox->setItemData(0, "You can donate to any EverGreenCoin address you wish.", Qt::ToolTipRole);
} else {
qDebug() << "Failure" <<reply->errorString();
Expand Down Expand Up @@ -234,6 +234,7 @@ void StakeForCharityDialog::on_enableButton_clicked()
ui->message->setStyleSheet("QLabel { color: red; font-weight: 900; }");
ui->message->setText(tr("Please enter whole numbers, 1 through 100, for percentage")+ " \n\n\n");
ui->charityPercentEdit->setFocus();
ui->charityPercentEdit->setStyleSheet("border-color: #ffffff;");
return;
}

Expand Down Expand Up @@ -291,7 +292,7 @@ void StakeForCharityDialog::on_enableButton_clicked()
model->setStakeForCharity(true, nCharityPercent, address, changeAddress, nMinAmount, nMaxAmount);
if(!fGlobalStakeForCharity)
fGlobalStakeForCharity = true;
ui->message->setStyleSheet("QLabel { color: green; font-weight: 900;}");
ui->message->setStyleSheet("QLabel { color: #1ab06c; font-weight: 900;}");
ui->message->setText("EverGreenCoin Staking For Charity enabled to:<br /> " + QString(address.ToString().c_str()) + " at a rate of " + QString::number(nCharityPercent) + "%");
if (ui->comboBox->currentIndex() > 0) ui->message->setText(ui->message->text() + "<br />" + charitiesThanks[ui->comboBox->currentIndex()-1]) ;
ui->comboBox->update();
Expand All @@ -314,7 +315,7 @@ void StakeForCharityDialog::on_disableButton_clicked()
ui->charityMinEdit->clear();
ui->charityPercentEdit->clear();
ui->comboBox->setCurrentIndex(0); // reset charity select combo
ui->message->setStyleSheet("QLabel { color: green; font-weight: 900;}");
ui->message->setStyleSheet("QLabel { color: #1ab06c; font-weight: 900;}");
ui->message->setText(tr("EverGreenCoin Stake for Charity is now off and saved off."));
return;
}
Expand All @@ -332,18 +333,20 @@ void StakeForCharityDialog::on_comboBox_currentIndexChanged(int index)
ui->charityAddressEdit->setEnabled(true);
ui->charityAddressEdit->setReadOnly(false);
ui->addressBookButton->setDisabled(false);
ui->charityAddressEdit->setStyleSheet("border-color: #00B300;");
ui->charityAddressEdit->setStyleSheet("border-color: #ffffff; color: #ffffff;");
ui->label_5->setStyleSheet("QLabel {color: #ffffff;}");
ui->message->setText("Please enter the EverGreenCoin address <br />or select from the drop-down <br />and then click 'Enable'");
ui->charityAddressEdit->setFocus();
}
else if (index==1)
{
ui->charityAddressEdit->clear();
ui->charityAddressEdit->setDisabled(true);
ui->charityAddressEdit->setStyleSheet("border-color: #cacaca;");
ui->charityAddressEdit->setStyleSheet("border-color: #35473c; color:35473c;");
ui->label_5->setStyleSheet("QLabel {color: #018457;}");
if (!fTestNet) ui->charityAddressEdit->setText(QString(FOUNDATION));
else ui->charityAddressEdit->setText(QString(FOUNDATION_TEST));
ui->message->setText("Your donation will be used by the <a href='https://evergreencoin.org/EGCFoundation/'>EverGreenCoin Foundation, Inc.</a> <br />under the guidance of the board and community. <br />Click the 'Enable' button above to save <br />and start EverGreenCoin Stake for Charity");
ui->message->setText("Your donation will be used by the <a href='https://evergreencoin.org/EGCFoundation/' style='color: #1ab06c;'>EverGreenCoin Foundation, Inc.</a> <br />under the guidance of the board and community. <br />Click the 'Enable' button above to save <br />and start EverGreenCoin Stake for Charity");
ui->addressBookButton->setDisabled(true);
ui->charityAddressEdit->setEnabled(false);
ui->charityAddressEdit->setReadOnly(true);
Expand All @@ -355,7 +358,8 @@ void StakeForCharityDialog::on_comboBox_currentIndexChanged(int index)
ui->charityAddressEdit->setEnabled(false);
ui->charityAddressEdit->setReadOnly(true);
ui->addressBookButton->setDisabled(true);
ui->charityAddressEdit->setStyleSheet("border-color: #cacaca;");
ui->charityAddressEdit->setStyleSheet("border-color: #35473c; color:35473c;");
ui->label_5->setStyleSheet("QLabel {color: #018457;}");
ui->message->setText(charitiesAsk[index-1] + "<br />Click the 'Enable' button above to save <br />and start EverGreenCoin Stake for Charity");
}
}
Expand All @@ -370,8 +374,8 @@ void StakeForCharityDialog::on_btnRefreshCharities_clicked()
ui->charityMaxEdit->clear();
ui->charityMinEdit->clear();
ui->charityPercentEdit->clear();
ui->message->setStyleSheet("QLabel { color: green; font-weight: 900;}");
ui->message->setText(tr("Data refreshed from <a href='https://EverGreenCoin.org'>EverGreenCoin.org</a><br />Select a cause you find charitable<br />and click the 'Enable' button to apply changes."));
ui->message->setStyleSheet("QLabel { color: #1ab06c; font-weight: 900;}");
ui->message->setText(tr("Data refreshed from <a href='https://EverGreenCoin.org' style='color: #1ab06c;'>EverGreenCoin.org</a><br />Select a cause you find charitable<br />and click the 'Enable' button to apply changes."));
ui->comboBox->setCurrentIndex(0); // reset charity select combo
ui->btnRefreshCharities->setDisabled(false);
ui->btnRefreshCharities->setText("Refresh Charities");
Expand All @@ -382,7 +386,7 @@ void StakeForCharityDialog::updateMessageColor()
WalletModel::EncryptionStatus status = model->getEncryptionStatus();
if (status == WalletModel::Locked) ui->message->setStyleSheet("QLabel { color: red; font-weight: 900;}");
else if (fWalletUnlockStakingOnly) ui->message->setStyleSheet("QLabel { color: red; font-weight: 900;}");
else ui->message->setStyleSheet("QLabel { color: green; font-weight: 900;}");
else ui->message->setStyleSheet("QLabel { color: #1ab06c; font-weight: 900;}");
}

void StakeForCharityDialog::on_copyToClipboard_clicked()
Expand Down
11 changes: 7 additions & 4 deletions src/qt/coincontroldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) :

// default view is sorted by amount desc
sortView(COLUMN_AMOUNT_INT64, Qt::DescendingOrder);
QFile style(":/styles/res/styles/style.qss");
style.open(QFile::ReadOnly);
setStyleSheet(QString::fromUtf8(style.readAll()));
}

CoinControlDialog::~CoinControlDialog()
Expand Down Expand Up @@ -552,10 +555,10 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change

// turn labels "red"
l5->setStyleSheet((nBytes >= 10000) ? "color:red;" : ""); // Bytes >= 10000
l6->setStyleSheet((dPriority <= 576000) ? "color:red;" : ""); // Priority < "medium"
l7->setStyleSheet((fLowOutput) ? "color:red;" : ""); // Low Output = "yes"
l8->setStyleSheet((nChange > 0 && nChange < CENT) ? "color:red;" : ""); // Change < 0.01BTC
l5->setStyleSheet((nBytes >= 10000) ? "color:red;" : "color: #ffffff;"); // Bytes >= 10000
l6->setStyleSheet((dPriority <= 576000) ? "color:red;" : "color: #ffffff;"); // Priority < "medium"
l7->setStyleSheet((fLowOutput) ? "color:red;" : "color: #ffffff;"); // Low Output = "yes"
l8->setStyleSheet((nChange > 0 && nChange < CENT) ? "color:red;" : "color: #ffffff;"); // Change < 0.01BTC

// tool tips
l5->setToolTip(tr("This label turns red, if the transaction size is bigger than 10000 bytes.\n\n This means a fee of at least %1 per kb is required.\n\n Can vary +/- 1 Byte per input.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)));
Expand Down
Loading