fix DPI scaling in PictureDialog

This commit is contained in:
Syping 2018-12-25 21:05:09 +01:00
parent c39c3a3e9f
commit aeae6c9311
2 changed files with 6 additions and 0 deletions

View file

@ -188,6 +188,12 @@ void PictureDialog::setupPictureDialog()
ui->labPicture->setFixedSize(960 * screenRatio, 536 * screenRatio); ui->labPicture->setFixedSize(960 * screenRatio, 536 * screenRatio);
ui->labPicture->setFocusPolicy(Qt::StrongFocus); ui->labPicture->setFocusPolicy(Qt::StrongFocus);
// DPI calculation
ui->hlButtons->setSpacing(6 * screenRatio);
ui->vlButtons->setSpacing(6 * screenRatio);
ui->vlButtons->setContentsMargins(0, 0, 5 * screenRatio, 5 * screenRatio);
ui->jsonLayout->setContentsMargins(4 * screenRatio, 10 * screenRatio, 4 * screenRatio, 4 * screenRatio);
// Pre-adapt window for DPI // Pre-adapt window for DPI
setFixedWidth(960 * screenRatio); setFixedWidth(960 * screenRatio);
setFixedHeight(536 * screenRatio); setFixedHeight(536 * screenRatio);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 88 KiB