forked from qt-creator/qt-creator
make zoom-in/-out apply to all editors
This commit is contained in:
@@ -152,7 +152,7 @@ void TextEditorSettings::initializeEditor(BaseTextEditor *editor)
|
||||
{
|
||||
// Connect to settings change signals
|
||||
connect(this, SIGNAL(fontSettingsChanged(TextEditor::FontSettings)),
|
||||
editor, SLOT(setFontSettings(TextEditor::FontSettings)));
|
||||
editor, SLOT(setFontSettingsIfVisible(TextEditor::FontSettings)));
|
||||
connect(this, SIGNAL(tabSettingsChanged(TextEditor::TabSettings)),
|
||||
editor, SLOT(setTabSettings(TextEditor::TabSettings)));
|
||||
connect(this, SIGNAL(storageSettingsChanged(TextEditor::StorageSettings)),
|
||||
@@ -160,6 +160,9 @@ void TextEditorSettings::initializeEditor(BaseTextEditor *editor)
|
||||
connect(this, SIGNAL(displaySettingsChanged(TextEditor::DisplaySettings)),
|
||||
editor, SLOT(setDisplaySettings(TextEditor::DisplaySettings)));
|
||||
|
||||
connect(editor, SIGNAL(requestFontSize(int)),
|
||||
this, SLOT(fontSizeRequested(int)));
|
||||
|
||||
// Apply current settings (tab settings depend on font settings)
|
||||
editor->setFontSettings(fontSettings());
|
||||
editor->setTabSettings(tabSettings());
|
||||
@@ -167,6 +170,14 @@ void TextEditorSettings::initializeEditor(BaseTextEditor *editor)
|
||||
editor->setDisplaySettings(displaySettings());
|
||||
}
|
||||
|
||||
|
||||
void TextEditorSettings::fontSizeRequested(int pointSize)
|
||||
{
|
||||
FontSettings &fs = const_cast<FontSettings&>(m_fontSettingsPage->fontSettings());
|
||||
fs.setFontSize(pointSize);
|
||||
emit fontSettingsChanged(m_fontSettingsPage->fontSettings());
|
||||
}
|
||||
|
||||
FontSettings TextEditorSettings::fontSettings() const
|
||||
{
|
||||
return m_fontSettingsPage->fontSettings();
|
||||
|
||||
Reference in New Issue
Block a user