Commit 383178ff authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Use the global font settings in GenericProjectFilesEditor

parent 13232879
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include <coreplugin/uniqueidmanager.h> #include <coreplugin/uniqueidmanager.h>
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <texteditor/fontsettings.h>
#include <texteditor/texteditorsettings.h>
using namespace GenericProjectManager; using namespace GenericProjectManager;
using namespace GenericProjectManager::Internal; using namespace GenericProjectManager::Internal;
...@@ -36,7 +38,7 @@ Manager *ProjectFilesFactory::manager() const ...@@ -36,7 +38,7 @@ Manager *ProjectFilesFactory::manager() const
Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent) Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent)
{ {
ProjectFilesEditor *ed = new ProjectFilesEditor(parent, this, _actionHandler); ProjectFilesEditor *ed = new ProjectFilesEditor(parent, this, _actionHandler);
// ### initialize ed->initialize();
return ed->editableInterface(); return ed->editableInterface();
} }
...@@ -95,6 +97,7 @@ Core::IEditor *ProjectFilesEditable::duplicate(QWidget *parent) ...@@ -95,6 +97,7 @@ Core::IEditor *ProjectFilesEditable::duplicate(QWidget *parent)
ProjectFilesEditor *editor = new ProjectFilesEditor(parent, ProjectFilesEditor *editor = new ProjectFilesEditor(parent,
parentEditor->factory(), parentEditor->factory(),
parentEditor->actionHandler()); parentEditor->actionHandler());
editor->initialize();
return editor->editableInterface(); return editor->editableInterface();
} }
...@@ -116,6 +119,16 @@ ProjectFilesEditor::ProjectFilesEditor(QWidget *parent, ProjectFilesFactory *fac ...@@ -116,6 +119,16 @@ ProjectFilesEditor::ProjectFilesEditor(QWidget *parent, ProjectFilesFactory *fac
ProjectFilesEditor::~ProjectFilesEditor() ProjectFilesEditor::~ProjectFilesEditor()
{ } { }
void ProjectFilesEditor::initialize()
{
TextEditor::TextEditorSettings *settings = TextEditor::TextEditorSettings::instance();
connect(settings, SIGNAL(fontSettingsChanged(const TextEditor::FontSettings&)),
this, SLOT(setFontSettings(const TextEditor::FontSettings&)));
setFontSettings(settings->fontSettings());
}
ProjectFilesFactory *ProjectFilesEditor::factory() const ProjectFilesFactory *ProjectFilesEditor::factory() const
{ {
return _factory; return _factory;
......
...@@ -64,6 +64,8 @@ public: ...@@ -64,6 +64,8 @@ public:
TextEditor::TextEditorActionHandler *handler); TextEditor::TextEditorActionHandler *handler);
virtual ~ProjectFilesEditor(); virtual ~ProjectFilesEditor();
void initialize();
ProjectFilesFactory *factory() const; ProjectFilesFactory *factory() const;
TextEditor::TextEditorActionHandler *actionHandler() const; TextEditor::TextEditorActionHandler *actionHandler() const;
......
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