diff options
author | Tayou <tayou@gmx.net> | 2023-06-28 18:50:44 +0200 |
---|---|---|
committer | Tayou <tayou@gmx.net> | 2023-06-28 18:50:44 +0200 |
commit | 6b3b119db07b229e22e33313a92a0c81a530f45c (patch) | |
tree | 0a5d2342148234d26199f9e257111eb12d7dd8c4 | |
parent | 66461ac500ded75d1d3f4df580296936b85e08b2 (diff) | |
download | PrismLauncher-6b3b119db07b229e22e33313a92a0c81a530f45c.tar.gz PrismLauncher-6b3b119db07b229e22e33313a92a0c81a530f45c.tar.bz2 PrismLauncher-6b3b119db07b229e22e33313a92a0c81a530f45c.zip |
give ungrouped instances a group header
Signed-off-by: Tayou <tayou@gmx.net>
-rw-r--r-- | launcher/ui/instanceview/VisualGroup.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/launcher/ui/instanceview/VisualGroup.cpp b/launcher/ui/instanceview/VisualGroup.cpp index f544c3dc..9d8dd2b9 100644 --- a/launcher/ui/instanceview/VisualGroup.cpp +++ b/launcher/ui/instanceview/VisualGroup.cpp @@ -189,6 +189,7 @@ void VisualGroup::drawHeader(QPainter *painter, const QStyleOptionViewItem &opti polygon << QPoint(arrowOffsetLeft - arrowSize, centerHeight - arrowSize/2) << QPoint(arrowOffsetLeft, centerHeight + arrowSize/2) << QPoint(arrowOffsetLeft + arrowSize, centerHeight - arrowSize/2); painter->drawPolyline(polygon); } + painter->restore(); } //END: arrow @@ -203,7 +204,8 @@ void VisualGroup::drawHeader(QPainter *painter, const QStyleOptionViewItem &opti painter->save(); painter->setFont(font); - painter->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, text); + painter->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, text != "" ? text : QObject::tr("Ungrouped")); + painter->restore(); } //END: text } |