aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-08-25 11:14:11 -0400
committerGavin Andresen <gavinandresen@gmail.com>2012-08-25 11:14:11 -0400
commit772351b0d5b298a93bb90b403b4ec151ca5f9770 (patch)
tree4b8f4d06fcd7eb772762eede0b83d260364cd8f3 /src/qt
parent9db9642db4d830dfeec5ad6a55c02a441a23b0b7 (diff)
parent382b75f528fd3d2d3ac76076e8b3325d9d471f96 (diff)
Merge branch '2012_08_progressbarwin' of git://github.com/laanwj/bitcoin
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoingui.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index b81b832a87..1bdc313da8 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -53,6 +53,7 @@
#include <QTimer>
#include <QDragEnterEvent>
#include <QUrl>
+#include <QStyle>
#include <iostream>
@@ -148,6 +149,15 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
progressBar->setAlignment(Qt::AlignCenter);
progressBar->setVisible(false);
+ // Override style sheet for progress bar for styles that have a segmented progress bar,
+ // as they make the text unreadable (workaround for issue #1071)
+ // See https://qt-project.org/doc/qt-4.8/gallery.html
+ QString curStyle = qApp->style()->metaObject()->className();
+ if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")
+ {
+ progressBar->setStyleSheet("QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #FF8000, stop: 1 orange); border-radius: 7px; margin: 0px; }");
+ }
+
statusBar()->addWidget(progressBarLabel);
statusBar()->addWidget(progressBar);
statusBar()->addPermanentWidget(frameBlocks);