From 1ec23952dd7c022e11afbb93d93be1bac5c94081 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Fri, 20 May 2016 23:51:15 +0800 Subject: Scale GUI correctly on a high DPI device. Fix building for Windows. RC-bugs still exist. --- qmidiplayer-desktop/qmpefxwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qmidiplayer-desktop/qmpefxwindow.cpp') 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 dials=findChildren(); for(int i=0;isetStyle(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(); -- cgit v1.2.3