forked from qt-creator/qt-creator
ProjectExplorer: Add space between treeview entries
Task-number: QTCREATORBUG-17481 Change-Id: I27c304d1a63477c6ad081dd843ec3a6e9b6b2a4e Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -614,7 +614,13 @@ QSize SelectorDelegate::sizeHint(const QStyleOptionViewItem &option, const QMode
|
|||||||
auto model = static_cast<const ProjectsModel *>(index.model());
|
auto model = static_cast<const ProjectsModel *>(index.model());
|
||||||
if (TreeItem *item = model->itemForIndex(index)) {
|
if (TreeItem *item = model->itemForIndex(index)) {
|
||||||
switch (item->level()) {
|
switch (item->level()) {
|
||||||
case 2: s = QSize(s.width(), 3 * s.height()); break;
|
case 2:
|
||||||
|
s = QSize(s.width(), 3 * s.height());
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
s = QSize(s.width(), s.height() * 1.2);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
|
|||||||
Reference in New Issue
Block a user