| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Instead of moving the code back and forth between different plugins,
promote it to QQuickStylePrivate so it can be used from any plugin.
Change-Id: Ifb80923750ff531676dc3347dacf0aff8c026fdb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of trying to determine a single base URL based on the import
URI of the plugin, and whether built in static mode, provide a list of
paths where to lookup styles, in priority order:
- requested style path (-style /path/to/style)
- QT_QUICK_CONTROLS_STYLE_PATH environment variable
- QT_INSTALL_QML/QtQuick/Controls.2/
- qrc://qt-project.org/imports/QtQuick/Controls.2/
Furthermore, provide the requested style name and the fallback style
name as a simple list of selectors. The lookup order is:
1) requested style
2) fallback style
3) default style
As a result, QQuickStyleSelector implementation is a lot simpler,
completely independent of QQuickStyle, and the style lookup works
regardless of whether the files are in QRC or on the file system.
This allows us to utilize QRC and the Qt Quick Compiler in the future.
Note: two data rows in tst_QQuickStyleSelector::select_data() had to
be fixed. Not sure how the expected values ended up like that, but as
the comments say, "Label.qml exists in the default and fallback styles"
and "Button.qml exists in all styles", so it makes no sense to expect
that Label.qml or Button.qml is selected from the FallbackStyle when
a valid "data" folder is specified.
Change-Id: I18dea9fddf8f079e0140b51b567814da0df2802c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
QQuickStyleAttached is being generalized to a recursive attached
object type that can be used for palettes too, which are planned
to be used for the upcoming image-based style.
Change-Id: I4c1d25624ee11bb0ec6cd5ee2656c36e622e2139
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The settings were added before QQuickStyle(Private) existed. Now
QQuickStyle(Private) is a lot more logical place for the settings
that are not specific to the attached style attributes only, but
can be also determine which style is used etc.
Change-Id: I7bc432c330d58ab501b51b0ee8eaf24697155324
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|\
| |
| |
| | |
Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
|
| |
| |
| |
| |
| | |
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/imports/controls/SpinBox.qml
src/imports/controls/material/SpinBox.qml
src/imports/controls/universal/SpinBox.qml
tests/auto/controls/data/tst_swipedelegate.qml
Change-Id: Ie1d1f487890f0a9f80a00df5e813e1d2e8303fe5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The style path is resolved relative to the location of config file.
Even though qtquickcontrols2.conf is normally located in the root of
resources, Quick Designer uses QT_QUICK_CONTROLS_CONF to set a custom
location for the preview, where the standard config location is not
feasible.
This patch extends the config and style lookup further by allowing
to specify a relative path to a custom style for the Quick Designer
preview.
Change-Id: Iad9c459421eefbf7a5bcbedfea59f5f16a1d3a39
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
This allows us to introduce platform-specific styles, such as the iOS
style, and make them appear correctly in the Gallery example so that we
don't have to hard-code the lists separately for different platforms.
[ChangeLog][Controls][QQuickStyle] Added availableStyles() method that
returns the list of available built-in styles.
Change-Id: Ieea88577f402cbc52a844d6777e64c6bd55c5ab9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, you can call QQuickStyle::setStyle(":/mycontrols") and
QQuickStyle::setFallbackStyle("Material") to select a custom style so
that the missing files will fallback to the Material style.
Notice that the Material and Universal styles do not contain all files.
For example, the non-visual Control.qml, Container.qml are not duplicated.
For these, we must fallback to the Default style that is guaranteed to
contain them all.
[ChangeLog][Controls] Added support for specifying the fallback style for
custom styles via :/qtquickcontrols2.conf, QT_QUICK_CONTROLS_FALLBACK_STYLE
or QQuickStyle::setFallbackStyle().
Change-Id: I00be1c8c6aaca875ef851c90d018e9b5e2f501b7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
Initialize the base URL from QtQuickControls2Plugin::registerTypes()
to avoid creating an unnecessary temporary instance of QQmlEngine. It
was used to list all known import paths, which were scanned for the
requested style folder. Now that we pass the base URL, the built-in
styles (a name without path to the style) can be looked up straight
from the base path.
Change-Id: I0d68d4c5bb90a4ab89660b5ce97f6433aeefc1ff
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|