aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-21 21:30:10 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-21 21:30:10 +0800
commit7e12992ad284fda2c29e494b3c0d60101592c277 (patch)
tree73de77f1c4ab7ec52b7e492628ebe968bd2553da /qmidiplayer-desktop/qmpmainwindow.cpp
parent1ec23952dd7c022e11afbb93d93be1bac5c94081 (diff)
downloadQMidiPlayer-7e12992ad284fda2c29e494b3c0d60101592c277.tar.xz
Use QDirIterator instead, fixing plugin loading problems in Windows.
Also scale UI elements.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index c81816c..de15412 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -11,6 +11,7 @@
#include "qmpmainwindow.hpp"
#include "ui_qmpmainwindow.h"
#include "../core/qmpmidiplay.hpp"
+#define setButtonHeight(x,h) {x->setMaximumHeight(h*(logicalDpiY()/96.));x->setMinimumHeight(h*(logicalDpiY()/96.));}
#ifdef _WIN32
#include <Windows.h>
char* wcsto8bit(const wchar_t* s)
@@ -55,6 +56,10 @@ qmpMainWindow::qmpMainWindow(QWidget *parent) :
ui->lbFileName->setText("");ref=this;ui->verticalLayout->setAlignment(ui->pushButton,Qt::AlignRight);
int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.);
setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h);
+ setButtonHeight(ui->pbNext,34);setButtonHeight(ui->pbPlayPause,34);
+ setButtonHeight(ui->pbPrev,34);setButtonHeight(ui->pbSettings,34);setButtonHeight(ui->pbStop,34);
+ setButtonHeight(ui->pbChannels,36);setButtonHeight(ui->pbPList,36);
+ setButtonHeight(ui->pbEfx,36);setButtonHeight(ui->pbVisualization,36);
playing=false;stopped=true;dragging=false;memset(VIs,0,sizeof(VIs));
settingsw=new qmpSettingsWindow(this);pmgr=new qmpPluginManager();
plistw=new qmpPlistWindow(this);player=NULL;timer=NULL;