diff --git a/src/plugins/cpptools/cppcodestylesettingspage.cpp b/src/plugins/cpptools/cppcodestylesettingspage.cpp index ef62ad1fa32..1616411f511 100644 --- a/src/plugins/cpptools/cppcodestylesettingspage.cpp +++ b/src/plugins/cpptools/cppcodestylesettingspage.cpp @@ -161,8 +161,6 @@ CppCodeStylePreferencesWidget::CppCodeStylePreferencesWidget(QWidget *parent) this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged); m_ui->categoryTab->setCurrentIndex(0); - - m_ui->tabSettingsWidget->setFlat(true); } CppCodeStylePreferencesWidget::~CppCodeStylePreferencesWidget() diff --git a/src/plugins/cpptools/cppcodestylesettingspage.ui b/src/plugins/cpptools/cppcodestylesettingspage.ui index 713c6384efb..5bb0eff89c1 100644 --- a/src/plugins/cpptools/cppcodestylesettingspage.ui +++ b/src/plugins/cpptools/cppcodestylesettingspage.ui @@ -7,7 +7,7 @@ 0 0 463 - 314 + 317 @@ -69,19 +69,7 @@ Indent - - true - - - 0 - - - 0 - - - 0 - @@ -155,19 +143,7 @@ Indent Braces - - true - - - 0 - - - 0 - - - 0 - @@ -238,19 +214,7 @@ Indent within "switch" - - true - - - 0 - - - 0 - - - 0 - @@ -317,19 +281,7 @@ Align - - true - - - 0 - - - 0 - - - 0 - @@ -414,9 +366,6 @@ if they would align to the next line Bind '*' and '&&' in types/declarations to - - true - diff --git a/src/plugins/texteditor/simplecodestylepreferenceswidget.cpp b/src/plugins/texteditor/simplecodestylepreferenceswidget.cpp index d520232c632..d64a588244d 100644 --- a/src/plugins/texteditor/simplecodestylepreferenceswidget.cpp +++ b/src/plugins/texteditor/simplecodestylepreferenceswidget.cpp @@ -89,11 +89,6 @@ void SimpleCodeStylePreferencesWidget::slotTabSettingsChanged(const TextEditor:: current->setTabSettings(settings); } -void SimpleCodeStylePreferencesWidget::setFlat(bool on) -{ - m_tabSettingsWidget->setFlat(on); -} - TabSettingsWidget *SimpleCodeStylePreferencesWidget::tabSettingsWidget() const { return m_tabSettingsWidget; diff --git a/src/plugins/texteditor/simplecodestylepreferenceswidget.h b/src/plugins/texteditor/simplecodestylepreferenceswidget.h index 9b77a98a277..7674b3c657d 100644 --- a/src/plugins/texteditor/simplecodestylepreferenceswidget.h +++ b/src/plugins/texteditor/simplecodestylepreferenceswidget.h @@ -46,7 +46,6 @@ public: void setPreferences(ICodeStylePreferences *tabPreferences); - void setFlat(bool on); TabSettingsWidget *tabSettingsWidget() const; private: diff --git a/src/plugins/texteditor/tabsettingswidget.cpp b/src/plugins/texteditor/tabsettingswidget.cpp index fd4ddb29890..c6e84d26d31 100644 --- a/src/plugins/texteditor/tabsettingswidget.cpp +++ b/src/plugins/texteditor/tabsettingswidget.cpp @@ -32,7 +32,7 @@ namespace TextEditor { TabSettingsWidget::TabSettingsWidget(QWidget *parent) : - QWidget(parent), + QGroupBox(parent), ui(new Internal::Ui::TabSettingsWidget) { ui->setupUi(this); @@ -91,13 +91,6 @@ void TabSettingsWidget::codingStyleLinkActivated(const QString &linkString) emit codingStyleLinkClicked(QtQuickLink); } -void TabSettingsWidget::setFlat(bool on) -{ - ui->tabsAndIndentationGroupBox->setFlat(on); - const int margin = on ? 0 : -1; - ui->tabsAndIndentationGroupBox->layout()->setContentsMargins(margin, -1, margin, margin); -} - void TabSettingsWidget::setCodingStyleWarningVisible(bool visible) { ui->codingStyleWarning->setVisible(visible); diff --git a/src/plugins/texteditor/tabsettingswidget.h b/src/plugins/texteditor/tabsettingswidget.h index 33b8ad919e3..5a5206434ac 100644 --- a/src/plugins/texteditor/tabsettingswidget.h +++ b/src/plugins/texteditor/tabsettingswidget.h @@ -27,7 +27,7 @@ #include "texteditor_global.h" -#include +#include namespace TextEditor { @@ -35,7 +35,7 @@ namespace Internal { namespace Ui { class TabSettingsWidget; } } class TabSettings; -class TEXTEDITOR_EXPORT TabSettingsWidget : public QWidget +class TEXTEDITOR_EXPORT TabSettingsWidget : public QGroupBox { Q_OBJECT @@ -50,7 +50,6 @@ public: TabSettings tabSettings() const; - void setFlat(bool on); void setCodingStyleWarningVisible(bool visible); void setTabSettings(const TextEditor::TabSettings& s); diff --git a/src/plugins/texteditor/tabsettingswidget.ui b/src/plugins/texteditor/tabsettingswidget.ui index 44029650b40..69fe0b9a2a6 100644 --- a/src/plugins/texteditor/tabsettingswidget.ui +++ b/src/plugins/texteditor/tabsettingswidget.ui @@ -1,160 +1,181 @@ TextEditor::Internal::TabSettingsWidget - + 0 0 - 335 - 224 + 254 + 189 - + - - - 0 - - - - - Tabs And Indentation + + Tabs And Indentation + + + + + + The text editor indentation setting is used for non-code files only. See the C++ and Qt Quick coding style settings to configure indentation for code files. - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 30 - 20 - - - - - - - - - 0 - 0 - - - - - Spaces Only - - - - - Tabs Only - - - - - Mixed - - - - - - - - - - - 0 - 0 - - - - Ta&b size: - - - tabSize - - - - - - - - 0 - 0 - - - - 1 - - - 20 - - - - - - - - 0 - 0 - - - - &Indent size: - - - indentSize - - - - - - - - 0 - 0 - - - - 1 - - - 20 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 0 - 0 - - - - <html><head/><body> + + <i>Code indentation is configured in <a href="C++">C++</a> and <a href="QtQuick">Qt Quick</a> settings.</i> + + + true + + + + + + + Tab policy: + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 30 + 20 + + + + + + + + + 0 + 0 + + + + + Spaces Only + + + + + Tabs Only + + + + + Mixed + + + + + + + + + + + 0 + 0 + + + + Ta&b size: + + + tabSize + + + + + + + + 0 + 0 + + + + 1 + + + 20 + + + + + + + + 0 + 0 + + + + &Indent size: + + + indentSize + + + + + + + + 0 + 0 + + + + 1 + + + 20 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Align continuation lines: + + + + + + + + 0 + 0 + + + + <html><head/><body> Influences the indentation of continuation lines. <ul> @@ -179,52 +200,22 @@ Influences the indentation of continuation lines. </pre> </li> </ul></body></html> - - - - Not At All - - - - - With Spaces - - - - - With Regular Indent - - - - - - - - Tab policy: - - - - - - - Align continuation lines: - - - - - - - The text editor indentation setting is used for non-code files only. See the C++ and Qt Quick coding style settings to configure indentation for code files. - - - <i>Code indentation is configured in <a href="C++">C++</a> and <a href="QtQuick">Qt Quick</a> settings.</i> - - - true - - - - + + + + Not At All + + + + + With Spaces + + + + + With Regular Indent + +