make sure that the minimum height of musrStep is not larger than the available screen resolution height.
This commit is contained in:
parent
d0923d75b9
commit
8f682aceca
@ -39,6 +39,8 @@
|
|||||||
#include <QDoubleValidator>
|
#include <QDoubleValidator>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#include <QScreen>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
@ -175,6 +177,12 @@ PMusrStep::PMusrStep(const char *fln, QWidget *parent) :
|
|||||||
height = 20*fParamVec.size();
|
height = 20*fParamVec.size();
|
||||||
else
|
else
|
||||||
height = 900;
|
height = 900;
|
||||||
|
// make sure that the minimal height is not larger than the screen resolution height
|
||||||
|
QScreen *screen = QGuiApplication::primaryScreen();
|
||||||
|
int hh = screen->geometry().height();
|
||||||
|
if (height > hh)
|
||||||
|
height = hh - 70;
|
||||||
|
|
||||||
setMinimumSize(400, height);
|
setMinimumSize(400, height);
|
||||||
|
|
||||||
// populate dialog
|
// populate dialog
|
||||||
|
@ -39,6 +39,8 @@
|
|||||||
#include <QDoubleValidator>
|
#include <QDoubleValidator>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#include <QScreen>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
@ -175,6 +177,11 @@ PMusrStep::PMusrStep(const char *fln, QWidget *parent) :
|
|||||||
height = 20*fParamVec.size();
|
height = 20*fParamVec.size();
|
||||||
else
|
else
|
||||||
height = 900;
|
height = 900;
|
||||||
|
// make sure that the minimal height is not larger than the screen resolution height
|
||||||
|
QScreen *screen = QGuiApplication::primaryScreen();
|
||||||
|
int hh = screen->geometry().height();
|
||||||
|
if (height > hh)
|
||||||
|
height = hh - 70;
|
||||||
setMinimumSize(400, height);
|
setMinimumSize(400, height);
|
||||||
|
|
||||||
// populate dialog
|
// populate dialog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user