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/qmpchannelswindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qmidiplayer-desktop/qmpchannelswindow.cpp') diff --git a/qmidiplayer-desktop/qmpchannelswindow.cpp b/qmidiplayer-desktop/qmpchannelswindow.cpp index e0a1522..a692852 100644 --- a/qmidiplayer-desktop/qmpchannelswindow.cpp +++ b/qmidiplayer-desktop/qmpchannelswindow.cpp @@ -11,6 +11,8 @@ qmpChannelsWindow::qmpChannelsWindow(QWidget *parent) : ui(new Ui::qmpChannelsWindow) { ui->setupUi(this); + int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.); + setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h); pselectw=new qmpPresetSelector(this); ceditw=new qmpChannelEditor(this); connect(this,SIGNAL(dialogClosing()),parent,SLOT(dialogClosed())); -- cgit v1.2.3