summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtVCardWidget')
-rw-r--r--Swift/QtUI/QtVCardWidget/QtRemovableItemDelegate.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtRemovableItemDelegate.cpp b/Swift/QtUI/QtVCardWidget/QtRemovableItemDelegate.cpp
index e7e3175..1cae00a 100644
--- a/Swift/QtUI/QtVCardWidget/QtRemovableItemDelegate.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtRemovableItemDelegate.cpp
@@ -48,7 +48,7 @@ bool QtRemovableItemDelegate::editorEvent(QEvent* event, QAbstractItemModel* mod
}
QSize QtRemovableItemDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const {
- QSize size(style->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, 0, 0), style->pixelMetric(QStyle::PM_TabCloseIndicatorHeight, 0, 0));
+ QSize size(style->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, 0, 0) + 2, style->pixelMetric(QStyle::PM_TabCloseIndicatorHeight, 0, 0) + 2);
return size;
}
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.cpp
index 99e5f0b..98c8e8e 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.cpp
@@ -41,8 +41,7 @@ void QtVCardOrganizationField::setupContentWidgets() {
connect(unitsTreeWidget->model(), SIGNAL(rowsRemoved(QModelIndex, int, int)), SLOT(handleRowsRemoved(QModelIndex,int,int)));
unitsTreeWidget->setColumnCount(2);
unitsTreeWidget->header()->setStretchLastSection(false);
- int closeIconWidth = style()->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, 0, 0);
- unitsTreeWidget->header()->resizeSection(1, closeIconWidth);
+ unitsTreeWidget->header()->resizeSection(1, itemDelegate->sizeHint(QStyleOptionViewItem(), QModelIndex()).width());
#if QT_VERSION >= 0x050000
unitsTreeWidget->header()->setSectionResizeMode(0, QHeaderView::Stretch);