diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2012-08-04 00:37:04 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2012-08-04 00:37:04 +0000 |
commit | 297347f96e074cf56f4be932dcf28e842c6434ed (patch) | |
tree | 2ba9a40f949060fd39790faac3ac79e920a93655 /ui/qt | |
parent | 9c5fa224a926d3c35da1cf50b2fcbd00a735f9bb (diff) |
Fix sparlines on Windows. Unfortunately this means listing device IDs
(for now at least).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44258 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/interface_tree.cpp | 5 | ||||
-rw-r--r-- | ui/qt/sparkline_delegate.cpp | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ui/qt/interface_tree.cpp b/ui/qt/interface_tree.cpp index 8a5a5d2e4a..d594b0efe5 100644 --- a/ui/qt/interface_tree.cpp +++ b/ui/qt/interface_tree.cpp @@ -99,7 +99,10 @@ InterfaceTree::InterfaceTree(QWidget *parent) : } ti = new QTreeWidgetItem(); - ti->setText(0, QString().fromUtf8(if_info->description ? if_info->description : if_info->name)); + // XXX Using if_info->name is amazingly ugly under Windows but it's needed for + // statistics updates +// ti->setText(0, QString().fromUtf8(if_info->description ? if_info->description : if_info->name)); + ti->setText(0, QString().fromUtf8(if_info->name)); points = new QList<int>(); v.setValue(points); ti->setData(1, Qt::UserRole, v); diff --git a/ui/qt/sparkline_delegate.cpp b/ui/qt/sparkline_delegate.cpp index f62c095cb9..178e8180c5 100644 --- a/ui/qt/sparkline_delegate.cpp +++ b/ui/qt/sparkline_delegate.cpp @@ -31,14 +31,12 @@ void SparkLineDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt foreach (val, *points) { if (val > max) max = val; } + foreach (val, *points) { fpoints.append(QPointF(idx, (qreal) content_h - (val * content_h / max) )); idx = idx + 1; } - if (fpoints.count() > 0) { - } - painter->save(); painter->setRenderHint(QPainter::Antialiasing, true); painter->translate(option.rect.x() + SL_MARGIN, option.rect.y() + SL_MARGIN); |