Commit 81441d4b authored by Akhil K Gangadharan's avatar Akhil K Gangadharan Committed by Jean-Baptiste Mardelle

enlarge Configure Dialog

BUG: 387503
parent ba5b1602
......@@ -44,7 +44,9 @@
#include <QThread>
#include <QAction>
#include <QTimer>
#include <QSize>
#include <QGuiApplication>
#include <QScreen>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -338,6 +340,21 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap<QString, QString> &map
// No blackmagic card found
m_configSdl.kcfg_external_display->setEnabled(false);
}
//Config dialog size
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup settingsGroup(config, "settings");
QSize optimalSize;
if(!settingsGroup.exists() || !settingsGroup.hasKey("dialogSize")){
const QSize screenSize = (QGuiApplication::primaryScreen()->availableSize()*0.9);
const QSize targetSize = QSize(1024, 700);
optimalSize = targetSize.boundedTo(screenSize);
}
else {
optimalSize = settingsGroup.readEntry("dialogSize", QVariant(size())).toSize();
}
resize(optimalSize);
}
//static
......@@ -970,6 +987,11 @@ void KdenliveSettingsDialog::updateSettings()
emit restartKdenlive();
}
emit checkTabPosition();
//remembering Config dialog size
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup settingsGroup(config, "settings");
settingsGroup.writeEntry("dialogSize", QVariant(size()));
}
void KdenliveSettingsDialog::slotCheckAlsaDriver()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment