aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpefxwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-20 23:51:15 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-20 23:51:15 +0800
commit1ec23952dd7c022e11afbb93d93be1bac5c94081 (patch)
treec38c321d2374c72f4f607bd3742a59188dae1e60 /qmidiplayer-desktop/qmpefxwindow.cpp
parent78b384662f484e946a6a17c96e6c309df0c039da (diff)
downloadQMidiPlayer-1ec23952dd7c022e11afbb93d93be1bac5c94081.tar.xz
Scale GUI correctly on a high DPI device.
Fix building for Windows. RC-bugs still exist.
Diffstat (limited to 'qmidiplayer-desktop/qmpefxwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpefxwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/qmpefxwindow.cpp b/qmidiplayer-desktop/qmpefxwindow.cpp
index 7d9c08e..25e9bf4 100644
--- a/qmidiplayer-desktop/qmpefxwindow.cpp
+++ b/qmidiplayer-desktop/qmpefxwindow.cpp
@@ -12,6 +12,8 @@ qmpEfxWindow::qmpEfxWindow(QWidget *parent) :
QList<QDial*> dials=findChildren<QDial*>();
for(int i=0;i<dials.count();++i)
dials.at(i)->setStyle(styl);
+ int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.);
+ setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h);
connect(this,SIGNAL(dialogClosing()),parent,SLOT(dialogClosed()));
//stub. read these from settings after the setting module is implemented
QSettings *settings=qmpSettingsWindow::getSettingsIntf();