Skip to content

Commit

Permalink
Add BOINC logo to GUI toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrossignol committed Apr 17, 2021
1 parent 97ea1a3 commit 7ff42da
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 103 deletions.
10 changes: 10 additions & 0 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,13 @@ void BitcoinGUI::createToolBars()
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");
Expand All @@ -594,6 +601,9 @@ void BitcoinGUI::createToolBars()
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);

Expand Down
96 changes: 9 additions & 87 deletions src/qt/res/images/boinc_logo_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 7 additions & 8 deletions src/qt/res/stylesheets/dark_stylesheet.qss
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,13 @@ QToolBar#toolbar::separator {
padding: 1em 1.5em;
}

#toolbarBoincLabel {
image: url(:/images/boinc_w);
min-width: 4em;
min-height: 1.68em;
padding: 1em;
}

QStatusBar {
background: rgb(23, 23, 23);
border-top: 0.065em solid rgb(19, 19, 19);
Expand Down Expand Up @@ -487,14 +494,6 @@ QStatusBar QToolTip {
font-weight: bold;
}

#boincLogo{
image:url(:/images/boinc_w);
min-width:5.38em;
max-width:5.38em;
min-height:2.25em;
max-height:2.25em;
}

#aboutLogoLabel{
image:url(:/images/about);
min-width:2.25em;
Expand Down
15 changes: 7 additions & 8 deletions src/qt/res/stylesheets/light_stylesheet.qss
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,13 @@ QToolBar#toolbar::separator {
padding: 1em 1.5em;
}

#toolbarBoincLabel {
image: url(:/images/boinc_w);
min-width: 4em;
min-height: 1.68em;
padding: 1em;
}

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);
Expand Down Expand Up @@ -496,14 +503,6 @@ QStatusBar .QFrame QLabel {
font-weight: bold;
}

#boincLogo{
image:url(:/images/boinc_w);
min-width:5.38em;
max-width:5.38em;
min-height:2.25em;
max-height:2.25em;
}

#aboutLogoLabel{
image:url(:/images/about_light);
min-width:2.25em;
Expand Down

0 comments on commit 7ff42da

Please sign in to comment.