diff --git a/src/gui/protocolwidget.cpp b/src/gui/protocolwidget.cpp index 59e4e51a6..34e91ccff 100644 --- a/src/gui/protocolwidget.cpp +++ b/src/gui/protocolwidget.cpp @@ -57,9 +57,15 @@ ProtocolWidget::ProtocolWidget(QWidget *parent) : header << tr("Action"); header << tr("Size"); + int timestampColumnExtra = 0; +#ifdef Q_OS_WIN + timestampColumnExtra = 20; // font metrics are broken on Windows, see #4721 +#endif + _ui->_treeWidget->setHeaderLabels( header ); int timestampColumnWidth = - _ui->_treeWidget->fontMetrics().width(timeString(QDateTime::currentDateTime())); + _ui->_treeWidget->fontMetrics().width(timeString(QDateTime::currentDateTime())) + + timestampColumnExtra; _ui->_treeWidget->setColumnWidth(0, timestampColumnWidth); _ui->_treeWidget->setColumnWidth(1, 180); _ui->_treeWidget->setColumnCount(5); @@ -84,7 +90,8 @@ ProtocolWidget::ProtocolWidget(QWidget *parent) : _issueItemView->setHeaderLabels( header ); timestampColumnWidth = ActivityItemDelegate::rowHeight() // icon - + _issueItemView->fontMetrics().width(timeString(QDateTime::currentDateTime())); + + _issueItemView->fontMetrics().width(timeString(QDateTime::currentDateTime())) + + timestampColumnExtra; _issueItemView->setColumnWidth(0, timestampColumnWidth); _issueItemView->setColumnWidth(1, 180); _issueItemView->setColumnCount(4);