diff options
author | hjk <hjk121@nokiamail.com> | 2014-09-24 12:40:28 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-09-24 21:21:39 +0200 |
commit | 99aa9955fd078ce8355b7df7f6a0e57e527a0f8b (patch) | |
tree | 47c29abf08689934b77a3181ad31f8a49a4b062c /src | |
parent | 209f0086629b4f39518e8f0787702d53a26d2655 (diff) | |
download | qt-creator-99aa9955fd078ce8355b7df7f6a0e57e527a0f8b.tar.gz |
DiffEditor: Fix summary view appearance
After the settings centralization it got visible margins which
are unwanted in this particular case.
Change-Id: I7c394e167035d3292a3a45e98fe711d3959ad353
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/diffeditor/diffeditor.cpp | 24 | ||||
-rw-r--r-- | src/plugins/texteditor/basetexteditor.h | 2 |
2 files changed, 11 insertions, 15 deletions
diff --git a/src/plugins/diffeditor/diffeditor.cpp b/src/plugins/diffeditor/diffeditor.cpp index 63fe415530..0c76a2f3d7 100644 --- a/src/plugins/diffeditor/diffeditor.cpp +++ b/src/plugins/diffeditor/diffeditor.cpp @@ -41,6 +41,7 @@ #include <texteditor/basetexteditor.h> #include <texteditor/texteditorsettings.h> #include <texteditor/displaysettings.h> +#include <texteditor/marginsettings.h> #include <QStackedWidget> #include <QToolButton> @@ -79,13 +80,13 @@ public: signals: void expandBranchesRequested(); -public slots: - void setDisplaySettings(const DisplaySettings &ds); - protected: void mouseMoveEvent(QMouseEvent *e); void mouseReleaseEvent(QMouseEvent *e); + void setDisplaySettings(const DisplaySettings &ds); + void setMarginSettings(const MarginSettings &ms); + bool findContentsUnderCursor(const QTextCursor &cursor); void highlightCurrentContents(); void handleCurrentContents(); @@ -128,6 +129,12 @@ void DescriptionEditorWidget::setDisplaySettings(const DisplaySettings &ds) BaseTextEditorWidget::setDisplaySettings(settings); } +void DescriptionEditorWidget::setMarginSettings(const MarginSettings &ms) +{ + Q_UNUSED(ms); + BaseTextEditorWidget::setMarginSettings(MarginSettings()); +} + void DescriptionEditorWidget::mouseMoveEvent(QMouseEvent *e) { if (e->buttons()) { @@ -227,17 +234,6 @@ DiffEditor::DiffEditor(const QSharedPointer<DiffEditorDocument> &doc) connect(m_descriptionWidget, SIGNAL(expandBranchesRequested()), m_document->controller(), SLOT(expandBranchesRequested())); - connect(TextEditorSettings::instance(), &TextEditorSettings::displaySettingsChanged, - m_descriptionWidget, &BaseTextEditorWidget::setDisplaySettings); - connect(TextEditorSettings::instance(), &TextEditorSettings::fontSettingsChanged, - m_descriptionWidget->textDocument(), &BaseTextDocument::setFontSettings); - - m_descriptionWidget->setDisplaySettings( - TextEditorSettings::displaySettings()); - m_descriptionWidget->setCodeStyle( - TextEditorSettings::codeStyle()); - m_descriptionWidget->textDocument()->setFontSettings( - TextEditorSettings::fontSettings()); m_controller = m_document->controller(); m_guiController = new DiffEditorGuiController(m_controller, this); diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h index cdd4cd284a..f6357fc84a 100644 --- a/src/plugins/texteditor/basetexteditor.h +++ b/src/plugins/texteditor/basetexteditor.h @@ -378,7 +378,7 @@ public: virtual void unCommentSelection(); virtual void setDisplaySettings(const TextEditor::DisplaySettings &); - void setMarginSettings(const TextEditor::MarginSettings &); + virtual void setMarginSettings(const TextEditor::MarginSettings &); void setBehaviorSettings(const TextEditor::BehaviorSettings &); void setTypingSettings(const TextEditor::TypingSettings &); void setStorageSettings(const TextEditor::StorageSettings &); |