mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
opt: remove explict RTL elide mode settings of text layout
This commit is contained in:
parent
932b88f743
commit
2053511856
|
@ -12,19 +12,13 @@ void WordListItemDelegate::paint( QPainter * painter,
|
||||||
const QStyleOptionViewItem & option,
|
const QStyleOptionViewItem & option,
|
||||||
const QModelIndex & index ) const
|
const QModelIndex & index ) const
|
||||||
{
|
{
|
||||||
QStyleOptionViewItem opt4 = option;
|
|
||||||
|
|
||||||
QStyleOptionViewItem opt = option;
|
QStyleOptionViewItem opt = option;
|
||||||
initStyleOption( &opt4, index );
|
initStyleOption( &opt, index );
|
||||||
if ( opt4.text.isRightToLeft() ) {
|
if ( opt.text.isRightToLeft() ) {
|
||||||
opt.direction = Qt::RightToLeft;
|
opt.direction = Qt::RightToLeft;
|
||||||
if ( opt4.textElideMode != Qt::ElideNone )
|
|
||||||
opt.textElideMode = Qt::ElideLeft;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
opt.direction = Qt::LeftToRight;
|
opt.direction = Qt::LeftToRight;
|
||||||
if ( opt4.textElideMode != Qt::ElideNone )
|
|
||||||
opt.textElideMode = Qt::ElideRight;
|
|
||||||
}
|
}
|
||||||
mainDelegate->paint( painter, opt, index );
|
mainDelegate->paint( painter, opt, index );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue