mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 17:36:36 +00:00
Emit a resized event on the resource preview when thumbnail resizes
* If the overall preview widget doesn't resize but the thumbnail does because the preview text label has changed in size, we should emit a resize event so the thumbnail can be redrawn.
This commit is contained in:
@@ -187,6 +187,7 @@ void RDLabel::resizeEvent(QResizeEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
emit resized();
|
||||
QLabel::resizeEvent(event);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ signals:
|
||||
void doubleClicked(QMouseEvent *event);
|
||||
void mouseMoved(QMouseEvent *event);
|
||||
void leave();
|
||||
void resized();
|
||||
void styleChanged(QEvent *event);
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -96,6 +96,9 @@ void ResourcePreview::Initialise()
|
||||
QObject::connect(ui->slotLabel, &RDLabel::doubleClicked, this, &ResourcePreview::doubleClickEvent);
|
||||
QObject::connect(ui->descriptionLabel, &RDLabel::doubleClicked, this,
|
||||
&ResourcePreview::doubleClickEvent);
|
||||
|
||||
if(m_ManualThumbnail)
|
||||
QObject::connect(m_ManualThumbnail, &RDLabel::resized, [this]() { emit resized(this); });
|
||||
}
|
||||
|
||||
ResourcePreview::~ResourcePreview()
|
||||
|
||||
Reference in New Issue
Block a user