Skip to content

Commit

Permalink
MainWindow Update
Browse files Browse the repository at this point in the history
- Progressbar update
- Spacing update leftbar
  • Loading branch information
Oliver Ziegler authored and Oliver Ziegler committed Aug 8, 2019
1 parent 9acd438 commit 7f256d8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ RES_ICONS = \
qt/res/icons/settings_menu.png \
qt/res/icons/createWallet.png \
qt/res/icons/openWallet.png \
qt/res/icons/backgroundIntro.png
qt/res/icons/backgroundIntro.png \
qt/res/icons/spacer.png \
qt/res/icons/tzc_green_space.png



Expand Down
2 changes: 2 additions & 0 deletions src/qt/bitcoin.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
<file alias="openWallet">res/icons/openWallet.png</file>
<file alias="createWallet">res/icons/createWallet.png</file>
<file alias="backgroundIntro">res/icons/backgroundIntro.png</file>
<file alias="spacer">res/icons/spacer.png</file>
<file alias="tzc_green_space">res/icons/tzc_green_space.png</file>
</qresource>
<qresource prefix="/css">
<file alias="default">res/css/default.css</file>
Expand Down
17 changes: 10 additions & 7 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,12 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
walletFrame->setStakingStatus(tr("Staking is turned off."),false);
}

// Progress bar and label for blocks download
// Progress bar and label for blocks download
placeholderLabel = new QLabel();
placeholderLabel->setPixmap(platformStyle->SingleColorIcon(":/icons/spacer").pixmap(145, 40));
placeholderLabel->setAlignment(Qt::AlignCenter);


progressBarLabel = new QLabel();
progressBarLabel->setVisible(false);
progressBar = new GUIUtil::ProgressBar();
Expand All @@ -286,12 +291,13 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
//QString curStyle = QApplication::style()->metaObject()->className();
//if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")
//{
progressBar->setStyleSheet("QProgressBar { background-color: #1b2234; border: transparent; border-radius: 10px; padding: 1px; text-align: center; } QProgressBar::chunk { background: #39df7b; border-radius: 7px; margin: 0px; }");
progressBar->setStyleSheet("QProgressBar { background-color: #1b2234; border: transparent; border-radius: 10px; padding: 1px; text-align: center; } QProgressBar::chunk { background: #39df7b; border-radius: 4px; margin: 4px; }");
//}


statusBar()->addWidget(progressBarIcon);
statusBar()->addWidget(progressBarLabel);
statusBar()->addWidget(placeholderLabel);
statusBar()->addWidget(progressBar);
statusBar()->addPermanentWidget(frameBlocks);

Expand Down Expand Up @@ -328,7 +334,7 @@ void BitcoinGUI::createActions()

QActionGroup *tabGroup = new QActionGroup(this);

emptyAction = new QAction(platformStyle->SingleColorIcon(":/icons/none"), tr(""), this);
emptyAction = new QAction(platformStyle->SingleColorIcon(":/icons/spacerBlock"), tr(""), this);
emptyAction->setCheckable(false);
emptyAction->setEnabled(false);
tabGroup->addAction(emptyAction);
Expand Down Expand Up @@ -578,14 +584,11 @@ void BitcoinGUI::createToolBars()
QLabel* syncLabel = new QLabel();
QLabel* emptyLabel = new QLabel();
toolbar->setIconSize(QSize(80, 80));
syncLabel->setPixmap(platformStyle->SingleColorIcon(":/icons/tzc_green").pixmap(108, 108));
syncLabel->setPixmap(platformStyle->SingleColorIcon(":/icons/tzc_green_space").pixmap(108, 180));
syncLabel->setAlignment(Qt::AlignCenter);
emptyLabel->setPixmap(platformStyle->SingleColorIcon(":/icons/none").pixmap(60, 60));
emptyLabel->setAlignment(Qt::AlignCenter);
QWidget* spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
addToolBar(Qt::LeftToolBarArea, toolbar);
toolbar->addWidget(emptyLabel);
toolbar->addWidget(syncLabel);
toolbar->setMovable(false);
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
Expand Down
3 changes: 2 additions & 1 deletion src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class BitcoinGUI : public QMainWindow
QLabel *labelPrice;
QLabel *progressBarLabel;
QLabel *progressBarIcon;
QLabel *placeholderLabel;
QProgressBar *progressBar;
QProgressDialog *progressDialog;

Expand Down Expand Up @@ -259,7 +260,7 @@ private Q_SLOTS:

/** called by a timer to check if fRequestShutdown has been set **/
void detectShutdown();

/** Show progress dialog e.g. for verifychain */
void showProgress(const QString &title, int nProgress);

Expand Down
Binary file added src/qt/res/icons/spacer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/qt/res/icons/tzc_green_space.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7f256d8

Please sign in to comment.