[Pkg-owncloud-commits] [owncloud-client] 07/78: Protocol: Increase width of timestamp column #4721
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Jun 24 16:29:36 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 0f9c32452cb04d1862803a70c12262ba09db4f9a
Author: Christian Kamm <mail at ckamm.de>
Date: Thu May 12 10:22:05 2016 +0200
Protocol: Increase width of timestamp column #4721
Since the font metrics aren't reliable on windows, we add some
extra space there.
---
src/gui/protocolwidget.cpp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/gui/protocolwidget.cpp b/src/gui/protocolwidget.cpp
index 59e4e51..34e91cc 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list