Skip to content

Commit bef7e4f

Browse files
committed
ticket:5050 Use Qt::ElideRight for value column. Other columns use Qt::ElideMiddle
1 parent c8fa402 commit bef7e4f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

OMEdit/OMEditGUI/Modeling/ItemDelegate.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
154154
painter->drawLine(option.rect.bottomLeft(), option.rect.bottomRight());
155155
painter->restore();
156156
}
157+
/* ticket:5050 Use Qt::ElideRight for value column. Other columns use Qt::ElideMiddle. */
158+
if (parent() && (qobject_cast<VariablesTreeView*>(parent())) && index.column() == 1) {
159+
opt.textElideMode = Qt::ElideRight;
160+
}
157161
/* if rich text flag is set */
158162
if (mDrawRichText) {
159163
QAbstractTextDocumentLayout::PaintContext ctx;

0 commit comments

Comments
 (0)