// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page qt-quick-toolbars.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Edit properties of QML types

    When you edit QML code in the code editor, you specify the properties of QML
    types. For some properties, such as colors and font names, this is not a
    trivial task. For example, few people can visualize the color \c {#18793f}.
    To easily edit these properties, use the Qt Quick toolbars.

    When you select a QML type in the code and a light bulb icon appears
    (\inlineimage {icons/refactormarker.png} {Light bulb icon}), select
    it to open a toolbar for changing the properties of that type.

    \section1 Preview images

    Edit the properties of \l {Border Image} and \l Image items
    to scale and tile the images, replace them with other images,
    preview them, and change the image margins.

    \image {qml-toolbar-image.png} {Qt Quick toolbar for images}

    To preview an image, double-click it on the toolbar. In the preview
    dialog, you can zoom the image. Drag the image margins to change them.

    \image {qml-toolbar-image-preview.png} {Image preview dialog}

    \section1 Format text

    Edit the properties of \l{Text} items to change the font family and size,
    as well as text formatting, style, alignment, and color.

    \note Move the mouse pointer over a color hex value in the code editor to
    see the color as a tooltip.

    If a property is assigned an expression instead of a value, you
    cannot use the toolbar to edit it. The button for editing the property
    is disabled.

    \image {qml-toolbar-text.png} {Qt Quick toolbar for text}

    By default, font size is specified as pixels. To use points, instead,
    change \uicontrol px to \uicontrol pt in the size field.

    \section1 Preview animations

    Edit the properties of PropertyAnimation items and the items that inherit it
    to change the easing curve type and duration. For some curves, you can also
    specify amplitude, period, and overshoot values.

    \image {qml-toolbar-animation.png} {Qt Quick toolbar for animation}

    Select the play button to preview your changes.

    \section1 Edit rectangles

    Edit the properties of \l {Rectangle} items to change the fill and border
    colors and add gradients.

    \image {qml-toolbar-rectangle.png} {Qt Quick toolbar for rectangles}

    To add gradient stop points, click above the gradient bar. To remove
    stop points, drag them upwards.

    \section1 Show toolbars immediately

    To open toolbars immediately when you select a QML type, select
    \preferences > \uicontrol {Qt Quick} >
    \uicontrol {QML/JS Editing} > \uicontrol {Always show Qt Quick Toolbar}.

    \image {qtcreator-qml-js-editing.webp} {QML/JS Editing tab in Qt Quick preferences}

    \section1 Pin toolbars

    Drag the toolbar to pin it to another location. Select \imagepin
    (\uicontrol Unpin) to unpin the toolbar and move it to its default location.

    To pin toolbars by default, select \uicontrol {Pin Qt Quick Toolbar}.

    \sa {Tutorial: Qt Quick application}
*/
