Margini alto/basso (Settings.readerMarginV) + applicazione a caldo senza reload: i margini si sovrascrivono via runJavaScript (setProperty !important) sul documento aperto, anteprima live nel dialogo e al ritorno dalle impostazioni
This commit is contained in:
+16
-1
@@ -11,7 +11,8 @@ Settings::Settings(QObject *parent)
|
||||
// diagnostica: path reale del file di configurazione e valori letti all'avvio
|
||||
qDebug() << "Settings file:" << m_settings.fileName();
|
||||
qDebug() << "Settings read: serverUrl=[" << serverUrl() << "] user=[" << username()
|
||||
<< "] ssl=" << ignoreSslErrors() << "margin=" << readerMargin();
|
||||
<< "] ssl=" << ignoreSslErrors() << "margin=" << readerMargin()
|
||||
<< "marginV=" << readerMarginV();
|
||||
}
|
||||
|
||||
QString Settings::serverUrl() const
|
||||
@@ -85,6 +86,20 @@ void Settings::setReaderMargin(int value)
|
||||
emit readerMarginChanged();
|
||||
}
|
||||
|
||||
int Settings::readerMarginV() const
|
||||
{
|
||||
return m_settings.value(QStringLiteral("readerMarginV"), 0).toInt();
|
||||
}
|
||||
|
||||
void Settings::setReaderMarginV(int value)
|
||||
{
|
||||
if (value == readerMarginV())
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("readerMarginV"), value);
|
||||
m_settings.sync();
|
||||
emit readerMarginVChanged();
|
||||
}
|
||||
|
||||
QString Settings::downloadDir() const
|
||||
{
|
||||
QString dir = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
|
||||
|
||||
Reference in New Issue
Block a user