From 9219e86aa571d8b2f5da1ec92a461e5add38f57c Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 1 Sep 2020 17:49:42 +0200 Subject: Rename "Default" style to "Basic" [ChangeLog][Styles] The Default style was renamed to Basic to account for the introduction of the platform styles (macOS, Windows), which will be used by default (where possible) when no style is specified. Fixes: QTBUG-85984 Task-number: QTBUG-68814 Task-number: QTBUG-86403 Change-Id: I22b3199c8662e4ee5d55a1be1a51c9856ac62376 Reviewed-by: Richard Moe Gustavsen --- .../chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc | 9 +++++---- examples/quickcontrols2/gallery/gallery.cpp | 2 +- examples/quickcontrols2/gallery/gallery.qml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc b/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc index 4c00d456..ec90074e 100644 --- a/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc +++ b/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc @@ -748,10 +748,10 @@ text field to make way for future input. Styles in Qt Quick Controls are designed to work on any platform. In this chapter, we'll do some minor visual tweaks to make sure our application -looks good when run with the \l {Default Style}{Default}, +looks good when run with the \l {Basic Style}{Basic}, \l {Material Style}{Material}, and \l {Universal Style}{Universal} styles. -So far, we've just been testing the application with the Default style. If we +So far, we've just been testing the application with the Basic style. If we run it with the \l {Material Style}, for example, we'll immediately see some issues. Here is the Contacts page: @@ -788,7 +788,8 @@ Instead, it is better to rely on Qt Quick Controls's built-in support for \l {Using File Selectors with Qt Quick Controls}{style-based file selectors}. To do this, we must move the ToolBar out into its own file. We'll call it \c ChatToolBar.qml. This will be the \e "default" version of the file, which -means that it will be used when the \l {Default Style}{Default style} is in +means that it will be used when the \l {Basic Style}{Basic style} (which is the +style that is used when none is specified) is in use. Here's the new file: \quotefromfile chattutorial/chapter5-styling/ChatToolBar.qml @@ -841,7 +842,7 @@ Let's try out the Universal style: No issues there. For a relatively simple application such as this one, there should be very few adjustments necessary when switching styles. -Now let's try each style's dark theme. The Default style has no dark theme, as +Now let's try each style's dark theme. The Basic style has no dark theme, as it would add a slight overhead to a style that is designed to be as performant as possible. We'll test out the Material style first, so add an entry to \c qtquickcontrols2.conf that tells it to use its dark theme: diff --git a/examples/quickcontrols2/gallery/gallery.cpp b/examples/quickcontrols2/gallery/gallery.cpp index 629e69f9..5c7dc188 100644 --- a/examples/quickcontrols2/gallery/gallery.cpp +++ b/examples/quickcontrols2/gallery/gallery.cpp @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) QQmlApplicationEngine engine; - const QStringList builtInStyles = { QLatin1String("Default"), QLatin1String("Fusion"), + const QStringList builtInStyles = { QLatin1String("Basic"), QLatin1String("Fusion"), QLatin1String("Imagine"), QLatin1String("Material"), QLatin1String("Universal") }; engine.rootContext()->setContextProperty("builtInStyles", builtInStyles); diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml index f53ce735..98551196 100644 --- a/examples/quickcontrols2/gallery/gallery.qml +++ b/examples/quickcontrols2/gallery/gallery.qml @@ -75,7 +75,7 @@ ApplicationWindow { Settings { id: settings - property string style: "Default" + property string style: "Basic" } Shortcut { -- cgit v1.2.3