forked from qt-creator/qt-creator
make zoom-in store the new size permanently in the settings.
This commit is contained in:
@@ -458,8 +458,11 @@ void FontSettingsPage::apply()
|
|||||||
const int size = d_ptr->ui.sizeComboBox->currentText().toInt(&ok);
|
const int size = d_ptr->ui.sizeComboBox->currentText().toInt(&ok);
|
||||||
if (ok)
|
if (ok)
|
||||||
d_ptr->m_value.setFontSize(size);
|
d_ptr->m_value.setFontSize(size);
|
||||||
|
saveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FontSettingsPage::saveSettings()
|
||||||
|
{
|
||||||
if (d_ptr->m_value != d_ptr->m_lastValue) {
|
if (d_ptr->m_value != d_ptr->m_lastValue) {
|
||||||
d_ptr->m_lastValue = d_ptr->m_value;
|
d_ptr->m_lastValue = d_ptr->m_value;
|
||||||
if (QSettings *settings = Core::ICore::instance()->settings())
|
if (QSettings *settings = Core::ICore::instance()->settings())
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ public:
|
|||||||
void apply();
|
void apply();
|
||||||
void finish();
|
void finish();
|
||||||
|
|
||||||
|
void saveSettings();
|
||||||
|
|
||||||
const FontSettings &fontSettings() const;
|
const FontSettings &fontSettings() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ void TextEditorSettings::fontSizeRequested(int pointSize)
|
|||||||
{
|
{
|
||||||
FontSettings &fs = const_cast<FontSettings&>(m_fontSettingsPage->fontSettings());
|
FontSettings &fs = const_cast<FontSettings&>(m_fontSettingsPage->fontSettings());
|
||||||
fs.setFontSize(pointSize);
|
fs.setFontSize(pointSize);
|
||||||
emit fontSettingsChanged(m_fontSettingsPage->fontSettings());
|
m_fontSettingsPage->saveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
FontSettings TextEditorSettings::fontSettings() const
|
FontSettings TextEditorSettings::fontSettings() const
|
||||||
|
|||||||
Reference in New Issue
Block a user