From 5ac043c1ba307eaa3b82a5b1f03661d497f0dfce Mon Sep 17 00:00:00 2001 From: crowning- Date: Mon, 6 Jun 2016 07:44:59 +0200 Subject: [PATCH] Merge #866: [UI] Column alignement of Transaction-Tab adjusted 191ca63 [UI] Column alignement of Transaction-Tab adjusted --- src/qt/res/css/crownium.css | 16 +++++++++++++++- src/qt/res/css/drkblue.css | 16 +++++++++++++++- src/qt/res/css/light.css | 16 +++++++++++++++- src/qt/transactiontablemodel.cpp | 2 +- src/qt/transactionview.cpp | 26 +++++++++++++------------- 5 files changed, 59 insertions(+), 17 deletions(-) diff --git a/src/qt/res/css/crownium.css b/src/qt/res/css/crownium.css index c20945a80..a5a129aee 100644 --- a/src/qt/res/css/crownium.css +++ b/src/qt/res/css/crownium.css @@ -1508,13 +1508,27 @@ border:1px solid #d7d7d7; /* TRANSACTIONS PAGE */ -TransactionView QLineEdit { /* Address Filter */ +TransactionView QLineEdit { /* Filters */ margin-bottom:2px; margin-right:1px; min-width:111px; text-align:center; } +TransactionView QLineEdit#addressWidget { /* Address Filter */ +margin-bottom:2px; +margin-right:1px; +min-width:405px; +text-align:center; +} + +TransactionView QLineEdit#amountWidget { /* Amount Filter */ +margin-bottom:2px; +margin-right:1px; +max-width:100px; +text-align:center; +} + TransactionView QComboBox { margin-bottom:1px; margin-right:1px; diff --git a/src/qt/res/css/drkblue.css b/src/qt/res/css/drkblue.css index eb0fb83b6..884fb4e1f 100644 --- a/src/qt/res/css/drkblue.css +++ b/src/qt/res/css/drkblue.css @@ -1491,13 +1491,27 @@ border:1px solid #d7d7d7; /* TRANSACTIONS PAGE */ -TransactionView QLineEdit { /* Address Filter */ +TransactionView QLineEdit { /* Filters */ margin-bottom:2px; margin-right:1px; min-width:111px; text-align:center; } +TransactionView QLineEdit#addressWidget { /* Address Filter */ +margin-bottom:2px; +margin-right:1px; +min-width:405px; +text-align:center; +} + +TransactionView QLineEdit#amountWidget { /* Amount Filter */ +margin-bottom:2px; +margin-right:1px; +max-width:100px; +text-align:center; +} + TransactionView QComboBox { margin-bottom:1px; margin-right:1px; diff --git a/src/qt/res/css/light.css b/src/qt/res/css/light.css index 2414157bc..1c954f9a8 100644 --- a/src/qt/res/css/light.css +++ b/src/qt/res/css/light.css @@ -1501,13 +1501,27 @@ border:1px solid #d7d7d7; /* TRANSACTIONS PAGE */ -TransactionView QLineEdit { /* Address Filter */ +TransactionView QLineEdit { /* Filters */ margin-bottom:2px; margin-right:1px; min-width:111px; text-align:center; } +TransactionView QLineEdit#addressWidget { /* Address Filter */ +margin-bottom:2px; +margin-right:1px; +min-width:405px; +text-align:center; +} + +TransactionView QLineEdit#amountWidget { /* Amount Filter */ +margin-bottom:2px; +margin-right:1px; +max-width:100px; +text-align:center; +} + TransactionView QComboBox { margin-bottom:1px; margin-right:1px; diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 6dd20f4b7..ec1a155f2 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -243,7 +243,7 @@ TransactionTableModel::TransactionTableModel(const PlatformStyle *platformStyle, fProcessingQueuedTransactions(false), platformStyle(platformStyle) { - columns << QString() << QString() << tr("Date") << tr("Type") << tr("Label") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit()); + columns << QString() << QString() << tr("Date") << tr("Type") << tr("Address / Label") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit()); priv->refreshWallet(); connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index c55d029de..705bae660 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -46,15 +46,13 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa QHBoxLayout *hlayout = new QHBoxLayout(); hlayout->setContentsMargins(0,0,0,0); - if (platformStyle->getUseExtraSpacing()) { - hlayout->setSpacing(5); - hlayout->addSpacing(26); - } else { hlayout->setSpacing(0); - hlayout->addSpacing(23); + hlayout->addSpacing(6); + } else { + hlayout->setSpacing(1); + hlayout->addSpacing(5); } - QString theme = GUIUtil::getThemeName(); watchOnlyWidget = new QComboBox(this); watchOnlyWidget->setFixedWidth(24); @@ -65,7 +63,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa dateWidget = new QComboBox(this); if (platformStyle->getUseExtraSpacing()) { - dateWidget->setFixedWidth(121); + dateWidget->setFixedWidth(120); } else { dateWidget->setFixedWidth(120); } @@ -81,9 +79,9 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa typeWidget = new QComboBox(this); if (platformStyle->getUseExtraSpacing()) { - typeWidget->setFixedWidth(TYPE_COLUMN_WIDTH+1); - } else { typeWidget->setFixedWidth(TYPE_COLUMN_WIDTH); + } else { + typeWidget->setFixedWidth(TYPE_COLUMN_WIDTH-1); } typeWidget->addItem(tr("All"), TransactionFilterProxy::ALL_TYPES); @@ -108,6 +106,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa #if QT_VERSION >= 0x040700 addressWidget->setPlaceholderText(tr("Enter address or label to search")); #endif + addressWidget->setObjectName("addressWidget"); hlayout->addWidget(addressWidget); amountWidget = new QLineEdit(this); @@ -115,11 +114,12 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa amountWidget->setPlaceholderText(tr("Min amount")); #endif if (platformStyle->getUseExtraSpacing()) { - amountWidget->setFixedWidth(97); + amountWidget->setFixedWidth(118); } else { - amountWidget->setFixedWidth(100); - } + amountWidget->setFixedWidth(125); + } amountWidget->setValidator(new QDoubleValidator(0, 1e20, 8, this)); + amountWidget->setObjectName("amountWidget"); hlayout->addWidget(amountWidget); QVBoxLayout *vlayout = new QVBoxLayout(this); @@ -592,6 +592,6 @@ bool TransactionView::eventFilter(QObject *obj, QEvent *event) // show/hide column Watch-only void TransactionView::updateWatchOnlyColumn(bool fHaveWatchOnly) { - watchOnlyWidget->setVisible(fHaveWatchOnly); + watchOnlyWidget->setVisible(true); transactionView->setColumnHidden(TransactionTableModel::Watchonly, !fHaveWatchOnly); }