fix attachament inline height

This commit is contained in:
Martin Rotter 2021-08-23 07:49:54 +02:00
parent a164eb0a94
commit 778b06e94e
2 changed files with 9 additions and 5 deletions

View File

@ -1 +1 @@
<a href="%1"><img src="%1" alt="%2" height="%3" /></a>
<a href="%1"><img src="%1" alt="%2" style="height: %3px;" /></a>

View File

@ -30,10 +30,15 @@ SettingsFeedsMessages::SettingsFeedsMessages(Settings* settings, QWidget* parent
m_ui->m_checkDisplayPlaceholders->hide();
connect(m_ui->m_cbShowEnclosuresDirectly, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_spinHeightImageAttachments, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &SettingsFeedsMessages::dirtifySettings);
#else
m_ui->m_tabMessages->layout()->removeWidget(m_ui->m_cbShowEnclosuresDirectly);
m_ui->m_cbShowEnclosuresDirectly->hide());
m_ui->m_tabMessages->layout()->removeWidget(m_ui->m_spinHeightImageAttachments);
m_ui->m_spinHeightImageAttachments->hide());
connect(m_ui->m_checkDisplayPlaceholders, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
#endif
@ -56,8 +61,6 @@ SettingsFeedsMessages::SettingsFeedsMessages(Settings* settings, QWidget* parent
this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_spinStartupUpdateDelay, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_spinHeightImageAttachments, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_spinHeightRowsMessages, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_spinHeightRowsFeeds, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
@ -147,12 +150,13 @@ void SettingsFeedsMessages::loadSettings() {
m_ui->m_spinStartupUpdateDelay->setValue(settings()->value(GROUP(Feeds), SETTING(Feeds::FeedsUpdateStartupDelay)).toDouble());
m_ui->m_cmbCountsFeedList->addItems(QStringList() << "(%unread)" << "[%unread]" << "%unread/%all" << "%unread-%all" << "[%unread|%all]");
m_ui->m_cmbCountsFeedList->setEditText(settings()->value(GROUP(Feeds), SETTING(Feeds::CountFormat)).toString());
m_ui->m_spinHeightImageAttachments->setValue(settings()->value(GROUP(Messages), SETTING(Messages::MessageHeadImageHeight)).toInt());
m_ui->m_checkShowTooltips->setChecked(settings()->value(GROUP(Feeds), SETTING(Feeds::EnableTooltipsFeedsMessages)).toBool());
#if !defined (USE_WEBENGINE)
m_ui->m_checkDisplayPlaceholders->setChecked(settings()->value(GROUP(Messages), SETTING(Messages::DisplayImagePlaceholders)).toBool());
#else
m_ui->m_spinHeightImageAttachments->setValue(settings()->value(GROUP(Messages),
SETTING(Messages::MessageHeadImageHeight)).toInt());
m_ui->m_cbShowEnclosuresDirectly->setChecked(settings()->value(GROUP(Messages),
SETTING(Messages::DisplayEnclosuresInMessage)).toBool());
#endif
@ -210,12 +214,12 @@ void SettingsFeedsMessages::saveSettings() {
settings()->setValue(GROUP(Feeds), Feeds::FeedsUpdateStartupDelay, m_ui->m_spinStartupUpdateDelay->value());
settings()->setValue(GROUP(Feeds), Feeds::CountFormat, m_ui->m_cmbCountsFeedList->currentText());
settings()->setValue(GROUP(Messages), Messages::UseCustomDate, m_ui->m_checkMessagesDateTimeFormat->isChecked());
settings()->setValue(GROUP(Messages), Messages::MessageHeadImageHeight, m_ui->m_spinHeightImageAttachments->value());
settings()->setValue(GROUP(Feeds), Feeds::EnableTooltipsFeedsMessages, m_ui->m_checkShowTooltips->isChecked());
#if !defined (USE_WEBENGINE)
settings()->setValue(GROUP(Messages), Messages::DisplayImagePlaceholders, m_ui->m_checkDisplayPlaceholders->isChecked());
#else
settings()->setValue(GROUP(Messages), Messages::MessageHeadImageHeight, m_ui->m_spinHeightImageAttachments->value());
settings()->setValue(GROUP(Messages),
Messages::DisplayEnclosuresInMessage,
m_ui->m_cbShowEnclosuresDirectly->isChecked());