From 921cddfb2db486242104abf24519d76958358358 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Thu, 21 Nov 2019 13:26:05 -0500 Subject: [PATCH] Set the vertical layout in .ui file instead of programatically --- src/qt/forms/overviewpage.ui | 206 ++++++++++++++++------------------- src/qt/overviewpage.cpp | 5 - 2 files changed, 91 insertions(+), 120 deletions(-) diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index c2f80ac60c..6c6c51fbc8 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -7,7 +7,7 @@ 0 0 596 - 342 + 419 @@ -17,7 +17,7 @@ - false + true QLabel { background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop:0 #F0D0A0, stop:1 #F8D488); color:#000000; } @@ -34,7 +34,7 @@ - + @@ -419,128 +419,102 @@ - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - + + + + + QFrame::StyledPanel + + + QFrame::Raised + + - - - - 75 - true - - - - Recent transactions - - + + + + + + 75 + true + + + + Recent transactions + + + + + + + true + + + + 30 + 16777215 + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Liquid network after a connection is established, but this process has not completed yet. + + + + + + + :/icons/warning + :/icons/warning:/icons/warning + + + + 24 + 24 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - true - - - - 30 - 16777215 - + + + QListView { background: transparent; } - - The displayed information may be out of date. Your wallet automatically synchronizes with the Liquid network after a connection is established, but this process has not completed yet. - - - + + QFrame::NoFrame - - - :/icons/warning - :/icons/warning:/icons/warning + + Qt::ScrollBarAlwaysOff - - - 24 - 24 - + + Qt::ScrollBarAlwaysOff - - true + + QAbstractItemView::NoSelection - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - QListView { background: transparent; } - - - QFrame::NoFrame - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractItemView::NoSelection - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - + + + @@ -548,6 +522,8 @@ - + + + diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index d20f30dc3e..73ec92d74b 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -119,11 +119,6 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent) m_balances.balance[::policyAsset] = -1; - // Move the "Recent Transactions" view below "Balances" - ui->verticalLayout_3->removeWidget(ui->frame_2); - ui->verticalLayout_2->addWidget(ui->frame_2); - ui->horizontalLayout->removeItem(ui->verticalLayout_3); - // use a SingleColorIcon for the "out of sync warning" icon QIcon icon = platformStyle->SingleColorIcon(":/icons/warning"); icon.addPixmap(icon.pixmap(QSize(64,64), QIcon::Normal), QIcon::Disabled); // also set the disabled icon because we are using a disabled QPushButton to work around missing HiDPI support of QLabel (https://bugreports.qt.io/browse/QTBUG-42503)