Doc: Split "Specifying Text Editor Settings"

- Move info into "Font & Colors" and "Behavior" reference topics
- Turn the step list into the "Change editor colors" how-to topic
- Fix the "Font & Colors" tab name in several places

Task-number: QTCREATORBUG-29361
Change-Id: I1495295764fdcaed346891e93880a78ab7ce655d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Leena Miettinen
2023-12-21 17:56:42 +01:00
parent 6c8ef7153c
commit 77ad9a60da
11 changed files with 75 additions and 64 deletions

View File

@@ -85,5 +85,5 @@
\li Implicit Manual Coverage Validation
\endlist
\sa {Enable and disable plugins}, {Specifying Text Editor Settings}
\sa {Enable and disable plugins}, {Font & Colors}
*/

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2022 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
// **********************************************************************
@@ -8,27 +8,27 @@
// **********************************************************************
/*!
\page creator-editor-options-text.html
\previouspage creator-editor-options.html
\page creator-preferences-text-editor-font-colors.html
\if defined(qtdesignstudio)
\previouspage creator-editor-options.html
\nextpage studio-debugging.html
\else
\nextpage creator-editor-fakevim.html
\previouspage creator-reference.html
\endif
\if defined(qtdesignstudio)
\title Specifying Code View Settings
\else
\title Specifying Text Editor Settings
\endif
\ingroup creator-reference-preferences-text-editor
Set the font preferences and apply color schemes for syntax highlighting,
diff editor, and code analysis results in \preferences >
\title Font & Colors
\brief Set the font preferences and apply color schemes for syntax
highlighting, diff editor, and code analysis results.
To set editor font and colors, select \preferences >
\uicontrol {Text Editor} > \uicontrol {Font & Colors}.
\image qtcreator-font-colors.png "Text editor preferences"
\image qtcreator-font-colors.png {Font & Colors tab in Text Editor preferences}
\section2 Configuring Fonts
\section1 Configuring Fonts
You can select the font family and size. You can specify a zoom setting in
percentage for viewing the text. You can also zoom in or out by pressing
@@ -44,17 +44,33 @@
on the screen. Deselect the \uicontrol Antialias check box to turn off
antialiasing.
\section2 Defining Color Schemes
\sa {Behavior}, {Change editor colors}
*/
You can select one of the predefined color schemes or create customized
color schemes.
/*!
\page creator-how-to-change-editor-colors.html
\if defined(qtdesignstudio)
\previouspage creator-editor-options.html
\nextpage studio-debugging.html
\else
\previouspage creator-how-tos.html
\endif
\ingroup creator-how-to-edit
\title Change editor colors
You can select one of the predefined color schemes for the text editor
or create customized color schemes.
\image qtcreator-font-colors.png {Font & Colors tab in Text Editor preferences}
To create a color scheme:
\list 1
\li Select \preferences > \uicontrol {Text Editor} >
\uicontrol {Fonts & Color} > \uicontrol Copy.
\uicontrol {Font & Colors} > \uicontrol Copy.
\li Enter a name for the color scheme and click \uicontrol OK.
@@ -80,11 +96,11 @@
format. The latter makes sure that syntax highlighting is preserved when
pasting to a rich-text editor.
\section2 Exporting and Importing Color Schemes
\section1 Export and import color schemes
To share color schemes with others, export and import them as XML files.
To export a color scheme, select \preferences >
\uicontrol {Text Editor} > \uicontrol {Fonts & Color} > \uicontrol Export,
\uicontrol {Text Editor} > \uicontrol {Font & Colors} > \uicontrol Export,
and then select the filename and location for the XML file.
To import a color scheme, select \uicontrol Import, and then select the XML
@@ -94,29 +110,7 @@
\image qtcreator-import-color-scheme.png "Import Color Scheme dialog"
When you select \uicontrol OK, the color scheme is added to the list of
color schemes in the \uicontrol {Fonts & Color} tab.
\section2 File Encoding
To define the default file encoding, select \preferences >
\uicontrol {Text Editor} > \uicontrol Behavior, and
then select a suitable option in \uicontrol {Default encoding}.
\image qtcreator-options-texteditor-behavior-file-encodings.png "File encoding preferences"
Qt 5 and Qt 6 require UTF-8 encoded source files, and therefore the default
encoding is set to \uicontrol UTF-8.
Detecting the correct encoding is tricky, so \QC will not try to do so.
Instead, it displays the following error message when you try to edit a file
that is not UTF-8 encoded: \uicontrol {Error: Could not decode "filename" with
"UTF-8"-encoding. Editing not possible.}
To resolve the issue, use a file conversion tool to convert the file
encoding to UTF-8 when developing Qt 5 applications. Otherwise, conversion
of string constants to QString might not work as expected.
If you develop only Qt 4 applications or other than Qt applications, you
can set other encoding options as the default encoding. Select the
\uicontrol System option to use the file encoding used by your system.
color schemes in the \uicontrol {Font & Colors} tab.
\sa {Behavior}, {Font & Colors}
*/

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2022 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
// **********************************************************************
@@ -14,7 +14,7 @@
\else
\previouspage creator-beautifier.html
\endif
\nextpage creator-editor-options-text.html
\nextpage creator-preferences-text-editor-font-colors.html
\title Configuring the Editor
@@ -32,15 +32,9 @@
You can perform the following configuration actions:
\list
\if defined(qtdesignstudio)
\li Set the \l{Specifying Code View Settings}{font preferences and
\li Set the \l{Font & Colors}{font preferences and
apply color schemes} for syntax highlighting in
\uicontrol {Font & Colors}.
\else
\li Set the \l{Specifying Text Editor Settings}{font preferences and
apply color schemes} for syntax highlighting in
\uicontrol {Font & Colors}.
\endif
\li Specify \l{Generic Highlighting}
{definition files for syntax highlighting} for other types of files
than C++ or QML in \uicontrol {Generic Highlighter}.

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\previouspage creator-editor-options-text.html
\previouspage creator-editor-options.html
\page creator-editor-fakevim.html
\nextpage creator-markdown-editor.html
@@ -305,7 +305,7 @@
preselected settings.
To use a Vim-style color scheme, select \preferences >
\uicontrol {Text Editor} > \uicontrol {Fonts & Color}.
\uicontrol {Text Editor} > \uicontrol {Font & Colors}.
In the \uicontrol {Color Scheme} list, select \uicontrol {Vim (dark)}.
\section1 Quitting FakeVim Mode

View File

@@ -14,7 +14,8 @@
\title Behavior
\brief Set preferences for the behavior of the text editor.
\brief Set preferences for indentation, typing, and file encoding in the
text editor.
To specify indentation settings for text files that do not have C++ or
QML code (such as Python code files), select \preferences >
@@ -94,9 +95,32 @@
always place them there. Select \uicontrol {At Line Start} to place single
line comments at the end of the line.
\section1 File Encoding
To define the default file encoding, select \preferences >
\uicontrol {Text Editor} > \uicontrol Behavior, and
then select a suitable option in \uicontrol {Default encoding}.
\image qtcreator-options-texteditor-behavior-file-encodings.png "File encoding preferences"
Qt 5 and Qt 6 require UTF-8 encoded source files, and therefore the default
encoding is set to \uicontrol UTF-8.
Detecting the correct encoding is tricky, so \QC will not try to do so.
Instead, it displays the following error message when you try to edit a file
that is not UTF-8 encoded: \uicontrol {Error: Could not decode "filename" with
"UTF-8"-encoding. Editing not possible.}
To resolve the issue, use a file conversion tool to convert the file
encoding to UTF-8 when developing Qt 5 applications. Otherwise, conversion
of string constants to QString might not work as expected.
If you develop only Qt 4 applications or other than Qt applications, you
can set other encoding options as the default encoding. Select the
\uicontrol System option to use the file encoding used by your system.
\if defined(qtcreator)
\sa {Find preferences}, {C++ Code Style}, {Nim}
\endif
\sa {Indent text or code}, {Qt Quick Code Style}
\sa {Indent text or code}, {Qt Quick Code Style}, {Font & Colors}
*/

View File

@@ -24,7 +24,7 @@
\endlist
To specify the color scheme to use for semantic highlighting, select
\preferences > \uicontrol {Text Editor} > \uicontrol {Fonts & Color}.
\preferences > \uicontrol {Text Editor} > \uicontrol {Font & Colors}.
\QC supports syntax highlighting also for other types of files than C++,
QML, or JavaScript.

View File

@@ -217,7 +217,7 @@
Exercise caution when applying styles, as overriding the existing styling
may make some items difficult to see. Also, setting a stylesheet may affect
the \l{Specifying Text Editor Settings}{text editor color scheme} and the
the \l{Font & Colors}{text editor color scheme} and the
styling of the integrated \QD.
You can also switch to a dark theme to customize the appearance of widgets,

View File

@@ -99,9 +99,9 @@
generic files.
To change the color scheme, select \preferences >
\uicontrol {Text Editor} > \uicontrol {Fonts & Color}.
\uicontrol {Text Editor} > \uicontrol {Font & Colors}.
For more information, see \l{Defining Color Schemes}.
For more information, see \l{Change editor colors}.
\l{https://api.kde.org/frameworks/syntax-highlighting/html/index.html}
{KSyntaxHighlighting} offers generic highlighting. It is the syntax

View File

@@ -48,7 +48,6 @@
\li \l{Beautifying Source Code}
\li \l{Configuring the Editor}
\list
\li \l{Specifying Text Editor Settings}
\li \l{Using FakeVim Mode}
\endlist
\li \l{Editing Markdown Files}

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\previouspage creator-editor-options-text.html
\previouspage creator-editor-options.html
\page studio-debugging.html
\nextpage creator-debugging-qml.html

View File

@@ -220,7 +220,7 @@
\li \l{Applying Refactoring Actions}
\li \l{Configuring the Editor}
\list
\li \l{Specifying Code View Settings}
\li \l{Font & Colors}
\endlist
\endlist
\li \l{Debugging and Profiling}