Commit 79f7703a authored by Jarek Kobus's avatar Jarek Kobus Committed by Jarek Kobus
Browse files

Add a label explaining the goal of editable preview

Change-Id: I6e3455f5767862150f95beac1ea4b7655619ca0c
Reviewed-on: http://codereview.qt-project.org/6363


Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarChristian Kamm <christian.d.kamm@nokia.com>
parent a5211130
......@@ -43,6 +43,7 @@
#include "snippets/isnippetprovider.h"
#include <QtGui/QVBoxLayout>
#include <QtGui/QTextBlock>
#include <QtGui/QLabel>
using namespace TextEditor;
......@@ -64,8 +65,14 @@ CodeStyleEditor::CodeStyleEditor(ICodeStylePreferencesFactory *factory,
ISnippetProvider *provider = factory->snippetProvider();
if (provider)
provider->decorateEditor(m_preview);
QLabel *label = new QLabel(
tr("Edit preview contents to see how the current settings "
"are applied to custom code snippets. Changes in the preview "
"do not affect the current settings."), this);
label->setWordWrap(true);
m_layout->addWidget(selector);
m_layout->addWidget(m_preview);
m_layout->addWidget(label);
connect(codeStyle, SIGNAL(currentTabSettingsChanged(TextEditor::TabSettings)),
this, SLOT(updatePreview()));
connect(codeStyle, SIGNAL(currentValueChanged(QVariant)),
......
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