mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-22 04:39:55 -04:00
Fix RSElidedItemDelegate to use spacing in size hint.
This commit is contained in:
parent
b700c451d4
commit
222cb38ce7
11 changed files with 216 additions and 190 deletions
|
@ -126,7 +126,11 @@ bool ElidedLabel::paintElidedLine( QPainter* painter, QString plainText
|
|||
to.setWrapMode(wordWrap ? QTextOption::WrapAtWordBoundaryOrAnywhere : QTextOption::NoWrap);
|
||||
textLayout.setTextOption(to);
|
||||
|
||||
if (painter) painter->save();
|
||||
if (painter)
|
||||
{
|
||||
painter->save();
|
||||
painter->setFont(useFont);
|
||||
}
|
||||
textLayout.beginLayout();
|
||||
forever {
|
||||
//Get new line for text.
|
||||
|
@ -220,10 +224,7 @@ bool ElidedLabel::paintElidedLine( QPainter* painter, QString plainText
|
|||
|
||||
if(width+iTransX+cr.left() <= cr.right())
|
||||
if (painter)
|
||||
{
|
||||
painter->setFont(useFont);
|
||||
painter->drawText(QPoint(iTransX + cr.left(), y + fontMetrics.ascent() + cr.top()), elidedLastLine);
|
||||
}
|
||||
|
||||
//Draw button to get ToolTip
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,11,0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue