mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 15:15:15 -04:00
fixed layout of compact view to use a constant apsect ratio with cropping
This commit is contained in:
parent
d3cb789fcd
commit
5c240c6abb
6 changed files with 100 additions and 61 deletions
|
@ -99,6 +99,8 @@ void PostedPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
|
|||
BoardPostDisplayWidget_compact w(post,displayFlags(post.mMeta.mMsgId),nullptr);
|
||||
|
||||
w.setFixedSize(option.rect.size());
|
||||
|
||||
w.updateGeometry();
|
||||
w.adjustSize();
|
||||
w.render(&pixmap,QPoint(0,0),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background
|
||||
}
|
||||
|
@ -107,6 +109,7 @@ void PostedPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
|
|||
BoardPostDisplayWidget_card w(post,displayFlags(post.mMeta.mMsgId),nullptr);
|
||||
|
||||
w.setFixedSize(option.rect.size());
|
||||
w.updateGeometry();
|
||||
w.adjustSize();
|
||||
w.render(&pixmap,QPoint(0,0),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background
|
||||
}
|
||||
|
@ -198,6 +201,8 @@ QWidget *PostedPostDelegate::createEditor(QWidget *parent, const QStyleOptionVie
|
|||
|
||||
w->setFixedSize(option.rect.size());
|
||||
w->adjustSize();
|
||||
w->updateGeometry();
|
||||
w->adjustSize();
|
||||
|
||||
return w;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue