Commit 99aa9955 authored by hjk's avatar hjk
Browse files

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: default avatarJarek Kobus <jaroslaw.kobus@digia.com>
parent 209f0086
......@@ -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);
......
......@@ -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 &);
......
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