#include "guiconstants.h"
#include "askpassphrasedialog.h"
#include "notificator.h"
-#include "qtwin.h"
#include <QApplication>
#include <QMainWindow>
// Doubleclicking on a transaction on the transaction history page shows details
connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails()));
-#ifdef Q_OS_WIN
- // Windows-specific customization
- if (QtWin::isCompositionEnabled())
- {
- QtWin::extendFrameIntoClientArea(&window);
- window.setContentsMargins(0, 0, 0, 0);
- }
-#endif
- setWindowComposition();
-
gotoOverviewPage();
}
void BitcoinGUI::setNumBlocks(int count)
{
- int total = clientModel->getTotalBlocksEstimate();
+ int initTotal = clientModel->getNumBlocksAtStartup();
+ int total = clientModel->getNumBlocksOfPeers();
QString tooltip;
if(count < total)
{
progressBarLabel->setVisible(true);
progressBar->setVisible(true);
- progressBar->setMaximum(total);
- progressBar->setValue(count);
+ progressBar->setMaximum(total - initTotal);
+ progressBar->setValue(count - initTotal);
tooltip = tr("Downloaded %1 of %2 blocks of transaction history.").arg(count).arg(total);
}
else
}
}
}
- setWindowComposition();
QMainWindow::changeEvent(e);
}
QMainWindow::closeEvent(event);
}
-void BitcoinGUI::setWindowComposition()
-{
-#ifdef Q_OS_WIN
- // Make the background transparent on Windows Vista or 7, except when maximized
- // Otherwise text becomes hard to read
- if (QtWin::isCompositionEnabled())
- {
- QPalette pal = palette();
- QColor bg = pal.window().color();
- if(isMaximized())
- {
- setAttribute(Qt::WA_TranslucentBackground, false);
- setAttribute(Qt::WA_StyledBackground, true);
- QBrush wb = pal.window();
- bg = wb.color();
- bg.setAlpha(255);
- pal.setColor(QPalette::Window, bg);
- setPalette(pal);
-
- }
- else
- {
- setAttribute(Qt::WA_TranslucentBackground);
- setAttribute(Qt::WA_StyledBackground, false);
- bg.setAlpha(0);
- pal.setColor(QPalette::Window, bg);
- setPalette(pal);
- setAttribute(Qt::WA_NoSystemBackground, false);
- ensurePolished();
- setAttribute(Qt::WA_StyledBackground, false);
- }
- }
-#endif
-}
-
void BitcoinGUI::askFee(qint64 nFeeRequired, bool *payFee)
{
QString strMessage =