mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-20 20:42:21 +08:00
Merge branch 'dev' into Reason
This commit is contained in:
commit
5de20aa19d
@ -42,12 +42,13 @@ void image_show::setImage(QPixmap image)
|
||||
void image_show::mousePressEvent(QMouseEvent *)
|
||||
{
|
||||
m_dialog->setimage(m_image);
|
||||
m_dialog->show();
|
||||
|
||||
// 识别主屏幕尺寸并设置 widget 大小
|
||||
m_dialog->setFixedSize(qMin(desktop_w, m_image.width() + int(desktop_h / 16 * m_image.width() / m_image.height())), qMin(desktop_h, m_image.height() + int(desktop_h / 16)));
|
||||
|
||||
m_dialog->move(QGuiApplication::screenAt(QCursor().pos())->geometry().center() - m_dialog->rect().center());
|
||||
|
||||
m_dialog->show();
|
||||
}
|
||||
image_show::~image_show()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user