Skip to content

Commit

Permalink
Fixing the width growth (#1078)
Browse files Browse the repository at this point in the history
* Fixing the width growth
  • Loading branch information
a-bezrukov authored Oct 11, 2021
1 parent d62dccf commit 901ddd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/qt/transactionview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
headerLayout->addSpacing(23);
}

statusSpacer = new QSpacerItem(20, 1, QSizePolicy::Expanding);
statusSpacer = new QSpacerItem(1, 1, QSizePolicy::MinimumExpanding);
headerLayout->addSpacerItem(statusSpacer);

watchOnlyWidget = new QComboBox(this);
Expand Down Expand Up @@ -439,14 +439,11 @@ void TransactionView::updateHeaderSizes(int logicalIndex, int oldSize, int newSi
if(logicalIndex < TransactionTableModel::ToAddress)
return;

headerLayout->blockSignals(true);
statusSpacer->changeSize(transactionView->columnWidth(TransactionTableModel::Status) - 10, 1, QSizePolicy::Expanding);
for(std::pair<int, QWidget*> const & p : headerWidgets) {
int const w = transactionView->columnWidth(p.first);
int const w = transactionView->columnWidth(p.first) - headerLayout->spacing() / 2;
if(p.second->width() != w)
p.second->setFixedWidth(w);
}
headerLayout->blockSignals(false);
}

void TransactionView::abandonTx()
Expand Down Expand Up @@ -675,7 +672,9 @@ void TransactionView::focusTransaction(const QModelIndex &idx)
void TransactionView::resizeEvent(QResizeEvent* event)
{
QWidget::resizeEvent(event);
disconnect(transactionView->horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, SLOT(updateHeaderSizes(int,int,int)));
columnResizingFixer->stretchColumnWidth(TransactionTableModel::ToAddress);
connect(transactionView->horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, SLOT(updateHeaderSizes(int,int,int)));
}

// Need to override default Ctrl+C action for amount as default behaviour is just to copy DisplayRole text
Expand Down
2 changes: 0 additions & 2 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2861,8 +2861,6 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
REJECT_INVALID, "conflict-tx-lock");
}
}
} else {
LogPrintf("ConnectBlock(): spork is off, skipping transaction locking checks\n");
}

int64_t nTime5_1 = GetTimeMicros(); nTimeISFilter += nTime5_1 - nTime4;
Expand Down

0 comments on commit 901ddd1

Please sign in to comment.