aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-09-25 22:16:49 +0300
committerJ-P Nurmi <jpnurmi@qt.io>2017-09-25 22:17:44 +0300
commit93816ce5a52d112b610f8af21ba46d384005a464 (patch)
treeacc22367aa1619a170a679a94f3f6a31809131c6
parentfb3e0ab4ef69166bfdadbecb158573b60cadfe18 (diff)
parentf2e06ce60a8822d844221e77ca0a66f690855452 (diff)
Merge remote-tracking branch 'origin/5.10' into dev
-rw-r--r--.gitignore1
-rw-r--r--src/imports/controls/BusyIndicator.qml4
-rw-r--r--src/imports/controls/Button.qml12
-rw-r--r--src/imports/controls/CheckBox.qml3
-rw-r--r--src/imports/controls/CheckDelegate.qml4
-rw-r--r--src/imports/controls/ComboBox.qml7
-rw-r--r--src/imports/controls/DelayButton.qml4
-rw-r--r--src/imports/controls/GroupBox.qml2
-rw-r--r--src/imports/controls/ItemDelegate.qml4
-rw-r--r--src/imports/controls/Label.qml4
-rw-r--r--src/imports/controls/MenuItem.qml2
-rw-r--r--src/imports/controls/PageIndicator.qml2
-rw-r--r--src/imports/controls/ProgressBar.qml4
-rw-r--r--src/imports/controls/RadioButton.qml3
-rw-r--r--src/imports/controls/RadioDelegate.qml4
-rw-r--r--src/imports/controls/RoundButton.qml14
-rw-r--r--src/imports/controls/SpinBox.qml7
-rw-r--r--src/imports/controls/SwipeDelegate.qml4
-rw-r--r--src/imports/controls/Switch.qml2
-rw-r--r--src/imports/controls/SwitchDelegate.qml4
-rw-r--r--src/imports/controls/TextArea.qml9
-rw-r--r--src/imports/controls/TextField.qml11
-rw-r--r--src/imports/controls/ToolTip.qml4
-rw-r--r--src/imports/controls/Tumbler.qml4
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine-thumbnail.pngbin0 -> 5192 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine.pngbin0 -> 10113 bytes
-rw-r--r--src/imports/controls/doc/manifest-meta.qdocconf35
-rw-r--r--src/imports/controls/doc/qtquickcontrols2.qdocconf4
-rw-r--r--src/imports/controls/doc/src/includes/qquickimaginestyle.qdocinc8
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc1909
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc7
-rw-r--r--src/imports/controls/imagine/ApplicationWindow.qml6
-rw-r--r--src/imports/controls/imagine/BusyIndicator.qml4
-rw-r--r--src/imports/controls/imagine/Button.qml2
-rw-r--r--src/imports/controls/imagine/CheckBox.qml4
-rw-r--r--src/imports/controls/imagine/CheckDelegate.qml4
-rw-r--r--src/imports/controls/imagine/ComboBox.qml6
-rw-r--r--src/imports/controls/imagine/DelayButton.qml6
-rw-r--r--src/imports/controls/imagine/Dial.qml4
-rw-r--r--src/imports/controls/imagine/Dialog.qml8
-rw-r--r--src/imports/controls/imagine/DialogButtonBox.qml2
-rw-r--r--src/imports/controls/imagine/Drawer.qml6
-rw-r--r--src/imports/controls/imagine/Frame.qml2
-rw-r--r--src/imports/controls/imagine/GroupBox.qml4
-rw-r--r--src/imports/controls/imagine/ItemDelegate.qml2
-rw-r--r--src/imports/controls/imagine/Label.qml2
-rw-r--r--src/imports/controls/imagine/Menu.qml6
-rw-r--r--src/imports/controls/imagine/MenuItem.qml6
-rw-r--r--src/imports/controls/imagine/MenuSeparator.qml4
-rw-r--r--src/imports/controls/imagine/Page.qml2
-rw-r--r--src/imports/controls/imagine/PageIndicator.qml4
-rw-r--r--src/imports/controls/imagine/Pane.qml2
-rw-r--r--src/imports/controls/imagine/Popup.qml6
-rw-r--r--src/imports/controls/imagine/ProgressBar.qml8
-rw-r--r--src/imports/controls/imagine/RadioButton.qml4
-rw-r--r--src/imports/controls/imagine/RadioDelegate.qml4
-rw-r--r--src/imports/controls/imagine/RangeSlider.qml8
-rw-r--r--src/imports/controls/imagine/RoundButton.qml2
-rw-r--r--src/imports/controls/imagine/ScrollBar.qml4
-rw-r--r--src/imports/controls/imagine/ScrollIndicator.qml4
-rw-r--r--src/imports/controls/imagine/Slider.qml6
-rw-r--r--src/imports/controls/imagine/SpinBox.qml8
-rw-r--r--src/imports/controls/imagine/StackView.qml2
-rw-r--r--src/imports/controls/imagine/SwipeDelegate.qml2
-rw-r--r--src/imports/controls/imagine/SwipeView.qml2
-rw-r--r--src/imports/controls/imagine/Switch.qml6
-rw-r--r--src/imports/controls/imagine/SwitchDelegate.qml6
-rw-r--r--src/imports/controls/imagine/TabBar.qml2
-rw-r--r--src/imports/controls/imagine/TabButton.qml2
-rw-r--r--src/imports/controls/imagine/TextArea.qml2
-rw-r--r--src/imports/controls/imagine/TextField.qml2
-rw-r--r--src/imports/controls/imagine/ToolBar.qml2
-rw-r--r--src/imports/controls/imagine/ToolButton.qml2
-rw-r--r--src/imports/controls/imagine/ToolSeparator.qml4
-rw-r--r--src/imports/controls/imagine/ToolTip.qml2
-rw-r--r--src/imports/controls/imagine/Tumbler.qml2
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-disabled.pngbin123 -> 123 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-disabled@2x.pngbin136 -> 136 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-disabled@3x.pngbin152 -> 152 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-disabled@4x.pngbin168 -> 168 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled.pngbin122 -> 112 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@2x.pngbin144 -> 144 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@3x.pngbin164 -> 164 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@4x.pngbin172 -> 172 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored.pngbin104 -> 122 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored@2x.pngbin133 -> 144 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored@3x.pngbin164 -> 164 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored@4x.pngbin172 -> 172 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow.pngbin108 -> 123 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow@2x.pngbin136 -> 136 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow@3x.pngbin152 -> 152 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow@4x.pngbin168 -> 168 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused.9.pngbin0 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@2x.9.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@3x.9.pngbin0 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@4x.9.pngbin0 -> 266 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered.9.pngbin0 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@2x.9.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@3x.9.pngbin0 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@4x.9.pngbin0 -> 266 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored.9.pngbin0 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@2x.9.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@3x.9.pngbin0 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@4x.9.pngbin0 -> 266 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed.9.pngbin0 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@2x.9.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@3x.9.pngbin0 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@4x.9.pngbin0 -> 266 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored.9.pngbin152 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@2x.9.pngbin187 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@3x.9.pngbin225 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@4x.9.pngbin259 -> 266 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled.9.pngbin0 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@2x.9.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@3x.9.pngbin0 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@4x.9.pngbin0 -> 266 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused.9.pngbin0 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@2x.9.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@3x.9.pngbin0 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@4x.9.pngbin0 -> 266 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered.9.pngbin0 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@2x.9.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@3x.9.pngbin0 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@4x.9.pngbin0 -> 266 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed.9.pngbin0 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@2x.9.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@3x.9.pngbin0 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@4x.9.pngbin0 -> 266 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored.9.pngbin152 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@2x.9.pngbin187 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@3x.9.pngbin225 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@4x.9.pngbin259 -> 266 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused.9.pngbin0 -> 159 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@2x.9.pngbin0 -> 192 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@3x.9.pngbin0 -> 234 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@4x.9.pngbin0 -> 267 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered.9.pngbin0 -> 159 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@2x.9.pngbin0 -> 192 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@3x.9.pngbin0 -> 234 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@4x.9.pngbin0 -> 267 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored.9.pngbin0 -> 159 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@2x.9.pngbin0 -> 192 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@3x.9.pngbin0 -> 234 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@4x.9.pngbin0 -> 267 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed.9.pngbin0 -> 159 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@2x.9.pngbin0 -> 192 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@3x.9.pngbin0 -> 234 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@4x.9.pngbin0 -> 267 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored.9.pngbin162 -> 159 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@2x.9.pngbin195 -> 192 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@3x.9.pngbin238 -> 234 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@4x.9.pngbin275 -> 267 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled.9.pngbin0 -> 159 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@2x.9.pngbin0 -> 192 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@3x.9.pngbin0 -> 234 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@4x.9.pngbin0 -> 267 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused.9.pngbin0 -> 159 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@2x.9.pngbin0 -> 192 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@3x.9.pngbin0 -> 234 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@4x.9.pngbin0 -> 267 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered.9.pngbin0 -> 159 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@2x.9.pngbin0 -> 192 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@3x.9.pngbin0 -> 234 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@4x.9.pngbin0 -> 267 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed.9.pngbin0 -> 159 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@2x.9.pngbin0 -> 192 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@3x.9.pngbin0 -> 234 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@4x.9.pngbin0 -> 267 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored.9.pngbin162 -> 159 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@2x.9.pngbin195 -> 192 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@3x.9.pngbin238 -> 234 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@4x.9.pngbin275 -> 267 bytes
-rw-r--r--src/imports/controls/imagine/qquickimaginestyle.cpp30
-rw-r--r--src/imports/controls/imagine/qquickimaginestyle_p.h3
-rw-r--r--src/imports/controls/plugins.qmltypes4
-rw-r--r--src/imports/controls/qquickdefaultstyle.cpp25
-rw-r--r--src/imports/controls/qquickdefaultstyle_p.h8
-rw-r--r--src/imports/controls/qquickdefaulttheme.cpp33
-rw-r--r--src/imports/controls/qquickdefaulttheme_p.h5
-rw-r--r--src/quicktemplates2/qquickapplicationwindow.cpp4
-rw-r--r--src/quicktemplates2/qquickcombobox.cpp7
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/controls/data/tst_combobox.qml1
-rw-r--r--tests/auto/palette/data/listview.qml79
-rw-r--r--tests/auto/palette/tst_palette.cpp64
-rw-r--r--tests/auto/qquickimaginestyle/control-assets/button-background.9.pngbin0 -> 251 bytes
-rw-r--r--tests/auto/qquickimaginestyle/data/tst_imagine.qml97
-rw-r--r--tests/auto/qquickimaginestyle/qquickimaginestyle.pro16
-rw-r--r--tests/auto/qquickimaginestyle/qtquickcontrols2.conf2
-rw-r--r--tests/auto/qquickimaginestyle/tst_qquickimaginestyle.cpp38
-rw-r--r--tests/manual/testbench/.gitignore83
-rw-r--r--tests/manual/testbench/ColorEditor.qml80
-rw-r--r--tests/manual/testbench/ControlContainer.qml70
-rw-r--r--tests/manual/testbench/ExampleContainer.qml83
-rw-r--r--tests/manual/testbench/README.md34
-rw-r--r--tests/manual/testbench/SettingsDialog.qml423
-rw-r--r--tests/manual/testbench/assetfixer.cpp563
-rw-r--r--tests/manual/testbench/assetfixer.h126
-rw-r--r--tests/manual/testbench/clipboard.cpp124
-rw-r--r--tests/manual/testbench/clipboard.h72
-rw-r--r--tests/manual/testbench/controls/BusyIndicator.qml65
-rw-r--r--tests/manual/testbench/controls/Button.qml94
-rw-r--r--tests/manual/testbench/controls/CheckBox.qml74
-rw-r--r--tests/manual/testbench/controls/CheckDelegate.qml85
-rw-r--r--tests/manual/testbench/controls/ComboBox.qml71
-rw-r--r--tests/manual/testbench/controls/DelayButton.qml72
-rw-r--r--tests/manual/testbench/controls/Dial.qml65
-rw-r--r--tests/manual/testbench/controls/Dialog.qml83
-rw-r--r--tests/manual/testbench/controls/Frame.qml64
-rw-r--r--tests/manual/testbench/controls/GroupBox.qml66
-rw-r--r--tests/manual/testbench/controls/ItemDelegate.qml82
-rw-r--r--tests/manual/testbench/controls/Label.qml66
-rw-r--r--tests/manual/testbench/controls/Menu.qml121
-rw-r--r--tests/manual/testbench/controls/Page.qml68
-rw-r--r--tests/manual/testbench/controls/PageIndicator.qml111
-rw-r--r--tests/manual/testbench/controls/Pane.qml68
-rw-r--r--tests/manual/testbench/controls/ProgressBar.qml66
-rw-r--r--tests/manual/testbench/controls/RadioButton.qml73
-rw-r--r--tests/manual/testbench/controls/RadioDelegate.qml84
-rw-r--r--tests/manual/testbench/controls/RangeSlider.qml69
-rw-r--r--tests/manual/testbench/controls/RoundButton.qml94
-rw-r--r--tests/manual/testbench/controls/ScrollBar.qml114
-rw-r--r--tests/manual/testbench/controls/ScrollIndicator.qml104
-rw-r--r--tests/manual/testbench/controls/Slider.qml69
-rw-r--r--tests/manual/testbench/controls/SpinBox.qml76
-rw-r--r--tests/manual/testbench/controls/SwipeDelegate.qml104
-rw-r--r--tests/manual/testbench/controls/Switch.qml76
-rw-r--r--tests/manual/testbench/controls/SwitchDelegate.qml84
-rw-r--r--tests/manual/testbench/controls/TabBar.qml81
-rw-r--r--tests/manual/testbench/controls/TextArea.qml63
-rw-r--r--tests/manual/testbench/controls/TextField.qml64
-rw-r--r--tests/manual/testbench/controls/ToolBar.qml87
-rw-r--r--tests/manual/testbench/controls/ToolTip.qml67
-rw-r--r--tests/manual/testbench/controls/Tumbler.qml67
-rw-r--r--tests/manual/testbench/directoryvalidator.cpp102
-rw-r--r--tests/manual/testbench/directoryvalidator.h84
-rw-r--r--tests/manual/testbench/fonts.qrc5
-rwxr-xr-xtests/manual/testbench/fonts/LICENSE.txt12
-rwxr-xr-xtests/manual/testbench/fonts/fontawesome.ttfbin0 -> 5464 bytes
-rw-r--r--tests/manual/testbench/main.cpp33
-rw-r--r--tests/manual/testbench/qml.qrc38
-rw-r--r--tests/manual/testbench/testbench.pro15
-rw-r--r--tests/manual/testbench/testbench.qml1266
243 files changed, 7448 insertions, 1139 deletions
diff --git a/.gitignore b/.gitignore
index 799795c9..585b5178 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,6 +46,7 @@
/tests/auto/qquickcolor/tst_qquickcolor
/tests/auto/qquickiconimage/tst_qquickiconimage
/tests/auto/qquickiconlabel/tst_qquickiconlabel
+/tests/auto/qquickimaginestyle/tst_qquickimaginestyle
/tests/auto/qquickmaterialstyle/tst_qquickmaterialstyle
/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf
/tests/auto/qquickmenubar/tst_qquickmenubar
diff --git a/src/imports/controls/BusyIndicator.qml b/src/imports/controls/BusyIndicator.qml
index 46c33a28..bff591c7 100644
--- a/src/imports/controls/BusyIndicator.qml
+++ b/src/imports/controls/BusyIndicator.qml
@@ -51,8 +51,8 @@ T.BusyIndicator {
implicitWidth: 48
implicitHeight: 48
- pen: Default.textColor
- fill: Default.textColor
+ pen: control.palette.dark
+ fill: control.palette.dark
opacity: control.running ? 1 : 0
visible: control.running || animator.running
Behavior on opacity { OpacityAnimator { id: animator; duration: 250 } }
diff --git a/src/imports/controls/Button.qml b/src/imports/controls/Button.qml
index 8457e9b8..9562c904 100644
--- a/src/imports/controls/Button.qml
+++ b/src/imports/controls/Button.qml
@@ -55,9 +55,9 @@ T.Button {
icon.width: 24
icon.height: 24
- icon.color: Color.transparent(checked || highlighted ? Default.textLightColor :
- visualFocus ? Default.focusColor : down ? Default.textDarkColor : Default.textColor,
- enabled || highlighted || checked ? 1 : 0.3)
+ icon.color: control.checked || control.highlighted ? control.palette.brightText :
+ control.visualFocus ? control.palette.highlight :
+ control.flat && !control.down ? control.palette.windowText : control.palette.buttonText
contentItem: IconLabel {
spacing: control.spacing
@@ -67,9 +67,9 @@ T.Button {
icon: control.icon
text: control.text
font: control.font
- color: Color.transparent(control.checked || control.highlighted ? Default.textLightColor :
- control.visualFocus ? Default.focusColor : control.down ? Default.textDarkColor : Default.textColor,
- enabled || control.highlighted || control.checked ? 1 : 0.3)
+ color: control.checked || control.highlighted ? control.palette.brightText :
+ control.visualFocus ? control.palette.highlight :
+ control.flat && !control.down ? control.palette.windowText : control.palette.buttonText
}
background: Rectangle {
diff --git a/src/imports/controls/CheckBox.qml b/src/imports/controls/CheckBox.qml
index 52dedac9..94d9ebca 100644
--- a/src/imports/controls/CheckBox.qml
+++ b/src/imports/controls/CheckBox.qml
@@ -64,11 +64,10 @@ T.CheckBox {
text: control.text
font: control.font
- color: control.down ? Default.textDarkColor : Default.textColor
+ color: control.palette.windowText
elide: Text.ElideRight
visible: control.text
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
- opacity: enabled ? 1 : 0.3
}
}
diff --git a/src/imports/controls/CheckDelegate.qml b/src/imports/controls/CheckDelegate.qml
index a73a8567..cee40c21 100644
--- a/src/imports/controls/CheckDelegate.qml
+++ b/src/imports/controls/CheckDelegate.qml
@@ -54,7 +54,7 @@ T.CheckDelegate {
icon.width: 24
icon.height: 24
- icon.color: enabled ? Default.textDarkColor : Default.textDisabledColor
+ icon.color: control.palette.text
contentItem: IconLabel {
leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
@@ -68,7 +68,7 @@ T.CheckDelegate {
icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
+ color: control.palette.text
}
indicator: CheckIndicator {
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index 5d3274ad..5bbe273b 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -84,12 +84,11 @@ T.ComboBox {
validator: control.validator
font: control.font
- color: !control.editable && control.visualFocus ? Default.focusColor : Default.textColor
- selectionColor: Default.focusColor
- selectedTextColor: Default.textLightColor
+ color: !control.editable && control.visualFocus ? Default.focusColor : control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
- opacity: control.enabled ? 1 : 0.3
background: Rectangle {
visible: control.editable && !control.flat
diff --git a/src/imports/controls/DelayButton.qml b/src/imports/controls/DelayButton.qml
index 8f279391..835d6b25 100644
--- a/src/imports/controls/DelayButton.qml
+++ b/src/imports/controls/DelayButton.qml
@@ -79,7 +79,7 @@ T.DelayButton {
text: control.text
font: control.font
opacity: enabled ? 1 : 0.3
- color: control.visualFocus ? Default.focusColor : (control.down ? Default.textDarkColor : Default.textColor)
+ color: control.visualFocus ? control.palette.highlight : control.palette.buttonText
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
@@ -102,7 +102,7 @@ T.DelayButton {
text: control.text
font: control.font
opacity: enabled ? 1 : 0.3
- color: Default.textLightColor
+ color: control.palette.brightText
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
diff --git a/src/imports/controls/GroupBox.qml b/src/imports/controls/GroupBox.qml
index 24636ca3..dc529bd6 100644
--- a/src/imports/controls/GroupBox.qml
+++ b/src/imports/controls/GroupBox.qml
@@ -60,7 +60,7 @@ T.GroupBox {
text: control.title
font: control.font
- color: control.enabled ? Default.textColor : Default.textDisabledColor
+ color: control.palette.windowText
elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
diff --git a/src/imports/controls/ItemDelegate.qml b/src/imports/controls/ItemDelegate.qml
index 7beaca12..a03deac0 100644
--- a/src/imports/controls/ItemDelegate.qml
+++ b/src/imports/controls/ItemDelegate.qml
@@ -54,7 +54,7 @@ T.ItemDelegate {
icon.width: 24
icon.height: 24
- icon.color: enabled ? Default.textDarkColor : Default.textDisabledColor
+ icon.color: control.palette.text
contentItem: IconLabel {
spacing: control.spacing
@@ -65,7 +65,7 @@ T.ItemDelegate {
icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
+ color: control.palette.text
}
background: Rectangle {
diff --git a/src/imports/controls/Label.qml b/src/imports/controls/Label.qml
index a1533506..aa02918f 100644
--- a/src/imports/controls/Label.qml
+++ b/src/imports/controls/Label.qml
@@ -42,6 +42,6 @@ import QtQuick.Templates 2.4 as T
T.Label {
id: control
- color: Default.textDarkColor
- linkColor: Default.textLinkColor
+ color: control.palette.windowText
+ linkColor: control.palette.link
}
diff --git a/src/imports/controls/MenuItem.qml b/src/imports/controls/MenuItem.qml
index 088dfc85..e8d1d426 100644
--- a/src/imports/controls/MenuItem.qml
+++ b/src/imports/controls/MenuItem.qml
@@ -70,7 +70,7 @@ T.MenuItem {
icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
+ color: control.palette.windowText
}
indicator: ColorImage {
diff --git a/src/imports/controls/PageIndicator.qml b/src/imports/controls/PageIndicator.qml
index 34df4e94..9d048002 100644
--- a/src/imports/controls/PageIndicator.qml
+++ b/src/imports/controls/PageIndicator.qml
@@ -55,7 +55,7 @@ T.PageIndicator {
implicitHeight: 8
radius: width / 2
- color: Default.pageIndicatorColor
+ color: control.palette.dark
opacity: index === currentIndex ? 0.95 : pressed ? 0.7 : 0.45
Behavior on opacity { OpacityAnimator { duration: 100 } }
diff --git a/src/imports/controls/ProgressBar.qml b/src/imports/controls/ProgressBar.qml
index 1b0a3394..8fa7ba21 100644
--- a/src/imports/controls/ProgressBar.qml
+++ b/src/imports/controls/ProgressBar.qml
@@ -53,7 +53,7 @@ T.ProgressBar {
scale: control.mirrored ? -1 : 1
progress: control.position
indeterminate: control.visible && control.indeterminate
- color: Default.textColor
+ color: control.palette.dark
}
background: Rectangle {
@@ -64,6 +64,6 @@ T.ProgressBar {
width: control.availableWidth
height: 6
- color: Default.progressBarColor
+ color: control.palette.light
}
}
diff --git a/src/imports/controls/RadioButton.qml b/src/imports/controls/RadioButton.qml
index 41fc7025..747f3a9f 100644
--- a/src/imports/controls/RadioButton.qml
+++ b/src/imports/controls/RadioButton.qml
@@ -64,11 +64,10 @@ T.RadioButton {
text: control.text
font: control.font
- color: control.down ? Default.textDarkColor : Default.textColor
+ color: control.palette.windowText
elide: Text.ElideRight
visible: control.text
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
- opacity: enabled ? 1 : 0.3
}
}
diff --git a/src/imports/controls/RadioDelegate.qml b/src/imports/controls/RadioDelegate.qml
index e6e31e6c..9a84685d 100644
--- a/src/imports/controls/RadioDelegate.qml
+++ b/src/imports/controls/RadioDelegate.qml
@@ -54,7 +54,7 @@ T.RadioDelegate {
icon.width: 24
icon.height: 24
- icon.color: enabled ? Default.textDarkColor : Default.textDisabledColor
+ icon.color: control.palette.text
contentItem: IconLabel {
leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
@@ -68,7 +68,7 @@ T.RadioDelegate {
icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
+ color: control.palette.text
}
indicator: RadioIndicator {
diff --git a/src/imports/controls/RoundButton.qml b/src/imports/controls/RoundButton.qml
index 37b1b5b7..f4431132 100644
--- a/src/imports/controls/RoundButton.qml
+++ b/src/imports/controls/RoundButton.qml
@@ -53,10 +53,9 @@ T.RoundButton {
icon.width: 24
icon.height: 24
- icon.color: Color.transparent(checked || highlighted ? Default.textLightColor
- : visualFocus ? Default.focusColor
- : down ? Default.textDarkColor : Default.textColor,
- enabled || highlighted || checked ? 1 : 0.3)
+ icon.color: control.checked || control.highlighted ? control.palette.brightText :
+ control.visualFocus ? control.palette.highlight :
+ control.flat && !control.down ? control.palette.windowText : control.palette.buttonText
contentItem: IconLabel {
spacing: control.spacing
@@ -66,10 +65,9 @@ T.RoundButton {
icon: control.icon
text: control.text
font: control.font
- color: Color.transparent(control.checked || control.highlighted ? Default.textLightColor
- : control.visualFocus ? Default.focusColor
- : control.down ? Default.textDarkColor : Default.textColor,
- enabled || control.highlighted || control.checked ? 1 : 0.3)
+ color: control.checked || control.highlighted ? control.palette.brightText :
+ control.visualFocus ? control.palette.highlight :
+ control.flat && !control.down ? control.palette.windowText : control.palette.buttonText
}
background: Rectangle {
diff --git a/src/imports/controls/SpinBox.qml b/src/imports/controls/SpinBox.qml
index b5aee02b..0855d2f0 100644
--- a/src/imports/controls/SpinBox.qml
+++ b/src/imports/controls/SpinBox.qml
@@ -65,12 +65,11 @@ T.SpinBox {
contentItem: TextInput {
z: 2
text: control.textFromValue(control.value, control.locale)
- opacity: control.enabled ? 1 : 0.3
font: control.font
- color: Default.textColor
- selectionColor: Default.focusColor
- selectedTextColor: Default.textLightColor
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
diff --git a/src/imports/controls/SwipeDelegate.qml b/src/imports/controls/SwipeDelegate.qml
index f9b2a153..bed2ed03 100644
--- a/src/imports/controls/SwipeDelegate.qml
+++ b/src/imports/controls/SwipeDelegate.qml
@@ -54,7 +54,7 @@ T.SwipeDelegate {
icon.width: 24
icon.height: 24
- icon.color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
+ icon.color: control.palette.text
swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
@@ -67,7 +67,7 @@ T.SwipeDelegate {
icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
+ color: control.palette.text
}
background: Rectangle {
diff --git a/src/imports/controls/Switch.qml b/src/imports/controls/Switch.qml
index 06959732..05f64124 100644
--- a/src/imports/controls/Switch.qml
+++ b/src/imports/controls/Switch.qml
@@ -64,7 +64,7 @@ T.Switch {
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
+ color: control.palette.windowText
elide: Text.ElideRight
visible: control.text
horizontalAlignment: Text.AlignLeft
diff --git a/src/imports/controls/SwitchDelegate.qml b/src/imports/controls/SwitchDelegate.qml
index c5626144..4fb5fa5c 100644
--- a/src/imports/controls/SwitchDelegate.qml
+++ b/src/imports/controls/SwitchDelegate.qml
@@ -54,7 +54,7 @@ T.SwitchDelegate {
icon.width: 24
icon.height: 24
- icon.color: enabled ? Default.textDarkColor : Default.textDisabledColor
+ icon.color: control.palette.text
indicator: SwitchIndicator {
x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
@@ -74,7 +74,7 @@ T.SwitchDelegate {
icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
+ color: control.palette.text
}
background: Rectangle {
diff --git a/src/imports/controls/TextArea.qml b/src/imports/controls/TextArea.qml
index 24b66f7a..af705c43 100644
--- a/src/imports/controls/TextArea.qml
+++ b/src/imports/controls/TextArea.qml
@@ -52,10 +52,9 @@ T.TextArea {
padding: 6
leftPadding: padding + 4
- opacity: enabled ? 1 : 0.2
- color: Default.textColor
- selectionColor: Default.textSelectionColor
- selectedTextColor: color
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
PlaceholderText {
id: placeholder
@@ -66,7 +65,7 @@ T.TextArea {
text: control.placeholderText
font: control.font
- color: Default.textDisabledLightColor
+ color: enabled ? Default.textPlaceholderColor : Default.textDisabledColor
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
diff --git a/src/imports/controls/TextField.qml b/src/imports/controls/TextField.qml
index dd7b5237..7a8ffe45 100644
--- a/src/imports/controls/TextField.qml
+++ b/src/imports/controls/TextField.qml
@@ -52,10 +52,9 @@ T.TextField {
padding: 6
leftPadding: padding + 4
- opacity: enabled ? 1 : 0.2
- color: Default.textColor
- selectionColor: Default.textSelectionColor
- selectedTextColor: color
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
verticalAlignment: TextInput.AlignVCenter
PlaceholderText {
@@ -67,7 +66,7 @@ T.TextField {
text: control.placeholderText
font: control.font
- color: Default.textDisabledColor
+ color: enabled ? Default.textPlaceholderColor : Default.textDisabledColor
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
@@ -77,7 +76,7 @@ T.TextField {
implicitWidth: 200
implicitHeight: 40
border.width: control.activeFocus ? 2 : 1
- color: control.enabled ? Default.backgroundColor : Default.disabledDarkColor
+ color: control.enabled ? Default.backgroundColor : Default.indicatorFrameDisabledColor
border.color: control.activeFocus ? Default.focusColor : (control.enabled ? Default.disabledLightColor : "transparent")
}
}
diff --git a/src/imports/controls/ToolTip.qml b/src/imports/controls/ToolTip.qml
index 55b49644..46f7f577 100644
--- a/src/imports/controls/ToolTip.qml
+++ b/src/imports/controls/ToolTip.qml
@@ -58,10 +58,12 @@ T.ToolTip {
contentItem: Text {
text: control.text
font: control.font
+ color: control.palette.toolTipText
// TODO: wrapMode: Label.Wrap
}
background: Rectangle {
- border.color: Default.frameDarkColor
+ border.color: control.palette.dark
+ color: control.palette.toolTipBase
}
}
diff --git a/src/imports/controls/Tumbler.qml b/src/imports/controls/Tumbler.qml
index 5595a51f..25c00162 100644
--- a/src/imports/controls/Tumbler.qml
+++ b/src/imports/controls/Tumbler.qml
@@ -47,9 +47,9 @@ T.Tumbler {
delegate: Text {
id: label
text: modelData
- color: control.visualFocus ? Default.focusColor : Default.textDarkColor
+ color: control.visualFocus ? control.palette.highlight : control.palette.text
font: control.font
- opacity: (1.0 - Math.abs(Tumbler.displacement) / (visibleItemCount / 2)) * (control.enabled ? 1 : 0.6)
+ opacity: 1.0 - Math.abs(Tumbler.displacement) / (visibleItemCount / 2)
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine-thumbnail.png b/src/imports/controls/doc/images/qtquickcontrols2-imagine-thumbnail.png
new file mode 100644
index 00000000..b949ab7c
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine-thumbnail.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine.png b/src/imports/controls/doc/images/qtquickcontrols2-imagine.png
new file mode 100644
index 00000000..1cf7a0f2
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine.png
Binary files differ
diff --git a/src/imports/controls/doc/manifest-meta.qdocconf b/src/imports/controls/doc/manifest-meta.qdocconf
new file mode 100644
index 00000000..74dbb41f
--- /dev/null
+++ b/src/imports/controls/doc/manifest-meta.qdocconf
@@ -0,0 +1,35 @@
+# Additional meta information (attributes for matched entries, as well as tags)
+# to be added to manifest.xml files.
+#
+# manifestmeta.filters = <filter1>,<filter2>,...
+#
+# manifestmeta.<filter>.names = <Module1>/<name1>,<Module2>/<name2>,..
+# manifestmeta.<filter>.attributes = <attribute1:value1>,<attribute2:value2>,..
+# manifestmeta.<filter>.tags = <tag1>,<tag2>,..
+#
+# <filter>.names specify all the module/name combinations to apply the
+# attributes/tags to. You can use simple wildcard matching by appending
+# '*' at the end of name.
+#
+# Note: You cannot use operators (+, =, -) in the names.
+#
+# Examples: add a 'isHighlighted' attribute for two 'Analog Clock' examples,
+# add a 'database' tag for QtSql examples, and a 'qt5' tag for all examples
+#
+# manifestmeta.filters = highlighted sql global
+#
+# manifestmeta.highlighted.names = "QtGui/Analog Clock Window Example" \
+# "QtWidgets/Analog Clock Example"
+# manifestmeta.highlighted.attributes = isHighlighted:true
+#
+# manifestmeta.sql.names = "QtSql/*"
+# manifestmeta.sql.tags = database
+#
+# manifestmeta.global.names = *
+# manifestmeta.global.tags = qt5
+
+manifestmeta.highlighted.names += "QtQuickControls2/Qt Quick Controls 2 - Gallery" \
+ "QtQuickControls2/Qt Quick Controls 2 - Wearable Demo" \
+ "QtQuickControls2/Qt Quick Controls 2 - Text Editor" \
+ "QtQuickControls2/Qt Quick Controls 2 - Contact List" \
+ "QtQuickControls2/Qt Quick Controls 2 - Side Panel"
diff --git a/src/imports/controls/doc/qtquickcontrols2.qdocconf b/src/imports/controls/doc/qtquickcontrols2.qdocconf
index 7f05247e..225b7bea 100644
--- a/src/imports/controls/doc/qtquickcontrols2.qdocconf
+++ b/src/imports/controls/doc/qtquickcontrols2.qdocconf
@@ -1,4 +1,5 @@
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+include($PWD/manifest-meta.qdocconf)
project = QtQuickControls2
description = Qt Quick Controls 2 Reference Documentation
@@ -48,7 +49,8 @@ sourcedirs += ../../../quicktemplates2 \
../../templates/doc/src \
src
-imagedirs += images
+imagedirs += images \
+ ..
navigation.landingpage = "Qt Quick Controls 2"
navigation.qmltypespage = "Qt Quick Controls 2 QML Types"
diff --git a/src/imports/controls/doc/src/includes/qquickimaginestyle.qdocinc b/src/imports/controls/doc/src/includes/qquickimaginestyle.qdocinc
index c5ffa9c1..8acec2a8 100644
--- a/src/imports/controls/doc/src/includes/qquickimaginestyle.qdocinc
+++ b/src/imports/controls/doc/src/includes/qquickimaginestyle.qdocinc
@@ -6,7 +6,10 @@
\row
\li \c Path
\li Specifies the \l {imagine-path-attached-prop}{path} to the directory that contains
- the Imagine style assets.
+ the Imagine style assets. If not specified, the built-in assets are used.
+
+ \note Due to a technical limitation, the path should not be named
+ \e "imagine" if it is relative to the \c qtquickcontrols2.conf file.
\endtable
//! [conf]
@@ -19,5 +22,8 @@
\li \c QT_QUICK_CONTROLS_IMAGINE_PATH
\li Specifies the path to the directory that contains the Imagine style assets.
If not specified, the built-in assets are used.
+
+ \note Due to a technical limitation, the path should not be named
+ \e "imagine" if it is relative to the \c qtquickcontrols2.conf file.
\endtable
//! [env]
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc
index 8a3c3ebf..e1f974bd 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc
@@ -67,7 +67,7 @@
possible, such as \c disabled, \c pressed, etc. This will ensure that
interactive controls visually behave as the end user would expect them to.
- TODO: mention priority order, scoring system?
+ \section2 Element Reference
The following table lists which elements are supported for each control,
along with the possible states for that element, and the file extension
@@ -143,7 +143,7 @@
\li .9.png (or .png)
\row
\li \l DelayButton
- \li background, progress, mask
+ \li background
\li disabled, pressed, checked, checkable, focused, mirrored, hovered
\li .9.png (or .png)
\row
@@ -248,10 +248,15 @@
\li .png
\row
\li \l MenuSeparator
- \li background, separator
+ \li background
\li disabled, mirrored
\li .9.png (or .png)
\row
+ \li
+ \li separator
+ \li same as above
+ \li .9.png (or .png)
+ \row
\li \l Page
\li background
\li disabled, mirrored
@@ -303,7 +308,7 @@
\li .9.png (or .png)
\row
\li \l RadioButton
- \li background, indicator
+ \li background
\li disabled, pressed, checked, focused, mirrored, hovered
\li .9.png (or .png)
\row
@@ -413,7 +418,7 @@
\li .9.png (or .png)
\row
\li \l Switch
- \li background, handle, indicator
+ \li background
\li disabled, pressed, checked, focused, mirrored, hovered
\li .9.png (or .png)
\row
@@ -428,7 +433,7 @@
\li .9.png (or .png)
\row
\li \l SwitchDelegate
- \li background, handle, indicator
+ \li background
\li disabled, pressed, checked, focused, highlighted, mirrored, hovered
\li .9.png (or .png)
\row
@@ -473,10 +478,15 @@
\li .9.png (or .png)
\row
\li \l ToolSeparator
- \li background, separator
+ \li background
\li vertical, horizontal, disabled, mirrored
\li .9.png (or .png)
\row
+ \li
+ \li separator
+ \li same as above
+ \li .9.png (or .png)
+ \row
\li \l ToolTip
\li background
\li
@@ -488,6 +498,1891 @@
\li .9.png (or .png)
\endtable
+ \section2 Asset Examples
+
+ The following table lists examples of assets (taken from the default
+ Imagine style assets) for all controls. The list is not exhaustive,
+ as not all elements need assets, but it can be used as a guide
+ when creating your own assets.
+
+ \table
+ \header
+ \li Control
+ \li Element
+ \li States
+ \li Asset
+ \li Notes
+ \row
+ \li \l ApplicationWindow
+ \li background
+ \li
+ \li \image imagine/images/applicationwindow-background.png
+ \li \l {sup1}{See footnote} \sup 1
+ \row
+ \li
+ \li overlay
+ \li
+ \li \image imagine/images/applicationwindow-overlay.png
+ \li \l {sup1}{See footnote} \sup 1
+ \row
+ \li
+ \li overlay
+ \li modal
+ \li \image imagine/images/applicationwindow-overlay-modal.png
+ \li \l {sup1}{See footnote} \sup 1
+ \row
+ \li \l Button
+ \li background
+ \li
+ \li \image imagine/images/button-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/button-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/button-background-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/button-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked
+ \li \image imagine/images/button-background-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked, disabled
+ \li \image imagine/images/button-background-checked-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked, focused
+ \li \image imagine/images/button-background-checked-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked, hovered
+ \li \image imagine/images/button-background-checked-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted
+ \li \image imagine/images/button-background-highlighted.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, disabled
+ \li \image imagine/images/button-background-highlighted-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, focused
+ \li \image imagine/images/button-background-highlighted-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, hovered
+ \li \image imagine/images/button-background-highlighted-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, pressed
+ \li \image imagine/images/button-background-highlighted-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, checked
+ \li \image imagine/images/button-background-highlighted-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, checkable, hovered
+ \li \image imagine/images/button-background-highlighted-checkable-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, checkable, pressed
+ \li \image imagine/images/button-background-highlighted-checkable-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, checkable, checked
+ \li \image imagine/images/button-background-highlighted-checkable-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/button-background-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat
+ \li \image imagine/images/button-background-flat.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, disabled
+ \li \image imagine/images/button-background-flat-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, hovered
+ \li \image imagine/images/button-background-flat-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, pressed
+ \li \image imagine/images/button-background-flat-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, checked
+ \li \image imagine/images/button-background-flat-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, checkable
+ \li \image imagine/images/button-background-flat-checkable.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, checkable, hovered
+ \li \image imagine/images/button-background-flat-checkable-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, checkable, pressed
+ \li \image imagine/images/button-background-flat-checkable-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, checkable, checked, pressed
+ \li \image imagine/images/button-background-flat-checkable-checked-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, checkable, highlighted
+ \li \image imagine/images/button-background-flat-checkable-highlighted.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, checkable, highlighted, pressed
+ \li \image imagine/images/button-background-flat-checkable-highlighted-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li flat, checkable, highlighted, checked
+ \li \image imagine/images/button-background-flat-checkable-highlighted-checked.9.png
+ \li
+ \row
+ \li \l CheckBox
+ \li indicator
+ \li
+ \li \image imagine/images/checkbox-indicator.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li disabled
+ \li \image imagine/images/checkbox-indicator-disabled.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li pressed
+ \li \image imagine/images/checkbox-indicator-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked
+ \li \image imagine/images/checkbox-indicator-checked.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, pressed
+ \li \image imagine/images/checkbox-indicator-checked-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, hovered
+ \li \image imagine/images/checkbox-indicator-checked-hovered.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, focused
+ \li \image imagine/images/checkbox-indicator-checked-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li partially, checked
+ \li \image imagine/images/checkbox-indicator-partially-checked.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li partially, checked, pressed
+ \li \image imagine/images/checkbox-indicator-partially-checked-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li partially, checked, focused
+ \li \image imagine/images/checkbox-indicator-partially-checked-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li partially, checked, hovered
+ \li \image imagine/images/checkbox-indicator-partially-checked-hovered.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li focused
+ \li \image imagine/images/checkbox-indicator-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li hovered
+ \li \image imagine/images/checkbox-indicator-hovered.png
+ \li
+ \row
+ \li \l CheckDelegate
+ \li background
+ \li
+ \li \image imagine/images/checkdelegate-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/checkdelegate-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/checkdelegate-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked
+ \li \image imagine/images/checkdelegate-background-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/checkdelegate-background-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/checkdelegate-background-hovered.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li
+ \li \image imagine/images/checkdelegate-indicator.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li disabled
+ \li \image imagine/images/checkdelegate-indicator-disabled.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li pressed
+ \li \image imagine/images/checkdelegate-indicator-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked
+ \li \image imagine/images/checkdelegate-indicator-checked.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, pressed
+ \li \image imagine/images/checkdelegate-indicator-checked-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, focused
+ \li \image imagine/images/checkdelegate-indicator-checked-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, hovered
+ \li \image imagine/images/checkdelegate-indicator-checked-hovered.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li focused
+ \li \image imagine/images/checkdelegate-indicator-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li hovered
+ \li \image imagine/images/checkdelegate-indicator-hovered.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li partially, checked
+ \li \image imagine/images/checkdelegate-indicator-partially-checked.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li partially, checked, pressed
+ \li \image imagine/images/checkdelegate-indicator-partially-checked-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li partially, checked, focused
+ \li \image imagine/images/checkdelegate-indicator-partially-checked-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li partially, checked, hovered
+ \li \image imagine/images/checkdelegate-indicator-partially-checked-hovered.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li hovered
+ \li \image imagine/images/checkdelegate-indicator-hovered.png
+ \li
+ \row
+ \li \l ComboBox
+ \li background
+ \li
+ \li \image imagine/images/combobox-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/combobox-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/combobox-background-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/combobox-background-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/combobox-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li open
+ \li \image imagine/images/combobox-background-open.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li editable
+ \li \image imagine/images/combobox-background-editable.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li editable, focused
+ \li \image imagine/images/combobox-background-editable-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li editable, disabled
+ \li \image imagine/images/combobox-background-editable-disabled.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li
+ \li \image imagine/images/combobox-indicator.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li disabled
+ \li \image imagine/images/combobox-indicator-disabled.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li editable
+ \li \image imagine/images/combobox-indicator-editable.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li editable, disabled
+ \li \image imagine/images/combobox-indicator-editable-disabled.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li editable, mirrored
+ \li \image imagine/images/combobox-indicator-editable-mirrored.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li editable, mirrored, disabled
+ \li \image imagine/images/combobox-indicator-editable-mirrored-disabled.png
+ \li
+ \row
+ \li
+ \li popup
+ \li
+ \li \image imagine/images/combobox-popup.9.png
+ \li
+ \row
+ \li \l DelayButton
+ \li background
+ \li
+ \li \image imagine/images/delaybutton-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/delaybutton-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled, checked
+ \li \image imagine/images/delaybutton-background-disabled-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/delaybutton-background-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/delaybutton-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked
+ \li \image imagine/images/delaybutton-background-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked, focused
+ \li \image imagine/images/delaybutton-background-checked-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked, hovered
+ \li \image imagine/images/delaybutton-background-checked-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/delaybutton-background-hovered.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li
+ \li \image imagine/images/delaybutton-progress.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li disabled
+ \li \image imagine/images/delaybutton-progress-disabled.9.png
+ \li
+ \row
+ \li
+ \li mask
+ \li
+ \li \image imagine/images/delaybutton-mask.9.png
+ \li
+ \row
+ \li \l Dial
+ \li background
+ \li
+ \li \image imagine/images/dial-background.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/dial-background-disabled.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/dial-background-focused.png
+ \li
+ \row
+ \li
+ \li handle
+ \li
+ \li \image imagine/images/dial-handle.png
+ \li
+ \row
+ \li
+ \li handle
+ \li disabled
+ \li \image imagine/images/dial-handle-disabled.png
+ \li
+ \row
+ \li
+ \li handle
+ \li focused
+ \li \image imagine/images/dial-handle-focused.png
+ \li
+ \row
+ \li
+ \li handle
+ \li focused, pressed
+ \li \image imagine/images/dial-handle-focused-pressed.png
+ \li
+ \row
+ \li
+ \li handle
+ \li focused, hovered
+ \li \image imagine/images/dial-handle-focused-hovered.png
+ \li
+ \row
+ \li
+ \li handle
+ \li pressed
+ \li \image imagine/images/dial-handle-pressed.png
+ \li
+ \row
+ \li
+ \li handle
+ \li hovered
+ \li \image imagine/images/dial-handle-hovered.png
+ \li
+ \row
+ \li \l Dialog
+ \li background
+ \li
+ \li \image imagine/images/dialog-background.9.png
+ \li
+ \row
+ \li
+ \li overlay
+ \li
+ \li \image imagine/images/dialog-overlay.png
+ \li \l {sup1}{See footnote} \sup 1
+ \row
+ \li
+ \li overlay
+ \li modal
+ \li \image imagine/images/dialog-overlay-modal.png
+ \li \l {sup1}{See footnote} \sup 1
+ \row
+ \li \l DialogButtonBox
+ \li background
+ \li
+ \li \image imagine/images/dialogbuttonbox-background.9.png
+ \li
+ \row
+ \li \l Drawer
+ \li background
+ \li left
+ \li \image imagine/images/drawer-background-left.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li right
+ \li \image imagine/images/drawer-background-right.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li top
+ \li \image imagine/images/drawer-background-top.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li bottom
+ \li \image imagine/images/drawer-background-bottom.9.png
+ \li
+ \row
+ \li
+ \li overlay
+ \li
+ \li \image imagine/images/drawer-overlay.png
+ \li \l {sup1}{See footnote} \sup 1
+ \row
+ \li
+ \li overlay
+ \li modal
+ \li \image imagine/images/drawer-overlay-modal.png
+ \li \l {sup1}{See footnote} \sup 1
+ \row
+ \li \l Frame
+ \li background
+ \li
+ \li \image imagine/images/frame-background.9.png
+ \li
+ \row
+ \li \l GroupBox
+ \li background
+ \li
+ \li \image imagine/images/groupbox-background.9.png
+ \li
+ \row
+ \li
+ \li title
+ \li
+ \li \image imagine/images/groupbox-title.9.png
+ \li
+ \row
+ \li \l ItemDelegate
+ \li background
+ \li
+ \li \image imagine/images/itemdelegate-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/itemdelegate-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/itemdelegate-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/itemdelegate-background-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/itemdelegate-background-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted
+ \li \image imagine/images/itemdelegate-background-highlighted.9.png
+ \li
+ \row
+ \li \l Menu
+ \li background
+ \li
+ \li \image imagine/images/menu-background.9.png
+ \li
+ \row
+ \li \l MenuItem
+ \li background
+ \li
+ \li \image imagine/images/menuitem-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted
+ \li \image imagine/images/menuitem-background-highlighted.9.png
+ \li
+ \row
+ \li
+ \li arrow
+ \li
+ \li \image imagine/images/menuitem-arrow.png
+ \li
+ \row
+ \li
+ \li arrow
+ \li mirrored
+ \li \image imagine/images/menuitem-arrow-mirrored.png
+ \li
+ \row
+ \li
+ \li arrow
+ \li disabled
+ \li \image imagine/images/menuitem-arrow-disabled.png
+ \li
+ \row
+ \li
+ \li arrow
+ \li mirrored, disabled
+ \li \image imagine/images/menuitem-arrow-mirrored-disabled.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li
+ \li \image imagine/images/menuitem-indicator.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li disabled
+ \li \image imagine/images/menuitem-indicator-disabled.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li pressed
+ \li \image imagine/images/menuitem-indicator-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked
+ \li \image imagine/images/menuitem-indicator-checked.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, pressed
+ \li \image imagine/images/menuitem-indicator-checked-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, focused
+ \li \image imagine/images/menuitem-indicator-checked-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, hovered
+ \li \image imagine/images/menuitem-indicator-checked-hovered.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li focused
+ \li \image imagine/images/menuitem-indicator-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li hovered
+ \li \image imagine/images/menuitem-indicator-hovered.png
+ \li
+ \row
+ \li \l MenuSeparator
+ \li separator
+ \li
+ \li \image imagine/images/menuseparator-separator.9.png
+ \li
+ \row
+ \li \l Page
+ \li background
+ \li
+ \li \image imagine/images/page-background.png
+ \li \l {sup1}{See footnote} \sup 1
+ \row
+ \li \l PageIndicator
+ \li delegate
+ \li
+ \li \image imagine/images/pageindicator-delegate.png
+ \li
+ \row
+ \li
+ \li delegate
+ \li disabled
+ \li \image imagine/images/pageindicator-delegate-disabled.png
+ \li
+ \row
+ \li
+ \li delegate
+ \li disabled, current
+ \li \image imagine/images/pageindicator-delegate-disabled-current.png
+ \li
+ \row
+ \li
+ \li delegate
+ \li pressed
+ \li \image imagine/images/pageindicator-delegate-pressed.png
+ \li
+ \row
+ \li
+ \li delegate
+ \li current
+ \li \image imagine/images/pageindicator-delegate-current.png
+ \li
+ \row
+ \li
+ \li delegate
+ \li mirrored
+ \li \image imagine/images/pageindicator-delegate-mirrored.png
+ \li
+ \row
+ \li \l Pane
+ \li background
+ \li
+ \li \image imagine/images/pane-background.9.png
+ \li
+ \row
+ \li \l Popup
+ \li background
+ \li
+ \li \image imagine/images/popup-background.9.png
+ \li \l {sup1}{See footnote} \sup 1
+ \row
+ \li
+ \li overlay
+ \li
+ \li \image imagine/images/popup-overlay.png
+ \li \l {sup1}{See footnote} \sup 1
+ \row
+ \li
+ \li overlay
+ \li modal
+ \li \image imagine/images/popup-overlay-modal.png
+ \li
+ \row
+ \li \l ProgressBar
+ \li background
+ \li
+ \li \image imagine/images/progressbar-background.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li
+ \li \image imagine/images/progressbar-progress.png
+ \li
+ \row
+ \li
+ \li mask
+ \li
+ \li \image imagine/images/progressbar-mask.9.png
+ \li
+ \row
+ \li \l RadioButton
+ \li indicator
+ \li
+ \li \image imagine/images/radiobutton-indicator.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li disabled
+ \li \image imagine/images/radiobutton-indicator-disabled.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li pressed
+ \li \image imagine/images/radiobutton-indicator-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked
+ \li \image imagine/images/radiobutton-indicator-checked.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, focused
+ \li \image imagine/images/radiobutton-indicator-checked-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, hovered
+ \li \image imagine/images/radiobutton-indicator-checked-hovered.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, pressed
+ \li \image imagine/images/radiobutton-indicator-checked-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li focused
+ \li \image imagine/images/radiobutton-indicator-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li hovered
+ \li \image imagine/images/radiobutton-indicator-hovered.png
+ \li
+ \row
+ \li \l RadioDelegate
+ \li background
+ \li
+ \li \image imagine/images/radiodelegate-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/radiodelegate-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/radiodelegate-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked
+ \li \image imagine/images/radiodelegate-background-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/radiodelegate-background-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/radiodelegate-background-hovered.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li
+ \li \image imagine/images/radiodelegate-indicator.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li disabled
+ \li \image imagine/images/radiodelegate-indicator-disabled.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li pressed
+ \li \image imagine/images/radiodelegate-indicator-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked
+ \li \image imagine/images/radiodelegate-indicator-checked.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, focused
+ \li \image imagine/images/radiodelegate-indicator-checked-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, hovered
+ \li \image imagine/images/radiodelegate-indicator-checked-hovered.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, pressed
+ \li \image imagine/images/radiodelegate-indicator-checked-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li focused
+ \li \image imagine/images/radiodelegate-indicator-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li hovered
+ \li \image imagine/images/radiodelegate-indicator-hovered.png
+ \li
+ \row
+ \li \l RangeSlider
+ \li background
+ \li vertical
+ \li \image imagine/images/rangeslider-background-vertical.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li horizontal
+ \li \image imagine/images/rangeslider-background-horizontal.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li vertical
+ \li \image imagine/images/rangeslider-progress-vertical.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li vertical, disabled
+ \li \image imagine/images/rangeslider-progress-vertical-disabled.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li horizontal
+ \li \image imagine/images/rangeslider-progress-horizontal.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li horizontal, disabled
+ \li \image imagine/images/rangeslider-progress-horizontal-disabled.9.png
+ \li
+ \row
+ \li
+ \li handle
+ \li
+ \li \image imagine/images/rangeslider-handle.png
+ \li
+ \row
+ \li
+ \li handle
+ \li disabled
+ \li \image imagine/images/rangeslider-handle-disabled.png
+ \li
+ \row
+ \li
+ \li handle
+ \li focused
+ \li \image imagine/images/rangeslider-handle-focused.png
+ \li
+ \row
+ \li
+ \li handle
+ \li focused, hovered
+ \li \image imagine/images/rangeslider-handle-focused-hovered.png
+ \li
+ \row
+ \li
+ \li handle
+ \li focused, pressed
+ \li \image imagine/images/rangeslider-handle-focused-pressed.png
+ \li
+ \row
+ \li
+ \li handle
+ \li hovered
+ \li \image imagine/images/rangeslider-handle-hovered.png
+ \li
+ \row
+ \li
+ \li handle
+ \li pressed
+ \li \image imagine/images/rangeslider-handle-pressed.png
+ \li
+ \row
+ \li \l RoundButton
+ \li background
+ \li
+ \li \image imagine/images/roundbutton-background.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/roundbutton-background-disabled.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled, checked
+ \li \image imagine/images/roundbutton-background-disabled-checked.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/roundbutton-background-focused.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/roundbutton-background-pressed.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked
+ \li \image imagine/images/roundbutton-background-checked.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked, focused
+ \li \image imagine/images/roundbutton-background-checked-focused.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked, hovered
+ \li \image imagine/images/roundbutton-background-checked-hovered.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted
+ \li \image imagine/images/roundbutton-background-highlighted.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, pressed
+ \li \image imagine/images/roundbutton-background-highlighted-pressed.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, focused
+ \li \image imagine/images/roundbutton-background-highlighted-focused.png
+ \li
+ \row
+ \li
+ \li background
+ \li highlighted, hovered
+ \li \image imagine/images/roundbutton-background-highlighted-hovered.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/roundbutton-background-hovered.png
+ \li
+ \row
+ \li \l ScrollBar
+ \li handle
+ \li
+ \li \image imagine/images/scrollbar-handle.png
+ \li
+ \row
+ \li
+ \li handle
+ \li disabled
+ \li \image imagine/images/scrollbar-handle-disabled.png
+ \li
+ \row
+ \li
+ \li handle
+ \li interactive
+ \li \image imagine/images/scrollbar-handle-interactive.png
+ \li
+ \row
+ \li
+ \li handle
+ \li interactive, disabled
+ \li \image imagine/images/scrollbar-handle-interactive-disabled.png
+ \li
+ \row
+ \li
+ \li handle
+ \li interactive, pressed
+ \li \image imagine/images/scrollbar-handle-interactive-pressed.png
+ \li
+ \row
+ \li
+ \li handle
+ \li interactive, hovered
+ \li \image imagine/images/scrollbar-handle-interactive-hovered.png
+ \li
+ \row
+ \li \l ScrollIndicator
+ \li handle
+ \li
+ \li \image imagine/images/scrollindicator-handle.png
+ \li
+ \row
+ \li \l Slider
+ \li background
+ \li vertical
+ \li \image imagine/images/slider-background-vertical.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li horizontal
+ \li \image imagine/images/slider-background-horizontal.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li vertical
+ \li \image imagine/images/slider-progress-vertical.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li vertical, disabled
+ \li \image imagine/images/slider-progress-vertical-disabled.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li horizontal
+ \li \image imagine/images/slider-progress-horizontal.9.png
+ \li
+ \row
+ \li
+ \li progress
+ \li horizontal, disabled
+ \li \image imagine/images/slider-progress-horizontal-disabled.9.png
+ \li
+ \row
+ \li
+ \li handle
+ \li
+ \li \image imagine/images/slider-handle.png
+ \li
+ \row
+ \li
+ \li handle
+ \li disabled
+ \li \image imagine/images/slider-handle-disabled.png
+ \li
+ \row
+ \li
+ \li handle
+ \li focused
+ \li \image imagine/images/slider-handle-focused.png
+ \li
+ \row
+ \li
+ \li handle
+ \li focused, hovered
+ \li \image imagine/images/slider-handle-focused-hovered.png
+ \li
+ \row
+ \li
+ \li handle
+ \li focused, pressed
+ \li \image imagine/images/slider-handle-focused-pressed.png
+ \li
+ \row
+ \li
+ \li handle
+ \li hovered
+ \li \image imagine/images/slider-handle-hovered.png
+ \li
+ \row
+ \li
+ \li handle
+ \li pressed
+ \li \image imagine/images/slider-handle-pressed.png
+ \li
+ \row
+ \li \l SpinBox
+ \li background
+ \li
+ \li \image imagine/images/spinbox-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/spinbox-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/spinbox-background-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li editable
+ \li \image imagine/images/spinbox-background-editable.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up
+ \li \image imagine/images/spinbox-indicator-up.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up, disabled
+ \li \image imagine/images/spinbox-indicator-up-disabled.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up, pressed
+ \li \image imagine/images/spinbox-indicator-up-pressed.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up, focused
+ \li \image imagine/images/spinbox-indicator-up-focused.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up, mirrored
+ \li \image imagine/images/spinbox-indicator-up-mirrored.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up, hovered
+ \li \image imagine/images/spinbox-indicator-up-hovered.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up, editable
+ \li \image imagine/images/spinbox-indicator-up-editable.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up, editable, pressed
+ \li \image imagine/images/spinbox-indicator-up-editable-pressed.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up, editable, focused
+ \li \image imagine/images/spinbox-indicator-up-editable-focused.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up, editable, mirrored
+ \li \image imagine/images/spinbox-indicator-up-editable-mirrored.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li up, editable, hovered
+ \li \image imagine/images/spinbox-indicator-up-editable-hovered.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down
+ \li \image imagine/images/spinbox-indicator-down.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down, disabled
+ \li \image imagine/images/spinbox-indicator-down-disabled.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down, pressed
+ \li \image imagine/images/spinbox-indicator-down-pressed.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down, focused
+ \li \image imagine/images/spinbox-indicator-down-focused.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down, mirrored
+ \li \image imagine/images/spinbox-indicator-down-mirrored.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down, hovered
+ \li \image imagine/images/spinbox-indicator-down-hovered.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down, editable
+ \li \image imagine/images/spinbox-indicator-down-editable.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down, editable, pressed
+ \li \image imagine/images/spinbox-indicator-down-editable-pressed.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down, editable, focused
+ \li \image imagine/images/spinbox-indicator-down-editable-focused.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down, editable, mirrored
+ \li \image imagine/images/spinbox-indicator-down-editable-mirrored.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li down, editable, hovered
+ \li \image imagine/images/spinbox-indicator-down-editable-hovered.9.png
+ \li
+ \row
+ \li \l SwipeDelegate
+ \li background
+ \li
+ \li \image imagine/images/swipedelegate-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/swipedelegate-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/swipedelegate-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/swipedelegate-background-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/swipedelegate-background-hovered.9.png
+ \li
+ \row
+ \li \l Switch
+ \li indicator
+ \li
+ \li \image imagine/images/switch-indicator.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li disabled
+ \li \image imagine/images/switch-indicator-disabled.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li pressed
+ \li \image imagine/images/switch-indicator-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked
+ \li \image imagine/images/switch-indicator-checked.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, focused
+ \li \image imagine/images/switch-indicator-checked-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, hovered
+ \li \image imagine/images/switch-indicator-checked-hovered.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, pressed
+ \li \image imagine/images/switch-indicator-checked-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li focused
+ \li \image imagine/images/switch-indicator-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li hovered
+ \li \image imagine/images/switch-indicator-hovered.png
+ \li
+ \row
+ \li
+ \li handle
+ \li
+ \li \image imagine/images/switch-handle.png
+ \li
+ \row
+ \li
+ \li handle
+ \li disabled
+ \li \image imagine/images/switch-handle-disabled.png
+ \li
+ \row
+ \li
+ \li handle
+ \li pressed
+ \li \image imagine/images/switch-handle-pressed.png
+ \li
+ \row
+ \li \l SwitchDelegate
+ \li background
+ \li
+ \li \image imagine/images/switchdelegate-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/switchdelegate-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/switchdelegate-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked
+ \li \image imagine/images/switchdelegate-background-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/switchdelegate-background-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/switchdelegate-background-hovered.9.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li
+ \li \image imagine/images/switchdelegate-indicator.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li disabled
+ \li \image imagine/images/switchdelegate-indicator-disabled.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li pressed
+ \li \image imagine/images/switchdelegate-indicator-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked
+ \li \image imagine/images/switchdelegate-indicator-checked.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, focused
+ \li \image imagine/images/switchdelegate-indicator-checked-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, hovered
+ \li \image imagine/images/switchdelegate-indicator-checked-hovered.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li checked, pressed
+ \li \image imagine/images/switchdelegate-indicator-checked-pressed.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li focused
+ \li \image imagine/images/switchdelegate-indicator-focused.png
+ \li
+ \row
+ \li
+ \li indicator
+ \li hovered
+ \li \image imagine/images/switchdelegate-indicator-hovered.png
+ \li
+ \row
+ \li
+ \li handle
+ \li
+ \li \image imagine/images/switchdelegate-handle.png
+ \li
+ \row
+ \li
+ \li handle
+ \li disabled
+ \li \image imagine/images/switchdelegate-handle-disabled.png
+ \li
+ \row
+ \li \l TabBar
+ \li background
+ \li
+ \li \image imagine/images/tabbar-background.png
+ \li
+ \row
+ \li \l TabButton
+ \li background
+ \li
+ \li \image imagine/images/tabbutton-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/tabbutton-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/tabbutton-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked
+ \li \image imagine/images/tabbutton-background-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/tabbutton-background-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled, checked
+ \li \image imagine/images/tabbutton-background-disabled-checked.9.png
+ \li
+ \row
+ \li \l TextArea
+ \li background
+ \li
+ \li \image imagine/images/textarea-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/textarea-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/textarea-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/textarea-background-focused.9.png
+ \li
+ \row
+ \li \l TextField
+ \li background
+ \li
+ \li \image imagine/images/textfield-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled
+ \li \image imagine/images/textfield-background-disabled.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/textfield-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/textfield-background-focused.9.png
+ \li
+ \row
+ \li \l ToolBar
+ \li background
+ \li
+ \li \image imagine/images/toolbar-background.png
+ \li
+ \row
+ \li \l ToolButton
+ \li background
+ \li
+ \li \image imagine/images/toolbutton-background.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li disabled, checked
+ \li \image imagine/images/toolbutton-background-disabled-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li focused
+ \li \image imagine/images/toolbutton-background-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li pressed
+ \li \image imagine/images/toolbutton-background-pressed.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked
+ \li \image imagine/images/toolbutton-background-checked.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked, focused
+ \li \image imagine/images/toolbutton-background-checked-focused.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li checked, hovered
+ \li \image imagine/images/toolbutton-background-checked-hovered.9.png
+ \li
+ \row
+ \li
+ \li background
+ \li hovered
+ \li \image imagine/images/toolbutton-background-hovered.9.png
+ \li
+ \row
+ \li \l ToolSeparator
+ \li separator
+ \li horizontal
+ \li \image imagine/images/toolseparator-separator-horizontal.9.png
+ \li
+ \row
+ \li
+ \li separator
+ \li vertical
+ \li \image imagine/images/toolseparator-separator-vertical.9.png
+ \li
+ \row
+ \li \l ToolTip
+ \li background
+ \li
+ \li \image imagine/images/tooltip-background.9.png
+ \li
+ \endtable
+
+ \target sup1
+ \sup 1 A 1x1 image containing one color, stretched to fill the control.
+
\section2 9-Patch Images
The Imagine style uses \l
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
index 97f5e926..21eca464 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
@@ -45,6 +45,13 @@
The \l {Fusion Style} is a platform-agnostic style that offers a desktop-oriented
look'n'feel for Qt Quick Controls 2.
+ \section2 Imagine Style
+
+ \image qtquickcontrols2-imagine-thumbnail.png
+ The \l {Imagine Style} is based on image assets. The style comes with a default
+ set of images which can easily be changed by providing a directory
+ with images using a predefined naming convention.
+
\section2 Material Style
\image qtquickcontrols2-material-thumbnail.png
diff --git a/src/imports/controls/imagine/ApplicationWindow.qml b/src/imports/controls/imagine/ApplicationWindow.qml
index 59e706b8..8600e8d6 100644
--- a/src/imports/controls/imagine/ApplicationWindow.qml
+++ b/src/imports/controls/imagine/ApplicationWindow.qml
@@ -45,7 +45,7 @@ T.ApplicationWindow {
// ### remove?
overlay.modal: NinePatchImage {
- source: Imagine.path + "applicationwindow-overlay"
+ source: Imagine.url + "applicationwindow-overlay"
NinePatchImageSelector on source {
states: [
{"modal": true}
@@ -55,7 +55,7 @@ T.ApplicationWindow {
// ### remove?
overlay.modeless: NinePatchImage {
- source: Imagine.path + "applicationwindow-overlay"
+ source: Imagine.url + "applicationwindow-overlay"
NinePatchImageSelector on source {
states: [
{"modal": false}
@@ -67,7 +67,7 @@ T.ApplicationWindow {
width: window.width
height: window.height
- source: Imagine.path + "applicationwindow-background"
+ source: Imagine.url + "applicationwindow-background"
NinePatchImageSelector on source {
states: [
{"active": window.active}
diff --git a/src/imports/controls/imagine/BusyIndicator.qml b/src/imports/controls/imagine/BusyIndicator.qml
index 32e11314..d373dcfd 100644
--- a/src/imports/controls/imagine/BusyIndicator.qml
+++ b/src/imports/controls/imagine/BusyIndicator.qml
@@ -58,7 +58,7 @@ T.BusyIndicator {
visible: control.running || animator.running
Behavior on opacity { OpacityAnimator { id: animator; duration: 250 } }
- source: Imagine.path + "busyindicator-animation"
+ source: Imagine.url + "busyindicator-animation"
AnimatedImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -74,7 +74,7 @@ T.BusyIndicator {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "busyindicator-background"
+ source: Imagine.url + "busyindicator-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/Button.qml b/src/imports/controls/imagine/Button.qml
index 8a197d4e..7c8ab584 100644
--- a/src/imports/controls/imagine/Button.qml
+++ b/src/imports/controls/imagine/Button.qml
@@ -81,7 +81,7 @@ T.Button {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "button-background"
+ source: Imagine.url + "button-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/CheckBox.qml b/src/imports/controls/imagine/CheckBox.qml
index 4774cd23..db0a6680 100644
--- a/src/imports/controls/imagine/CheckBox.qml
+++ b/src/imports/controls/imagine/CheckBox.qml
@@ -60,7 +60,7 @@ T.CheckBox {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- source: Imagine.path + "checkbox-indicator"
+ source: Imagine.url + "checkbox-indicator"
ImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -92,7 +92,7 @@ T.CheckBox {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "checkbox-background"
+ source: Imagine.url + "checkbox-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/CheckDelegate.qml b/src/imports/controls/imagine/CheckDelegate.qml
index 95000651..76cd89c4 100644
--- a/src/imports/controls/imagine/CheckDelegate.qml
+++ b/src/imports/controls/imagine/CheckDelegate.qml
@@ -66,7 +66,7 @@ T.CheckDelegate {
x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
y: control.topPadding + (control.availableHeight - height) / 2
- source: Imagine.path + "checkdelegate-indicator"
+ source: Imagine.url + "checkdelegate-indicator"
ImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -101,7 +101,7 @@ T.CheckDelegate {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "checkdelegate-background"
+ source: Imagine.url + "checkdelegate-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/ComboBox.qml b/src/imports/controls/imagine/ComboBox.qml
index 7f47eb57..fc9fce61 100644
--- a/src/imports/controls/imagine/ComboBox.qml
+++ b/src/imports/controls/imagine/ComboBox.qml
@@ -65,7 +65,7 @@ T.ComboBox {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
- source: Imagine.path + "combobox-indicator"
+ source: Imagine.url + "combobox-indicator"
ImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -107,7 +107,7 @@ T.ComboBox {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "combobox-background"
+ source: Imagine.url + "combobox-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -155,7 +155,7 @@ T.ComboBox {
width: control.popup.width + leftInset + rightInset
height: control.popup.height + topInset + bottomInset
- source: Imagine.path + "combobox-popup"
+ source: Imagine.url + "combobox-popup"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/DelayButton.qml b/src/imports/controls/imagine/DelayButton.qml
index 4994dbb2..14db2b96 100644
--- a/src/imports/controls/imagine/DelayButton.qml
+++ b/src/imports/controls/imagine/DelayButton.qml
@@ -74,7 +74,7 @@ T.DelayButton {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "delaybutton-background"
+ source: Imagine.url + "delaybutton-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -92,7 +92,7 @@ T.DelayButton {
height: parent.height
visible: false
- source: Imagine.path + "delaybutton-progress"
+ source: Imagine.url + "delaybutton-progress"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -111,7 +111,7 @@ T.DelayButton {
height: parent.height
visible: false
- source: Imagine.path + "delaybutton-mask"
+ source: Imagine.url + "delaybutton-mask"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/Dial.qml b/src/imports/controls/imagine/Dial.qml
index 8f7054f5..e9652249 100644
--- a/src/imports/controls/imagine/Dial.qml
+++ b/src/imports/controls/imagine/Dial.qml
@@ -56,7 +56,7 @@ T.Dial {
x: background.x + background.width / 2 - handle.width / 2
y: background.y + background.height / 2 - handle.height / 2
- source: Imagine.path + "dial-handle"
+ source: Imagine.url + "dial-handle"
ImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -85,7 +85,7 @@ T.Dial {
width: Math.max(64, Math.min(control.width, control.height))
height: width
- source: Imagine.path + "dial-background"
+ source: Imagine.url + "dial-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/Dialog.qml b/src/imports/controls/imagine/Dialog.qml
index d3d8a591..67215ec5 100644
--- a/src/imports/controls/imagine/Dialog.qml
+++ b/src/imports/controls/imagine/Dialog.qml
@@ -65,7 +65,7 @@ T.Dialog {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "dialog-background"
+ source: Imagine.url + "dialog-background"
NinePatchImageSelector on source {
states: [
{"modal": control.modal},
@@ -85,7 +85,7 @@ T.Dialog {
width: parent.width
height: parent.height
- source: Imagine.path + "dialog-title"
+ source: Imagine.url + "dialog-title"
NinePatchImageSelector on source {
states: [
{"modal": control.modal},
@@ -100,7 +100,7 @@ T.Dialog {
}
T.Overlay.modal: NinePatchImage {
- source: Imagine.path + "dialog-overlay"
+ source: Imagine.url + "dialog-overlay"
NinePatchImageSelector on source {
states: [
{"modal": true}
@@ -109,7 +109,7 @@ T.Dialog {
}
T.Overlay.modeless: NinePatchImage {
- source: Imagine.path + "dialog-overlay"
+ source: Imagine.url + "dialog-overlay"
NinePatchImageSelector on source {
states: [
{"modal": false}
diff --git a/src/imports/controls/imagine/DialogButtonBox.qml b/src/imports/controls/imagine/DialogButtonBox.qml
index f14a6604..d24ad4ee 100644
--- a/src/imports/controls/imagine/DialogButtonBox.qml
+++ b/src/imports/controls/imagine/DialogButtonBox.qml
@@ -75,7 +75,7 @@ T.DialogButtonBox {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "dialogbuttonbox-background"
+ source: Imagine.url + "dialogbuttonbox-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/Drawer.qml b/src/imports/controls/imagine/Drawer.qml
index 77981b11..d4bf5a7c 100644
--- a/src/imports/controls/imagine/Drawer.qml
+++ b/src/imports/controls/imagine/Drawer.qml
@@ -63,7 +63,7 @@ T.Drawer {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "drawer-background"
+ source: Imagine.url + "drawer-background"
NinePatchImageSelector on source {
states: [
{"modal": control.modal},
@@ -77,7 +77,7 @@ T.Drawer {
}
T.Overlay.modal: NinePatchImage {
- source: Imagine.path + "drawer-overlay"
+ source: Imagine.url + "drawer-overlay"
NinePatchImageSelector on source {
states: [
{"modal": true}
@@ -86,7 +86,7 @@ T.Drawer {
}
T.Overlay.modeless: NinePatchImage {
- source: Imagine.path + "drawer-overlay"
+ source: Imagine.url + "drawer-overlay"
NinePatchImageSelector on source {
states: [
{"modal": false}
diff --git a/src/imports/controls/imagine/Frame.qml b/src/imports/controls/imagine/Frame.qml
index 2d722f99..4c9b87d3 100644
--- a/src/imports/controls/imagine/Frame.qml
+++ b/src/imports/controls/imagine/Frame.qml
@@ -58,7 +58,7 @@ T.Frame {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "frame-background"
+ source: Imagine.url + "frame-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/GroupBox.qml b/src/imports/controls/imagine/GroupBox.qml
index 3f72ed3b..88e8d21c 100644
--- a/src/imports/controls/imagine/GroupBox.qml
+++ b/src/imports/controls/imagine/GroupBox.qml
@@ -78,7 +78,7 @@ T.GroupBox {
width: parent.width
height: parent.height
- source: Imagine.path + "groupbox-title"
+ source: Imagine.url + "groupbox-title"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -94,7 +94,7 @@ T.GroupBox {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset - control.topPadding + control.padding
- source: Imagine.path + "groupbox-background"
+ source: Imagine.url + "groupbox-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/ItemDelegate.qml b/src/imports/controls/imagine/ItemDelegate.qml
index 85e9cbc1..6d1d7bbe 100644
--- a/src/imports/controls/imagine/ItemDelegate.qml
+++ b/src/imports/controls/imagine/ItemDelegate.qml
@@ -79,7 +79,7 @@ T.ItemDelegate {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "itemdelegate-background"
+ source: Imagine.url + "itemdelegate-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/Label.qml b/src/imports/controls/imagine/Label.qml
index 9d121db1..c73954b2 100644
--- a/src/imports/controls/imagine/Label.qml
+++ b/src/imports/controls/imagine/Label.qml
@@ -50,7 +50,7 @@ T.Label {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "label-background"
+ source: Imagine.url + "label-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/Menu.qml b/src/imports/controls/imagine/Menu.qml
index 1c7a2cbf..83953d05 100644
--- a/src/imports/controls/imagine/Menu.qml
+++ b/src/imports/controls/imagine/Menu.qml
@@ -76,7 +76,7 @@ T.Menu {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "menu-background"
+ source: Imagine.url + "menu-background"
NinePatchImageSelector on source {
states: [
{"modal": control.modal},
@@ -86,7 +86,7 @@ T.Menu {
}
T.Overlay.modal: NinePatchImage {
- source: Imagine.path + "menu-overlay"
+ source: Imagine.url + "menu-overlay"
NinePatchImageSelector on source {
states: [
{"modal": true}
@@ -95,7 +95,7 @@ T.Menu {
}
T.Overlay.modeless: NinePatchImage {
- source: Imagine.path + "menu-overlay"
+ source: Imagine.url + "menu-overlay"
NinePatchImageSelector on source {
states: [
{"modal": false}
diff --git a/src/imports/controls/imagine/MenuItem.qml b/src/imports/controls/imagine/MenuItem.qml
index ab242d2b..80d6f2cd 100644
--- a/src/imports/controls/imagine/MenuItem.qml
+++ b/src/imports/controls/imagine/MenuItem.qml
@@ -84,7 +84,7 @@ T.MenuItem {
y: control.topPadding + (control.availableHeight - height) / 2
visible: control.subMenu
- source: Imagine.path + "menuitem-arrow"
+ source: Imagine.url + "menuitem-arrow"
ImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -103,7 +103,7 @@ T.MenuItem {
y: control.topPadding + (control.availableHeight - height) / 2
visible: control.checkable
- source: Imagine.path + "menuitem-indicator"
+ source: Imagine.url + "menuitem-indicator"
ImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -122,7 +122,7 @@ T.MenuItem {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "menuitem-background"
+ source: Imagine.url + "menuitem-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/MenuSeparator.qml b/src/imports/controls/imagine/MenuSeparator.qml
index 2d83ffca..a14fe9a6 100644
--- a/src/imports/controls/imagine/MenuSeparator.qml
+++ b/src/imports/controls/imagine/MenuSeparator.qml
@@ -53,7 +53,7 @@ T.MenuSeparator {
bottomPadding: background ? background.bottomPadding : 0
contentItem: NinePatchImage {
- source: Imagine.path + "menuseparator-separator"
+ source: Imagine.url + "menuseparator-separator"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -67,7 +67,7 @@ T.MenuSeparator {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "menuseparator-background"
+ source: Imagine.url + "menuseparator-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/Page.qml b/src/imports/controls/imagine/Page.qml
index 9c9dcc91..72f54830 100644
--- a/src/imports/controls/imagine/Page.qml
+++ b/src/imports/controls/imagine/Page.qml
@@ -64,7 +64,7 @@ T.Page {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "page-background"
+ source: Imagine.url + "page-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/PageIndicator.qml b/src/imports/controls/imagine/PageIndicator.qml
index 908ba5a2..156033e2 100644
--- a/src/imports/controls/imagine/PageIndicator.qml
+++ b/src/imports/controls/imagine/PageIndicator.qml
@@ -53,7 +53,7 @@ T.PageIndicator {
bottomPadding: background ? background.bottomPadding : 0
delegate: Image {
- source: Imagine.path + "pageindicator-delegate"
+ source: Imagine.url + "pageindicator-delegate"
ImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -79,7 +79,7 @@ T.PageIndicator {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "pageindicator-background"
+ source: Imagine.url + "pageindicator-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/Pane.qml b/src/imports/controls/imagine/Pane.qml
index 3c2a232b..a1899149 100644
--- a/src/imports/controls/imagine/Pane.qml
+++ b/src/imports/controls/imagine/Pane.qml
@@ -58,7 +58,7 @@ T.Pane {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "pane-background"
+ source: Imagine.url + "pane-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/Popup.qml b/src/imports/controls/imagine/Popup.qml
index da4d9618..a111df3a 100644
--- a/src/imports/controls/imagine/Popup.qml
+++ b/src/imports/controls/imagine/Popup.qml
@@ -60,7 +60,7 @@ T.Popup {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "popup-background"
+ source: Imagine.url + "popup-background"
NinePatchImageSelector on source {
states: [
{"modal": control.modal},
@@ -70,7 +70,7 @@ T.Popup {
}
T.Overlay.modal: NinePatchImage {
- source: Imagine.path + "popup-overlay"
+ source: Imagine.url + "popup-overlay"
NinePatchImageSelector on source {
states: [
{"modal": true}
@@ -79,7 +79,7 @@ T.Popup {
}
T.Overlay.modeless: NinePatchImage {
- source: Imagine.path + "popup-overlay"
+ source: Imagine.url + "popup-overlay"
NinePatchImageSelector on source {
states: [
{"modal": false}
diff --git a/src/imports/controls/imagine/ProgressBar.qml b/src/imports/controls/imagine/ProgressBar.qml
index 5ddfcf03..5cfc292c 100644
--- a/src/imports/controls/imagine/ProgressBar.qml
+++ b/src/imports/controls/imagine/ProgressBar.qml
@@ -64,7 +64,7 @@ T.ProgressBar {
height: parent.height
visible: !control.indeterminate && mask.status === Image.Null
- source: Imagine.path + "progressbar-progress"
+ source: Imagine.url + "progressbar-progress"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -82,7 +82,7 @@ T.ProgressBar {
playing: control.indeterminate
visible: control.indeterminate && mask.status === Image.Null
- source: Imagine.path + "progressbar-animation"
+ source: Imagine.url + "progressbar-animation"
AnimatedImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -98,7 +98,7 @@ T.ProgressBar {
height: parent.height
visible: false
- source: Imagine.path + "progressbar-mask"
+ source: Imagine.url + "progressbar-mask"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -127,7 +127,7 @@ T.ProgressBar {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "progressbar-background"
+ source: Imagine.url + "progressbar-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/RadioButton.qml b/src/imports/controls/imagine/RadioButton.qml
index 7ad2bd12..4a111bc3 100644
--- a/src/imports/controls/imagine/RadioButton.qml
+++ b/src/imports/controls/imagine/RadioButton.qml
@@ -60,7 +60,7 @@ T.RadioButton {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- source: Imagine.path + "radiobutton-indicator"
+ source: Imagine.url + "radiobutton-indicator"
ImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -91,7 +91,7 @@ T.RadioButton {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "radiobutton-background"
+ source: Imagine.url + "radiobutton-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/RadioDelegate.qml b/src/imports/controls/imagine/RadioDelegate.qml
index ced68e52..e7e37b0b 100644
--- a/src/imports/controls/imagine/RadioDelegate.qml
+++ b/src/imports/controls/imagine/RadioDelegate.qml
@@ -66,7 +66,7 @@ T.RadioDelegate {
x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
y: control.topPadding + (control.availableHeight - height) / 2
- source: Imagine.path + "radiodelegate-indicator"
+ source: Imagine.url + "radiodelegate-indicator"
ImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -100,7 +100,7 @@ T.RadioDelegate {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "radiodelegate-background"
+ source: Imagine.url + "radiodelegate-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/RangeSlider.qml b/src/imports/controls/imagine/RangeSlider.qml
index e00b3eb0..5c7ee70e 100644
--- a/src/imports/controls/imagine/RangeSlider.qml
+++ b/src/imports/controls/imagine/RangeSlider.qml
@@ -58,7 +58,7 @@ T.RangeSlider {
x: control.leftPadding + (control.horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height))
- source: Imagine.path + "rangeslider-handle"
+ source: Imagine.url + "rangeslider-handle"
ImageSelector on source {
states: [
{"first": true},
@@ -77,7 +77,7 @@ T.RangeSlider {
x: control.leftPadding + (control.horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height))
- source: Imagine.path + "rangeslider-handle"
+ source: Imagine.url + "rangeslider-handle"
ImageSelector on source {
states: [
{"second": true},
@@ -98,7 +98,7 @@ T.RangeSlider {
height: control.height + topInset + bottomInset
scale: control.horizontal && control.mirrored ? -1 : 1
- source: Imagine.path + "rangeslider-background"
+ source: Imagine.url + "rangeslider-background"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
@@ -116,7 +116,7 @@ T.RangeSlider {
width: control.horizontal ? control.second.position * (parent.width - control.first.handle.width) - control.first.position * (parent.width - control.first.handle.width) : parent.width
height: control.vertical ? control.second.position * (parent.height - control.first.handle.height) - control.first.position * (parent.height - control.first.handle.height): parent.height
- source: Imagine.path + "rangeslider-progress"
+ source: Imagine.url + "rangeslider-progress"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
diff --git a/src/imports/controls/imagine/RoundButton.qml b/src/imports/controls/imagine/RoundButton.qml
index f0e6579d..b4d25343 100644
--- a/src/imports/controls/imagine/RoundButton.qml
+++ b/src/imports/controls/imagine/RoundButton.qml
@@ -72,7 +72,7 @@ T.RoundButton {
height: control.height + topInset + bottomInset
// ### TODO: radius?
- source: Imagine.path + "roundbutton-background"
+ source: Imagine.url + "roundbutton-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/ScrollBar.qml b/src/imports/controls/imagine/ScrollBar.qml
index 85c3730d..49c8d1f0 100644
--- a/src/imports/controls/imagine/ScrollBar.qml
+++ b/src/imports/controls/imagine/ScrollBar.qml
@@ -58,7 +58,7 @@ T.ScrollBar {
width: control.availableWidth
height: control.availableHeight
- source: Imagine.path + "scrollbar-handle"
+ source: Imagine.url + "scrollbar-handle"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
@@ -78,7 +78,7 @@ T.ScrollBar {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "scrollbar-background"
+ source: Imagine.url + "scrollbar-background"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
diff --git a/src/imports/controls/imagine/ScrollIndicator.qml b/src/imports/controls/imagine/ScrollIndicator.qml
index bafa4bc6..a2d0e94f 100644
--- a/src/imports/controls/imagine/ScrollIndicator.qml
+++ b/src/imports/controls/imagine/ScrollIndicator.qml
@@ -56,7 +56,7 @@ T.ScrollIndicator {
width: control.availableWidth
height: control.availableHeight
- source: Imagine.path + "scrollindicator-handle"
+ source: Imagine.url + "scrollindicator-handle"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
@@ -74,7 +74,7 @@ T.ScrollIndicator {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "scrollindicator-background"
+ source: Imagine.url + "scrollindicator-background"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
diff --git a/src/imports/controls/imagine/Slider.qml b/src/imports/controls/imagine/Slider.qml
index fc46ecdb..d42af8c6 100644
--- a/src/imports/controls/imagine/Slider.qml
+++ b/src/imports/controls/imagine/Slider.qml
@@ -56,7 +56,7 @@ T.Slider {
x: control.leftPadding + (control.horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))
- source: Imagine.path + "slider-handle"
+ source: Imagine.url + "slider-handle"
ImageSelector on source {
states: [
{"vertical": control.vertical},
@@ -76,7 +76,7 @@ T.Slider {
height: control.height + topInset + bottomInset
scale: control.horizontal && control.mirrored ? -1 : 1
- source: Imagine.path + "slider-background"
+ source: Imagine.url + "slider-background"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
@@ -101,7 +101,7 @@ T.Slider {
? control.handle.height / 2 + control.position * (parent.height - control.handle.height)
: parent.height
- source: Imagine.path + "slider-progress"
+ source: Imagine.url + "slider-progress"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
diff --git a/src/imports/controls/imagine/SpinBox.qml b/src/imports/controls/imagine/SpinBox.qml
index 0b92d2b3..db1ae992 100644
--- a/src/imports/controls/imagine/SpinBox.qml
+++ b/src/imports/controls/imagine/SpinBox.qml
@@ -85,7 +85,7 @@ T.SpinBox {
height: control.height
visible: control.editable
- source: Imagine.path + "spinbox-editor"
+ source: Imagine.url + "spinbox-editor"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -102,7 +102,7 @@ T.SpinBox {
x: control.mirrored ? 0 : parent.width - width
height: parent.height
- source: Imagine.path + "spinbox-indicator"
+ source: Imagine.url + "spinbox-indicator"
NinePatchImageSelector on source {
states: [
{"up": true},
@@ -121,7 +121,7 @@ T.SpinBox {
x: control.mirrored ? parent.width - width : 0
height: parent.height
- source: Imagine.path + "spinbox-indicator"
+ source: Imagine.url + "spinbox-indicator"
NinePatchImageSelector on source {
states: [
{"down": true},
@@ -140,7 +140,7 @@ T.SpinBox {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "spinbox-background"
+ source: Imagine.url + "spinbox-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/StackView.qml b/src/imports/controls/imagine/StackView.qml
index 0c7cd4c8..8d749519 100644
--- a/src/imports/controls/imagine/StackView.qml
+++ b/src/imports/controls/imagine/StackView.qml
@@ -79,7 +79,7 @@ T.StackView {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "stackview-background"
+ source: Imagine.url + "stackview-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/SwipeDelegate.qml b/src/imports/controls/imagine/SwipeDelegate.qml
index 7b9b2e19..23edfc58 100644
--- a/src/imports/controls/imagine/SwipeDelegate.qml
+++ b/src/imports/controls/imagine/SwipeDelegate.qml
@@ -81,7 +81,7 @@ T.SwipeDelegate {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "swipedelegate-background"
+ source: Imagine.url + "swipedelegate-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/SwipeView.qml b/src/imports/controls/imagine/SwipeView.qml
index ba7f6e0c..f997be0d 100644
--- a/src/imports/controls/imagine/SwipeView.qml
+++ b/src/imports/controls/imagine/SwipeView.qml
@@ -73,7 +73,7 @@ T.SwipeView {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "swipeview-background"
+ source: Imagine.url + "swipeview-background"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
diff --git a/src/imports/controls/imagine/Switch.qml b/src/imports/controls/imagine/Switch.qml
index c27bd36c..f9878851 100644
--- a/src/imports/controls/imagine/Switch.qml
+++ b/src/imports/controls/imagine/Switch.qml
@@ -62,7 +62,7 @@ T.Switch {
width: Math.max(implicitWidth, handle.leftPadding && handle.rightPadding ? handle.implicitWidth : 2 * handle.implicitWidth)
height: Math.max(implicitHeight, handle.implicitHeight)
- source: Imagine.path + "switch-indicator"
+ source: Imagine.url + "switch-indicator"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -83,7 +83,7 @@ T.Switch {
x: Math.max(minPos, Math.min(maxPos, control.visualPosition * parent.width - (width / 2)))
y: (parent.height - height) / 2
- source: Imagine.path + "switch-handle"
+ source: Imagine.url + "switch-handle"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -120,7 +120,7 @@ T.Switch {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "switch-background"
+ source: Imagine.url + "switch-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/SwitchDelegate.qml b/src/imports/controls/imagine/SwitchDelegate.qml
index 150c9eca..497bc4e5 100644
--- a/src/imports/controls/imagine/SwitchDelegate.qml
+++ b/src/imports/controls/imagine/SwitchDelegate.qml
@@ -68,7 +68,7 @@ T.SwitchDelegate {
width: Math.max(implicitWidth, handle.leftPadding && handle.rightPadding ? handle.implicitWidth : 2 * handle.implicitWidth)
height: Math.max(implicitHeight, handle.implicitHeight)
- source: Imagine.path + "switchdelegate-indicator"
+ source: Imagine.url + "switchdelegate-indicator"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -90,7 +90,7 @@ T.SwitchDelegate {
x: Math.max(minPos, Math.min(maxPos, control.visualPosition * parent.width - (width / 2)))
y: (parent.height - height) / 2
- source: Imagine.path + "switchdelegate-handle"
+ source: Imagine.url + "switchdelegate-handle"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
@@ -130,7 +130,7 @@ T.SwitchDelegate {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "switchdelegate-background"
+ source: Imagine.url + "switchdelegate-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/TabBar.qml b/src/imports/controls/imagine/TabBar.qml
index 333c5f19..be143bf1 100644
--- a/src/imports/controls/imagine/TabBar.qml
+++ b/src/imports/controls/imagine/TabBar.qml
@@ -73,7 +73,7 @@ T.TabBar {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "tabbar-background"
+ source: Imagine.url + "tabbar-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/TabButton.qml b/src/imports/controls/imagine/TabButton.qml
index 4665d356..d4098c9e 100644
--- a/src/imports/controls/imagine/TabButton.qml
+++ b/src/imports/controls/imagine/TabButton.qml
@@ -77,7 +77,7 @@ T.TabButton {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "tabbutton-background"
+ source: Imagine.url + "tabbutton-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/TextArea.qml b/src/imports/controls/imagine/TextArea.qml
index 6287a0b0..49153b5d 100644
--- a/src/imports/controls/imagine/TextArea.qml
+++ b/src/imports/controls/imagine/TextArea.qml
@@ -82,7 +82,7 @@ T.TextArea {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "textarea-background"
+ source: Imagine.url + "textarea-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/TextField.qml b/src/imports/controls/imagine/TextField.qml
index 0e5ddae5..09ef5bcb 100644
--- a/src/imports/controls/imagine/TextField.qml
+++ b/src/imports/controls/imagine/TextField.qml
@@ -82,7 +82,7 @@ T.TextField {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "textfield-background"
+ source: Imagine.url + "textfield-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/ToolBar.qml b/src/imports/controls/imagine/ToolBar.qml
index 2b201f5d..289566ec 100644
--- a/src/imports/controls/imagine/ToolBar.qml
+++ b/src/imports/controls/imagine/ToolBar.qml
@@ -58,7 +58,7 @@ T.ToolBar {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "toolbar-background"
+ source: Imagine.url + "toolbar-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/ToolButton.qml b/src/imports/controls/imagine/ToolButton.qml
index 373c2174..63260ff5 100644
--- a/src/imports/controls/imagine/ToolButton.qml
+++ b/src/imports/controls/imagine/ToolButton.qml
@@ -77,7 +77,7 @@ T.ToolButton {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "toolbutton-background"
+ source: Imagine.url + "toolbutton-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/ToolSeparator.qml b/src/imports/controls/imagine/ToolSeparator.qml
index 8b28f766..88b645cb 100644
--- a/src/imports/controls/imagine/ToolSeparator.qml
+++ b/src/imports/controls/imagine/ToolSeparator.qml
@@ -53,7 +53,7 @@ T.ToolSeparator {
bottomPadding: background ? background.bottomPadding : 0
contentItem: NinePatchImage {
- source: Imagine.path + "toolseparator-separator"
+ source: Imagine.url + "toolseparator-separator"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
@@ -69,7 +69,7 @@ T.ToolSeparator {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "toolseparator-background"
+ source: Imagine.url + "toolseparator-background"
NinePatchImageSelector on source {
states: [
{"vertical": control.vertical},
diff --git a/src/imports/controls/imagine/ToolTip.qml b/src/imports/controls/imagine/ToolTip.qml
index 917d22db..81a5e8aa 100644
--- a/src/imports/controls/imagine/ToolTip.qml
+++ b/src/imports/controls/imagine/ToolTip.qml
@@ -74,7 +74,7 @@ T.ToolTip {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "tooltip-background"
+ source: Imagine.url + "tooltip-background"
NinePatchImageSelector on source {
states: [
// ###
diff --git a/src/imports/controls/imagine/Tumbler.qml b/src/imports/controls/imagine/Tumbler.qml
index ef6c29c9..7cd2b6a9 100644
--- a/src/imports/controls/imagine/Tumbler.qml
+++ b/src/imports/controls/imagine/Tumbler.qml
@@ -76,7 +76,7 @@ T.Tumbler {
width: control.width + leftInset + rightInset
height: control.height + topInset + bottomInset
- source: Imagine.path + "tumbler-background"
+ source: Imagine.url + "tumbler-background"
NinePatchImageSelector on source {
states: [
{"disabled": !control.enabled},
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-disabled.png b/src/imports/controls/imagine/images/menuitem-arrow-disabled.png
index 990c92ae..e9d77838 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-disabled.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-disabled@2x.png b/src/imports/controls/imagine/images/menuitem-arrow-disabled@2x.png
index 4bd03ef5..62a57de4 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-disabled@2x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-disabled@3x.png b/src/imports/controls/imagine/images/menuitem-arrow-disabled@3x.png
index 4748eb2a..37591d7c 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-disabled@3x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-disabled@4x.png b/src/imports/controls/imagine/images/menuitem-arrow-disabled@4x.png
index 9201c8c8..0abd7e80 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-disabled@4x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled.png b/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled.png
index 5009cb4a..906392dd 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@2x.png b/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@2x.png
index fbbe1fc0..446970de 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@2x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@3x.png b/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@3x.png
index dd56d8df..54b63b9b 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@3x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@4x.png b/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@4x.png
index 355b92d8..77e0894b 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@4x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-mirrored.png b/src/imports/controls/imagine/images/menuitem-arrow-mirrored.png
index 6f0dd408..5009cb4a 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-mirrored.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-mirrored.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-mirrored@2x.png b/src/imports/controls/imagine/images/menuitem-arrow-mirrored@2x.png
index cfa89e19..fbbe1fc0 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-mirrored@2x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-mirrored@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-mirrored@3x.png b/src/imports/controls/imagine/images/menuitem-arrow-mirrored@3x.png
index fc0a6837..dd56d8df 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-mirrored@3x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-mirrored@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-mirrored@4x.png b/src/imports/controls/imagine/images/menuitem-arrow-mirrored@4x.png
index 2cf90cdb..355b92d8 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow-mirrored@4x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow-mirrored@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow.png b/src/imports/controls/imagine/images/menuitem-arrow.png
index 2fe97406..990c92ae 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow@2x.png b/src/imports/controls/imagine/images/menuitem-arrow@2x.png
index 2db85315..4bd03ef5 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow@2x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow@3x.png b/src/imports/controls/imagine/images/menuitem-arrow@3x.png
index e37558da..4748eb2a 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow@3x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow@4x.png b/src/imports/controls/imagine/images/menuitem-arrow@4x.png
index 5a663103..9201c8c8 100644
--- a/src/imports/controls/imagine/images/menuitem-arrow@4x.png
+++ b/src/imports/controls/imagine/images/menuitem-arrow@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused.9.png
new file mode 100644
index 00000000..0b34d6c4
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@2x.9.png
new file mode 100644
index 00000000..ae9c07c3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@3x.9.png
new file mode 100644
index 00000000..9b862ef7
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@4x.9.png
new file mode 100644
index 00000000..298d3996
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered.9.png
new file mode 100644
index 00000000..0b34d6c4
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@2x.9.png
new file mode 100644
index 00000000..ae9c07c3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@3x.9.png
new file mode 100644
index 00000000..9b862ef7
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@4x.9.png
new file mode 100644
index 00000000..298d3996
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored.9.png
new file mode 100644
index 00000000..63e48ae2
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@2x.9.png
new file mode 100644
index 00000000..eadedcd3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@3x.9.png
new file mode 100644
index 00000000..140f0d33
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@4x.9.png
new file mode 100644
index 00000000..5db63bc6
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-mirrored@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed.9.png
new file mode 100644
index 00000000..9a580be3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@2x.9.png
new file mode 100644
index 00000000..8e8192d2
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@3x.9.png
new file mode 100644
index 00000000..5a751c6a
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@4x.9.png
new file mode 100644
index 00000000..80aff885
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored.9.png
index f50434fc..63e48ae2 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@2x.9.png
index 82a7b71e..eadedcd3 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@2x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@3x.9.png
index 91ae261d..140f0d33 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@3x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@4x.9.png
index 7e93bd09..5db63bc6 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@4x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled.9.png
new file mode 100644
index 00000000..5ca41cba
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@2x.9.png
new file mode 100644
index 00000000..5efb47dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@3x.9.png
new file mode 100644
index 00000000..4ff3d439
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@4x.9.png
new file mode 100644
index 00000000..f2241ab3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused.9.png
new file mode 100644
index 00000000..648b30c4
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@2x.9.png
new file mode 100644
index 00000000..f87ce876
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@3x.9.png
new file mode 100644
index 00000000..bea3eff1
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@4x.9.png
new file mode 100644
index 00000000..44b9f81f
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered.9.png
new file mode 100644
index 00000000..648b30c4
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@2x.9.png
new file mode 100644
index 00000000..f87ce876
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@3x.9.png
new file mode 100644
index 00000000..bea3eff1
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@4x.9.png
new file mode 100644
index 00000000..44b9f81f
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed.9.png
new file mode 100644
index 00000000..eb6a9812
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@2x.9.png
new file mode 100644
index 00000000..51f20f47
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@3x.9.png
new file mode 100644
index 00000000..00082963
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@4x.9.png
new file mode 100644
index 00000000..6ae20279
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored.9.png
index e7dd2bd8..0eb5528f 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@2x.9.png
index 4ff2bc4e..7d234c78 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@2x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@3x.9.png
index 7876005b..dee53c86 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@3x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@4x.9.png
index b59c8501..df682f98 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@4x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused.9.png
new file mode 100644
index 00000000..5f05bc73
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@2x.9.png
new file mode 100644
index 00000000..c83d7574
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@3x.9.png
new file mode 100644
index 00000000..f3cffa2b
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@4x.9.png
new file mode 100644
index 00000000..4bda0ce3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered.9.png
new file mode 100644
index 00000000..5f05bc73
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@2x.9.png
new file mode 100644
index 00000000..c83d7574
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@3x.9.png
new file mode 100644
index 00000000..f3cffa2b
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@4x.9.png
new file mode 100644
index 00000000..4bda0ce3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored.9.png
new file mode 100644
index 00000000..0f946e4b
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@2x.9.png
new file mode 100644
index 00000000..8e1a3f4d
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@3x.9.png
new file mode 100644
index 00000000..e76b4a79
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@4x.9.png
new file mode 100644
index 00000000..bd256696
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-mirrored@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed.9.png
new file mode 100644
index 00000000..243ebfca
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@2x.9.png
new file mode 100644
index 00000000..79d87a9c
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@3x.9.png
new file mode 100644
index 00000000..a644865d
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@4x.9.png
new file mode 100644
index 00000000..45189533
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored.9.png
index a1dfa8b3..0f946e4b 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@2x.9.png
index f86efbd1..8e1a3f4d 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@2x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@3x.9.png
index acd9d658..e76b4a79 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@3x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@4x.9.png
index cf9d25d1..bd256696 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@4x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled.9.png
new file mode 100644
index 00000000..b5c1c5c6
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@2x.9.png
new file mode 100644
index 00000000..5246ee8e
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@3x.9.png
new file mode 100644
index 00000000..466a7e19
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@4x.9.png
new file mode 100644
index 00000000..1e510d84
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused.9.png
new file mode 100644
index 00000000..314ed022
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@2x.9.png
new file mode 100644
index 00000000..798f2e9c
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@3x.9.png
new file mode 100644
index 00000000..447dfda6
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@4x.9.png
new file mode 100644
index 00000000..b11cb7f2
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered.9.png
new file mode 100644
index 00000000..314ed022
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@2x.9.png
new file mode 100644
index 00000000..798f2e9c
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@3x.9.png
new file mode 100644
index 00000000..447dfda6
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@4x.9.png
new file mode 100644
index 00000000..b11cb7f2
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed.9.png
new file mode 100644
index 00000000..56a6a992
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@2x.9.png
new file mode 100644
index 00000000..d5329c51
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@3x.9.png
new file mode 100644
index 00000000..1667bfdf
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@4x.9.png
new file mode 100644
index 00000000..45b48332
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored.9.png
index 9a76855d..222285e3 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@2x.9.png
index b883e239..5788f366 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@2x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@3x.9.png
index b3efe0cc..1f8342c6 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@3x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@4x.9.png
index 68b90337..b19c5629 100644
--- a/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@4x.9.png
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/qquickimaginestyle.cpp b/src/imports/controls/imagine/qquickimaginestyle.cpp
index e103421e..7617fbf5 100644
--- a/src/imports/controls/imagine/qquickimaginestyle.cpp
+++ b/src/imports/controls/imagine/qquickimaginestyle.cpp
@@ -64,17 +64,16 @@ QQuickImagineStyle *QQuickImagineStyle::qmlAttachedProperties(QObject *object)
QString QQuickImagineStyle::path() const
{
- return m_path; // ### TODO: url?
+ return m_path;
}
void QQuickImagineStyle::setPath(const QString &path)
{
- QString p = ensureSlash(path);
m_explicitPath = true;
- if (m_path == p)
+ if (m_path == path)
return;
- m_path = p;
+ m_path = path;
propagatePath();
emit pathChanged();
@@ -110,6 +109,29 @@ void QQuickImagineStyle::resetPath()
inheritPath(imagine ? imagine->path() : *GlobalPath());
}
+QUrl QQuickImagineStyle::url() const
+{
+ // Using ApplicationWindow as an example, its NinePatchImage url
+ // was previously assigned like this:
+ //
+ // soruce: Imagine.path + "applicationwindow-background"
+ //
+ // If Imagine.path is set to ":/images" by the user, then the final URL would be:
+ //
+ // QUrl("file:///home/user/qt/qtbase/qml/QtQuick/Controls.2/Imagine/:/images/applicationwindow-background")
+ //
+ // To ensure that the correct URL is constructed, we do it ourselves here,
+ // and then the control QML files use the "url" property instead.
+ const QString path = ensureSlash(m_path);
+ if (path.startsWith(QLatin1String("qrc")))
+ return QUrl(path);
+
+ if (path.startsWith(QLatin1String(":/")))
+ return QUrl(QLatin1String("qrc") + path);
+
+ return QUrl::fromLocalFile(path);
+}
+
void QQuickImagineStyle::attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent)
{
Q_UNUSED(oldParent);
diff --git a/src/imports/controls/imagine/qquickimaginestyle_p.h b/src/imports/controls/imagine/qquickimaginestyle_p.h
index fc4b21b8..88b92c00 100644
--- a/src/imports/controls/imagine/qquickimaginestyle_p.h
+++ b/src/imports/controls/imagine/qquickimaginestyle_p.h
@@ -58,6 +58,7 @@ class QQuickImagineStyle : public QQuickAttachedObject
{
Q_OBJECT
Q_PROPERTY(QString path READ path WRITE setPath RESET resetPath NOTIFY pathChanged FINAL)
+ Q_PROPERTY(QUrl url READ url NOTIFY pathChanged FINAL)
public:
explicit QQuickImagineStyle(QObject *parent = nullptr);
@@ -70,6 +71,8 @@ public:
void propagatePath();
void resetPath();
+ QUrl url() const;
+
Q_SIGNALS:
void pathChanged();
diff --git a/src/imports/controls/plugins.qmltypes b/src/imports/controls/plugins.qmltypes
index 864a3df8..d5bdfefe 100644
--- a/src/imports/controls/plugins.qmltypes
+++ b/src/imports/controls/plugins.qmltypes
@@ -75,8 +75,6 @@ Module {
Property { name: "textColor"; type: "QColor"; isReadonly: true }
Property { name: "textDarkColor"; type: "QColor"; isReadonly: true }
Property { name: "textLightColor"; type: "QColor"; isReadonly: true }
- Property { name: "textLinkColor"; type: "QColor"; isReadonly: true }
- Property { name: "textSelectionColor"; type: "QColor"; isReadonly: true }
Property { name: "textDisabledColor"; type: "QColor"; isReadonly: true }
Property { name: "textDisabledLightColor"; type: "QColor"; isReadonly: true }
Property { name: "focusColor"; type: "QColor"; isReadonly: true }
@@ -103,8 +101,6 @@ Module {
Property { name: "frameLightColor"; type: "QColor"; isReadonly: true }
Property { name: "scrollBarColor"; type: "QColor"; isReadonly: true }
Property { name: "scrollBarPressedColor"; type: "QColor"; isReadonly: true }
- Property { name: "progressBarColor"; type: "QColor"; isReadonly: true }
- Property { name: "pageIndicatorColor"; type: "QColor"; isReadonly: true }
Property { name: "separatorColor"; type: "QColor"; isReadonly: true }
Property { name: "disabledDarkColor"; type: "QColor"; isReadonly: true }
Property { name: "disabledLightColor"; type: "QColor"; isReadonly: true }
diff --git a/src/imports/controls/qquickdefaultstyle.cpp b/src/imports/controls/qquickdefaultstyle.cpp
index 38c98a72..3f91eb58 100644
--- a/src/imports/controls/qquickdefaultstyle.cpp
+++ b/src/imports/controls/qquickdefaultstyle.cpp
@@ -73,16 +73,6 @@ QColor QQuickDefaultStyle::textLightColor() const
return QColor::fromRgba(0xFFFFFFFF);
}
-QColor QQuickDefaultStyle::textLinkColor() const
-{
- return QColor::fromRgba(0xFF45A7D7);
-}
-
-QColor QQuickDefaultStyle::textSelectionColor() const
-{
- return QColor::fromRgba(0xFFFDDD5C);
-}
-
QColor QQuickDefaultStyle::textDisabledColor() const
{
return QColor::fromRgba(0xFFBDBEBF);
@@ -93,6 +83,11 @@ QColor QQuickDefaultStyle::textDisabledLightColor() const
return QColor::fromRgba(0xFFC2C2C2);
}
+QColor QQuickDefaultStyle::textPlaceholderColor() const
+{
+ return QColor::fromRgba(0xFF777777);
+}
+
QColor QQuickDefaultStyle::focusColor() const
{
return QColor::fromRgba(0xFF0066FF);
@@ -213,16 +208,6 @@ QColor QQuickDefaultStyle::scrollBarPressedColor() const
return QColor::fromRgba(0xFF28282A);
}
-QColor QQuickDefaultStyle::progressBarColor() const
-{
- return QColor::fromRgba(0xFFE4E4E4);
-}
-
-QColor QQuickDefaultStyle::pageIndicatorColor() const
-{
- return QColor::fromRgba(0xFF28282A);
-}
-
QColor QQuickDefaultStyle::separatorColor() const
{
return QColor::fromRgba(0xFFCCCCCC);
diff --git a/src/imports/controls/qquickdefaultstyle_p.h b/src/imports/controls/qquickdefaultstyle_p.h
index d12587c6..e2f9bf4a 100644
--- a/src/imports/controls/qquickdefaultstyle_p.h
+++ b/src/imports/controls/qquickdefaultstyle_p.h
@@ -62,10 +62,9 @@ class QQuickDefaultStyle : public QObject
Q_PROPERTY(QColor textColor READ textColor CONSTANT FINAL)
Q_PROPERTY(QColor textDarkColor READ textDarkColor CONSTANT FINAL)
Q_PROPERTY(QColor textLightColor READ textLightColor CONSTANT FINAL)
- Q_PROPERTY(QColor textLinkColor READ textLinkColor CONSTANT FINAL)
- Q_PROPERTY(QColor textSelectionColor READ textSelectionColor CONSTANT FINAL)
Q_PROPERTY(QColor textDisabledColor READ textDisabledColor CONSTANT FINAL)
Q_PROPERTY(QColor textDisabledLightColor READ textDisabledLightColor CONSTANT FINAL)
+ Q_PROPERTY(QColor textPlaceholderColor READ textPlaceholderColor CONSTANT FINAL)
Q_PROPERTY(QColor focusColor READ focusColor CONSTANT FINAL)
Q_PROPERTY(QColor focusLightColor READ focusLightColor CONSTANT FINAL)
Q_PROPERTY(QColor focusPressedColor READ focusPressedColor CONSTANT FINAL)
@@ -90,8 +89,6 @@ class QQuickDefaultStyle : public QObject
Q_PROPERTY(QColor frameLightColor READ frameLightColor CONSTANT FINAL)
Q_PROPERTY(QColor scrollBarColor READ scrollBarColor CONSTANT FINAL)
Q_PROPERTY(QColor scrollBarPressedColor READ scrollBarPressedColor CONSTANT FINAL)
- Q_PROPERTY(QColor progressBarColor READ progressBarColor CONSTANT FINAL)
- Q_PROPERTY(QColor pageIndicatorColor READ pageIndicatorColor CONSTANT FINAL)
Q_PROPERTY(QColor separatorColor READ separatorColor CONSTANT FINAL)
Q_PROPERTY(QColor disabledDarkColor READ disabledDarkColor CONSTANT FINAL)
Q_PROPERTY(QColor disabledLightColor READ disabledLightColor CONSTANT FINAL)
@@ -109,6 +106,7 @@ public:
QColor textSelectionColor() const;
QColor textDisabledColor() const;
QColor textDisabledLightColor() const;
+ QColor textPlaceholderColor() const;
QColor focusColor() const;
QColor focusLightColor() const;
QColor focusPressedColor() const;
@@ -133,8 +131,6 @@ public:
QColor frameLightColor() const;
QColor scrollBarColor() const;
QColor scrollBarPressedColor() const;
- QColor progressBarColor() const;
- QColor pageIndicatorColor() const;
QColor separatorColor() const;
QColor disabledDarkColor() const;
QColor disabledLightColor() const;
diff --git a/src/imports/controls/qquickdefaulttheme.cpp b/src/imports/controls/qquickdefaulttheme.cpp
index f9cdcddc..60d76556 100644
--- a/src/imports/controls/qquickdefaulttheme.cpp
+++ b/src/imports/controls/qquickdefaulttheme.cpp
@@ -41,6 +41,39 @@ QT_BEGIN_NAMESPACE
QQuickDefaultTheme::QQuickDefaultTheme()
: QQuickTheme(QStringLiteral("Default"))
{
+ systemPalette.setColor(QPalette::ButtonText, QColor::fromRgba(0xFF26282A));
+ systemPalette.setColor(QPalette::Disabled, QPalette::ButtonText, QColor::fromRgba(0x4D26282A));
+
+ systemPalette.setColor(QPalette::BrightText, QColor::fromRgba(0xFFFFFFFF));
+ systemPalette.setColor(QPalette::Disabled, QPalette::BrightText, QColor::fromRgba(0x4DFFFFFF));
+
+ systemPalette.setColor(QPalette::Dark, QColor::fromRgba(0xFF353637));
+
+ systemPalette.setColor(QPalette::Highlight, QColor::fromRgba(0xFF0066FF));
+ systemPalette.setColor(QPalette::Disabled, QPalette::Highlight, QColor::fromRgba(0xFFF0F6FF));
+
+ systemPalette.setColor(QPalette::HighlightedText, QColor::fromRgba(0xFFFFFFFF));
+
+ systemPalette.setColor(QPalette::Light, QColor::fromRgba(0xFFE4E4E4));
+
+ systemPalette.setColor(QPalette::Link, QColor::fromRgba(0xFF45A7D7));
+
+ systemPalette.setColor(QPalette::Text, QColor::fromRgba(0xFF353637));
+ systemPalette.setColor(QPalette::Disabled, QPalette::Text, QColor::fromRgba(0xFFC2C2C2));
+
+ systemPalette.setColor(QPalette::ToolTipBase, QColor::fromRgba(0xFFFFFFFF));
+ systemPalette.setColor(QPalette::ToolTipText, QColor::fromRgba(0xFF000000));
+
+ systemPalette.setColor(QPalette::WindowText, QColor::fromRgba(0xFF26282A));
+ systemPalette.setColor(QPalette::Disabled, QPalette::WindowText, QColor::fromRgba(0xFFBDBEBF));
+
+ systemPalette = resolvePalette(systemPalette);
+}
+
+const QPalette *QQuickDefaultTheme::palette(QPlatformTheme::Palette type) const
+{
+ Q_UNUSED(type);
+ return &systemPalette;
}
QT_END_NAMESPACE
diff --git a/src/imports/controls/qquickdefaulttheme_p.h b/src/imports/controls/qquickdefaulttheme_p.h
index e0811dcb..16e4d061 100644
--- a/src/imports/controls/qquickdefaulttheme_p.h
+++ b/src/imports/controls/qquickdefaulttheme_p.h
@@ -56,6 +56,11 @@ class QQuickDefaultTheme : public QQuickTheme
{
public:
explicit QQuickDefaultTheme();
+
+ const QPalette *palette(Palette type) const override;
+
+private:
+ QPalette systemPalette;
};
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickapplicationwindow.cpp b/src/quicktemplates2/qquickapplicationwindow.cpp
index 872783bf..2ef84a17 100644
--- a/src/quicktemplates2/qquickapplicationwindow.cpp
+++ b/src/quicktemplates2/qquickapplicationwindow.cpp
@@ -194,6 +194,9 @@ static void layoutItem(QQuickItem *item, qreal y, qreal width)
void QQuickApplicationWindowPrivate::relayout()
{
Q_Q(QQuickApplicationWindow);
+ if (!complete)
+ return;
+
QQuickItem *content = q->contentItem();
qreal hh = header && header->isVisible() ? header->height() : 0;
qreal fh = footer && footer->isVisible() ? footer->height() : 0;
@@ -810,6 +813,7 @@ void QQuickApplicationWindow::componentComplete()
Q_D(QQuickApplicationWindow);
d->complete = true;
QQuickWindowQmlImpl::componentComplete();
+ d->relayout();
}
void QQuickApplicationWindow::resizeEvent(QResizeEvent *event)
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp
index dceda7d7..48d75f88 100644
--- a/src/quicktemplates2/qquickcombobox.cpp
+++ b/src/quicktemplates2/qquickcombobox.cpp
@@ -1422,9 +1422,12 @@ bool QQuickComboBox::eventFilter(QObject *object, QEvent *event)
d->hidePopup(false);
break;
case QEvent::KeyPress: {
- const int key = static_cast<QKeyEvent *>(event)->key();
+ QKeyEvent *ke = static_cast<QKeyEvent *>(event);
+ if (d->filterKeyEvent(ke, false))
+ return true;
+ event->accept();
if (d->extra.isAllocated())
- d->extra->allowComplete = key != Qt::Key_Backspace && key != Qt::Key_Delete;
+ d->extra->allowComplete = ke->key() != Qt::Key_Backspace && ke->key() != Qt::Key_Delete;
break;
}
case QEvent::FocusOut:
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 2f6dc9af..df6f764e 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -16,6 +16,7 @@ SUBDIRS += \
qquickcolor \
qquickiconimage \
qquickiconlabel \
+ qquickimaginestyle \
qquickmaterialstyle \
qquickmaterialstyleconf \
qquickmenubar \
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index 2b5af81b..bc110de6 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -1460,7 +1460,6 @@ TestCase {
keyPress(Qt.Key_B)
verify(control.activeFocus)
- expectFail("", "An editable ComboBox does not yet support the Keys attached property.")
verify(control.gotit)
compare(control.editText, "a")
diff --git a/tests/auto/palette/data/listview.qml b/tests/auto/palette/data/listview.qml
new file mode 100644
index 00000000..7381c310
--- /dev/null
+++ b/tests/auto/palette/data/listview.qml
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.9
+import QtQuick.Controls 2.2
+
+ApplicationWindow {
+ id: window
+ width: 200
+ height: 200
+
+ property alias listView: listView
+
+ palette.highlight: "red"
+
+ ListView {
+ id: listView
+ anchors.fill: parent
+ model: 1
+ delegate: Column {
+ property alias control: control
+ property alias label: label
+ property alias textarea: textarea
+ property alias textfield: textfield
+
+ Control { id: control }
+ Label { id: label }
+ TextArea { id: textarea }
+ TextField { id: textfield }
+ }
+ }
+}
diff --git a/tests/auto/palette/tst_palette.cpp b/tests/auto/palette/tst_palette.cpp
index 66e93ae4..f74e358a 100644
--- a/tests/auto/palette/tst_palette.cpp
+++ b/tests/auto/palette/tst_palette.cpp
@@ -44,6 +44,7 @@
#include <QtQml/qqmlcomponent.h>
#include <QtQuickTemplates2/private/qquickapplicationwindow_p.h>
#include <QtQuickTemplates2/private/qquickcontrol_p.h>
+#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
#include <QtQuickTemplates2/private/qquickpopup_p.h>
#include <QtQuickControls2/private/qquickproxytheme_p.h>
@@ -54,6 +55,8 @@ class tst_palette : public QQmlDataTest
Q_OBJECT
private slots:
+ void initTestCase();
+
void palette_data();
void palette();
@@ -62,14 +65,30 @@ private slots:
void defaultPalette_data();
void defaultPalette();
+
+ void listView_data();
+ void listView();
};
+void tst_palette::initTestCase()
+{
+ QQmlDataTest::initTestCase();
+
+ // Import QtQuick.Controls to initialize styles and themes so that
+ // QQuickControlPrivate::themePalette() returns a palette from the
+ // style's theme instead of the platform's theme.
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick.Controls 2.3; Control { }", QUrl());
+ delete component.create();
+}
+
void tst_palette::palette_data()
{
QTest::addColumn<QString>("testFile");
QTest::addColumn<QPalette>("expectedPalette");
- QPalette defaultPalette;
+ QPalette defaultPalette = QQuickControlPrivate::themePalette(QPlatformTheme::SystemPalette);
defaultPalette.setColor(QPalette::Base, QColor("#efefef"));
defaultPalette.setColor(QPalette::Text, QColor("#101010"));
@@ -153,7 +172,7 @@ void tst_palette::inheritance()
QObject *grandChild = window->property("grandChild").value<QObject *>();
QVERIFY(control && child && grandChild);
- QPalette defaultPalette;
+ QPalette defaultPalette = QQuickControlPrivate::themePalette(QPlatformTheme::SystemPalette);
defaultPalette.setColor(QPalette::Base, QColor("#efefef"));
defaultPalette.setColor(QPalette::Text, QColor("#101010"));
@@ -342,6 +361,47 @@ void tst_palette::defaultPalette()
QCOMPARE(actualPalette, *expectedPalette);
}
+void tst_palette::listView_data()
+{
+ QTest::addColumn<QString>("objectName");
+
+ QTest::newRow("Control") << "control";
+ QTest::newRow("Label") << "label";
+ QTest::newRow("TextArea") << "textarea";
+ QTest::newRow("TextField") << "textfield";
+}
+
+void tst_palette::listView()
+{
+ QFETCH(QString, objectName);
+
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.loadUrl(testFileUrl("listview.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(component.create()));
+ QVERIFY2(!window.isNull(), qPrintable(component.errorString()));
+
+ window->show();
+ QVERIFY(QTest::qWaitForWindowActive(window.data()));
+
+ QQuickItem *listView = window->property("listView").value<QQuickItem *>();
+ QVERIFY(listView);
+
+ QQuickItem *contentItem = listView->property("contentItem").value<QQuickItem *>();
+ QVERIFY(contentItem);
+
+ QVERIFY(QMetaObject::invokeMethod(listView, "forceLayout"));
+
+ QQuickItem *column = contentItem->childItems().value(0);
+ QVERIFY(column);
+
+ QQuickItem *control = column->property(objectName.toUtf8()).value<QQuickItem *>();
+ QVERIFY(control);
+
+ QCOMPARE(control->property("palette").value<QPalette>().color(QPalette::Highlight), QColor(Qt::red));
+}
+
QTEST_MAIN(tst_palette)
#include "tst_palette.moc"
diff --git a/tests/auto/qquickimaginestyle/control-assets/button-background.9.png b/tests/auto/qquickimaginestyle/control-assets/button-background.9.png
new file mode 100644
index 00000000..29bd8d7c
--- /dev/null
+++ b/tests/auto/qquickimaginestyle/control-assets/button-background.9.png
Binary files differ
diff --git a/tests/auto/qquickimaginestyle/data/tst_imagine.qml b/tests/auto/qquickimaginestyle/data/tst_imagine.qml
new file mode 100644
index 00000000..7a711dcd
--- /dev/null
+++ b/tests/auto/qquickimaginestyle/data/tst_imagine.qml
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.9
+import QtQuick.Window 2.2
+import QtTest 1.1
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Imagine 2.3
+
+TestCase {
+ id: testCase
+ width: 200
+ height: 200
+ visible: true
+ when: windowShown
+ name: "Imagine"
+
+ Component {
+ id: implicitQrcButtonComponent
+ Button {
+ Imagine.path: ":/control-assets"
+ }
+ }
+
+ Component {
+ id: explicitQrcButtonComponent
+ Button {
+ Imagine.path: "qrc:/control-assets"
+ }
+ }
+
+ function test_qrcPaths_data() {
+ return [
+ { tag: ":/control-assets", component: implicitQrcButtonComponent },
+ { tag: "qrc:/control-assets", component: explicitQrcButtonComponent }
+ ]
+ }
+
+ function test_qrcPaths(data) {
+ if (Qt.platform.pluginName === "offscreen")
+ skip("grabImage() is not functional on the offscreen platform (QTBUG-63185)")
+
+ var control = createTemporaryObject(data.component, testCase)
+ verify(control)
+ compare(control.Imagine.path, data.tag)
+ var image = grabImage(control)
+ compare(image.pixel(control.width / 2, control.height / 2), "#ff0000")
+ }
+}
diff --git a/tests/auto/qquickimaginestyle/qquickimaginestyle.pro b/tests/auto/qquickimaginestyle/qquickimaginestyle.pro
new file mode 100644
index 00000000..c421f2dc
--- /dev/null
+++ b/tests/auto/qquickimaginestyle/qquickimaginestyle.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET = tst_qquickimaginestyle
+CONFIG += qmltestcase
+
+SOURCES += \
+ $$PWD/tst_qquickimaginestyle.cpp
+
+RESOURCES += \
+ $$PWD/qtquickcontrols2.conf \
+ $$PWD/control-assets/button-background.9.png
+
+OTHER_FILES += \
+ $$PWD/data/*.qml
+
+TESTDATA += \
+ $$PWD/data/tst_*
diff --git a/tests/auto/qquickimaginestyle/qtquickcontrols2.conf b/tests/auto/qquickimaginestyle/qtquickcontrols2.conf
new file mode 100644
index 00000000..add378d4
--- /dev/null
+++ b/tests/auto/qquickimaginestyle/qtquickcontrols2.conf
@@ -0,0 +1,2 @@
+[Controls]
+Style=Imagine
diff --git a/tests/auto/qquickimaginestyle/tst_qquickimaginestyle.cpp b/tests/auto/qquickimaginestyle/tst_qquickimaginestyle.cpp
new file mode 100644
index 00000000..cd08923a
--- /dev/null
+++ b/tests/auto/qquickimaginestyle/tst_qquickimaginestyle.cpp
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQuickTest/quicktest.h>
+QUICK_TEST_MAIN(tst_qquickmaterialstyle)
diff --git a/tests/manual/testbench/.gitignore b/tests/manual/testbench/.gitignore
new file mode 100644
index 00000000..75fae8bc
--- /dev/null
+++ b/tests/manual/testbench/.gitignore
@@ -0,0 +1,83 @@
+testbench
+*.png
+*.so
+*.so.*
+*.app
+*.exe
+*.dll
+*.dylib
+*.lib
+*.exp
+*.a
+*.la
+*.core
+*.moc
+*.o
+*.obj
+*.orig
+*.swp
+*.rej
+*.so
+*.pbxuser
+*.mode1
+*.mode1v3
+*_pch.h.cpp
+*_resource.rc
+*~
+.#*
+*.*#
+.qmake.stash
+.qmake.cache
+.qmake.vars
+*.prl
+tags
+.DS_Store
+*.debug
+Makefile*
+*.Debug
+*.Release
+*.prl
+*.pro.user
+*.qmlproject.user*
+moc_*.h
+moc_*.cpp
+ui_*.h
+qrc_*.cpp
+callgrind.out.*
+pcviewer.cfg
+*.flc
+.*.swp
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+*.ncb
+.pch
+.rcc
+.project
+.cproject
+.make.cache
+android-build
+app_process
+qtc-debugging-helper
+android-*.so-deployment-settings.json
+*.directory
+*_plugin_import.cpp
+*_wrapper.sh
+*_wrapper.bat
+*.mak
+*.xib
+*.plist
+*.pbxproj
+*_plugin_import.cpp
+*.xcsettings
+*.xcscheme
+*.xcodeproj
+qt.conf
+*.version
+*.version.in
+*.qmlc
diff --git a/tests/manual/testbench/ColorEditor.qml b/tests/manual/testbench/ColorEditor.qml
new file mode 100644
index 00000000..83f8f2b0
--- /dev/null
+++ b/tests/manual/testbench/ColorEditor.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+RowLayout {
+ property alias labelText: label.text
+ property string toolTipText
+ property alias color: textField.text
+
+ ToolTip.text: toolTipText
+ ToolTip.visible: textField.hovered
+
+ Layout.columnSpan: 2
+
+ Label {
+ id: label
+
+ Layout.fillWidth: true
+ }
+
+ TextField {
+ id: textField
+
+ validator: RegExpValidator{
+ regExp: /#?[0-9a-fA-F]*/
+ }
+
+ Layout.preferredWidth: 200
+ }
+}
diff --git a/tests/manual/testbench/ControlContainer.qml b/tests/manual/testbench/ControlContainer.qml
new file mode 100644
index 00000000..b6bd8542
--- /dev/null
+++ b/tests/manual/testbench/ControlContainer.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+
+Item {
+ id: container
+
+ implicitWidth: delegate.implicitWidth
+ implicitHeight: delegate.implicitHeight
+
+ property var controlMetaObject
+ property var states
+
+ Loader {
+ id: delegate
+ sourceComponent: controlMetaObject ? controlMetaObject.component : null
+
+ function is(state) {
+ return container.states.indexOf(state) !== -1
+ }
+ }
+}
diff --git a/tests/manual/testbench/ExampleContainer.qml b/tests/manual/testbench/ExampleContainer.qml
new file mode 100644
index 00000000..ffada686
--- /dev/null
+++ b/tests/manual/testbench/ExampleContainer.qml
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+Frame {
+ id: container
+
+ property var controlMetaObject
+
+ ColumnLayout {
+ id: exampleLayout
+ anchors.centerIn: parent
+
+ Label {
+ text: !exampleLoader.active ? qsTr("Show example") : qsTr("Hide example")
+
+ Layout.alignment: Qt.AlignHCenter
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: exampleLoader.active = !exampleLoader.active
+ }
+ }
+
+ Loader {
+ id: exampleLoader
+ active: false
+ sourceComponent: controlMetaObject ? controlMetaObject.exampleComponent : null
+
+ Layout.preferredHeight: active ? item.implicitHeight : 0
+ }
+ }
+}
diff --git a/tests/manual/testbench/README.md b/tests/manual/testbench/README.md
new file mode 100644
index 00000000..2d7fa54a
--- /dev/null
+++ b/tests/manual/testbench/README.md
@@ -0,0 +1,34 @@
+# Style Testbench
+
+The Style Testbench provides a way to quickly see how controls look in different states with a given style.
+
+When run with the Imagine style, the testbench will react to changes to image assets and automatically fix and reload them.
+To use this functionality, click on the settings icon and then the settings menu item.
+From there, check "Use Custom Imagine Style Assets" and provide a path to your custom assets in the text field.
+If you want your 9-patch assets to be automatically fixed up (e.g. turn 4 pixel-thick 9-patch lines exported at
+@4x to a 1 pixel-thick line), check "Fix Imagine Style Assets".
+
+## Custom Text colors
+
+To use custom text colors, enable the "Use Custom Palette" option in the settings dialog, and then provide colors in the relevant fields. As an example, the WindowText palette role affects text that is displayed directly against the window (labels, flat button text, etc.), ButtonText affects text that is displayed against a button's background, and so on. A full list of color roles can be found here:
+
+http://doc.qt.io/qt-5/qpalette.html#ColorRole-enum
+
+The custom text color settings apply to every style that supports palettes, until turned off.
+
+The "Copy Palette Settings To Clipboard" button in the settings dialog can be used to copy the current colors and share them with others. Once someone has your custom colors, they can import them with the "Imort Palette Settings From Clipboard" button.
+
+## Tips
+
+- Ensure that 9-patch lines are black (#000000) or red (#ff0000). If these colors are slightly
+ off (e.g. #010101), the assets won't display correctly when run in the application.
+- Don't use pure black in assets that have black 9-patch lines, as this will confuse the asset fixer.
+
+## Shortcuts
+
+| Name | Shortcut | Shortcut (Mac) | Description |
+|-------------------|--------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
+| Use Custom Assets | Ctrl+Shift+C | ⌘+Shift+C | If using the Imagine style, toggles between the default assets and the user's custom assets. Custom assets are specified in the settings dialog. |
+| Reload Assets | Ctrl+Shift+R | ⌘+R | If using the Imagine style, reloads the assets from disk. This is usually done automatically. |
+| Search/Filter | Ctrl+F | ⌘+F | Filter the controls that are shown. Case-sensitive. |
+| Quit | Ctrl+Q | ⌘+Q | Quit the application. |
diff --git a/tests/manual/testbench/SettingsDialog.qml b/tests/manual/testbench/SettingsDialog.qml
new file mode 100644
index 00000000..2bc3ddec
--- /dev/null
+++ b/tests/manual/testbench/SettingsDialog.qml
@@ -0,0 +1,423 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Layouts 1.2
+
+import App 1.0
+
+Dialog {
+ id: settingsDialog
+ title: "Settings"
+ width: 500
+ height: 400
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+
+ Imagine.path: defaultImaginePath
+
+ property alias imaginePathTextField: imaginePathTextField
+ property alias customImagineStyleCheckBox: customImagineStyleCheckBox
+ property alias fixImagineAssetsCheckBox: fixImagineAssetsCheckBox
+
+ onAboutToShow: {
+ styleComboBox.currentIndex = styleComboBox.styleIndex
+ customImagineStyleCheckBox.checked = settings.useCustomImaginePath
+ imaginePathTextField.text = settings.imaginePath
+ fixImagineAssetsCheckBox.checked = settings.fixImagineAssets
+
+ updatePaletteSettingsControls(paletteSettings)
+ }
+
+ onAccepted: {
+ settings.style = styleComboBox.displayText
+ settings.useCustomImaginePath = customImagineStyleCheckBox.checked
+ settings.imaginePath = imaginePathTextField.text
+ settings.fixImagineAssets = fixImagineAssetsCheckBox.checked
+
+ paletteSettings.useCustomPalette = useCustomPaletteCheckBox.checked
+ paletteSettings.window = windowColorEditor.color
+ paletteSettings.windowText = windowTextColorEditor.color
+ paletteSettings.base = baseColorEditor.color
+ paletteSettings.text = textColorEditor.color
+ paletteSettings.button = buttonColorEditor.color
+ paletteSettings.buttonText = buttonTextColorEditor.color
+ paletteSettings.brightText = brightTextColorEditor.color
+ paletteSettings.toolTipBase = toolTipBaseColorEditor.color
+ paletteSettings.toolTipText = toolTipTextColorEditor.color
+ paletteSettings.light = lightColorEditor.color
+ paletteSettings.midlight = midlightColorEditor.color
+ paletteSettings.dark = darkColorEditor.color
+ paletteSettings.mid = midColorEditor.color
+ paletteSettings.shadow = shadowColorEditor.color
+ paletteSettings.highlight = highlightColorEditor.color
+ paletteSettings.highlightedText = highlightedTextColorEditor.color
+ paletteSettings.link = linkColorEditor.color
+ }
+
+ function updatePaletteSettingsControls(source) {
+ useCustomPaletteCheckBox.checked = paletteSettings.useCustomPalette
+ windowColorEditor.color = source.window
+ windowTextColorEditor.color = source.windowText
+ baseColorEditor.color = source.base
+ textColorEditor.color = source.text
+ buttonColorEditor.color = source.button
+ buttonTextColorEditor.color = source.buttonText
+ brightTextColorEditor.color = source.brightText
+ toolTipBaseColorEditor.color = source.toolTipBase
+ toolTipTextColorEditor.color = source.toolTipText
+ lightColorEditor.color = source.light
+ midlightColorEditor.color = source.midlight
+ darkColorEditor.color = source.dark
+ midColorEditor.color = source.mid
+ shadowColorEditor.color = source.shadow
+ highlightColorEditor.color = source.highlight
+ highlightedTextColorEditor.color = source.highlightedText
+ linkColorEditor.color = source.link
+ }
+
+ function paletteSettingsMap() {
+ var map = ({});
+ map.window = windowColorEditor.color
+ map.windowText = windowTextColorEditor.color
+ map.base = baseColorEditor.color
+ map.text = textColorEditor.color
+ map.button = buttonColorEditor.color
+ map.buttonText = buttonTextColorEditor.color
+ map.brightText = brightTextColorEditor.color
+ map.toolTipBase = toolTipBaseColorEditor.color
+ map.toolTipText = toolTipTextColorEditor.color
+ map.light = lightColorEditor.color
+ map.midlight = midlightColorEditor.color
+ map.dark = darkColorEditor.color
+ map.mid = midColorEditor.color
+ map.shadow = shadowColorEditor.color
+ map.highlight = highlightColorEditor.color
+ map.highlightedText = highlightedTextColorEditor.color
+ map.link = linkColorEditor.color
+ return map;
+ }
+
+ Clipboard {
+ id: clipboard
+ }
+
+ DirectoryValidator {
+ id: directoryValidator
+ path: imaginePathTextField.text
+ }
+
+ contentItem: Flickable {
+ contentWidth: settingsDialog.availableWidth
+ contentHeight: contentGridLayout.implicitHeight
+ flickableDirection: Qt.Vertical
+ clip: true
+
+ GridLayout {
+ id: contentGridLayout
+ columns: 2
+ anchors.fill: parent
+
+ Label {
+ text: "Style:"
+ }
+
+ ComboBox {
+ id: styleComboBox
+ model: availableStyles
+
+ property int styleIndex: -1
+
+ Component.onCompleted: {
+ styleIndex = find(settings.style, Qt.MatchFixedString)
+ if (styleIndex !== -1)
+ currentIndex = styleIndex
+ }
+
+ Layout.fillWidth: true
+ }
+
+ Item {
+ Layout.fillWidth: true
+ }
+
+ Label {
+ text: "Restart required"
+ color: "#e41e25"
+ opacity: styleComboBox.currentIndex !== styleComboBox.styleIndex ? 1.0 : 0.0
+ Layout.topMargin: 12
+ Layout.maximumHeight: styleComboBox.currentIndex !== styleComboBox.styleIndex ? implicitHeight : 0
+ }
+
+ CheckBox {
+ id: customImagineStyleCheckBox
+ text: qsTr("Use Custom Imagine Style Assets")
+ enabled: usingImagineStyle
+
+ Layout.columnSpan: 2
+ }
+
+ Label {
+ text: "Imagine Style Assets Path"
+ enabled: usingImagineStyle && customImagineStyleCheckBox.checked
+ }
+
+ TextField {
+ id: imaginePathTextField
+ text: settings.imaginePath
+ enabled: usingImagineStyle && customImagineStyleCheckBox.checked
+
+ Layout.preferredWidth: 200
+ Layout.fillWidth: true
+
+ ToolTip {
+ text: "Path to a folder that contains Imagine style image assets"
+ visible: imaginePathTextField.hovered
+ delay: 500
+ parent: imaginePathTextField
+
+ Imagine.path: defaultImaginePath
+ }
+ }
+
+ Item {
+ Layout.fillWidth: true
+ }
+
+ Label {
+ text: directoryValidator.errorMessage
+ color: "#e41e25"
+ opacity: !directoryValidator.valid ? 1.0 : 0.0
+ elide: Label.ElideMiddle
+ Layout.topMargin: !directoryValidator.valid ? 12 : 0
+ Layout.maximumHeight: !directoryValidator.valid ? implicitHeight : 0
+
+ Layout.fillWidth: true
+ }
+
+ CheckBox {
+ id: fixImagineAssetsCheckBox
+ text: "Fix Imagine Style Assets"
+ enabled: usingImagineStyle && customImagineStyleCheckBox.checked
+
+ Layout.columnSpan: 2
+
+ ToolTip {
+ text: "If set, custom Imagine style assets will be modified to be compliant"
+ visible: fixImagineAssetsCheckBox.hovered
+ delay: 500
+ parent: imaginePathTextField
+
+ Imagine.path: defaultImaginePath
+ }
+ }
+
+ CheckBox {
+ id: useCustomPaletteCheckBox
+ text: qsTr("Use Custom Palette")
+
+ Layout.topMargin: 12
+ }
+
+ ColorEditor {
+ id: windowColorEditor
+ labelText: qsTr("Window")
+ toolTipText: qsTr("A general background color.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: windowTextColorEditor
+ labelText: qsTr("WindowText")
+ toolTipText: qsTr("A general foreground color.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: baseColorEditor
+ labelText: qsTr("Base")
+ toolTipText: qsTr("Used mostly as the background color for text editor controls and items views. It is usually white or another light color.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: textColorEditor
+ labelText: qsTr("Text")
+ toolTipText: qsTr("The foreground color used with Base. This is usually the same as the WindowText, in which case it must provide good contrast with Window and Base.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: buttonColorEditor
+ labelText: qsTr("Button")
+ toolTipText: qsTr("The general button background color. This background can be different from Window as some styles require a different background color for buttons.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: buttonTextColorEditor
+ labelText: qsTr("ButtonText")
+ toolTipText: qsTr("A foreground color used with the Button color.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: brightTextColorEditor
+ labelText: qsTr("BrightText")
+ toolTipText: qsTr("A text color that is very different from WindowText, and contrasts well with e.g. Dark. Typically used for text that needs to be drawn where Text, WindowText or ButtonText would give poor contrast, such as on highlighted buttons.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: toolTipBaseColorEditor
+ labelText: qsTr("ToolTipBase")
+ toolTipText: qsTr("Used as the background color for tooltips.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: toolTipTextColorEditor
+ labelText: qsTr("ToolTipText")
+ toolTipText: qsTr("Used as the foreground color for tooltips.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: lightColorEditor
+ labelText: qsTr("Light")
+ toolTipText: qsTr("Lighter than Button.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: midlightColorEditor
+ labelText: qsTr("Midlight")
+ toolTipText: qsTr("Between Button and Light.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: darkColorEditor
+ labelText: qsTr("Dark")
+ toolTipText: qsTr("Darker than Button.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: midColorEditor
+ labelText: qsTr("Mid")
+ toolTipText: qsTr("Between Button and Dark.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: shadowColorEditor
+ labelText: qsTr("Shadow")
+ toolTipText: qsTr("A very dark color.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: highlightColorEditor
+ labelText: qsTr("Highlight")
+ toolTipText: qsTr("A color to indicate a selected item or the current item.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: linkColorEditor
+ labelText: qsTr("Link")
+ toolTipText: qsTr("A text color used for hyperlinks.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ ColorEditor {
+ id: highlightedTextColorEditor
+ labelText: qsTr("HighlightedText")
+ toolTipText: qsTr("A text color that contrasts with Highlight.")
+ enabled: useCustomPaletteCheckBox.checked
+ }
+
+ Button {
+ text: qsTr("Copy Palette Settings To Clipboard")
+ onClicked: clipboard.copy(paletteSettingsMap())
+
+ Layout.columnSpan: 2
+ Layout.alignment: Qt.AlignRight
+ }
+
+ Button {
+ text: qsTr("Import Palette Settings From Clipboard")
+ onClicked: updatePaletteSettingsControls(clipboard.paste())
+
+ Layout.columnSpan: 2
+ Layout.alignment: Qt.AlignRight
+ }
+
+ Item {
+ Layout.fillHeight: true
+ }
+ }
+ }
+
+ footer: DialogButtonBox {
+ Button {
+ text: qsTr("OK")
+ DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
+ enabled: !imaginePathTextField.enabled || (imaginePathTextField.enabled && directoryValidator.valid)
+ }
+ Button {
+ text: qsTr("Cancel")
+ DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
+ }
+ }
+}
diff --git a/tests/manual/testbench/assetfixer.cpp b/tests/manual/testbench/assetfixer.cpp
new file mode 100644
index 00000000..21a67573
--- /dev/null
+++ b/tests/manual/testbench/assetfixer.cpp
@@ -0,0 +1,563 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "assetfixer.h"
+
+#include <QDebug>
+#include <QDir>
+#include <QDirIterator>
+#include <QImage>
+#include <QLoggingCategory>
+#include <QQmlApplicationEngine>
+#include <QQuickWindow>
+#include <QtMath>
+
+#include "directoryvalidator.h"
+
+Q_LOGGING_CATEGORY(lcAssetFixer, "qt.quick.controls.tools.testbench.assetfixer.brief")
+Q_LOGGING_CATEGORY(lcAssetFixerVerbose, "qt.quick.controls.tools.testbench.assetfixer.verbose")
+
+static const QColor black = Qt::black;
+static const QColor red = Qt::red;
+
+/*
+ This class:
+
+ - Watches a given asset directory for changes. When it notices a change in the directory's
+ "last modification" time, it suggests that client code call fixAssets(). It suggests
+ rather than just doing it itself because the client code (QML) may want to wait a second
+ or two to see if more changes are coming before doing an expensive fixup, as exporting
+ a bunch of files into a directory will cause several directoryChanged() emissions from
+ QFileSystemWatcher.
+ - Fixes 9-patch image assets via the function below.
+*/
+
+/*
+ This function:
+
+ - Crops the image to the area within the 9-patch lines if necessary.
+ This can happen if e.g. a shadow is applied to an asset in Illustrator
+ and it causes the image to be larger than necessary.
+ - Reduces the thickness of the 9-patch lines. This is necessary to enable
+ designers not to have to worry about creating one pixel-thick lines for
+ each DPI variant of an asset; they can simply export the asset at each
+ DPI variant as usual and this program will fix it for them.
+
+ See README.md for more information.
+*/
+bool cropImageToLines(QImage *image)
+{
+ QRect cropArea;
+ /*
+ We need to keep track of this because of the following case:
+
+ ______________________
+ ______________________
+ ||
+ oooooooooooooooooooooooo
+ ||
+
+ If we didn't keep track of thickness, the top edge's lines would be found fine,
+ but then we'd look at the bottom edge and we'd accidentally pick up the left edge's lines.
+ Keeping track of thickness ensures that we have some way of knowing if we're far enough
+ in for the line to belong to a certain edge.
+
+ Note that this approach is still limited, as it doesn't account for the top edge,
+ but we have to start somewhere in order to find the thickness.
+ */
+ int thickness = 0;
+
+ bool cropTop = false;
+ bool foundOnePixelThick9PatchLine = false;
+ // We have to go row by row because otherwise we might find a pixel that
+ // belongs to e.g. the left edge.
+ for (int y = 0; y < qFloor(image->height() / 2.0) && !cropTop && !foundOnePixelThick9PatchLine; ++y) {
+ for (int x = 1; x < image->width() - 2 && !cropTop && !foundOnePixelThick9PatchLine; ++x) {
+ const QColor pixelColor = image->pixelColor(x, y);
+ if (pixelColor == black || pixelColor == red) {
+ if (y == 0) {
+ const QColor pixelColorBelow = image->pixelColor(x, y + 1);
+ if (pixelColorBelow != black && pixelColorBelow != red) {
+ // We've already found the top of the 9-patch line, and the row below it
+ // is a different color, so we know that it's one pixel thick, and that we're done.
+ // Note that we can't just assume all of the other edges are the same and return here,
+ // as we also need to account for e.g. shadows.
+ qCDebug(lcAssetFixerVerbose) << "found one-pixel-thick nine patch line on top edge at x" << x;
+ foundOnePixelThick9PatchLine = true;
+ thickness = 1;
+ }
+ } else {
+ // It's not already at the top edge, so crop the top edge.
+ cropTop = true;
+
+ // Now that we've found the line, find out how thick it is.
+ for (int yy = y; yy < qFloor(image->height() / 2.0); ++yy) {
+ const QColor pixelColor = image->pixelColor(x, yy);
+ if (pixelColor == black || pixelColor == red) {
+ cropArea.setTop(yy);
+ } else {
+ break;
+ }
+ }
+
+ // + 1 for the pixel that we leave in when cropping,
+ // another +1 for the fact that this else statement is only entered when y > 0
+ if (thickness == 0) {
+ thickness = cropArea.top() - y + 2;
+ qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on top edge at x" << x << "y" << y
+ << "with thickness" << thickness;
+ } else {
+ qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on top edge at x" << x << "y" << y
+ << "using existing thickness of" << thickness;
+ }
+ }
+ }
+ }
+ }
+
+ bool cropBottom = false;
+ foundOnePixelThick9PatchLine = false;
+ for (int y = image->height() - 1; y >= qCeil(image->height() / 2.0) && !cropBottom && !foundOnePixelThick9PatchLine; --y) {
+ for (int x = qMax(1, thickness); x < image->width() - 2 && !cropBottom && !foundOnePixelThick9PatchLine; ++x) {
+ const QColor pixelColor = image->pixelColor(x, y);
+ if (pixelColor == black || pixelColor == red) {
+ if (y == image->height() - 1) {
+ const QColor pixelColorAbove = image->pixelColor(x, y - 1);
+ if (pixelColorAbove != black && pixelColorAbove != red) {
+ // We've already found the bottom of the 9-patch line, and the row above it
+ // is a different color, so we know that it's one pixel thick, and that we're done.
+ qCDebug(lcAssetFixerVerbose) << "found one-pixel-thick nine patch line on bottom edge at x" << x;
+ foundOnePixelThick9PatchLine = true;
+ if (thickness == 0)
+ thickness = 1;
+ }
+ } else {
+ // It's not already at the bottom edge, so crop the bottom edge.
+ cropBottom = true;
+
+ // Now that we've found the line, find out how thick it is.
+ for (int yy = y; yy >= qCeil(image->height() / 2.0); --yy) {
+ const QColor pixelColor = image->pixelColor(x, yy);
+ if (pixelColor == black || pixelColor == red) {
+ cropArea.setBottom(yy);
+ } else {
+ break;
+ }
+ }
+
+ // + 1 for the pixel that we leave in when cropping,
+ // another +1 for the fact that this else statement is only entered when y < image->height() - 1
+ if (thickness == 0) {
+ thickness = y - cropArea.bottom() + 2;
+ qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on bottom edge at x" << x << "y" << y
+ << "with thickness" << thickness;
+ } else {
+ qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on bottom edge at x" << x << "y" << y
+ << "using existing thickness of" << thickness;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ bool cropLeft = false;
+ foundOnePixelThick9PatchLine = false;
+ for (int x = 0; x < qFloor(image->width() / 2.0) && !cropLeft && !foundOnePixelThick9PatchLine; ++x) {
+ for (int y = qMax(1, thickness); y < image->height() - 2 && !cropLeft && !foundOnePixelThick9PatchLine; ++y) {
+ const QColor pixelColor = image->pixelColor(x, y);
+ if (pixelColor == black || pixelColor == red) {
+ if (x == 0) {
+ const QColor pixelColorToTheRight = image->pixelColor(x + 1, y);
+ if (pixelColorToTheRight != black && pixelColorToTheRight != red) {
+ // We've already found the beginning of the 9-patch line, and the column after it
+ // is a different color, so we know that it's one pixel thick, and that we're done.
+ qCDebug(lcAssetFixerVerbose) << "found one-pixel-thick nine patch line on left edge at y" << y;
+ foundOnePixelThick9PatchLine = true;
+ }
+ } else {
+ // It's not already at the left edge, so crop the left edge.
+ cropLeft = true;
+
+ // Now that we've found the line, find out how thick it is.
+ for (int xx = x; xx < qFloor(image->width() / 2.0); ++xx) {
+ const QColor pixelColor = image->pixelColor(xx, y);
+ if (pixelColor == black || pixelColor == red) {
+ cropArea.setLeft(xx);
+ } else {
+ break;
+ }
+ }
+
+ // + 1 for the pixel that we leave in when cropping,
+ // another +1 for the fact that this else statement is only entered when x > 0
+ if (thickness == 0) {
+ thickness = cropArea.left() - x + 2;
+ qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on left edge at x" << x << "y" << y
+ << "with thickness" << thickness;
+ } else {
+ qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on left edge at x" << x << "y" << y
+ << "using existing thickness of" << thickness;
+ }
+ }
+ }
+ }
+ }
+
+ bool cropRight = false;
+ foundOnePixelThick9PatchLine = false;
+ for (int x = image->width() - 1; x >= qCeil(image->width() / 2.0) && !cropRight && !foundOnePixelThick9PatchLine; --x) {
+ for (int y = qMax(1, thickness); y < image->height() - 2 && !cropRight && !foundOnePixelThick9PatchLine; ++y) {
+ const QColor pixelColor = image->pixelColor(x, y);
+ if (pixelColor == black || pixelColor == red) {
+ if (x == image->width() - 1) {
+ const QColor pixelColorToTheLeft = image->pixelColor(x - 1, y);
+ if (pixelColorToTheLeft != black && pixelColorToTheLeft != red) {
+ // We've already found the end of the 9-patch line, and the column before it
+ // is a different color, so we know that it's one pixel thick, and that we're done.
+ qCDebug(lcAssetFixerVerbose) << "found one-pixel-thick nine patch line on right edge at y" << y;
+ foundOnePixelThick9PatchLine = true;
+ }
+ } else {
+ // It's not already at the right edge, so crop the right edge.
+ cropRight = true;
+
+ // Now that we've found the line, find out how thick it is.
+ for (int xx = x; xx >= qCeil(image->width() / 2.0); --xx) {
+ const QColor pixelColor = image->pixelColor(xx, y);
+ if (pixelColor == black || pixelColor == red) {
+ cropArea.setRight(xx);
+ } else {
+ break;
+ }
+ }
+
+ // + 1 for the pixel that we leave in when cropping,
+ // another +1 for the fact that this else statement is only entered when x < image->width() - 1
+ if (thickness == 0) {
+ thickness = x - cropArea.right() + 2;
+ qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on right edge at x" << x << "y" << y
+ << "with thickness" << thickness;
+ } else {
+ qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on right edge at x" << x << "y" << y
+ << "using existing thickness of" << thickness;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ const QRect copyArea(cropLeft ? cropArea.x() : (thickness ? thickness - 1 : 0),
+ cropTop ? cropArea.y() : (thickness ? thickness - 1 : 0),
+ cropRight ? cropArea.width() : image->width() - (thickness ? (thickness - 1) * 2 : 0),
+ cropBottom ? cropArea.height() : image->height() - (thickness ? (thickness - 1) * 2 : 0));
+
+ if (cropLeft | cropRight | cropTop | cropBottom) {
+ qCDebug(lcAssetFixerVerbose) << "cropping area" << copyArea;
+ *image = image->copy(copyArea);
+ return true;
+ }
+
+ return false;
+}
+
+AssetFixer::AssetFixer(QObject *parent) :
+ QObject(parent),
+ mComponentComplete(false),
+ mFirstWatch(true),
+ mShouldWatch(false),
+ mShouldFix(false),
+ mLastModified(QDateTime::fromSecsSinceEpoch(0))
+{
+}
+
+bool AssetFixer::shouldWatch() const
+{
+ return mShouldWatch;
+}
+
+void AssetFixer::setShouldWatch(bool watch)
+{
+ if (watch == mShouldWatch)
+ return;
+
+ stopWatching();
+
+ mShouldWatch = watch;
+
+ startWatching();
+
+ emit shouldWatchChanged();
+}
+
+bool AssetFixer::shouldFix() const
+{
+ return mShouldFix;
+}
+
+void AssetFixer::setShouldFix(bool fix)
+{
+ if (fix == mShouldFix)
+ return;
+
+ mShouldFix = fix;
+ emit shouldFixChanged();
+}
+
+QString AssetFixer::assetDirectory() const
+{
+ return mAssetDirectory;
+}
+
+void AssetFixer::setAssetDirectory(const QString &assetDirectory)
+{
+ if (assetDirectory == mAssetDirectory)
+ return;
+
+ stopWatching();
+
+ const QString oldAssetDirectory = assetDirectory;
+ mAssetDirectory.clear();
+
+ if (isAssetDirectoryValid(assetDirectory)) {
+ mAssetDirectory = assetDirectory;
+ startWatching();
+ }
+
+ if (mAssetDirectory != oldAssetDirectory)
+ emit assetDirectoryChanged();
+}
+
+QUrl AssetFixer::assetDirectoryUrl() const
+{
+ return QUrl::fromLocalFile(mAssetDirectory);
+}
+
+QDateTime AssetFixer::assetDirectoryLastModified() const
+{
+ return mLastModified;
+}
+
+void AssetFixer::setAssetDirectoryLastModified(const QDateTime &assetDirectoryLastModified)
+{
+ if (assetDirectoryLastModified == mLastModified)
+ return;
+
+ mLastModified = assetDirectoryLastModified;
+ emit assetDirectoryLastModifiedChanged();
+}
+
+void AssetFixer::componentComplete()
+{
+ mComponentComplete = true;
+}
+
+void AssetFixer::classBegin()
+{
+}
+
+void AssetFixer::onAssetsChanged()
+{
+ const QFileInfo fileInfo(mAssetDirectory);
+ const QDateTime lastModified = fileInfo.lastModified();
+
+ qCDebug(lcAssetFixer) << "Change in asset directory" << mAssetDirectory << "detected"
+ << "lastModified:" << lastModified;
+ const qint64 secsSinceLastModification = mLastModified.secsTo(lastModified);
+ if (secsSinceLastModification == 0) {
+ qCDebug(lcAssetFixer) << "Change in asset directory" << mAssetDirectory << "detected, "
+ << "but QFileInfo says the directory hasn't been modified; ignoring";
+ } else {
+ setAssetDirectoryLastModified(lastModified);
+
+ QString message;
+ if (lcAssetFixer().isDebugEnabled()) {
+ message = QString::fromLatin1("Change in asset directory %1 detected, and QFileInfo says that there have been " \
+ "%2 seconds since it was previously last modified); %3").arg(mAssetDirectory).arg(secsSinceLastModification);
+ }
+
+ if (shouldFix()) {
+ qCDebug(lcAssetFixer) << message.arg(QLatin1String("suggesting delayed fix"));
+ emit delayedFixSuggested();
+ } else {
+ qCDebug(lcAssetFixer) << message.arg(QLatin1String("suggesting reload"));
+ emit reloadSuggested();
+ }
+ }
+}
+
+void AssetFixer::stopWatching()
+{
+ if (!mShouldWatch || mAssetDirectory.isEmpty() || !mComponentComplete)
+ return;
+
+ disconnect(&mFileSystemWatcher, &QFileSystemWatcher::directoryChanged, this, &AssetFixer::onAssetsChanged);
+ mFileSystemWatcher.removePath(mAssetDirectory);
+}
+
+void AssetFixer::startWatching()
+{
+ if (!mShouldWatch || mAssetDirectory.isEmpty() || !mComponentComplete || !isAssetDirectoryValid(mAssetDirectory))
+ return;
+
+ if (mFileSystemWatcher.addPath(mAssetDirectory)) {
+ // TODO: for some reason this is not called when an image is edited, but is when the same image is "touch"ed.
+ // We could add watchers for each file, but then the application might have to be limited to displaying
+ // the elements for one control at a time so that we don't breach the 256 file descriptor limit on some platforms:
+ // http://doc.qt.io/qt-5/qfilesystemwatcher.html#details
+
+ // We only emit a signal here rather than automatically responding to it ourselves,
+ // because we want to give the UI time to start animations.
+ connect(&mFileSystemWatcher, &QFileSystemWatcher::directoryChanged, this, &AssetFixer::onAssetsChanged);
+
+ const QFileInfo fileInfo(mAssetDirectory);
+ bool suggestFix = false;
+ if (mFirstWatch) {
+ mFirstWatch = false;
+
+ // Here we check if the assets have been modified since the last time the application closed.
+ // Checking this avoids a slow startup (due to fixing up assets).
+ if (fileInfo.lastModified() > mLastModified) {
+ qCDebug(lcAssetFixer) << "asset directory" << mAssetDirectory << "was modified at"
+ << fileInfo.lastModified() << ", which is later than our last stored modification time of"
+ << mLastModified << "; suggesting fix";
+ suggestFix = true;
+ } else {
+ qCDebug(lcAssetFixer) << "asset directory" << mAssetDirectory << "has not been modified since"
+ << "the application was last closed; a fix is not necessary";
+
+ // For some reason not all assets are updated if we don't do this.
+ emit reloadSuggested();
+ }
+
+ // Don't need to call setAssetDirectoryLastModified() here, as we should have gotten it from settings.
+ } else {
+ suggestFix = true;
+ }
+
+ if (suggestFix) {
+ setAssetDirectoryLastModified(fileInfo.lastModified());
+ emit fixSuggested();
+ }
+ } else {
+ qWarning() << "Could not watch asset directory" << mAssetDirectory;
+ }
+}
+
+bool AssetFixer::isAssetDirectoryValid(const QString &assetDirectory)
+{
+ DirectoryValidator validator;
+ validator.setPath(assetDirectory);
+ return validator.isValid();
+}
+
+void AssetFixer::clearImageCache()
+{
+ QQmlApplicationEngine *engine = qobject_cast<QQmlApplicationEngine*>(qmlEngine(this));
+ if (!engine) {
+ qWarning() << "No QQmlApplicationEngine for AssetFixer - assets may not reload properly";
+ return;
+ }
+
+ QQuickWindow *window = qobject_cast<QQuickWindow*>(engine->rootObjects().first());
+ if (!window) {
+ qWarning() << "No QQuickWindow - assets may not reload properly";
+ return;
+ }
+
+ // We can't seem to disable image caching on a per-Image basis (by the time the QQuickImages
+ // are available, the cache has already been filled), so we call this instead.
+ window->releaseResources();
+}
+
+void AssetFixer::fixAssets()
+{
+ if (!mShouldWatch || !mShouldFix || !mComponentComplete || mAssetDirectory.isEmpty() || !isAssetDirectoryValid(mAssetDirectory))
+ return;
+
+ QDir assetDir(mAssetDirectory);
+ qCDebug(lcAssetFixer) << "Fixing up assets in" << assetDir.absolutePath() << "...";
+ int filesChanged = 0;
+
+ QStringList nameFilters;
+ nameFilters << QLatin1String("*.9.png");
+ QDirIterator dirIt(assetDir.absolutePath(), nameFilters, QDir::Files | QDir::Readable | QDir::NoSymLinks);
+ while (dirIt.hasNext()) {
+ const QString imagePath = dirIt.next();
+
+ QImage image(imagePath);
+ if (image.isNull()) {
+ qWarning() << "Couldn't open image at" << imagePath;
+ return;
+ }
+
+ qCDebug(lcAssetFixerVerbose).nospace() << "found " << imagePath << " (" << image.width() << "x" << image.height() << ") - "
+ << "checking if we need to crop 9-patch lines";
+
+ if (cropImageToLines(&image)) {
+ if (!image.save(imagePath)) {
+ qWarning() << "Couldn't save" << imagePath;
+ return;
+ }
+
+ ++filesChanged;
+ }
+ }
+
+ qCDebug(lcAssetFixer) << "Fixed" << filesChanged << "assets";
+
+ // Let the application know that it should reload the Imagine style's assets.
+ // Currently we always suggest a reload after fixing files, even if no files were fixed.
+ // This is because the default Imagine style assets are automatically loaded at first, and then we
+ // set a custom path shortly after, so we must ensure that the Imagine style is using the correct assets.
+ // Reloads are just a matter of changing Imagine.path, which is very fast.
+ emit reloadSuggested();
+}
diff --git a/tests/manual/testbench/assetfixer.h b/tests/manual/testbench/assetfixer.h
new file mode 100644
index 00000000..4af9ccf4
--- /dev/null
+++ b/tests/manual/testbench/assetfixer.h
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ASSETFIXER_H
+#define ASSETFIXER_H
+
+#include <QObject>
+#include <QDateTime>
+#include <QFileSystemWatcher>
+#include <QQmlParserStatus>
+#include <QUrl>
+
+class AssetFixer : public QObject, public QQmlParserStatus
+{
+ Q_OBJECT
+ Q_PROPERTY(bool shouldWatch READ shouldWatch WRITE setShouldWatch NOTIFY shouldWatchChanged FINAL)
+ Q_PROPERTY(bool shouldFix READ shouldFix WRITE setShouldFix NOTIFY shouldFixChanged FINAL)
+ Q_PROPERTY(QString assetDirectory READ assetDirectory WRITE setAssetDirectory NOTIFY assetDirectoryChanged FINAL)
+ Q_PROPERTY(QUrl assetDirectoryUrl READ assetDirectoryUrl NOTIFY assetDirectoryChanged FINAL)
+ Q_PROPERTY(QDateTime assetDirectoryLastModified READ assetDirectoryLastModified WRITE setAssetDirectoryLastModified
+ NOTIFY assetDirectoryLastModifiedChanged FINAL)
+ Q_INTERFACES(QQmlParserStatus)
+
+public:
+ explicit AssetFixer(QObject *parent = nullptr);
+
+ bool shouldWatch() const;
+ void setShouldWatch(bool shouldWatch);
+
+ bool shouldFix() const;
+ void setShouldFix(bool shouldFix);
+
+ QString assetDirectory() const;
+ void setAssetDirectory(const QString &assetDirectory);
+
+ QUrl assetDirectoryUrl() const;
+
+ QDateTime assetDirectoryLastModified() const;
+ void setAssetDirectoryLastModified(const QDateTime &assetDirectoryLastModified);
+
+signals:
+ void shouldWatchChanged();
+ void shouldFixChanged();
+ void assetDirectoryChanged();
+ void assetDirectoryLastModifiedChanged();
+
+ void fixSuggested();
+ void delayedFixSuggested();
+ void reloadSuggested();
+
+ void error(const QString &errorMessage);
+
+public slots:
+ void clearImageCache();
+ void fixAssets();
+
+protected:
+ void componentComplete() override;
+ void classBegin() override;
+
+private slots:
+ void onAssetsChanged();
+
+private:
+ void stopWatching();
+ void startWatching();
+
+ bool isAssetDirectoryValid(const QString &assetDirectory);
+
+ bool mComponentComplete;
+ bool mFirstWatch;
+ bool mShouldWatch;
+ bool mShouldFix;
+ QString mAssetDirectory;
+ QFileSystemWatcher mFileSystemWatcher;
+ QDateTime mLastModified;
+};
+
+#endif // ASSETFIXER_H
diff --git a/tests/manual/testbench/clipboard.cpp b/tests/manual/testbench/clipboard.cpp
new file mode 100644
index 00000000..1daebfc9
--- /dev/null
+++ b/tests/manual/testbench/clipboard.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "clipboard.h"
+
+#include <QClipboard>
+#include <QGuiApplication>
+#include <QSettings>
+
+const QStringList keys = {
+ "Palette/window",
+ "Palette/windowText",
+ "Palette/base",
+ "Palette/text",
+ "Palette/button",
+ "Palette/buttonText",
+ "Palette/brightText",
+ "Palette/toolTipBase",
+ "Palette/toolTipText",
+ "Palette/light",
+ "Palette/midlight",
+ "Palette/dark",
+ "Palette/mid",
+ "Palette/shadow",
+ "Palette/highlight",
+ "Palette/highlightedText",
+ "Palette/link"
+};
+
+Clipboard::Clipboard(QObject *parent) :
+ QObject(parent)
+{
+}
+
+// Converts the JS map into a big string and copies it to the clipboard.
+void Clipboard::copy(const QJSValue &keyValueMap)
+{
+ QString paletteSettingsString;
+ QVariantMap map = keyValueMap.toVariant().value<QVariantMap>();
+ const QList<QString> mapKeys = map.keys();
+ for (const QString &key : mapKeys) {
+ paletteSettingsString += "Palette/" + key + "=" + map.value(key).toString() + ",";
+ }
+
+ // Remove the trailing comma.
+ if (!paletteSettingsString.isEmpty())
+ paletteSettingsString.chop(1);
+
+ QGuiApplication::clipboard()->setText(paletteSettingsString);
+}
+
+// Converts the big string into a JS map and returns it.
+QVariant Clipboard::paste() const
+{
+ QClipboard *clipboard = QGuiApplication::clipboard();
+ if (clipboard->text().isEmpty())
+ return QVariant();
+
+ QVariantMap keyValueMap;
+
+ const QStringList settingsList = clipboard->text().split(QLatin1Char(','));
+ for (const QString &setting : settingsList) {
+ const QStringList keyValuePair = setting.split(QLatin1Char('='));
+ if (keyValuePair.size() < 2)
+ continue;
+
+ QString key = keyValuePair.first();
+ if (keys.contains(key)) {
+ key.remove(QLatin1String("Palette/"));
+ const QString value = keyValuePair.last();
+
+ keyValueMap.insert(key, value);
+ }
+ }
+
+ return QVariant(keyValueMap);
+}
diff --git a/tests/manual/testbench/clipboard.h b/tests/manual/testbench/clipboard.h
new file mode 100644
index 00000000..a21dd9c6
--- /dev/null
+++ b/tests/manual/testbench/clipboard.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CLIPBOARD_H
+#define CLIPBOARD_H
+
+#include <QObject>
+#include <QJSValue>
+#include <QVariant>
+
+class Clipboard : public QObject
+{
+ Q_OBJECT
+public:
+ explicit Clipboard(QObject *parent = nullptr);
+
+public slots:
+ void copy(const QJSValue &keyValueMap);
+ QVariant paste() const;
+
+// void copyPaletteSettingsToClipboard();
+// void importPaletteSettingsFromClipboard();
+};
+
+#endif // CLIPBOARD_H
diff --git a/tests/manual/testbench/controls/BusyIndicator.qml b/tests/manual/testbench/controls/BusyIndicator.qml
new file mode 100644
index 00000000..97456a93
--- /dev/null
+++ b/tests/manual/testbench/controls/BusyIndicator.qml
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["mirrored"]
+ ]
+
+ property Component component: BusyIndicator {
+ enabled: !is("disabled")
+ LayoutMirroring.enabled: is("mirrored")
+ }
+}
diff --git a/tests/manual/testbench/controls/Button.qml b/tests/manual/testbench/controls/Button.qml
new file mode 100644
index 00000000..6d65b3ee
--- /dev/null
+++ b/tests/manual/testbench/controls/Button.qml
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["checked"],
+ ["checked", "disabled"],
+ ["checked", "hovered"],
+ ["highlighted"],
+ ["highlighted", "disabled"],
+ ["highlighted", "hovered"],
+ ["highlighted", "pressed"],
+ ["highlighted", "checked"],
+ ["highlighted", "checkable", "hovered"],
+ ["highlighted", "checkable", "pressed"],
+ ["highlighted", "checkable", "checked"],
+ ["hovered"],
+ ["flat"],
+ ["flat", "disabled"],
+ ["flat", "hovered"],
+ ["flat", "pressed"],
+ ["flat", "checked"],
+ ["flat", "checkable"],
+ ["flat", "checkable", "hovered"],
+ ["flat", "checkable", "pressed"],
+ ["flat", "checkable", "checked", "pressed"],
+ ["flat", "checkable", "highlighted"],
+ ["flat", "checkable", "highlighted", "pressed"],
+ ["flat", "checkable", "highlighted", "checked"]
+ ]
+
+ property Component component: Button {
+ text: "Button"
+ enabled: !is("disabled")
+ flat: is("flat")
+ checkable: is("checkable")
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+ highlighted: is("highlighted")
+ }
+}
diff --git a/tests/manual/testbench/controls/CheckBox.qml b/tests/manual/testbench/controls/CheckBox.qml
new file mode 100644
index 00000000..73f94857
--- /dev/null
+++ b/tests/manual/testbench/controls/CheckBox.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["checked"],
+ ["checked", "disabled"],
+ ["checked", "pressed"],
+ ["partially-checked"],
+ ["partially-checked", "disabled"],
+ ["partially-checked", "pressed"],
+ ]
+
+ property Component component: CheckBox {
+ text: "CheckBox"
+ enabled: !is("disabled")
+ checkState: is("checked") ? Qt.Checked : is("partially-checked") ? Qt.PartiallyChecked : Qt.Unchecked
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+ }
+}
diff --git a/tests/manual/testbench/controls/CheckDelegate.qml b/tests/manual/testbench/controls/CheckDelegate.qml
new file mode 100644
index 00000000..fc6ce6eb
--- /dev/null
+++ b/tests/manual/testbench/controls/CheckDelegate.qml
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["checked"],
+ ["checked", "disabled"],
+ ["checked", "pressed"],
+ ["partially-checked"],
+ ["partially-checked", "disabled"],
+ ["partially-checked", "pressed"],
+ ]
+
+ property Component component: CheckDelegate {
+ text: "CheckDelegate"
+ enabled: !is("disabled")
+ checkState: is("checked") ? Qt.Checked : is("partially-checked") ? Qt.PartiallyChecked : Qt.Unchecked
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+ }
+
+ property Component exampleComponent: ListView {
+ implicitWidth: 200
+ implicitHeight: 200
+ clip: true
+ model: 20
+ delegate: CheckDelegate {
+ width: parent.width
+ text: "CheckDelegate"
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/ComboBox.qml b/tests/manual/testbench/controls/ComboBox.qml
new file mode 100644
index 00000000..c9b8498f
--- /dev/null
+++ b/tests/manual/testbench/controls/ComboBox.qml
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["open"],
+ ["editable"],
+ ["editable", "disabled"]
+ ]
+
+ property Component component: ComboBox {
+ enabled: !is("disabled")
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+ editable: is("editable")
+ model: ["ComboBox", "Apple", "Bird", "Cat", "Dog", "Elephant"]
+ }
+}
diff --git a/tests/manual/testbench/controls/DelayButton.qml b/tests/manual/testbench/controls/DelayButton.qml
new file mode 100644
index 00000000..af52e067
--- /dev/null
+++ b/tests/manual/testbench/controls/DelayButton.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["disabled", "checked"],
+ ["pressed"],
+ ["checked"],
+ ]
+
+ property Component component: Component {
+ DelayButton {
+ text: "DelayButton"
+// enabled: !is("disabled")
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+// down: is("pressed") ? true : undefined
+ onDownChanged: print("down", down)
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/Dial.qml b/tests/manual/testbench/controls/Dial.qml
new file mode 100644
index 00000000..5dc8c356
--- /dev/null
+++ b/tests/manual/testbench/controls/Dial.qml
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ // TODO: no down property to test this with
+// ["pressed"]
+ ]
+
+ property Component component: Dial {
+ enabled: !is("disabled")
+ }
+}
diff --git a/tests/manual/testbench/controls/Dialog.qml b/tests/manual/testbench/controls/Dialog.qml
new file mode 100644
index 00000000..b05ef1e3
--- /dev/null
+++ b/tests/manual/testbench/controls/Dialog.qml
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+// TODO
+QtObject {
+ property string customControlName: qsTr("Dialog")
+
+ property var supportedStates: [
+ []
+ ]
+
+ property Component component: Button {
+ id: dialogButton
+ text: qsTr("Dialog")
+ hoverEnabled: true
+
+ onClicked: dialog.open()
+
+ Dialog {
+ id: dialog
+ x: (window.width - width) / 2
+ y: (window.height - height) / 2
+ standardButtons: Dialog.Ok | Dialog.Cancel
+ parent: window.contentItem
+
+ Label {
+ text: "Lorem ipsum dolor sit amet, \nconsectetuer adipiscing elit, \n"
+ + "sed diam nonummy nibh euismod tincidunt ut \nlaoreet dolore magna aliquam erat volutpat."
+ }
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/Frame.qml b/tests/manual/testbench/controls/Frame.qml
new file mode 100644
index 00000000..c0348025
--- /dev/null
+++ b/tests/manual/testbench/controls/Frame.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ]
+
+ property Component component: Frame {
+ Label {
+ text: "Frame"
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/GroupBox.qml b/tests/manual/testbench/controls/GroupBox.qml
new file mode 100644
index 00000000..a99a998a
--- /dev/null
+++ b/tests/manual/testbench/controls/GroupBox.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ]
+
+ property Component component: GroupBox {
+ title: qsTr("Title")
+
+ Label {
+ text: qsTr("GroupBox")
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/ItemDelegate.qml b/tests/manual/testbench/controls/ItemDelegate.qml
new file mode 100644
index 00000000..98f13556
--- /dev/null
+++ b/tests/manual/testbench/controls/ItemDelegate.qml
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["highlighted"],
+ ["highlighted", "pressed"]
+ ]
+
+ property Component component: ItemDelegate {
+ text: "ItemDelegate"
+ enabled: !is("disabled")
+ checkable: is("checkable")
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+ highlighted: is("highlighted")
+ }
+
+ property Component exampleComponent: ListView {
+ implicitWidth: 200
+ implicitHeight: 200
+ clip: true
+ model: 20
+ delegate: ItemDelegate {
+ width: parent.width
+ text: "ItemDelegate"
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/Label.qml b/tests/manual/testbench/controls/Label.qml
new file mode 100644
index 00000000..c0d980e8
--- /dev/null
+++ b/tests/manual/testbench/controls/Label.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"]
+ ]
+
+ property Component component: Label {
+ text: "Label with a <a href=\"http://doc.qt.io\">link</a>"
+ onTextChanged: print(text)
+ enabled: !is("disabled")
+ textFormat: Label.StyledText
+ }
+}
diff --git a/tests/manual/testbench/controls/Menu.qml b/tests/manual/testbench/controls/Menu.qml
new file mode 100644
index 00000000..c449dd47
--- /dev/null
+++ b/tests/manual/testbench/controls/Menu.qml
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+// TODO
+QtObject {
+ property string customControlName: qsTr("Menu, MenuItem & MenuSeparator")
+
+ property var supportedStates: [
+ []
+ ]
+
+ property Component component: Button {
+ id: menuButton
+ text: qsTr("Menu")
+ checked: menu.visible
+ checkable: true
+
+ Menu {
+ id: menu
+ x: 1
+ y: 1 + parent.height
+ visible: menuButton.checked
+ closePolicy: Popup.CloseOnPressOutsideParent
+
+ MenuItem {
+ text: "Normal"
+ }
+ MenuItem {
+ text: "Pressed"
+ down: true
+ }
+ MenuItem {
+ text: "Disabled"
+ enabled: false
+ }
+
+ MenuSeparator {}
+
+ MenuItem {
+ text: "Checked"
+ checked: true
+ }
+ MenuItem {
+ text: "Checked + Pressed"
+ checked: true
+ down: true
+ }
+ MenuItem {
+ text: "Checked + Disabled"
+ checked: true
+ enabled: false
+ }
+
+ MenuSeparator {}
+
+ Menu {
+ title: "Submenu"
+
+ MenuItem {
+ text: "Submenu item"
+ }
+ }
+
+ Menu {
+ title: "Disabled Submenu"
+ enabled: false
+ }
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/Page.qml b/tests/manual/testbench/controls/Page.qml
new file mode 100644
index 00000000..117359f9
--- /dev/null
+++ b/tests/manual/testbench/controls/Page.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ]
+
+ property Component component: Page {
+ width: 100
+ height: 100
+
+ Label {
+ text: "Page"
+ anchors.centerIn: parent
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/PageIndicator.qml b/tests/manual/testbench/controls/PageIndicator.qml
new file mode 100644
index 00000000..e8d3f570
--- /dev/null
+++ b/tests/manual/testbench/controls/PageIndicator.qml
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ // TODO: no down property to test this with
+// ["pressed"]
+ ]
+
+ property Component component: PageIndicator {
+ enabled: !is("disabled")
+ count: 5
+ }
+
+ property Component exampleComponent: ColumnLayout {
+ implicitWidth: 200
+ implicitHeight: 200
+
+ // TODO: why doesn't this fill the ColumnLayout? :/
+ StackLayout {
+ id: swipeView
+ currentIndex: pageIndicator.currentIndex
+
+ Label {
+ text: qsTr("Page 1")
+ horizontalAlignment: Label.AlignHCenter
+ }
+
+ Label {
+ text: qsTr("Page 2")
+ horizontalAlignment: Label.AlignHCenter
+ }
+
+ Label {
+ text: qsTr("Page 3")
+ horizontalAlignment: Label.AlignHCenter
+ }
+
+ Label {
+ text: qsTr("Page 4")
+ horizontalAlignment: Label.AlignHCenter
+ }
+
+ Label {
+ text: qsTr("Page 5")
+ horizontalAlignment: Label.AlignHCenter
+ }
+ }
+
+ PageIndicator {
+ id: pageIndicator
+ currentIndex: swipeView.currentIndex
+ count: swipeView.count
+ interactive: true
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/Pane.qml b/tests/manual/testbench/controls/Pane.qml
new file mode 100644
index 00000000..d39adff4
--- /dev/null
+++ b/tests/manual/testbench/controls/Pane.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ]
+
+ property Component component: Pane {
+ width: 100
+ height: 100
+
+ Label {
+ text: "Pane"
+ anchors.centerIn: parent
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/ProgressBar.qml b/tests/manual/testbench/controls/ProgressBar.qml
new file mode 100644
index 00000000..1fdb02b2
--- /dev/null
+++ b/tests/manual/testbench/controls/ProgressBar.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["indeterminate"]
+ ]
+
+ property Component component: ProgressBar {
+ enabled: !is("disabled")
+ indeterminate: is("indeterminate")
+ value: 0.25
+ }
+}
diff --git a/tests/manual/testbench/controls/RadioButton.qml b/tests/manual/testbench/controls/RadioButton.qml
new file mode 100644
index 00000000..b1a10e0f
--- /dev/null
+++ b/tests/manual/testbench/controls/RadioButton.qml
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["checked"],
+ ["checked", "disabled"],
+ ["checked", "pressed"],
+ ]
+
+ property Component component: Component {
+ RadioButton {
+ text: "RadioButton"
+ enabled: !is("disabled")
+ checked: is("checked")
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/RadioDelegate.qml b/tests/manual/testbench/controls/RadioDelegate.qml
new file mode 100644
index 00000000..cb1f6139
--- /dev/null
+++ b/tests/manual/testbench/controls/RadioDelegate.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["checked"],
+ ["checked", "disabled"],
+ ["checked", "pressed"]
+ ]
+
+ property Component component: Component {
+ RadioDelegate {
+ text: "RadioDelegate"
+ enabled: !is("disabled")
+ checked: is("checked")
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+ }
+ }
+
+ property Component exampleComponent: ListView {
+ implicitWidth: 200
+ implicitHeight: 200
+ clip: true
+ model: 20
+ delegate: RadioDelegate {
+ width: parent.width
+ text: "RadioDelegate"
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/RangeSlider.qml b/tests/manual/testbench/controls/RangeSlider.qml
new file mode 100644
index 00000000..debd097c
--- /dev/null
+++ b/tests/manual/testbench/controls/RangeSlider.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ ["vertical"],
+ ["vertical", "disabled"],
+ ["vertical", "pressed"],
+ ["horizontal"],
+ ["horizontal", "disabled"],
+ ["horizontal", "pressed"]
+ ]
+
+ property Component component: RangeSlider {
+ enabled: !is("disabled")
+ orientation: is("horizontal") ? Qt.Horizontal : Qt.Vertical
+ second.value: 0.5
+ }
+}
diff --git a/tests/manual/testbench/controls/RoundButton.qml b/tests/manual/testbench/controls/RoundButton.qml
new file mode 100644
index 00000000..75eedf38
--- /dev/null
+++ b/tests/manual/testbench/controls/RoundButton.qml
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["checked"],
+ ["checked", "disabled"],
+ ["checked", "hovered"],
+ ["highlighted"],
+ ["highlighted", "disabled"],
+ ["highlighted", "hovered"],
+ ["highlighted", "pressed"],
+ ["highlighted", "checked"],
+ ["highlighted", "checkable", "hovered"],
+ ["highlighted", "checkable", "pressed"],
+ ["highlighted", "checkable", "checked"],
+ ["hovered"],
+ ["flat"],
+ ["flat", "disabled"],
+ ["flat", "hovered"],
+ ["flat", "pressed"],
+ ["flat", "checked"],
+ ["flat", "checkable"],
+ ["flat", "checkable", "hovered"],
+ ["flat", "checkable", "pressed"],
+ ["flat", "checkable", "checked", "pressed"],
+ ["flat", "checkable", "highlighted"],
+ ["flat", "checkable", "highlighted", "pressed"],
+ ["flat", "checkable", "highlighted", "checked"]
+ ]
+
+ property Component component: RoundButton {
+ text: "B"
+ enabled: !is("disabled")
+ flat: is("flat")
+ checkable: is("checkable")
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+ highlighted: is("highlighted")
+ }
+}
diff --git a/tests/manual/testbench/controls/ScrollBar.qml b/tests/manual/testbench/controls/ScrollBar.qml
new file mode 100644
index 00000000..abe1d007
--- /dev/null
+++ b/tests/manual/testbench/controls/ScrollBar.qml
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ ["vertical"],
+ ["vertical", "disabled"],
+ ["vertical", "interactive"],
+ ["vertical", "interactive", "disabled"],
+ ["horizontal"],
+ ["horizontal", "disabled"],
+ ["horizontal", "interactive"],
+ ["horizontal", "interactive", "disabled"]
+ ]
+
+ property Component component: Frame {
+ width: 100
+ height: 100
+ clip: true
+
+ Label {
+ text: "ABCDEFG\nHIJKLMN"
+ font.pixelSize: 40
+ x: -horizontalScrollBar.position * width
+ y: -verticalScrollBar.position * height
+ }
+
+ ScrollBar {
+ id: verticalScrollBar
+ enabled: !is("disabled")
+ orientation: Qt.Vertical
+ interactive: is("interactive")
+ visible: is("vertical")
+ size: 0.3
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+
+ Binding {
+ target: verticalScrollBar
+ property: "active"
+ value: verticalScrollBar.visible
+ }
+ }
+
+ ScrollBar {
+ id: horizontalScrollBar
+ enabled: !is("disabled")
+ orientation: Qt.Vertical
+ interactive: is("interactive")
+ visible: is("horizontal")
+ size: 0.3
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+
+ Binding {
+ target: horizontalScrollBar
+ property: "active"
+ value: horizontalScrollBar.visible
+ }
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/ScrollIndicator.qml b/tests/manual/testbench/controls/ScrollIndicator.qml
new file mode 100644
index 00000000..8c5079fa
--- /dev/null
+++ b/tests/manual/testbench/controls/ScrollIndicator.qml
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ ["vertical"],
+ ["vertical", "disabled"],
+ ["horizontal"],
+ ["horizontal", "disabled"],
+ ]
+
+ property Component component: Frame {
+ width: 100
+ height: 100
+ clip: true
+
+ Label {
+ text: "ABCDEFG\nHIJKLMN"
+ font.pixelSize: 40
+ x: horizontalScrollIndicator.position * width
+ y: verticalScrollIndicator.position * height
+ }
+
+ ScrollIndicator {
+ id: verticalScrollIndicator
+ enabled: !is("disabled")
+ orientation: Qt.Vertical
+ active: true
+ visible: is("vertical")
+ size: 0.3
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ }
+
+ ScrollIndicator {
+ id: horizontalScrollIndicator
+ enabled: !is("disabled")
+ orientation: Qt.Vertical
+ active: true
+ visible: is("horizontal")
+ size: 0.3
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+
+ Binding {
+ target: horizontalScrollIndicator
+ property: "active"
+ value: horizontalScrollIndicator.visible
+ }
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/Slider.qml b/tests/manual/testbench/controls/Slider.qml
new file mode 100644
index 00000000..d2a272fa
--- /dev/null
+++ b/tests/manual/testbench/controls/Slider.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ ["vertical"],
+ ["vertical", "disabled"],
+ ["vertical", "pressed"],
+ ["horizontal"],
+ ["horizontal", "disabled"],
+ ["horizontal", "pressed"]
+ ]
+
+ property Component component: Slider {
+ enabled: !is("disabled")
+ orientation: is("horizontal") ? Qt.Horizontal : Qt.Vertical
+ value: 0.5
+ }
+}
diff --git a/tests/manual/testbench/controls/SpinBox.qml b/tests/manual/testbench/controls/SpinBox.qml
new file mode 100644
index 00000000..87e5cfae
--- /dev/null
+++ b/tests/manual/testbench/controls/SpinBox.qml
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ ["disabled"],
+ ["pressed"],
+ ["mirrored"],
+ ["mirrored", "disabled"],
+ ["mirrored", "pressed"],
+ ["editable"],
+ ["editable", "pressed"],
+ ["editable", "mirrored"],
+ ["editable", "mirrored", "pressed"],
+ ["editable", "mirrored", "mirrored"]
+ ]
+
+ property Component component: SpinBox {
+ value: 1
+ enabled: !is("disabled")
+ editable: is("editable")
+ up.pressed: is("pressed")
+
+ LayoutMirroring.enabled: is("mirrored")
+ }
+}
diff --git a/tests/manual/testbench/controls/SwipeDelegate.qml b/tests/manual/testbench/controls/SwipeDelegate.qml
new file mode 100644
index 00000000..3ea67101
--- /dev/null
+++ b/tests/manual/testbench/controls/SwipeDelegate.qml
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["highlighted"],
+ ["highlighted", "pressed"]
+ ]
+
+ property Component actionComponent: Component {
+ Rectangle {
+ color: SwipeDelegate.pressed ? "#333" : "#444"
+ width: parent ? parent.width : 0
+ height: parent ? parent.height: 0
+ clip: true
+
+ Label {
+ text: "Test"
+ color: "white"
+ anchors.centerIn: parent
+ }
+ }
+ }
+
+ property Component component: SwipeDelegate {
+ id: swipeDelegate
+ text: "SwipeDelegate"
+ enabled: !is("disabled")
+ checkable: is("checkable")
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+ highlighted: is("highlighted")
+
+ swipe.left: actionComponent
+ swipe.right: actionComponent
+ }
+
+ property Component exampleComponent: ListView {
+ implicitWidth: 200
+ implicitHeight: 200
+ clip: true
+ model: 20
+ delegate: SwipeDelegate {
+ width: parent.width
+ text: "SwipeDelegate"
+
+ swipe.left: actionComponent
+ swipe.right: actionComponent
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/Switch.qml b/tests/manual/testbench/controls/Switch.qml
new file mode 100644
index 00000000..70f44abd
--- /dev/null
+++ b/tests/manual/testbench/controls/Switch.qml
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["checked"],
+ ["checked", "disabled"],
+ ["checked", "disabled", "mirrored"],
+ ["checked", "pressed"],
+ ["checked", "pressed", "mirrored"],
+ ["mirrored"],
+ ]
+
+ property Component component: Switch {
+ text: "CheckBox"
+ enabled: !is("disabled")
+ checked: is("checked")
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+
+ LayoutMirroring.enabled: is("mirrored")
+ }
+}
diff --git a/tests/manual/testbench/controls/SwitchDelegate.qml b/tests/manual/testbench/controls/SwitchDelegate.qml
new file mode 100644
index 00000000..aad2eed3
--- /dev/null
+++ b/tests/manual/testbench/controls/SwitchDelegate.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ["pressed"],
+ ["highlighted"],
+ ["highlighted", "pressed"],
+ ["mirrored"]
+ ]
+
+ property Component component: SwitchDelegate {
+ text: "SwitchDelegate"
+ enabled: !is("disabled")
+ // Only set it if it's pressed, or the non-pressed examples will have no press effects
+ down: is("pressed") ? true : undefined
+ highlighted: is("highlighted")
+
+ LayoutMirroring.enabled: is("mirrored")
+ }
+
+ property Component exampleComponent: ListView {
+ implicitWidth: 200
+ implicitHeight: 200
+ clip: true
+ model: 20
+ delegate: SwitchDelegate {
+ width: parent.width
+ text: "SwitchDelegate"
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/TabBar.qml b/tests/manual/testbench/controls/TabBar.qml
new file mode 100644
index 00000000..4e6440d3
--- /dev/null
+++ b/tests/manual/testbench/controls/TabBar.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+// TODO
+QtObject {
+ property string customControlName: qsTr("TabBar & TabButton")
+
+ property var supportedStates: [
+ ["header"],
+ ["header", "disabled"],
+ ["footer"],
+ ["footer", "disabled"]
+ ]
+
+ property Component component: TabBar {
+ implicitHeight: tabButton1.implicitHeight
+ enabled: !is("disabled")
+ position: is("header") ? TabBar.Header : TabBar.Footer
+
+ TabButton {
+ id: tabButton1
+ text: qsTr("TabButton 1")
+ }
+ TabButton {
+ text: qsTr("TabButton 2")
+ }
+ TabButton {
+ text: qsTr("TabButton 3")
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/TextArea.qml b/tests/manual/testbench/controls/TextArea.qml
new file mode 100644
index 00000000..de34076a
--- /dev/null
+++ b/tests/manual/testbench/controls/TextArea.qml
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ]
+
+ property Component component: TextArea {
+ text: "TextArea\nTextArea\nTextArea"
+ }
+}
diff --git a/tests/manual/testbench/controls/TextField.qml b/tests/manual/testbench/controls/TextField.qml
new file mode 100644
index 00000000..6986854b
--- /dev/null
+++ b/tests/manual/testbench/controls/TextField.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"],
+ ]
+
+ property Component component: TextField {
+ text: "TextField"
+ enabled: !is("disabled")
+ }
+}
diff --git a/tests/manual/testbench/controls/ToolBar.qml b/tests/manual/testbench/controls/ToolBar.qml
new file mode 100644
index 00000000..7ce40218
--- /dev/null
+++ b/tests/manual/testbench/controls/ToolBar.qml
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+// TODO
+QtObject {
+ property string customControlName: qsTr("ToolBar, ToolButton & ToolSeparator")
+
+ property var supportedStates: [
+ ["header"],
+ ["header", "disabled"],
+ ["footer"],
+ ["footer", "disabled"]
+ ]
+
+ property Component component: ToolBar {
+ enabled: !is("disabled")
+ position: is("header") ? ToolBar.Header : ToolBar.Footer
+
+ RowLayout {
+ anchors.fill: parent
+
+ ToolButton {
+ text: qsTr("ToolButton 1")
+ }
+ ToolButton {
+ text: qsTr("ToolButton 2")
+ }
+
+ ToolSeparator {}
+
+ ToolButton {
+ text: qsTr("ToolButton 3")
+ }
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/ToolTip.qml b/tests/manual/testbench/controls/ToolTip.qml
new file mode 100644
index 00000000..19ae9dd1
--- /dev/null
+++ b/tests/manual/testbench/controls/ToolTip.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+QtObject {
+ property var supportedStates: [
+ []
+ ]
+
+ property Component component: Button {
+ text: qsTr("Hover over me")
+
+ ToolTip.text: qsTr("ToolTip")
+ ToolTip.visible: hovered
+ ToolTip.delay: 500
+ }
+}
diff --git a/tests/manual/testbench/controls/Tumbler.qml b/tests/manual/testbench/controls/Tumbler.qml
new file mode 100644
index 00000000..0d64ff3b
--- /dev/null
+++ b/tests/manual/testbench/controls/Tumbler.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+QtObject {
+ property var supportedStates: [
+ [],
+ ["disabled"]
+ ]
+
+ property Component component: Tumbler {
+ model: 20
+ enabled: !is("disabled")
+
+ LayoutMirroring.enabled: is("mirrored")
+ }
+}
diff --git a/tests/manual/testbench/directoryvalidator.cpp b/tests/manual/testbench/directoryvalidator.cpp
new file mode 100644
index 00000000..d0d4cd8d
--- /dev/null
+++ b/tests/manual/testbench/directoryvalidator.cpp
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directoryvalidator.h"
+
+#include <QFileInfo>
+
+DirectoryValidator::DirectoryValidator(QObject *parent) :
+ QObject(parent)
+{
+}
+
+QString DirectoryValidator::path() const
+{
+ return mPath;
+}
+
+void DirectoryValidator::setPath(const QString &path)
+{
+ if (path == mPath)
+ return;
+
+ const bool wasValid = isValid();
+ const QString oldErrorMessage = mErrorMessage;
+
+ mPath = path;
+ mErrorMessage.clear();
+
+ QFileInfo fileInfo(mPath);
+ if (!fileInfo.exists()) {
+ mErrorMessage = QLatin1String("Directory does not exist");
+ } else {
+ if (!fileInfo.isDir()) {
+ mErrorMessage = QLatin1String("Not a directory");
+ }
+ }
+
+ if (isValid() != wasValid)
+ emit validChanged();
+
+ if (mErrorMessage != oldErrorMessage)
+ emit errorMessageChanged();
+
+ emit pathChanged();
+}
+
+bool DirectoryValidator::isValid() const
+{
+ return mErrorMessage.isEmpty();
+}
+
+QString DirectoryValidator::errorMessage() const
+{
+ return mErrorMessage;
+}
diff --git a/tests/manual/testbench/directoryvalidator.h b/tests/manual/testbench/directoryvalidator.h
new file mode 100644
index 00000000..a1650d86
--- /dev/null
+++ b/tests/manual/testbench/directoryvalidator.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTORYVALIDATOR_H
+#define DIRECTORYVALIDATOR_H
+
+#include <QObject>
+
+class DirectoryValidator : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged FINAL)
+ Q_PROPERTY(bool valid READ isValid NOTIFY validChanged FINAL)
+ Q_PROPERTY(QString errorMessage READ errorMessage NOTIFY errorMessageChanged FINAL)
+
+public:
+ explicit DirectoryValidator(QObject *parent = nullptr);
+
+ QString path() const;
+ void setPath(const QString &path);
+
+ bool isValid() const;
+ QString errorMessage() const;
+
+signals:
+ void pathChanged();
+ void validChanged();
+ void errorMessageChanged();
+
+private:
+ void updateValid();
+
+ QString mPath;
+ QString mErrorMessage;
+};
+
+#endif // DIRECTORYVALIDATOR_H
diff --git a/tests/manual/testbench/fonts.qrc b/tests/manual/testbench/fonts.qrc
new file mode 100644
index 00000000..fc86e031
--- /dev/null
+++ b/tests/manual/testbench/fonts.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>fonts/fontawesome.ttf</file>
+ </qresource>
+</RCC>
diff --git a/tests/manual/testbench/fonts/LICENSE.txt b/tests/manual/testbench/fonts/LICENSE.txt
new file mode 100755
index 00000000..8fa3da36
--- /dev/null
+++ b/tests/manual/testbench/fonts/LICENSE.txt
@@ -0,0 +1,12 @@
+Font license info
+
+
+## Font Awesome
+
+ Copyright (C) 2016 by Dave Gandy
+
+ Author: Dave Gandy
+ License: SIL ()
+ Homepage: http://fortawesome.github.com/Font-Awesome/
+
+
diff --git a/tests/manual/testbench/fonts/fontawesome.ttf b/tests/manual/testbench/fonts/fontawesome.ttf
new file mode 100755
index 00000000..49b6c5da
--- /dev/null
+++ b/tests/manual/testbench/fonts/fontawesome.ttf
Binary files differ
diff --git a/tests/manual/testbench/main.cpp b/tests/manual/testbench/main.cpp
index d8786941..0287537d 100644
--- a/tests/manual/testbench/main.cpp
+++ b/tests/manual/testbench/main.cpp
@@ -48,22 +48,45 @@
**
****************************************************************************/
+#include <QDebug>
+#include <QFontDatabase>
#include <QGuiApplication>
+#include <QSettings>
#include <QQmlApplicationEngine>
-#include <QtCore/private/qabstractanimation_p.h>
+#include <QQmlContext>
+#include <QQuickStyle>
+
+#include "assetfixer.h"
+#include "clipboard.h"
+#include "directoryvalidator.h"
int main(int argc, char *argv[])
{
+ QGuiApplication::setApplicationName("testbench");
+ QGuiApplication::setOrganizationName("QtProject");
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
- QUnifiedTimer::instance()->setSlowModeEnabled(app.arguments().contains("-slow"));
+ QSettings settings;
+ QString style = QQuickStyle::name();
+ if (!style.isEmpty())
+ settings.setValue("style", style);
+ else
+ QQuickStyle::setStyle(settings.value("style").isValid() ? settings.value("style").toString() : "Imagine");
+
+ if (QFontDatabase::addApplicationFont(":/fonts/fontawesome.ttf") == -1) {
+ qWarning() << "Failed to load fontawesome font";
+ }
- // These must be set before running.
- // TODO: move style selection into app UI and use settings to save choices.
- // qputenv("QT_QUICK_CONTROLS_STYLE", "material");
QQmlApplicationEngine engine;
+
+ qmlRegisterType<AssetFixer>("App", 1, 0, "AssetFixer");
+ qmlRegisterType<Clipboard>("App", 1, 0, "Clipboard");
+ qmlRegisterType<DirectoryValidator>("App", 1, 0, "DirectoryValidator");
+
+ engine.rootContext()->setContextProperty("availableStyles", QQuickStyle::availableStyles());
+
engine.load(QUrl(QStringLiteral("qrc:/testbench.qml")));
return app.exec();
diff --git a/tests/manual/testbench/qml.qrc b/tests/manual/testbench/qml.qrc
index 9f4b1783..85d7f5d3 100644
--- a/tests/manual/testbench/qml.qrc
+++ b/tests/manual/testbench/qml.qrc
@@ -1,5 +1,43 @@
<RCC>
<qresource prefix="/">
+ <file>ControlContainer.qml</file>
+ <file>controls/Button.qml</file>
+ <file>controls/CheckBox.qml</file>
+ <file>controls/RadioButton.qml</file>
+ <file>controls/CheckDelegate.qml</file>
+ <file>controls/ComboBox.qml</file>
+ <file>controls/DelayButton.qml</file>
+ <file>controls/Dial.qml</file>
+ <file>controls/Frame.qml</file>
+ <file>controls/GroupBox.qml</file>
+ <file>controls/ItemDelegate.qml</file>
+ <file>controls/Page.qml</file>
+ <file>controls/PageIndicator.qml</file>
+ <file>controls/Pane.qml</file>
+ <file>controls/ProgressBar.qml</file>
+ <file>controls/RadioDelegate.qml</file>
+ <file>controls/RangeSlider.qml</file>
+ <file>controls/RoundButton.qml</file>
+ <file>controls/ScrollBar.qml</file>
+ <file>controls/ScrollIndicator.qml</file>
+ <file>controls/Slider.qml</file>
+ <file>controls/SpinBox.qml</file>
+ <file>controls/SwipeDelegate.qml</file>
+ <file>controls/Switch.qml</file>
+ <file>controls/SwitchDelegate.qml</file>
+ <file>controls/TabBar.qml</file>
+ <file>controls/TextArea.qml</file>
+ <file>controls/TextField.qml</file>
+ <file>SettingsDialog.qml</file>
+ <file>ColorEditor.qml</file>
+ <file>controls/ToolBar.qml</file>
+ <file>controls/Dialog.qml</file>
+ <file>controls/Menu.qml</file>
+ <file>ExampleContainer.qml</file>
+ <file>controls/Label.qml</file>
+ <file>controls/ToolTip.qml</file>
+ <file>controls/Tumbler.qml</file>
+ <file>controls/BusyIndicator.qml</file>
<file>testbench.qml</file>
</qresource>
</RCC>
diff --git a/tests/manual/testbench/testbench.pro b/tests/manual/testbench/testbench.pro
index 082ca66f..829bcbde 100644
--- a/tests/manual/testbench/testbench.pro
+++ b/tests/manual/testbench/testbench.pro
@@ -1,11 +1,20 @@
TEMPLATE = app
-QT += qml quick core-private
+QT += qml quick quickcontrols2
CONFIG += c++11
-SOURCES += main.cpp
+HEADERS += \
+ assetfixer.h \
+ directoryvalidator.h \
+ clipboard.h
-RESOURCES += qml.qrc
+SOURCES += main.cpp \
+ assetfixer.cpp \
+ directoryvalidator.cpp \
+ clipboard.cpp
+
+RESOURCES += qml.qrc \
+ fonts.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
diff --git a/tests/manual/testbench/testbench.qml b/tests/manual/testbench/testbench.qml
index 4ec9b1ea..43f4465e 100644
--- a/tests/manual/testbench/testbench.qml
+++ b/tests/manual/testbench/testbench.qml
@@ -48,169 +48,132 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Window 2.3
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.3
-import QtQuick.Controls.Material 2.3
-import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls.Imagine 2.3
+import Qt.labs.folderlistmodel 1.0
+import Qt.labs.settings 1.0
+
+import App 1.0
ApplicationWindow {
id: window
visible: true
- width: 750
- height: 1000
-
- Component.onCompleted: {
- x = Screen.width / 2 - width / 2
- y = Screen.height / 2 - height / 2
+ width: 1000
+ height: 750
+ title: "Style Testbench - " + settings.style + " Style" + (usingImagineStyle ? imagineTitleText : "")
+
+ Imagine.path: defaultImaginePath
+
+ readonly property bool usingImagineStyle: settings.style.toLowerCase() === "imagine"
+ // Some controls should be visible regardless of whether or not custom assets are lacking for it,
+ // so we use the default assets in some cases.
+ readonly property string defaultImaginePath: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Imagine/images/"
+ property bool settingsLoaded: false
+ readonly property string imagineTitleText: " - " + (settings.useCustomImaginePath ? settings.imaginePath : "Default Assets")
+
+ LoggingCategory {
+ id: brief
+ name: "qt.quick.controls.tools.testbench.assetfixer.brief"
}
- LayoutMirroring.childrenInherit: true
- LayoutMirroring.enabled: mirroredMenuItem.checked
-
- Material.theme: darkMenuItem.checked ? Material.Dark : Material.Light
- Universal.theme: darkMenuItem.checked ? Universal.Dark : Universal.Light
-
- property int controlSpacing: 10
+ Shortcut {
+ sequence: "Ctrl+F"
+ onActivated: searchTextField.forceActiveFocus()
+ }
Shortcut {
sequence: "Ctrl+Q"
onActivated: Qt.quit()
}
- header: ToolBar {
- Material.theme: Material.Dark
+ Action {
+ id: useCustomAssetsAction
+ text: qsTr("Use Custom Assets")
+ shortcut: "Ctrl+Shift+C"
+ enabled: usingImagineStyle
+ checkable: true
+ checked: settings.useCustomImaginePath
+ onTriggered: settings.useCustomImaginePath = !settings.useCustomImaginePath
+ }
- RowLayout {
- anchors.fill: parent
+ Action {
+ id: reloadAssetsAction
+ text: qsTr("Reload Assets")
+ shortcut: "Ctrl+R"
+ enabled: usingImagineStyle
+ onTriggered: assetFixer.reloadAssets()
+ }
- RowLayout {
- enabled: enabledMenuItem.checked
+ FontMetrics {
+ id: fontMetrics
+ }
- ToolButton {
- text: "\u2630"
- onClicked: drawer.open()
- }
+ Settings {
+ id: settings
- ToolSeparator {}
+ property alias windowX: window.x
+ property alias windowY: window.y
+ property alias windowWidth: window.width
+ property alias windowHeight: window.height
- ToolButton {
- text: "ToolButton"
- hoverEnabled: true
- ToolTip.text: text
- ToolTip.delay: 1000
- ToolTip.visible: hovered
- Layout.fillWidth: true
- }
- ToolButton {
- text: "Pressed"
- down: true
- hoverEnabled: true
- ToolTip.text: text
- ToolTip.delay: 1000
- ToolTip.visible: hovered
- Layout.fillWidth: true
- }
- ToolButton {
- text: "Checked"
- checkable: true
- checked: true
- hoverEnabled: true
- ToolTip.text: text
- ToolTip.delay: 1000
- ToolTip.visible: hovered
- Layout.fillWidth: true
- }
- ToolButton {
- text: "Highlighted"
- highlighted: true
- hoverEnabled: true
- ToolTip.text: text
- ToolTip.delay: 1000
- ToolTip.visible: hovered
- Layout.fillWidth: true
- }
- ToolButton {
- text: "Disabled"
- enabled: false
- Layout.fillWidth: true
- }
+ property string style: "Imagine"
- ToolSeparator {}
-
- ToolButton {
- id: menuButton
- text: "Menu"
- hoverEnabled: true
- checked: menu.visible
- checkable: true
- ToolTip.text: text
- ToolTip.delay: 1000
- ToolTip.visible: hovered
- Layout.fillWidth: true
+ property bool useCustomImaginePath
+ property string imaginePath
+ property bool fixImagineAssets
+ property alias imagineDirLastModified: assetFixer.assetDirectoryLastModified
- Menu {
- id: menu
- x: 1
- y: 1 + parent.height
- visible: menuButton.checked
- closePolicy: Popup.CloseOnPressOutsideParent
+ Component.onCompleted: settingsLoaded = true
+ }
- MenuItem {
- text: "MenuItem"
- }
- MenuItem {
- text: "Pressed"
- down: true
- }
- MenuItem {
- text: "Disabled"
- enabled: false
- }
+ Settings {
+ id: paletteSettings
+
+ category: "Palette"
+
+ property bool useCustomPalette
+ property string window
+ property string windowText
+ property string base
+ property string text
+ property string button
+ property string buttonText
+ property string brightText
+ property string toolTipBase
+ property string toolTipText
+ property string light
+ property string midlight
+ property string dark
+ property string mid
+ property string shadow
+ property string highlight
+ property string highlightedText
+ property string link
+ }
- MenuSeparator {}
+ header: ToolBar {
+ // Seems to be necessary to get the default assets to be used here,
+ // though it should inherit the window's path
+ Imagine.path: defaultImaginePath
- MenuItem {
- text: "Checked"
- checked: true
- }
- MenuItem {
- text: "CH+PR"
- checked: true
- down: true
- }
- MenuItem {
- text: "CH+DIS"
- checked: true
- enabled: false
- }
- }
- }
+ RowLayout {
+ anchors.fill: parent
- ToolButton {
- id: dialogButton
- text: "Dialog"
- hoverEnabled: true
- onClicked: dialog.open()
- ToolTip.text: text
- ToolTip.delay: 1000
- ToolTip.visible: hovered
- Layout.fillWidth: true
+ ToolButton {
+ text: "\uf0c9"
+ font.family: "fontawesome"
+ font.pixelSize: Qt.application.font.pixelSize * 1.6
+ onClicked: drawer.open()
+ }
- Dialog {
- id: dialog
- x: (window.width - width) / 2
- y: (window.height - height) / 2
- standardButtons: Dialog.Ok | Dialog.Cancel
- parent: window.contentItem
+ ToolSeparator {}
- Label {
- text: "Lorem ipsum dolor sit amet, \nconsectetuer adipiscing elit, \n"
- + "sed diam nonummy nibh euismod tincidunt ut \nlaoreet dolore magna aliquam erat volutpat."
- }
- }
- }
+ TextField {
+ id: searchTextField
+ placeholderText: "Search"
}
Item {
@@ -219,10 +182,14 @@ ApplicationWindow {
ToolButton {
id: optionsMenuButton
- text: "\u22EE" // VERTICAL ELLIPSIS
+ text: "\ue800"
+ font.family: "FontAwesome"
+ font.pixelSize: Qt.application.font.pixelSize * 1.6
checked: optionsMenu.visible
checkable: true
+ onClicked: optionsMenu.open()
+
Menu {
id: optionsMenu
x: 1
@@ -230,29 +197,34 @@ ApplicationWindow {
visible: optionsMenuButton.checked
closePolicy: Popup.CloseOnPressOutsideParent
+ Imagine.path: defaultImaginePath
+
MenuItem {
- id: enabledMenuItem
- text: "Enabled"
- checkable: true
- checked: true
+ text: qsTr("Open Asset Directory")
+ onClicked: Qt.openUrlExternally(assetFixer.assetDirectoryUrl)
+ enabled: usingImagineStyle
}
MenuItem {
- id: mirroredMenuItem
- text: "Mirrored"
- checkable: true
+ action: reloadAssetsAction
}
MenuItem {
- id: darkMenuItem
- text: "Dark"
- checkable: true
+ action: useCustomAssetsAction
}
MenuSeparator {}
MenuItem {
- text: "Quit"
+ id: settingsMenuItem
+ text: qsTr("Settings")
+ onTriggered: settingsDialog.open()
+ }
+
+ MenuSeparator {}
+
+ MenuItem {
+ text: qsTr("Quit")
onTriggered: Qt.quit()
}
}
@@ -260,838 +232,268 @@ ApplicationWindow {
}
}
- footer: TabBar {
- enabled: enabledMenuItem.checked
- TabButton {
- text: "TabButton"
- }
- TabButton {
- text: "Pressed"
- down: true
- }
- TabButton {
- text: "Disabled"
- enabled: false
- }
+ SettingsDialog {
+ id: settingsDialog
+
+ Imagine.path: defaultImaginePath
}
- Pane {
- anchors.fill: parent
+ Drawer {
+ id: drawer
+ width: parent.width * 0.33
+ height: window.height
+ focus: false
+ modal: false
- Drawer {
- id: drawer
- width: parent.width * 0.33
- height: parent.height
+ Label {
+ text: "Drawer contents go here"
+ anchors.centerIn: parent
}
+ }
- Flickable {
- anchors.fill: parent
- contentHeight: flow.height
-
- Flow {
- id: flow
- width: parent.width
- spacing: 30
- enabled: enabledMenuItem.checked
-
- RowLayout {
- spacing: window.controlSpacing
-
- Button {
- text: "Button"
- }
- Button {
- text: "Pressed"
- down: true
- }
- Button {
- text: "Checked"
- checked: true
- }
- Button {
- text: "CH + PR"
- checked: true
- down: true
- }
- Button {
- text: "Disabled"
- enabled: false
- }
- Button {
- text: "CH + DIS"
- enabled: false
- checked: true
- }
- }
-
- RowLayout {
- spacing: window.controlSpacing
-
- Button {
- text: "HI"
- highlighted: true
- }
- Button {
- text: "HI + PR"
- highlighted: true
- down: true
- }
- Button {
- text: "HI + CH"
- highlighted: true
- checked: true
- }
- Button {
- text: "HI+CH+PR"
- highlighted: true
- down: true
- checked: true
- }
- Button {
- text: "HI + DIS"
- highlighted: true
- enabled: false
- }
- Button {
- text: "HI+CH+DIS"
- highlighted: true
- enabled: false
- checked: true
- }
- }
-
- RowLayout {
- spacing: window.controlSpacing
-
- Button {
- text: "Flat"
- flat: true
- }
- Button {
- text: "Flat+PR"
- down: true
- flat: true
- }
- Button {
- text: "Flat+CH"
- checked: true
- flat: true
- }
- Button {
- text: "Flat+CH+PR"
- checked: true
- down: true
- flat: true
- }
- Button {
- text: "Flat+DIS"
- enabled: false
- flat: true
- }
- }
-
- RowLayout {
- spacing: window.controlSpacing
-
- DelayButton {
- text: "DelayButton"
- }
- DelayButton {
- text: "Pressed"
- down: true
- }
- DelayButton {
- text: "Checked"
- checked: true
- }
- DelayButton {
- text: "CH + PR"
- checked: true
- down: true
- }
- DelayButton {
- text: "Disabled"
- enabled: false
- }
- DelayButton {
- text: "CH + DIS"
- enabled: false
- checked: true
- }
- }
-
- RowLayout {
- spacing: window.controlSpacing * 2
-
- ColumnLayout {
- RoundButton {
- highlighted: true
- Layout.alignment: Qt.AlignHCenter
- }
- Label {
- text: "HI"
- Layout.alignment: Qt.AlignHCenter
- }
- }
- ColumnLayout {
- RoundButton {
- highlighted: true
- down: true
- Layout.alignment: Qt.AlignHCenter
- }
- Label {
- text: "HI + PR"
- Layout.alignment: Qt.AlignHCenter
- }
- }
- ColumnLayout {
- RoundButton {
- highlighted: true
- checked: true
- Layout.alignment: Qt.AlignHCenter
- }
- Label {
- text: "HI + CH"
- Layout.alignment: Qt.AlignHCenter
- }
- }
- ColumnLayout {
- RoundButton {
- highlighted: true
- down: true
- checked: true
- Layout.alignment: Qt.AlignHCenter
- }
- Label {
- text: "HI+CH+PR"
- Layout.alignment: Qt.AlignHCenter
- }
- }
- ColumnLayout {
- RoundButton {
- highlighted: true
- enabled: false
- Layout.alignment: Qt.AlignHCenter
- }
- Label {
- text: "HI + DIS"
- Layout.alignment: Qt.AlignHCenter
- }
- }
- ColumnLayout {
- RoundButton {
- highlighted: true
- enabled: false
- checked: true
- Layout.alignment: Qt.AlignHCenter
- }
- Label {
- text: "HI+CH+DIS"
- Layout.alignment: Qt.AlignHCenter
- }
- }
- }
+ AssetFixer {
+ id: assetFixer
+ assetDirectory: settings.imaginePath
+ // Don't start watching until the settings have loaded, as AssetFixer can be completed before it.
+ // AssetFixer needs the settings in order to check the last modified time of the asset directory.
+ // Also, wait until the UI has been rendered for the first time so that we can show our busy indicators, etc.
+ shouldWatch: usingImagineStyle && settings.useCustomImaginePath && settingsLoaded && initialUiRenderDelayTimer.hasRun
+ shouldFix: shouldWatch && settings.fixImagineAssets
+
+ onFixSuggested: fixEmUp()
+ onDelayedFixSuggested: assetFixerFileSystemDelayTimer.restart()
+ onReloadSuggested: reloadAssets()
+
+ function reloadAssets() {
+ console.log(brief, "Reloading assets...")
+ window.Imagine.path = ""
+ assetReloadNextFrameTimer.start()
+ }
- RowLayout {
- CheckBox {
- text: "CheckBox"
- }
- CheckBox {
- text: "Pressed"
- down: true
- }
- CheckBox {
- text: "Checked"
- checked: true
- }
- CheckBox {
- text: "CH + PR"
- checked: true
- down: true
- }
- CheckBox {
- text: "Disabled"
- enabled: false
- }
- CheckBox {
- text: "CH + DIS"
- checked: true
- enabled: false
- }
- }
+ function fixEmUp() {
+ // This is a bit of a hack, but I can't think of a nice way to solve it.
+ // The problem is that shouldWatch becomes true, causing startWatching() to be called.
+ // If a fix is suggested as a result of that, this function is called.
+ // However, the shouldFix binding hasn't been updated yet, so even though shouldWatch
+ // and settings.fixImagineAssets are both true (the properties that make up its binding),
+ // the if check below fails. So, we check for that case with effectiveShouldFix.
+ var effectiveShouldFix = shouldWatch && settings.fixImagineAssets;
+ if (shouldWatch && effectiveShouldFix && assetDirectory.length > 0) {
+ // Disable image caching if it hasn't already been done.
+ assetFixer.clearImageCache()
+
+ busyIndicatorRow.visible = true
+ assetFixerAnimationDelayTimer.start()
+ }
+ }
+ }
- RowLayout {
- CheckBox {
- text: "Tri-state\nCheckBox"
- tristate: true
- }
- CheckBox {
- text: "Pressed"
- down: true
- tristate: true
- }
- CheckBox {
- text: "Partially\nChecked"
- tristate: true
- checkState: Qt.PartiallyChecked
- }
- CheckBox {
- text: "CH + PR"
- tristate: true
- checkState: Qt.PartiallyChecked
- down: true
- }
- CheckBox {
- text: "Disabled"
- tristate: true
- enabled: false
- }
- CheckBox {
- text: "CH + DIS"
- tristate: true
- checkState: Qt.PartiallyChecked
- enabled: false
- }
- }
+ // The controls' assets don't always "reload" if the path is cleared and then set in the same frame,
+ // so we delay the setting to the next frame.
+ Timer {
+ id: assetReloadNextFrameTimer
+ interval: 0
+ onTriggered: {
+ window.Imagine.path = Qt.binding(function() {
+ return settings.useCustomImaginePath && settings.imaginePath.length > 0 ? settings.imaginePath : undefined
+ })
+ infoToolTip.text = "Reloaded assets"
+ infoToolTip.timeout = 1500
+ infoToolTip.open()
+ console.log(brief, "... reloaded assets.")
+ }
+ }
- RowLayout {
- RadioButton {
- text: "RadioButton"
- }
- RadioButton {
- text: "Pressed"
- down: true
- }
- RadioButton {
- text: "Checked"
- checked: true
- }
- RadioButton {
- text: "CH + PR"
- checked: true
- down: true
- }
- RadioButton {
- text: "Disabled"
- enabled: false
- }
- RadioButton {
- text: "CH + DIS"
- checked: true
- enabled: false
- }
- }
+ // When exporting or deleting a large amount of assets (not uncommon),
+ // the filesystem watcher seems to emit directoryChanged() every second or so,
+ // so rather than process hundreds of assets every time we get notified, delay
+ // it until we haven't been notified for a while.
+ Timer {
+ id: assetFixerFileSystemDelayTimer
+ interval: 2000
+ onRunningChanged: {
+ if (running) {
+ infoToolTip.text = "Assets changed on disk - reloading in 2 seconds if no further changes are detected"
+ infoToolTip.timeout = 2000
+ infoToolTip.open()
+ }
+ }
+ onTriggered: assetFixer.fixEmUp()
+ }
- RowLayout {
- Switch {
- text: "Switch"
- }
- Switch {
- text: "Pressed"
- down: true
- }
- Switch {
- text: "Checked"
- checked: true
- }
- Switch {
- text: "CH + PR"
- checked: true
- down: true
- }
- Switch {
- text: "Disabled"
- enabled: false
- }
- Switch {
- text: "CH + DIS"
- checked: true
- enabled: false
- }
- }
+ // Gives the BusyIndicator animation a chance to start.
+ Timer {
+ id: assetFixerAnimationDelayTimer
+ interval: 100
+ onTriggered: {
+ assetFixer.fixAssets()
+ busyIndicatorRow.visible = false
+ }
+ }
- RowLayout {
- ProgressBar {
- value: slider.value
- }
- ProgressBar {
- value: 0.5
- indeterminate: true
- }
- ProgressBar {
- value: 0.5
- enabled: false
- }
- }
+ // Gives the UI a chance to render before the initial fixup.
+ Timer {
+ id: initialUiRenderDelayTimer
+ interval: 300
+ running: true
+ onTriggered: hasRun = true
- RowLayout {
- Slider {
- id: slider
- value: 0.5
- }
- Slider {
- value: 0.5
- pressed: true
- }
- Slider {
- value: 0.5
- enabled: false
- }
- }
+ property bool hasRun: false
+ }
- RowLayout {
- RangeSlider {
- first.value: 0.25
- second.value: 0.75
- }
- RangeSlider {
- first.value: 0.25
- first.pressed: true
- second.value: 0.75
- }
- RangeSlider {
- first.value: 0.25
- second.value: 0.75
- enabled: false
- }
- }
+ function getControlElements(control) {
+ var props = [];
+ for (var p in control) {
+ if (p !== "component" && typeof control[p] === 'object')
+ props.push(p);
+ }
+ return props;
+ }
- RowLayout {
- spacing: window.controlSpacing * 2
+ Pane {
+ id: contentPane
+ anchors.fill: parent
- TextArea {
- text: "TextArea"
- Layout.preferredWidth: normalGroupBox.implicitWidth
- }
+ Imagine.path: settings.useCustomImaginePath && settings.imaginePath.length > 0 ? settings.imaginePath : undefined
+
+ palette.window: effectiveColor(paletteSettings.window)
+ palette.windowText: effectiveColor(paletteSettings.windowText)
+ palette.base: effectiveColor(paletteSettings.base)
+ palette.text: effectiveColor(paletteSettings.text)
+ palette.button: effectiveColor(paletteSettings.button)
+ palette.buttonText: effectiveColor(paletteSettings.buttonText)
+ palette.brightText: effectiveColor(paletteSettings.brightText)
+ palette.toolTipBase: effectiveColor(paletteSettings.toolTipBase)
+ palette.toolTipText: effectiveColor(paletteSettings.toolTipText)
+ palette.light: effectiveColor(paletteSettings.light)
+ palette.midlight: effectiveColor(paletteSettings.midlight)
+ palette.dark: effectiveColor(paletteSettings.dark)
+ palette.mid: effectiveColor(paletteSettings.mid)
+ palette.shadow: effectiveColor(paletteSettings.shadow)
+ palette.highlight: effectiveColor(paletteSettings.highlight)
+ palette.highlightedText: effectiveColor(paletteSettings.highlightedText)
+ palette.link: effectiveColor(paletteSettings.link)
+
+ function effectiveColor(paletteColorString) {
+ return paletteSettings.useCustomPalette && paletteColorString.length > 0 ? paletteColorString : undefined
+ }
- TextArea {
- placeholderText: "Placeholder"
- Layout.preferredWidth: normalGroupBox.implicitWidth
- }
+ ListView {
+ anchors.fill: parent
+ spacing: 30
+ visible: !busyIndicatorRow.visible
- TextArea {
- text: "Disabled"
- enabled: false
- Layout.preferredWidth: normalGroupBox.implicitWidth
- }
- }
+ ScrollBar.vertical: ScrollBar {}
- RowLayout {
- spacing: window.controlSpacing * 2
+ model: FolderListModel {
+ folder: "qrc:/controls"
+ showDirs: false
+ nameFilters: searchTextField.text.length > 0 ? ["*" + searchTextField.text + "*.qml"] : []
+ }
+ delegate: ColumnLayout {
+ id: rootDelegate
+ width: parent.width
- TextField {
- text: "TextField"
- }
- TextField {
- placeholderText: "Placeholder"
- }
- TextField {
- text: "Disabled"
- enabled: false
- }
+ MenuSeparator {
+ Layout.fillWidth: true
+ visible: index !== 0
}
- RowLayout {
- spacing: window.controlSpacing * 2
-
- SpinBox {
- id: normalSpinBox
- }
- SpinBox {
- up.pressed: true
- }
- SpinBox {
- editable: true
- }
- SpinBox {
- enabled: false
- }
+ Label {
+ text: customControlName.length === 0 ? model.fileBaseName : customControlName
+ font.pixelSize: Qt.application.font.pixelSize * 2
}
- RowLayout {
- spacing: window.controlSpacing * 2
-
- ComboBox {
- model: 5
- }
-
- ComboBox {
- pressed: true
- model: ["Pressed"]
- }
-
- ComboBox {
- editable: true
- model: ListModel {
- id: fruitModel
- ListElement { text: "Banana" }
- ListElement { text: "Apple" }
- ListElement { text: "Coconut" }
- }
- onAccepted: {
- if (find(editText) === -1)
- fruitModel.append({text: editText})
- }
- }
-
- ComboBox {
- enabled: false
- model: ["Disabled"]
+ readonly property var controlName: model.fileBaseName
+ readonly property var controlMetaObject: controlMetaObjectLoader.item
+ readonly property string customControlName: controlMetaObject && controlMetaObject.hasOwnProperty("customControlName")
+ ? controlMetaObject.customControlName : ""
+ readonly property var supportedStates: rootDelegate.controlMetaObject.supportedStates
+ readonly property int maxStateCombinations: {
+ var largest = 0;
+ for (var i = 0; i < supportedStates.length; ++i) {
+ var combinations = supportedStates[i];
+ if (combinations.length > largest)
+ largest = combinations.length;
}
+ return largest;
}
- ListModel {
- id: checkableDelegateModel
- ListElement { label: "Pressed"; press: true }
- ListElement { label: "Checked"; check: true }
- ListElement { label: "CH + PR"; check: true; press: true }
- ListElement { label: "Disabled"; disabled: true }
- ListElement { label: "CH + DIS"; check: true; disabled: true }
+ Loader {
+ id: controlMetaObjectLoader
+ source: "qrc" + model.filePath
}
- RowLayout {
- Frame {
- Column {
- width: 200
-
- CheckDelegate {
- text: "CheckDelegate"
- width: parent.width
- focusPolicy: Qt.StrongFocus
- }
-
- Repeater {
- model: checkableDelegateModel
- delegate: CheckDelegate {
- text: label
- width: parent.width
- down: press
- checked: check
- enabled: !disabled
- focusPolicy: Qt.StrongFocus
- }
- }
- }
- }
-
- Frame {
- Column {
- width: 200
-
- RadioDelegate {
- text: "RadioDelegate"
- width: parent.width
- focusPolicy: Qt.StrongFocus
- }
-
- Repeater {
- model: checkableDelegateModel
- delegate: RadioDelegate {
- text: label
- down: press
- width: parent.width
- checked: check
- enabled: !disabled
- focusPolicy: Qt.StrongFocus
- }
- }
- }
- }
-
- Frame {
- Column {
- width: 200
+ Flow {
+ spacing: 10
- SwitchDelegate {
- text: "SwitchDelegate"
- width: parent.width
- focusPolicy: Qt.StrongFocus
- }
+ Layout.fillWidth: true
- Repeater {
- model: checkableDelegateModel
- delegate: SwitchDelegate {
- text: label
- width: parent.width
- checked: check
- down: press
- enabled: !disabled
- focusPolicy: Qt.StrongFocus
- }
- }
- }
- }
- }
+ Repeater {
+ id: stateRepeater
+ model: rootDelegate.supportedStates
- ListModel {
- id: regularDelegateModel
- ListElement { label: "Pressed"; press: true }
- ListElement { label: "Disabled"; disabled: true }
- }
+ ColumnLayout {
+ id: labelWithDelegatesColumn
+ spacing: 4
- RowLayout {
- Frame {
- Column {
- width: 200
+ readonly property var states: modelData
+ readonly property string statesAsString: states.join("\n")
- ItemDelegate {
- text: "ItemDelegate"
- width: parent.width
- focusPolicy: Qt.StrongFocus
- }
+ Label {
+ text: statesAsString.length > 0 ? statesAsString : "normal"
- Repeater {
- model: regularDelegateModel
- delegate: ItemDelegate {
- text: label
- width: parent.width
- down: press
- enabled: !disabled
- focusPolicy: Qt.StrongFocus
- }
- }
- }
- }
- Frame {
- Column {
- id: listView
- width: 200
- clip: true
-
- SwipeDelegate {
- text: "SwipeDelegate"
- width: parent.width
- swipe.left: removeComponent
- swipe.right: removeComponent
- focusPolicy: Qt.StrongFocus
+ // 4 is the most states for any element (Button)
+ Layout.preferredHeight: (fontMetrics.lineSpacing) * (rootDelegate.maxStateCombinations + 1)
}
- Repeater {
- model: regularDelegateModel
- delegate: SwipeDelegate {
- text: label
- width: parent.width
- down: press
- enabled: !disabled
- focusPolicy: Qt.StrongFocus
-
- swipe.left: removeComponent
- swipe.right: removeComponent
- }
- }
+ ControlContainer {
+ id: controlContainer
+ objectName: controlName + "ControlContainer"
+ controlMetaObject: rootDelegate.controlMetaObject
+ states: labelWithDelegatesColumn.states
- Component {
- id: removeComponent
-
- Rectangle {
- color: parent.swipe.complete && parent.pressed ? "#333" : "#444"
- width: parent.width
- height: parent.height
- clip: true
-
- Label {
- font.pixelSize: parent.parent.font.pixelSize
- text: "Boop"
- color: "white"
- anchors.centerIn: parent
- }
- }
+ Layout.alignment: Qt.AlignHCenter
}
}
}
}
- RowLayout {
- Frame {
- padding: 0
- Layout.preferredWidth: 100
- Layout.preferredHeight: 100
-
- ScrollIndicator {
- size: 0.6
- position: 0.1
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- }
- }
-
- Frame {
- padding: 0
- Layout.preferredWidth: 100
- Layout.preferredHeight: 100
-
- ScrollIndicator {
- size: 0.6
- position: 0.1
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- enabled: false
- }
- }
- }
-
- RowLayout {
- Frame {
- id: scrollBarFrame
-
- padding: 0
- contentWidth: 200
- contentHeight: 100
-
- Label {
- text: "ScrollBar"
- anchors.centerIn: parent
- }
-
- ScrollBar {
- size: 0.6
- position: 0.1
- policy: ScrollBar.AlwaysOn
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- }
- }
-
- Frame {
- padding: 0
- contentWidth: 200
- contentHeight: 100
-
- Label {
- text: "Pressed"
- anchors.centerIn: parent
- }
-
- ScrollBar {
- size: 0.6
- position: 0.1
- policy: ScrollBar.AlwaysOn
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- pressed: true
- }
- }
-
- Frame {
- padding: 0
- contentWidth: 200
- contentHeight: 100
- enabled: false
-
- Label {
- text: "Disabled"
- anchors.centerIn: parent
- }
-
- ScrollBar {
- size: 0.6
- position: 0.1
- policy: ScrollBar.AlwaysOn
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- }
- }
- }
-
- RowLayout {
- GroupBox {
- id: normalGroupBox
- title: "GroupBox"
-
- contentWidth: 200
- contentHeight: 100
-
- BusyIndicator {
- anchors.centerIn: parent
- }
-
- PageIndicator {
- count: 5
- interactive: true
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- GroupBox {
- enabled: false
- title: "Disabled"
-
- contentWidth: 200
- contentHeight: 100
-
- BusyIndicator {
- anchors.centerIn: parent
- }
+ ExampleContainer {
+ id: exampleContainer
+ controlMetaObject: rootDelegate.controlMetaObject
+ visible: !!controlMetaObject.exampleComponent
- PageIndicator {
- count: 5
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- GroupBox {
- enabled: false
- title: "."
- label.visible: false
-
- contentWidth: 200
- contentHeight: 100
-
- PageIndicator {
- count: 5
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
+ Layout.alignment: Qt.AlignHCenter
+ Layout.topMargin: visible ? 14 : 0
+ Layout.fillWidth: true
+ Layout.preferredHeight: visible ? implicitHeight : 0
}
+ }
+ }
+ }
- RowLayout {
- Dial {
- value: 0.5
- implicitWidth: 100
- implicitHeight: 100
- }
- Dial {
- value: 0.5
- implicitWidth: 100
- implicitHeight: 100
- enabled: false
- }
- }
+ RowLayout {
+ id: busyIndicatorRow
+ anchors.centerIn: parent
+ visible: false
- RowLayout {
- Frame {
- Tumbler {
- id: tumbler
- model: 10
- implicitWidth: 60
- implicitHeight: 200
- }
- }
- Frame {
- Tumbler {
- model: 10
- implicitWidth: 60
- implicitHeight: 200
- enabled: false
- }
- }
- }
- }
+ BusyIndicator {
+ id: busyIndicator
+ running: visible
+ }
- ScrollBar.vertical: ScrollBar {
- parent: window.contentItem
- x: parent.width - width
- height: parent.height
- }
+ Label {
+ text: qsTr("Fixing assets...")
+ font.pixelSize: Qt.application.font.pixelSize * 2
}
}
+
+ ToolTip {
+ id: infoToolTip
+ x: (parent.width - width) / 2
+ y: parent.height - height - 40
+ parent: window.contentItem
+ }
}