added Snapmatic Players Editor

This commit is contained in:
Syping 2017-12-12 04:45:46 +01:00
parent eeb0c01a5f
commit 6938ca577d
26 changed files with 1104 additions and 194 deletions

View file

@ -38,6 +38,13 @@ ImportDialog::ImportDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::ImportDialog)
{
// Set Window Flags
setWindowFlags(windowFlags()^Qt::WindowContextHelpButtonHint^Qt::WindowMinMaxButtonsHint);
#ifdef Q_OS_LINUX
// for stupid Window Manager (GNOME 3 should feel triggered)
setWindowFlags(windowFlags()^Qt::Dialog^Qt::Window);
#endif
ui->setupUi(this);
importAgreed = false;
insideAvatarZone = false;
@ -56,14 +63,26 @@ ImportDialog::ImportDialog(QWidget *parent) :
ui->cbIgnore->setChecked(false);
ui->labColour->setText(tr("Background Colour: <span style=\"color: %1\">%1</span>").arg(selectedColour.name()));
// DPI calculation
qreal screenRatio = AppEnv::screenRatio();
snapmaticResolutionLW = 430 * screenRatio;
snapmaticResolutionLH = 240 * screenRatio;
ui->vlButtom->setSpacing(6 * screenRatio);
#ifndef Q_OS_MAC
ui->vlButtom->setContentsMargins(9 * screenRatio, 6 * screenRatio, 9 * screenRatio, 9 * screenRatio);
#else
if (QApplication::style()->objectName() == "macintosh")
{
ui->vlButtom->setContentsMargins(9 * screenRatio, 9 * screenRatio, 9 * screenRatio, 9 * screenRatio);
}
else
{
ui->vlButtom->setContentsMargins(9 * screenRatio, 6 * screenRatio, 9 * screenRatio, 9 * screenRatio);
}
#endif
setMinimumSize(430 * screenRatio, 380 * screenRatio);
setMaximumSize(430 * screenRatio, 380 * screenRatio);
setFixedSize(430 * screenRatio, 380 * screenRatio);
ui->vlButtom->setSpacing(6 * screenRatio);
ui->vlButtom->setContentsMargins(9 * screenRatio, 6 * screenRatio, 9 * screenRatio, 9 * screenRatio);
}
ImportDialog::~ImportDialog()