aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore11
-rw-r--r--.qmake.conf2
-rw-r--r--dist/changes-5.10.0166
-rw-r--r--examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc15
-rw-r--r--examples/quickcontrols2/gallery/gallery.cpp3
-rw-r--r--examples/quickcontrols2/gallery/gallery.pro3
-rw-r--r--examples/quickcontrols2/gallery/gallery.qml16
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20/back.png (renamed from examples/quickcontrols2/gallery/images/back.png)bin220 -> 220 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20/drawer.png (renamed from examples/quickcontrols2/gallery/images/drawer.png)bin123 -> 123 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20/menu.png (renamed from examples/quickcontrols2/gallery/images/menu.png)bin123 -> 123 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20@2/back.png (renamed from examples/quickcontrols2/gallery/images/back@2x.png)bin289 -> 289 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20@2/drawer.png (renamed from examples/quickcontrols2/gallery/images/drawer@2x.png)bin126 -> 126 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20@2/menu.png (renamed from examples/quickcontrols2/gallery/images/menu@2x.png)bin158 -> 158 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20@3/back.png (renamed from examples/quickcontrols2/gallery/images/back@3x.png)bin351 -> 351 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20@3/drawer.png (renamed from examples/quickcontrols2/gallery/images/drawer@3x.png)bin130 -> 130 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20@3/menu.png (renamed from examples/quickcontrols2/gallery/images/menu@3x.png)bin193 -> 193 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20@4/back.png (renamed from examples/quickcontrols2/gallery/images/back@4x.png)bin452 -> 452 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20@4/drawer.png (renamed from examples/quickcontrols2/gallery/images/drawer@4x.png)bin131 -> 131 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/20x20@4/menu.png (renamed from examples/quickcontrols2/gallery/images/menu@4x.png)bin223 -> 223 bytes
-rw-r--r--examples/quickcontrols2/gallery/icons/gallery/index.theme24
-rw-r--r--examples/quickcontrols2/gallery/images/+material/back.pngbin219 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/back@2x.pngbin299 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/back@3x.pngbin344 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/back@4x.pngbin473 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/drawer.pngbin213 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/drawer@2x.pngbin286 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/drawer@3x.pngbin345 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/drawer@4x.pngbin420 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/menu.pngbin232 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/menu@2x.pngbin366 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/menu@3x.pngbin499 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/images/+material/menu@4x.pngbin642 -> 0 bytes
-rw-r--r--examples/quickcontrols2/gallery/pages/DialogPage.qml8
-rw-r--r--examples/quickcontrols2/imagine/automotive/automotive.cpp75
-rw-r--r--examples/quickcontrols2/imagine/automotive/automotive.pro15
-rw-r--r--examples/quickcontrols2/imagine/automotive/doc/images/qtquickcontrols2-automotive.pngbin0 -> 356738 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/doc/src/qtquickcontrols2-automotive.qdoc40
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/air-con.pngbin0 -> 1394 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/command.pngbin0 -> 1350 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/message.pngbin0 -> 479 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/music.pngbin0 -> 622 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/seats.pngbin0 -> 1017 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/settings.pngbin0 -> 1406 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/statistics.pngbin0 -> 324 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/windows.pngbin0 -> 564 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/air-con.pngbin0 -> 2337 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/command.pngbin0 -> 2461 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/message.pngbin0 -> 639 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/music.pngbin0 -> 1106 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/navigation.pngbin0 -> 1604 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/seats.pngbin0 -> 1793 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/settings.pngbin0 -> 2413 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/statistics.pngbin0 -> 394 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/windows.pngbin0 -> 999 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/icons.svg526
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/automotive/index.theme14
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/car.pngbin0 -> 14952 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/car@2x.pngbin0 -> 37391 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/icons.qrc29
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/warning.pngbin0 -> 1212 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/warning@2x.pngbin0 -> 2118 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/weather.pngbin0 -> 1092 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/icons/weather@2x.pngbin0 -> 1798 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/applicationwindow-background.pngbin0 -> 91 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/applicationwindow-background@2x.pngbin0 -> 98 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked-hovered.9.pngbin0 -> 368 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked-hovered@2x.9.pngbin0 -> 669 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked.9.pngbin0 -> 291 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked@2x.9.pngbin0 -> 506 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-hovered.9.pngbin0 -> 315 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-hovered@2x.9.pngbin0 -> 581 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-pressed.9.pngbin0 -> 289 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-pressed@2x.9.pngbin0 -> 501 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/button-background.9.pngbin0 -> 291 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/button-background@2x.9.pngbin0 -> 515 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-hovered.pngbin0 -> 3383 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-hovered@2x.pngbin0 -> 7128 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-pressed.pngbin0 -> 3084 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-pressed@2x.pngbin0 -> 6196 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background.pngbin0 -> 2746 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background@2x.pngbin0 -> 6094 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle-pressed.pngbin0 -> 136 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle-pressed@2x.pngbin0 -> 172 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle.pngbin0 -> 164 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle@2x.pngbin0 -> 177 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/frame-background.9.pngbin0 -> 257 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/frame-background@2x.9.pngbin0 -> 383 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/imagine-assets.qrc80
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-checked.9.pngbin0 -> 141 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-checked@2x.9.pngbin0 -> 180 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-hovered.9.pngbin0 -> 200 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-hovered@2x.9.pngbin0 -> 243 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-pressed.9.pngbin0 -> 139 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-pressed@2x.9.pngbin0 -> 178 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background.9.pngbin0 -> 134 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background@2x.9.pngbin0 -> 172 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-hovered.pngbin0 -> 623 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-hovered@2x.pngbin0 -> 1062 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-pressed.pngbin0 -> 271 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-pressed@2x.pngbin0 -> 429 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked.pngbin0 -> 291 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked@2x.pngbin0 -> 452 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-hovered.pngbin0 -> 444 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-hovered@2x.pngbin0 -> 842 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-pressed.pngbin0 -> 249 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-pressed@2x.pngbin0 -> 420 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator.pngbin0 -> 231 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator@2x.pngbin0 -> 384 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/scrollindicator-handle.pngbin0 -> 99 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/scrollindicator-handle@2x.pngbin0 -> 100 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-background-horizontal.9.pngbin0 -> 177 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-background-horizontal@2x.9.pngbin0 -> 274 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-hovered.pngbin0 -> 217 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-hovered@2x.pngbin0 -> 385 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-pressed.pngbin0 -> 155 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-pressed@2x.pngbin0 -> 258 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle.pngbin0 -> 166 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle@2x.pngbin0 -> 312 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal-pressed.9.pngbin0 -> 168 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal-pressed@2x.9.pngbin0 -> 262 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal.9.pngbin0 -> 175 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal@2x.9.pngbin0 -> 269 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-background.9.pngbin0 -> 112 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-background@2x.9.pngbin0 -> 118 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked-hovered.pngbin0 -> 253 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked-hovered@2x.pngbin0 -> 441 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked.pngbin0 -> 145 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked@2x.pngbin0 -> 195 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-hovered.pngbin0 -> 253 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-hovered@2x.pngbin0 -> 452 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-pressed.pngbin0 -> 145 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-pressed@2x.pngbin0 -> 195 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle.pngbin0 -> 217 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle@2x.pngbin0 -> 354 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator-pressed.pngbin0 -> 129 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator-pressed@2x.pngbin0 -> 180 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator.pngbin0 -> 129 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator@2x.pngbin0 -> 180 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/toolseparator-separator-vertical.9.pngbin0 -> 145 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/imagine-assets/toolseparator-separator-vertical@2x.9.pngbin0 -> 213 bytes
-rw-r--r--examples/quickcontrols2/imagine/automotive/qml/CustomGlow.qml57
-rw-r--r--examples/quickcontrols2/imagine/automotive/qml/FeatureButton.qml70
-rw-r--r--examples/quickcontrols2/imagine/automotive/qml/GlowingLabel.qml90
-rw-r--r--examples/quickcontrols2/imagine/automotive/qml/automotive.qml642
-rw-r--r--examples/quickcontrols2/imagine/automotive/qml/qml.qrc8
-rw-r--r--examples/quickcontrols2/imagine/automotive/qtquickcontrols2.conf10
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/doc/images/qtquickcontrols2-musicplayer.pngbin0 -> 1457884 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/doc/src/qtquickcontrols2-musicplayer.qdoc57
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/icons.qrc40
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/bluetooth.pngbin0 -> 556 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/cart.pngbin0 -> 425 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/cloud.pngbin0 -> 525 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/favorite.pngbin0 -> 379 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/filter.pngbin0 -> 441 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/folder.pngbin0 -> 279 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/message.pngbin0 -> 466 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/music.pngbin0 -> 454 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/next.pngbin0 -> 201 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/pause.pngbin0 -> 141 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/power.pngbin0 -> 710 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/previous.pngbin0 -> 203 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/repeat.pngbin0 -> 328 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/save.pngbin0 -> 419 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/settings.pngbin0 -> 499 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/shuffle.pngbin0 -> 366 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/stop.pngbin0 -> 157 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/bluetooth.pngbin0 -> 1202 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/cart.pngbin0 -> 782 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/cloud.pngbin0 -> 1003 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/favorite.pngbin0 -> 744 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/filter.pngbin0 -> 872 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/folder.pngbin0 -> 437 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/grid.pngbin0 -> 177 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/message.pngbin0 -> 850 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/music.pngbin0 -> 842 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/next.pngbin0 -> 354 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/pause.pngbin0 -> 163 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/power.pngbin0 -> 1329 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/previous.pngbin0 -> 436 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/repeat.pngbin0 -> 634 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/save.pngbin0 -> 496 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/settings.pngbin0 -> 960 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/shuffle.pngbin0 -> 724 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/stop.pngbin0 -> 242 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/icons.svg648
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/index.theme14
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/images/album-cover.jpgbin0 -> 917863 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/applicationwindow-background.pngbin0 -> 82 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked-hovered.9.pngbin0 -> 1446 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked-hovered@2x.9.pngbin0 -> 4150 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked.9.pngbin0 -> 1353 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked@2x.9.pngbin0 -> 4049 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-disabled.9.pngbin0 -> 543 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-disabled@2x.9.pngbin0 -> 1509 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-hovered.9.pngbin0 -> 1444 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-hovered@2x.9.pngbin0 -> 3855 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-pressed.9.pngbin0 -> 1437 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-pressed@2x.9.pngbin0 -> 4048 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background.9.pngbin0 -> 1368 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background@2x.9.pngbin0 -> 3813 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-hovered.9.pngbin0 -> 4220 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-hovered@2x.9.pngbin0 -> 15135 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-open.9.pngbin0 -> 4197 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-open@2x.9.pngbin0 -> 14766 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-pressed.9.pngbin0 -> 4254 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-pressed@2x.9.pngbin0 -> 14995 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background.9.pngbin0 -> 4283 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background@2x.9.pngbin0 -> 14357 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-hovered.pngbin0 -> 390 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-hovered@2x.pngbin0 -> 961 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-open.pngbin0 -> 415 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-open@2x.pngbin0 -> 929 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-pressed.pngbin0 -> 373 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-pressed@2x.pngbin0 -> 955 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator.pngbin0 -> 381 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator@2x.pngbin0 -> 970 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-popup.9.pngbin0 -> 2437 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-popup@2x.9.pngbin0 -> 5349 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-hovered.pngbin0 -> 11658 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-hovered@2x.pngbin0 -> 36836 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-pressed.pngbin0 -> 13807 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-pressed@2x.pngbin0 -> 46319 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background.pngbin0 -> 12858 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background@2x.pngbin0 -> 43910 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle-pressed.pngbin0 -> 528 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle-pressed@2x.pngbin0 -> 1091 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle.pngbin0 -> 478 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle@2x.pngbin0 -> 852 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/frame-background.9.pngbin0 -> 353 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/frame-background@2x.9.pngbin0 -> 451 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/imagine-assets.qrc113
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-checked.9.pngbin0 -> 1552 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-checked@2x.9.pngbin0 -> 3489 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-disabled.9.pngbin0 -> 241 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-disabled@2x.9.pngbin0 -> 254 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-hovered.9.pngbin0 -> 1490 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-hovered@2x.9.pngbin0 -> 3316 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-pressed.9.pngbin0 -> 1572 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-pressed@2x.9.pngbin0 -> 3534 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background.9.pngbin0 -> 241 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background@2x.9.pngbin0 -> 254 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked-hovered.pngbin0 -> 2109 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked-hovered@2x.pngbin0 -> 5930 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked.pngbin0 -> 1883 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked@2x.pngbin0 -> 5271 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-disabled.pngbin0 -> 1073 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-disabled@2x.pngbin0 -> 3011 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-hovered.pngbin0 -> 1901 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-hovered@2x.pngbin0 -> 5306 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-pressed.pngbin0 -> 1886 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-pressed@2x.pngbin0 -> 5263 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background.pngbin0 -> 1802 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background@2x.pngbin0 -> 5131 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-hovered.pngbin0 -> 199 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-hovered@2x.pngbin0 -> 199 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-pressed.pngbin0 -> 199 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-pressed@2x.pngbin0 -> 199 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive.pngbin0 -> 199 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive@2x.pngbin0 -> 199 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal-disabled.9.pngbin0 -> 340 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal-disabled@2x.9.pngbin0 -> 539 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal.9.pngbin0 -> 353 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal@2x.9.pngbin0 -> 550 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical-disabled.9.pngbin0 -> 355 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical-disabled@2x.9.pngbin0 -> 474 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical.9.pngbin0 -> 344 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical@2x.9.pngbin0 -> 501 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-disabled.pngbin0 -> 639 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-disabled@2x.pngbin0 -> 1069 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-hovered.pngbin0 -> 1342 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-hovered@2x.pngbin0 -> 3642 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle.pngbin0 -> 1333 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle@2x.pngbin0 -> 3593 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-horizontal.9.pngbin0 -> 353 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-horizontal@2x.9.pngbin0 -> 550 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical-disabled.9.pngbin0 -> 344 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical-disabled@2x.9.pngbin0 -> 501 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical.9.pngbin0 -> 344 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical@2x.9.pngbin0 -> 501 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background-disabled.9.pngbin0 -> 377 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background-disabled@2x.9.pngbin0 -> 495 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background.9.pngbin0 -> 379 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background@2x.9.pngbin0 -> 535 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbar-background.9.pngbin0 -> 405 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbar-background@2x.9.pngbin0 -> 584 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked-hovered.9.pngbin0 -> 1628 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked-hovered@2x.9.pngbin0 -> 3508 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked.9.pngbin0 -> 1533 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked@2x.9.pngbin0 -> 3516 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-hovered.9.pngbin0 -> 1509 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-hovered@2x.9.pngbin0 -> 3475 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-pressed.9.pngbin0 -> 1599 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-pressed@2x.9.pngbin0 -> 3509 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background.9.pngbin0 -> 1469 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background@2x.9.pngbin0 -> 3314 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/tooltip-background.9.pngbin0 -> 2576 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/imagine-assets/tooltip-background@2x.9.pngbin0 -> 4783 bytes
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/musicplayer.cpp73
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/musicplayer.pro16
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/musicplayer.qml467
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/qtquickcontrols2.conf10
-rw-r--r--examples/quickcontrols2/quickcontrols2.pro4
-rw-r--r--examples/quickcontrols2/sidepanel/doc/src/qtquickcontrols2-sidepanel.qdoc14
-rw-r--r--examples/quickcontrols2/swipetoremove/doc/src/qtquickcontrols2-swipetoremove.qdoc6
-rw-r--r--examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc71
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36/alarms.png (renamed from examples/quickcontrols2/wearable/qml/Alarms/images/alarms.png)bin689 -> 689 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36/fitness.png (renamed from examples/quickcontrols2/wearable/qml/Fitness/images/fitness.png)bin541 -> 541 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36/navigation.pngbin0 -> 581 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36/notifications.png (renamed from examples/quickcontrols2/wearable/qml/Notifications/images/notifications.png)bin683 -> 683 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36/settings.png (renamed from examples/quickcontrols2/wearable/qml/Settings/images/settings.png)bin703 -> 703 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36/weather.png (renamed from examples/quickcontrols2/wearable/qml/Weather/images/weather.png)bin548 -> 548 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36/worldclock.png (renamed from examples/quickcontrols2/wearable/qml/WorldClock/images/worldclock.png)bin601 -> 601 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36@2/alarms.png (renamed from examples/quickcontrols2/wearable/qml/Alarms/images/alarms@2x.png)bin1208 -> 1208 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36@2/fitness.png (renamed from examples/quickcontrols2/wearable/qml/Fitness/images/fitness@2x.png)bin958 -> 958 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36@2/navigation.pngbin0 -> 1063 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36@2/notifications.png (renamed from examples/quickcontrols2/wearable/qml/Notifications/images/notifications@2x.png)bin1316 -> 1316 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36@2/settings.png (renamed from examples/quickcontrols2/wearable/qml/Settings/images/settings@2x.png)bin1233 -> 1233 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36@2/weather.png (renamed from examples/quickcontrols2/wearable/qml/Weather/images/weather@2x.png)bin1061 -> 1061 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/36x36@2/worldclock.png (renamed from examples/quickcontrols2/wearable/qml/WorldClock/images/worldclock@2x.png)bin1101 -> 1101 bytes
-rw-r--r--examples/quickcontrols2/wearable/icons/wearable/index.theme14
-rw-r--r--examples/quickcontrols2/wearable/qml/LauncherPage.qml33
-rw-r--r--examples/quickcontrols2/wearable/wearable.cpp5
-rw-r--r--examples/quickcontrols2/wearable/wearable.qrc27
-rw-r--r--src/imports/calendar/plugins.qmltypes2
-rw-r--r--src/imports/calendar/qtlabscalendarplugin.cpp2
-rw-r--r--src/imports/controls/AbstractButton.qml4
-rw-r--r--src/imports/controls/Action.qml40
-rw-r--r--src/imports/controls/ActionGroup.qml40
-rw-r--r--src/imports/controls/ApplicationWindow.qml14
-rw-r--r--src/imports/controls/BusyIndicator.qml10
-rw-r--r--src/imports/controls/Button.qml37
-rw-r--r--src/imports/controls/ButtonGroup.qml4
-rw-r--r--src/imports/controls/CheckBox.qml46
-rw-r--r--src/imports/controls/CheckDelegate.qml56
-rw-r--r--src/imports/controls/ComboBox.qml38
-rw-r--r--src/imports/controls/Container.qml4
-rw-r--r--src/imports/controls/Control.qml4
-rw-r--r--src/imports/controls/DelayButton.qml21
-rw-r--r--src/imports/controls/Dial.qml20
-rw-r--r--src/imports/controls/Dialog.qml20
-rw-r--r--src/imports/controls/DialogButtonBox.qml5
-rw-r--r--src/imports/controls/Drawer.qml21
-rw-r--r--src/imports/controls/Frame.qml10
-rw-r--r--src/imports/controls/GroupBox.qml12
-rw-r--r--src/imports/controls/ItemDelegate.qml34
-rw-r--r--src/imports/controls/Label.qml12
-rw-r--r--src/imports/controls/Menu.qml26
-rw-r--r--src/imports/controls/MenuBar.qml (renamed from src/imports/controls/RadioIndicator.qml)43
-rw-r--r--src/imports/controls/MenuBarItem.qml78
-rw-r--r--src/imports/controls/MenuItem.qml54
-rw-r--r--src/imports/controls/MenuSeparator.qml10
-rw-r--r--src/imports/controls/Page.qml10
-rw-r--r--src/imports/controls/PageIndicator.qml10
-rw-r--r--src/imports/controls/Pane.qml10
-rw-r--r--src/imports/controls/Popup.qml19
-rw-r--r--src/imports/controls/ProgressBar.qml15
-rw-r--r--src/imports/controls/RadioButton.qml39
-rw-r--r--src/imports/controls/RadioDelegate.qml49
-rw-r--r--src/imports/controls/RangeSlider.qml64
-rw-r--r--src/imports/controls/RoundButton.qml35
-rw-r--r--src/imports/controls/ScrollBar.qml10
-rw-r--r--src/imports/controls/ScrollIndicator.qml10
-rw-r--r--src/imports/controls/ScrollView.qml8
-rw-r--r--src/imports/controls/Slider.qml47
-rw-r--r--src/imports/controls/SpinBox.qml30
-rw-r--r--src/imports/controls/StackView.qml6
-rw-r--r--src/imports/controls/SwipeDelegate.qml34
-rw-r--r--src/imports/controls/SwipeView.qml6
-rw-r--r--src/imports/controls/Switch.qml44
-rw-r--r--src/imports/controls/SwitchDelegate.qml60
-rw-r--r--src/imports/controls/TabBar.qml9
-rw-r--r--src/imports/controls/TabButton.qml31
-rw-r--r--src/imports/controls/TextArea.qml17
-rw-r--r--src/imports/controls/TextField.qml21
-rw-r--r--src/imports/controls/ToolBar.qml10
-rw-r--r--src/imports/controls/ToolButton.qml30
-rw-r--r--src/imports/controls/ToolSeparator.qml10
-rw-r--r--src/imports/controls/ToolTip.qml12
-rw-r--r--src/imports/controls/Tumbler.qml12
-rw-r--r--src/imports/controls/controls.pri17
-rw-r--r--src/imports/controls/controls.pro2
-rw-r--r--src/imports/controls/dependencies.json2
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-applicationwindow-wireframe.pngbin5696 -> 8518 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-button-icononly.pngbin0 -> 626 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-button-textbesideicon.pngbin0 -> 1827 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-button-textonly.pngbin0 -> 1470 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-fusion-palettes.pngbin0 -> 12467 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-fusion-thumbnail.pngbin0 -> 7522 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-fusion-violet.pngbin0 -> 3763 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-fusion.pngbin0 -> 12316 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-4x.pngbin0 -> 6210 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-inset-boundaries.pngbin0 -> 7797 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-inset.pngbin0 -> 2435 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-resized-padding.pngbin0 -> 27813 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-resized-stretchable.pngbin0 -> 24222 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-size.pngbin0 -> 7982 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch.svgzbin0 -> 7598 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine-customization-dark.pngbin0 -> 4542 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-imagine-customization.svgzbin0 -> 2215 bytes
-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/images/qtquickcontrols2-menu-custom.pngbin2960 -> 8745 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-menubar-custom.pngbin0 -> 3392 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-menubar.pngbin0 -> 10188 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-styles.pngbin48670 -> 115398 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/snippets/qtquickcontrols2-action.qml56
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-button-icononly.qml34
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-button-textbesideicon.qml35
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-button-textonly.qml34
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-menu-custom.qml113
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-menubar-custom.qml84
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-menubar.qml67
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-policy.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-custom.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-interactive.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-listview.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-policy.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-scrollview.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-stackview-visible.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml2
-rw-r--r--src/imports/controls/doc/src/includes/qquickicon.qdocinc42
-rw-r--r--src/imports/controls/doc/src/includes/qquickimaginestyle.qdocinc29
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc92
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc49
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc26
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc4
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-fusion.qdoc93
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-icons.qdoc169
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc2450
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-index.qdoc8
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-material.qdoc2
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-menus.qdoc27
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-palette.qdoc107
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc4
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc15
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc2
-rw-r--r--src/imports/controls/fusion/ApplicationWindow.qml55
-rw-r--r--src/imports/controls/fusion/BusyIndicator.qml69
-rw-r--r--src/imports/controls/fusion/Button.qml77
-rw-r--r--src/imports/controls/fusion/ButtonPanel.qml77
-rw-r--r--src/imports/controls/fusion/CheckBox.qml75
-rw-r--r--src/imports/controls/fusion/CheckDelegate.qml88
-rw-r--r--src/imports/controls/fusion/CheckIndicator.qml92
-rw-r--r--src/imports/controls/fusion/ComboBox.qml177
-rw-r--r--src/imports/controls/fusion/DelayButton.qml137
-rw-r--r--src/imports/controls/fusion/Dial.qml72
-rw-r--r--src/imports/controls/fusion/Dialog.qml103
-rw-r--r--src/imports/controls/fusion/DialogButtonBox.qml77
-rw-r--r--src/imports/controls/fusion/Drawer.qml90
-rw-r--r--src/imports/controls/fusion/Frame.qml59
-rw-r--r--src/imports/controls/fusion/GroupBox.qml80
-rw-r--r--src/imports/controls/fusion/ItemDelegate.qml78
-rw-r--r--src/imports/controls/fusion/Label.qml49
-rw-r--r--src/imports/controls/fusion/Menu.qml93
-rw-r--r--src/imports/controls/fusion/MenuBar.qml74
-rw-r--r--src/imports/controls/fusion/MenuBarItem.qml79
-rw-r--r--src/imports/controls/fusion/MenuItem.qml104
-rw-r--r--src/imports/controls/fusion/MenuSeparator.qml59
-rw-r--r--src/imports/controls/fusion/Page.qml62
-rw-r--r--src/imports/controls/fusion/PageIndicator.qml74
-rw-r--r--src/imports/controls/fusion/Pane.qml58
-rw-r--r--src/imports/controls/fusion/Popup.qml70
-rw-r--r--src/imports/controls/fusion/ProgressBar.qml118
-rw-r--r--src/imports/controls/fusion/RadioButton.qml75
-rw-r--r--src/imports/controls/fusion/RadioDelegate.qml88
-rw-r--r--src/imports/controls/fusion/RadioIndicator.qml (renamed from src/imports/controls/CheckIndicator.qml)51
-rw-r--r--src/imports/controls/fusion/RangeSlider.qml82
-rw-r--r--src/imports/controls/fusion/RoundButton.qml102
-rw-r--r--src/imports/controls/fusion/ScrollBar.qml79
-rw-r--r--src/imports/controls/fusion/ScrollIndicator.qml80
-rw-r--r--src/imports/controls/fusion/ScrollView.qml68
-rw-r--r--src/imports/controls/fusion/Slider.qml68
-rw-r--r--src/imports/controls/fusion/SliderGroove.qml94
-rw-r--r--src/imports/controls/fusion/SliderHandle.qml (renamed from src/imports/controls/SwitchIndicator.qml)70
-rw-r--r--src/imports/controls/fusion/SpinBox.qml183
-rw-r--r--src/imports/controls/fusion/SwipeDelegate.qml80
-rw-r--r--src/imports/controls/fusion/Switch.qml75
-rw-r--r--src/imports/controls/fusion/SwitchDelegate.qml87
-rw-r--r--src/imports/controls/fusion/SwitchIndicator.qml137
-rw-r--r--src/imports/controls/fusion/TabBar.qml80
-rw-r--r--src/imports/controls/fusion/TabButton.qml110
-rw-r--r--src/imports/controls/fusion/TextArea.qml76
-rw-r--r--src/imports/controls/fusion/TextField.qml103
-rw-r--r--src/imports/controls/fusion/ToolBar.qml85
-rw-r--r--src/imports/controls/fusion/ToolButton.qml77
-rw-r--r--src/imports/controls/fusion/ToolSeparator.qml66
-rw-r--r--src/imports/controls/fusion/ToolTip.qml80
-rw-r--r--src/imports/controls/fusion/Tumbler.qml74
-rw-r--r--src/imports/controls/fusion/fusion.pri67
-rw-r--r--src/imports/controls/fusion/fusion.pro25
-rw-r--r--src/imports/controls/fusion/images/arrow.pngbin0 -> 195 bytes
-rw-r--r--src/imports/controls/fusion/images/arrow.svg75
-rw-r--r--src/imports/controls/fusion/images/arrow@2x.pngbin0 -> 219 bytes
-rw-r--r--src/imports/controls/fusion/images/arrow@3x.pngbin0 -> 245 bytes
-rw-r--r--src/imports/controls/fusion/images/arrow@4x.pngbin0 -> 290 bytes
-rw-r--r--src/imports/controls/fusion/images/checkmark.pngbin0 -> 255 bytes
-rw-r--r--src/imports/controls/fusion/images/checkmark.svg72
-rw-r--r--src/imports/controls/fusion/images/checkmark@2x.pngbin0 -> 390 bytes
-rw-r--r--src/imports/controls/fusion/images/checkmark@3x.pngbin0 -> 494 bytes
-rw-r--r--src/imports/controls/fusion/images/checkmark@4x.pngbin0 -> 556 bytes
-rw-r--r--src/imports/controls/fusion/images/progressmask.pngbin0 -> 383 bytes
-rw-r--r--src/imports/controls/fusion/images/progressmask.svg74
-rw-r--r--src/imports/controls/fusion/images/progressmask@2x.pngbin0 -> 660 bytes
-rw-r--r--src/imports/controls/fusion/images/progressmask@3x.pngbin0 -> 866 bytes
-rw-r--r--src/imports/controls/fusion/images/progressmask@4x.pngbin0 -> 1103 bytes
-rw-r--r--src/imports/controls/fusion/qmldir4
-rw-r--r--src/imports/controls/fusion/qquickfusionbusyindicator.cpp90
-rw-r--r--src/imports/controls/fusion/qquickfusionbusyindicator_p.h75
-rw-r--r--src/imports/controls/fusion/qquickfusiondial.cpp152
-rw-r--r--src/imports/controls/fusion/qquickfusiondial_p.h80
-rw-r--r--src/imports/controls/fusion/qquickfusionknob.cpp99
-rw-r--r--src/imports/controls/fusion/qquickfusionknob_p.h75
-rw-r--r--src/imports/controls/fusion/qquickfusionstyle.cpp172
-rw-r--r--src/imports/controls/fusion/qquickfusionstyle_p.h87
-rw-r--r--src/imports/controls/fusion/qquickfusiontheme.cpp46
-rw-r--r--src/imports/controls/fusion/qquickfusiontheme_p.h65
-rw-r--r--src/imports/controls/fusion/qtquickcontrols2fusionstyle.qrc16
-rw-r--r--src/imports/controls/fusion/qtquickcontrols2fusionstyleplugin.cpp121
-rw-r--r--src/imports/controls/images/arrow-indicator.pngbin0 -> 260 bytes
-rw-r--r--src/imports/controls/images/arrow-indicator@2x.pngbin0 -> 343 bytes
-rw-r--r--src/imports/controls/images/arrow-indicator@3x.pngbin0 -> 438 bytes
-rw-r--r--src/imports/controls/images/arrow-indicator@4x.pngbin0 -> 545 bytes
-rw-r--r--src/imports/controls/imagine/ApplicationWindow.qml77
-rw-r--r--src/imports/controls/imagine/BusyIndicator.qml87
-rw-r--r--src/imports/controls/imagine/Button.qml99
-rw-r--r--src/imports/controls/imagine/CheckBox.qml108
-rw-r--r--src/imports/controls/imagine/CheckDelegate.qml118
-rw-r--r--src/imports/controls/imagine/ComboBox.qml172
-rw-r--r--src/imports/controls/imagine/DelayButton.qml139
-rw-r--r--src/imports/controls/imagine/Dial.qml99
-rw-r--r--src/imports/controls/imagine/Dialog.qml119
-rw-r--r--src/imports/controls/imagine/DialogButtonBox.qml86
-rw-r--r--src/imports/controls/imagine/Drawer.qml96
-rw-r--r--src/imports/controls/imagine/Frame.qml69
-rw-r--r--src/imports/controls/imagine/GroupBox.qml105
-rw-r--r--src/imports/controls/imagine/ItemDelegate.qml94
-rw-r--r--src/imports/controls/imagine/Label.qml62
-rw-r--r--src/imports/controls/imagine/Menu.qml105
-rw-r--r--src/imports/controls/imagine/MenuItem.qml138
-rw-r--r--src/imports/controls/imagine/MenuSeparator.qml78
-rw-r--r--src/imports/controls/imagine/Page.qml75
-rw-r--r--src/imports/controls/imagine/PageIndicator.qml91
-rw-r--r--src/imports/controls/imagine/Pane.qml69
-rw-r--r--src/imports/controls/imagine/Popup.qml89
-rw-r--r--src/imports/controls/imagine/ProgressBar.qml140
-rw-r--r--src/imports/controls/imagine/RadioButton.qml106
-rw-r--r--src/imports/controls/imagine/RadioDelegate.qml116
-rw-r--r--src/imports/controls/imagine/RangeSlider.qml132
-rw-r--r--src/imports/controls/imagine/RoundButton.qml98
-rw-r--r--src/imports/controls/imagine/ScrollBar.qml117
-rw-r--r--src/imports/controls/imagine/ScrollIndicator.qml110
-rw-r--r--src/imports/controls/imagine/ScrollView.qml86
-rw-r--r--src/imports/controls/imagine/Slider.qml118
-rw-r--r--src/imports/controls/imagine/SpinBox.qml154
-rw-r--r--src/imports/controls/imagine/StackView.qml90
-rw-r--r--src/imports/controls/imagine/SwipeDelegate.qml96
-rw-r--r--src/imports/controls/imagine/SwipeView.qml88
-rw-r--r--src/imports/controls/imagine/Switch.qml135
-rw-r--r--src/imports/controls/imagine/SwitchDelegate.qml146
-rw-r--r--src/imports/controls/imagine/TabBar.qml86
-rw-r--r--src/imports/controls/imagine/TabButton.qml92
-rw-r--r--src/imports/controls/imagine/TextArea.qml95
-rw-r--r--src/imports/controls/imagine/TextField.qml95
-rw-r--r--src/imports/controls/imagine/ToolBar.qml71
-rw-r--r--src/imports/controls/imagine/ToolButton.qml95
-rw-r--r--src/imports/controls/imagine/ToolSeparator.qml82
-rw-r--r--src/imports/controls/imagine/ToolTip.qml84
-rw-r--r--src/imports/controls/imagine/Tumbler.qml89
-rw-r--r--src/imports/controls/imagine/design/9-patch-export.sketchplugin/Contents/Sketch/9-patch-export.js24
-rw-r--r--src/imports/controls/imagine/design/9-patch-export.sketchplugin/Contents/Sketch/manifest.json19
-rw-r--r--src/imports/controls/imagine/design/imagine.sketchbin0 -> 293192 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-background.pngbin0 -> 84 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-background@2x.pngbin0 -> 91 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-background@3x.pngbin0 -> 93 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-background@4x.pngbin0 -> 94 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-overlay-modal.pngbin0 -> 86 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-overlay-modal@2x.pngbin0 -> 92 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-overlay-modal@3x.pngbin0 -> 94 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-overlay-modal@4x.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-overlay.pngbin0 -> 86 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-overlay@2x.pngbin0 -> 92 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-overlay@3x.pngbin0 -> 94 bytes
-rw-r--r--src/imports/controls/imagine/images/applicationwindow-overlay@4x.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/busyindicator-animation.webpbin0 -> 30116 bytes
-rw-r--r--src/imports/controls/imagine/images/busyindicator-animation@2x.webpbin0 -> 56588 bytes
-rw-r--r--src/imports/controls/imagine/images/busyindicator-animation@3x.webpbin0 -> 77816 bytes
-rw-r--r--src/imports/controls/imagine/images/busyindicator-animation@4x.webpbin0 -> 103290 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-disabled.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-disabled@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-disabled@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-disabled@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-focused.9.pngbin0 -> 355 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-focused@2x.9.pngbin0 -> 730 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-focused@3x.9.pngbin0 -> 1149 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-focused@4x.9.pngbin0 -> 1653 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-hovered.9.pngbin0 -> 355 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-hovered@2x.9.pngbin0 -> 730 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-hovered@3x.9.pngbin0 -> 1149 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked-hovered@4x.9.pngbin0 -> 1653 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked.9.pngbin0 -> 372 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked@2x.9.pngbin0 -> 694 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked@3x.9.pngbin0 -> 1170 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-checked@4x.9.pngbin0 -> 1723 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-disabled.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-disabled@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-disabled@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-disabled@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-checked-pressed.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-checked-pressed@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-checked-pressed@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-checked-pressed@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-checked.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-checked@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-checked@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-checked@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-disabled.9.pngbin0 -> 197 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-disabled@2x.9.pngbin0 -> 308 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-disabled@3x.9.pngbin0 -> 589 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-disabled@4x.9.pngbin0 -> 860 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted-checked.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted-checked@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted-checked@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted-checked@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted-pressed.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted.9.pngbin0 -> 197 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted@2x.9.pngbin0 -> 308 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted@3x.9.pngbin0 -> 589 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-highlighted@4x.9.pngbin0 -> 860 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-hovered.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-hovered@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-hovered@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-hovered@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-pressed.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-pressed@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-pressed@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat-pressed@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat.9.pngbin0 -> 197 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat@2x.9.pngbin0 -> 308 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat@3x.9.pngbin0 -> 589 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-flat@4x.9.pngbin0 -> 860 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-focused.9.pngbin0 -> 341 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-focused@2x.9.pngbin0 -> 663 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-focused@3x.9.pngbin0 -> 1120 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-focused@4x.9.pngbin0 -> 1584 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-checked.9.pngbin0 -> 342 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-checked@2x.9.pngbin0 -> 658 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-checked@3x.9.pngbin0 -> 1122 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-checked@4x.9.pngbin0 -> 1583 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-disabled.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-disabled@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-disabled@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-disabled@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-focused.9.pngbin0 -> 342 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-focused@2x.9.pngbin0 -> 712 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-focused@3x.9.pngbin0 -> 1075 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-focused@4x.9.pngbin0 -> 1577 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-hovered.9.pngbin0 -> 342 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-hovered@2x.9.pngbin0 -> 712 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-hovered@3x.9.pngbin0 -> 1075 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-hovered@4x.9.pngbin0 -> 1577 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-pressed.9.pngbin0 -> 342 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-pressed@2x.9.pngbin0 -> 658 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-pressed@3x.9.pngbin0 -> 1122 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted-pressed@4x.9.pngbin0 -> 1583 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted.9.pngbin0 -> 355 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted@2x.9.pngbin0 -> 727 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted@3x.9.pngbin0 -> 1145 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-highlighted@4x.9.pngbin0 -> 1686 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-hovered.9.pngbin0 -> 341 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-hovered@2x.9.pngbin0 -> 663 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-hovered@3x.9.pngbin0 -> 1120 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-hovered@4x.9.pngbin0 -> 1584 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-pressed.9.pngbin0 -> 372 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-pressed@2x.9.pngbin0 -> 694 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-pressed@3x.9.pngbin0 -> 1170 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background-pressed@4x.9.pngbin0 -> 1723 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background.9.pngbin0 -> 358 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background@2x.9.pngbin0 -> 650 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background@3x.9.pngbin0 -> 1145 bytes
-rw-r--r--src/imports/controls/imagine/images/button-background@4x.9.pngbin0 -> 1600 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-focused.pngbin0 -> 394 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-focused@2x.pngbin0 -> 709 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-focused@3x.pngbin0 -> 1059 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-focused@4x.pngbin0 -> 1514 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-hovered.pngbin0 -> 394 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@2x.pngbin0 -> 709 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@3x.pngbin0 -> 1059 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@4x.pngbin0 -> 1514 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-pressed.pngbin0 -> 436 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@2x.pngbin0 -> 799 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@3x.pngbin0 -> 1186 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@4x.pngbin0 -> 1672 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked@2x.pngbin0 -> 795 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked@3x.pngbin0 -> 1149 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-checked@4x.pngbin0 -> 1625 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-disabled.pngbin0 -> 167 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-disabled@2x.pngbin0 -> 289 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-disabled@3x.pngbin0 -> 433 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-disabled@4x.pngbin0 -> 695 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-focused.pngbin0 -> 165 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-focused@2x.pngbin0 -> 292 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-focused@3x.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-focused@4x.pngbin0 -> 705 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-hovered.pngbin0 -> 165 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-hovered@2x.pngbin0 -> 292 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-hovered@3x.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-hovered@4x.pngbin0 -> 705 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused.pngbin0 -> 185 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@2x.pngbin0 -> 330 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@3x.pngbin0 -> 473 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@4x.pngbin0 -> 702 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered.pngbin0 -> 185 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@2x.pngbin0 -> 330 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@3x.pngbin0 -> 473 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@4x.pngbin0 -> 702 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed.pngbin0 -> 191 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@2x.pngbin0 -> 332 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@3x.pngbin0 -> 491 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@4x.pngbin0 -> 709 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked@2x.pngbin0 -> 340 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked@3x.pngbin0 -> 477 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-partially-checked@4x.pngbin0 -> 713 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-pressed.pngbin0 -> 164 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-pressed@2x.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-pressed@3x.pngbin0 -> 430 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator-pressed@4x.pngbin0 -> 615 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator.pngbin0 -> 168 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator@2x.pngbin0 -> 299 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator@3x.pngbin0 -> 427 bytes
-rw-r--r--src/imports/controls/imagine/images/checkbox-indicator@4x.pngbin0 -> 623 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-disabled.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-disabled@2x.9.pngbin0 -> 201 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-disabled@3x.9.pngbin0 -> 228 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-disabled@4x.9.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-focused.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-focused@2x.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-focused@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-focused@4x.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-highlighted.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-highlighted@2x.9.pngbin0 -> 205 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-highlighted@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-highlighted@4x.9.pngbin0 -> 307 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-hovered.9.pngbin0 -> 145 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-hovered@2x.9.pngbin0 -> 194 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-hovered@3x.9.pngbin0 -> 221 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-hovered@4x.9.pngbin0 -> 296 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-pressed.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-pressed@2x.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-pressed@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background-pressed@4x.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background.9.pngbin0 -> 145 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background@2x.9.pngbin0 -> 194 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background@3x.9.pngbin0 -> 221 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-background@4x.9.pngbin0 -> 296 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused.pngbin0 -> 394 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@2x.pngbin0 -> 709 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@3x.pngbin0 -> 1059 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@4x.pngbin0 -> 1514 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered.pngbin0 -> 394 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@2x.pngbin0 -> 709 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@3x.pngbin0 -> 1059 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@4x.pngbin0 -> 1514 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed.pngbin0 -> 436 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@2x.pngbin0 -> 799 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@3x.pngbin0 -> 1186 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@4x.pngbin0 -> 1672 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked@2x.pngbin0 -> 795 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked@3x.pngbin0 -> 1149 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-checked@4x.pngbin0 -> 1625 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-disabled.pngbin0 -> 167 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-disabled@2x.pngbin0 -> 289 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-disabled@3x.pngbin0 -> 433 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-disabled@4x.pngbin0 -> 695 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-focused.pngbin0 -> 165 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-focused@2x.pngbin0 -> 292 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-focused@3x.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-focused@4x.pngbin0 -> 705 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-hovered.pngbin0 -> 165 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-hovered@2x.pngbin0 -> 292 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-hovered@3x.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-hovered@4x.pngbin0 -> 705 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused.pngbin0 -> 185 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@2x.pngbin0 -> 330 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@3x.pngbin0 -> 473 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@4x.pngbin0 -> 702 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered.pngbin0 -> 185 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@2x.pngbin0 -> 330 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@3x.pngbin0 -> 473 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@4x.pngbin0 -> 702 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed.pngbin0 -> 191 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@2x.pngbin0 -> 332 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@3x.pngbin0 -> 491 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@4x.pngbin0 -> 709 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@2x.pngbin0 -> 340 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@3x.pngbin0 -> 477 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@4x.pngbin0 -> 713 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-pressed.pngbin0 -> 164 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-pressed@2x.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-pressed@3x.pngbin0 -> 430 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator-pressed@4x.pngbin0 -> 615 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator.pngbin0 -> 168 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator@2x.pngbin0 -> 299 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator@3x.pngbin0 -> 427 bytes
-rw-r--r--src/imports/controls/imagine/images/checkdelegate-indicator@4x.pngbin0 -> 623 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-disabled.9.pngbin0 -> 450 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-disabled@2x.9.pngbin0 -> 986 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-disabled@3x.9.pngbin0 -> 1655 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-disabled@4x.9.pngbin0 -> 2297 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable-disabled.9.pngbin0 -> 435 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable-disabled@2x.9.pngbin0 -> 993 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable-disabled@3x.9.pngbin0 -> 1652 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable-disabled@4x.9.pngbin0 -> 2400 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable-focused.9.pngbin0 -> 447 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable-focused@2x.9.pngbin0 -> 1114 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable-focused@3x.9.pngbin0 -> 1905 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable-focused@4x.9.pngbin0 -> 2792 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable.9.pngbin0 -> 460 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable@2x.9.pngbin0 -> 1185 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable@3x.9.pngbin0 -> 1898 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-editable@4x.9.pngbin0 -> 2750 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-focused.9.pngbin0 -> 443 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-focused@2x.9.pngbin0 -> 957 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-focused@3x.9.pngbin0 -> 1630 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-focused@4x.9.pngbin0 -> 2392 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-hovered.9.pngbin0 -> 443 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-hovered@2x.9.pngbin0 -> 957 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-hovered@3x.9.pngbin0 -> 1630 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-hovered@4x.9.pngbin0 -> 2392 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-open.9.pngbin0 -> 475 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-open@2x.9.pngbin0 -> 1018 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-open@3x.9.pngbin0 -> 1693 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-open@4x.9.pngbin0 -> 2461 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-pressed.9.pngbin0 -> 475 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-pressed@2x.9.pngbin0 -> 1018 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-pressed@3x.9.pngbin0 -> 1693 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background-pressed@4x.9.pngbin0 -> 2461 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background.9.pngbin0 -> 461 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background@2x.9.pngbin0 -> 930 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background@3x.9.pngbin0 -> 1635 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-background@4x.9.pngbin0 -> 2273 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-disabled.pngbin0 -> 215 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-disabled@2x.pngbin0 -> 261 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-disabled@3x.pngbin0 -> 426 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-disabled@4x.pngbin0 -> 530 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-disabled.pngbin0 -> 316 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-disabled@2x.pngbin0 -> 559 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-disabled@3x.pngbin0 -> 937 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-disabled@4x.pngbin0 -> 1188 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled.pngbin0 -> 333 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@2x.pngbin0 -> 544 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@3x.pngbin0 -> 885 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@4x.pngbin0 -> 1291 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-mirrored.pngbin0 -> 361 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@2x.pngbin0 -> 589 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@3x.pngbin0 -> 939 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@4x.pngbin0 -> 1350 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable.pngbin0 -> 346 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable@2x.pngbin0 -> 558 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable@3x.pngbin0 -> 971 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator-editable@4x.pngbin0 -> 1314 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator.pngbin0 -> 190 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator@2x.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator@3x.pngbin0 -> 407 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-indicator@4x.pngbin0 -> 533 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-popup.9.pngbin0 -> 664 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-popup@2x.9.pngbin0 -> 1398 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-popup@3x.9.pngbin0 -> 2438 bytes
-rw-r--r--src/imports/controls/imagine/images/combobox-popup@4x.9.pngbin0 -> 3448 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked-focused.9.pngbin0 -> 355 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked-focused@2x.9.pngbin0 -> 730 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked-focused@3x.9.pngbin0 -> 1149 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked-focused@4x.9.pngbin0 -> 1653 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked-hovered.9.pngbin0 -> 355 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked-hovered@2x.9.pngbin0 -> 730 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked-hovered@3x.9.pngbin0 -> 1149 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked-hovered@4x.9.pngbin0 -> 1653 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked.9.pngbin0 -> 372 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked@2x.9.pngbin0 -> 694 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked@3x.9.pngbin0 -> 1170 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-checked@4x.9.pngbin0 -> 1723 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-disabled-checked.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-disabled-checked@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-disabled-checked@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-disabled-checked@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-disabled.9.pngbin0 -> 351 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-disabled@2x.9.pngbin0 -> 711 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-disabled@3x.9.pngbin0 -> 1070 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-disabled@4x.9.pngbin0 -> 1696 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-focused.9.pngbin0 -> 342 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-focused@2x.9.pngbin0 -> 649 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-focused@3x.9.pngbin0 -> 1170 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-focused@4x.9.pngbin0 -> 1687 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-hovered.9.pngbin0 -> 341 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-hovered@2x.9.pngbin0 -> 663 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-hovered@3x.9.pngbin0 -> 1120 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-hovered@4x.9.pngbin0 -> 1584 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-pressed.9.pngbin0 -> 372 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-pressed@2x.9.pngbin0 -> 694 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-pressed@3x.9.pngbin0 -> 1170 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background-pressed@4x.9.pngbin0 -> 1723 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background.9.pngbin0 -> 358 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background@2x.9.pngbin0 -> 650 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background@3x.9.pngbin0 -> 1145 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-background@4x.9.pngbin0 -> 1600 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-mask.9.pngbin0 -> 297 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-mask@2x.9.pngbin0 -> 645 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-mask@3x.9.pngbin0 -> 1066 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-mask@4x.9.pngbin0 -> 1499 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-progress-disabled.9.pngbin0 -> 227 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-progress-disabled@2x.9.pngbin0 -> 366 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-progress-disabled@3x.9.pngbin0 -> 676 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-progress-disabled@4x.9.pngbin0 -> 938 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-progress.9.pngbin0 -> 229 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-progress@2x.9.pngbin0 -> 368 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-progress@3x.9.pngbin0 -> 678 bytes
-rw-r--r--src/imports/controls/imagine/images/delaybutton-progress@4x.9.pngbin0 -> 940 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background-disabled.pngbin0 -> 6691 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background-disabled@2x.pngbin0 -> 15224 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background-disabled@3x.pngbin0 -> 25013 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background-disabled@4x.pngbin0 -> 36000 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background-focused.pngbin0 -> 6852 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background-focused@2x.pngbin0 -> 15317 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background-focused@3x.pngbin0 -> 25211 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background-focused@4x.pngbin0 -> 36274 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background.pngbin0 -> 6798 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background@2x.pngbin0 -> 15237 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background@3x.pngbin0 -> 25121 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-background@4x.pngbin0 -> 36025 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-disabled.pngbin0 -> 191 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-disabled@2x.pngbin0 -> 256 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-disabled@3x.pngbin0 -> 316 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-disabled@4x.pngbin0 -> 367 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused-hovered.pngbin0 -> 185 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused-hovered@2x.pngbin0 -> 254 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused-hovered@3x.pngbin0 -> 321 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused-hovered@4x.pngbin0 -> 371 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused-pressed.pngbin0 -> 188 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused-pressed@2x.pngbin0 -> 255 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused-pressed@3x.pngbin0 -> 323 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused-pressed@4x.pngbin0 -> 386 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused@2x.pngbin0 -> 263 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused@3x.pngbin0 -> 320 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-focused@4x.pngbin0 -> 380 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-hovered.pngbin0 -> 178 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-hovered@2x.pngbin0 -> 253 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-hovered@3x.pngbin0 -> 312 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-hovered@4x.pngbin0 -> 367 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-pressed.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-pressed@2x.pngbin0 -> 274 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-pressed@3x.pngbin0 -> 332 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle-pressed@4x.pngbin0 -> 398 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle@2x.pngbin0 -> 253 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle@3x.pngbin0 -> 320 bytes
-rw-r--r--src/imports/controls/imagine/images/dial-handle@4x.pngbin0 -> 378 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-background.9.pngbin0 -> 663 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-background@2x.9.pngbin0 -> 1415 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-background@3x.9.pngbin0 -> 2438 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-background@4x.9.pngbin0 -> 3437 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-overlay-modal.pngbin0 -> 86 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-overlay-modal@2x.pngbin0 -> 92 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-overlay-modal@3x.pngbin0 -> 94 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-overlay-modal@4x.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-overlay.pngbin0 -> 86 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-overlay@2x.pngbin0 -> 92 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-overlay@3x.pngbin0 -> 94 bytes
-rw-r--r--src/imports/controls/imagine/images/dialog-overlay@4x.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/dialogbuttonbox-background.9.pngbin0 -> 128 bytes
-rw-r--r--src/imports/controls/imagine/images/dialogbuttonbox-background@2x.9.pngbin0 -> 173 bytes
-rw-r--r--src/imports/controls/imagine/images/dialogbuttonbox-background@3x.9.pngbin0 -> 232 bytes
-rw-r--r--src/imports/controls/imagine/images/dialogbuttonbox-background@4x.9.pngbin0 -> 274 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-bottom.9.pngbin0 -> 315 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-bottom@2x.9.pngbin0 -> 598 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-bottom@3x.9.pngbin0 -> 1042 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-bottom@4x.9.pngbin0 -> 1716 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-left.9.pngbin0 -> 314 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-left@2x.9.pngbin0 -> 699 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-left@3x.9.pngbin0 -> 1001 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-left@4x.9.pngbin0 -> 1628 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-right.9.pngbin0 -> 317 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-right@2x.9.pngbin0 -> 710 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-right@3x.9.pngbin0 -> 1189 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-right@4x.9.pngbin0 -> 1684 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-top.9.pngbin0 -> 308 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-top@2x.9.pngbin0 -> 572 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-top@3x.9.pngbin0 -> 1137 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-background-top@4x.9.pngbin0 -> 1739 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-overlay-modal.pngbin0 -> 86 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-overlay-modal@2x.pngbin0 -> 92 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-overlay-modal@3x.pngbin0 -> 94 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-overlay-modal@4x.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-overlay.pngbin0 -> 86 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-overlay@2x.pngbin0 -> 92 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-overlay@3x.pngbin0 -> 94 bytes
-rw-r--r--src/imports/controls/imagine/images/drawer-overlay@4x.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/frame-background.9.pngbin0 -> 307 bytes
-rw-r--r--src/imports/controls/imagine/images/frame-background@2x.9.pngbin0 -> 604 bytes
-rw-r--r--src/imports/controls/imagine/images/frame-background@3x.9.pngbin0 -> 889 bytes
-rw-r--r--src/imports/controls/imagine/images/frame-background@4x.9.pngbin0 -> 1354 bytes
-rw-r--r--src/imports/controls/imagine/images/groupbox-background.9.pngbin0 -> 307 bytes
-rw-r--r--src/imports/controls/imagine/images/groupbox-background@2x.9.pngbin0 -> 604 bytes
-rw-r--r--src/imports/controls/imagine/images/groupbox-background@3x.9.pngbin0 -> 889 bytes
-rw-r--r--src/imports/controls/imagine/images/groupbox-background@4x.9.pngbin0 -> 1354 bytes
-rw-r--r--src/imports/controls/imagine/images/groupbox-title.9.pngbin0 -> 141 bytes
-rw-r--r--src/imports/controls/imagine/images/groupbox-title@2x.9.pngbin0 -> 222 bytes
-rw-r--r--src/imports/controls/imagine/images/groupbox-title@3x.9.pngbin0 -> 268 bytes
-rw-r--r--src/imports/controls/imagine/images/groupbox-title@4x.9.pngbin0 -> 379 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-disabled.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-disabled@2x.9.pngbin0 -> 201 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-disabled@3x.9.pngbin0 -> 228 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-disabled@4x.9.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-focused.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-focused@2x.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-focused@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-focused@4x.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-highlighted.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-highlighted@2x.9.pngbin0 -> 205 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-highlighted@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-highlighted@4x.9.pngbin0 -> 307 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-hovered.9.pngbin0 -> 145 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-hovered@2x.9.pngbin0 -> 194 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-hovered@3x.9.pngbin0 -> 221 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-hovered@4x.9.pngbin0 -> 296 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-pressed.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-pressed@2x.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-pressed@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background-pressed@4x.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background.9.pngbin0 -> 145 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background@2x.9.pngbin0 -> 194 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background@3x.9.pngbin0 -> 221 bytes
-rw-r--r--src/imports/controls/imagine/images/itemdelegate-background@4x.9.pngbin0 -> 296 bytes
-rw-r--r--src/imports/controls/imagine/images/menu-background.9.pngbin0 -> 1329 bytes
-rw-r--r--src/imports/controls/imagine/images/menu-background@2x.9.pngbin0 -> 3172 bytes
-rw-r--r--src/imports/controls/imagine/images/menu-background@3x.9.pngbin0 -> 5762 bytes
-rw-r--r--src/imports/controls/imagine/images/menu-background@4x.9.pngbin0 -> 8797 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-disabled.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-disabled@2x.pngbin0 -> 276 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-disabled@3x.pngbin0 -> 362 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-disabled@4x.pngbin0 -> 440 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled.pngbin0 -> 206 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@2x.pngbin0 -> 302 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@3x.pngbin0 -> 392 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored-disabled@4x.pngbin0 -> 465 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored.pngbin0 -> 201 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored@2x.pngbin0 -> 304 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored@3x.pngbin0 -> 417 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow-mirrored@4x.pngbin0 -> 506 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow.pngbin0 -> 195 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow@2x.pngbin0 -> 281 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow@3x.pngbin0 -> 380 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-arrow@4x.pngbin0 -> 457 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-background-highlighted.9.pngbin0 -> 155 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-background-highlighted@2x.9.pngbin0 -> 211 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-background-highlighted@3x.9.pngbin0 -> 257 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-background-highlighted@4x.9.pngbin0 -> 392 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-background.9.pngbin0 -> 148 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-background@2x.9.pngbin0 -> 211 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-background@3x.9.pngbin0 -> 268 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-background@4x.9.pngbin0 -> 379 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-focused.pngbin0 -> 394 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-focused@2x.pngbin0 -> 709 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-focused@3x.pngbin0 -> 1059 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-focused@4x.pngbin0 -> 1514 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-hovered.pngbin0 -> 394 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@2x.pngbin0 -> 709 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@3x.pngbin0 -> 1059 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@4x.pngbin0 -> 1514 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-pressed.pngbin0 -> 436 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@2x.pngbin0 -> 799 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@3x.pngbin0 -> 1186 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@4x.pngbin0 -> 1672 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked@2x.pngbin0 -> 795 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked@3x.pngbin0 -> 1149 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-checked@4x.pngbin0 -> 1625 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-disabled.pngbin0 -> 167 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-disabled@2x.pngbin0 -> 289 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-disabled@3x.pngbin0 -> 433 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-disabled@4x.pngbin0 -> 695 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-focused.pngbin0 -> 165 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-focused@2x.pngbin0 -> 292 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-focused@3x.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-focused@4x.pngbin0 -> 705 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-hovered.pngbin0 -> 165 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-hovered@2x.pngbin0 -> 292 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-hovered@3x.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-hovered@4x.pngbin0 -> 705 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-pressed.pngbin0 -> 164 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-pressed@2x.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-pressed@3x.pngbin0 -> 430 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator-pressed@4x.pngbin0 -> 615 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator.pngbin0 -> 168 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator@2x.pngbin0 -> 299 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator@3x.pngbin0 -> 427 bytes
-rw-r--r--src/imports/controls/imagine/images/menuitem-indicator@4x.pngbin0 -> 623 bytes
-rw-r--r--src/imports/controls/imagine/images/menuseparator-separator.9.pngbin0 -> 114 bytes
-rw-r--r--src/imports/controls/imagine/images/menuseparator-separator@2x.9.pngbin0 -> 131 bytes
-rw-r--r--src/imports/controls/imagine/images/menuseparator-separator@3x.9.pngbin0 -> 144 bytes
-rw-r--r--src/imports/controls/imagine/images/menuseparator-separator@4x.9.pngbin0 -> 168 bytes
-rw-r--r--src/imports/controls/imagine/images/page-background.pngbin0 -> 84 bytes
-rw-r--r--src/imports/controls/imagine/images/page-background@2x.pngbin0 -> 91 bytes
-rw-r--r--src/imports/controls/imagine/images/page-background@3x.pngbin0 -> 93 bytes
-rw-r--r--src/imports/controls/imagine/images/page-background@4x.pngbin0 -> 94 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-current.pngbin0 -> 198 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-current@2x.pngbin0 -> 352 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-current@3x.pngbin0 -> 515 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-current@4x.pngbin0 -> 727 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-disabled-current.pngbin0 -> 175 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@2x.pngbin0 -> 317 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@3x.pngbin0 -> 511 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@4x.pngbin0 -> 677 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-disabled.pngbin0 -> 175 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-disabled@2x.pngbin0 -> 317 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-disabled@3x.pngbin0 -> 511 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-disabled@4x.pngbin0 -> 677 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-pressed.pngbin0 -> 198 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-pressed@2x.pngbin0 -> 352 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-pressed@3x.pngbin0 -> 515 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate-pressed@4x.pngbin0 -> 727 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate.pngbin0 -> 181 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate@2x.pngbin0 -> 353 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate@3x.pngbin0 -> 506 bytes
-rw-r--r--src/imports/controls/imagine/images/pageindicator-delegate@4x.pngbin0 -> 701 bytes
-rw-r--r--src/imports/controls/imagine/images/pane-background.9.pngbin0 -> 162 bytes
-rw-r--r--src/imports/controls/imagine/images/pane-background@2x.9.pngbin0 -> 230 bytes
-rw-r--r--src/imports/controls/imagine/images/pane-background@3x.9.pngbin0 -> 270 bytes
-rw-r--r--src/imports/controls/imagine/images/pane-background@4x.9.pngbin0 -> 392 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-background.9.pngbin0 -> 663 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-background@2x.9.pngbin0 -> 1415 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-background@3x.9.pngbin0 -> 2438 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-background@4x.9.pngbin0 -> 3437 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-overlay-modal.pngbin0 -> 86 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-overlay-modal@2x.pngbin0 -> 92 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-overlay-modal@3x.pngbin0 -> 94 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-overlay-modal@4x.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-overlay.pngbin0 -> 86 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-overlay@2x.pngbin0 -> 92 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-overlay@3x.pngbin0 -> 94 bytes
-rw-r--r--src/imports/controls/imagine/images/popup-overlay@4x.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-animation.webpbin0 -> 4760 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-animation@2x.webpbin0 -> 7932 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-animation@3x.webpbin0 -> 8154 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-animation@4x.webpbin0 -> 9646 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-background.9.pngbin0 -> 424 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-background@2x.9.pngbin0 -> 875 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-background@3x.9.pngbin0 -> 1544 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-background@4x.9.pngbin0 -> 2279 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-mask.9.pngbin0 -> 205 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-mask@2x.9.pngbin0 -> 344 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-mask@3x.9.pngbin0 -> 478 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-mask@4x.9.pngbin0 -> 673 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-progress.pngbin0 -> 92 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-progress@2x.pngbin0 -> 97 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-progress@3x.pngbin0 -> 101 bytes
-rw-r--r--src/imports/controls/imagine/images/progressbar-progress@4x.pngbin0 -> 115 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-focused.pngbin0 -> 451 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@2x.pngbin0 -> 996 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@3x.pngbin0 -> 1595 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@4x.pngbin0 -> 2157 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered.pngbin0 -> 451 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@2x.pngbin0 -> 996 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@3x.pngbin0 -> 1595 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@4x.pngbin0 -> 2157 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed.pngbin0 -> 475 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@2x.pngbin0 -> 1030 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@3x.pngbin0 -> 1612 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@4x.pngbin0 -> 2224 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked.pngbin0 -> 471 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked@2x.pngbin0 -> 1028 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked@3x.pngbin0 -> 1604 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-checked@4x.pngbin0 -> 2224 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-disabled.pngbin0 -> 382 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-disabled@2x.pngbin0 -> 767 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-disabled@3x.pngbin0 -> 1182 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-disabled@4x.pngbin0 -> 1737 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-focused.pngbin0 -> 373 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-focused@2x.pngbin0 -> 765 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-focused@3x.pngbin0 -> 1182 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-focused@4x.pngbin0 -> 1705 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-hovered.pngbin0 -> 373 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-hovered@2x.pngbin0 -> 765 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-hovered@3x.pngbin0 -> 1182 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-hovered@4x.pngbin0 -> 1705 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-pressed.pngbin0 -> 401 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-pressed@2x.pngbin0 -> 791 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-pressed@3x.pngbin0 -> 1188 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator-pressed@4x.pngbin0 -> 1708 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator.pngbin0 -> 369 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator@2x.pngbin0 -> 791 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator@3x.pngbin0 -> 1190 bytes
-rw-r--r--src/imports/controls/imagine/images/radiobutton-indicator@4x.pngbin0 -> 1740 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-disabled.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-disabled@2x.9.pngbin0 -> 201 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-disabled@3x.9.pngbin0 -> 228 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-disabled@4x.9.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-focused.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-focused@2x.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-focused@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-focused@4x.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-highlighted.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-highlighted@2x.9.pngbin0 -> 205 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-highlighted@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-highlighted@4x.9.pngbin0 -> 307 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-hovered.9.pngbin0 -> 145 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-hovered@2x.9.pngbin0 -> 194 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-hovered@3x.9.pngbin0 -> 221 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-hovered@4x.9.pngbin0 -> 296 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-pressed.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-pressed@2x.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-pressed@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background-pressed@4x.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background.9.pngbin0 -> 145 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background@2x.9.pngbin0 -> 194 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background@3x.9.pngbin0 -> 221 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-background@4x.9.pngbin0 -> 296 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused.pngbin0 -> 451 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@2x.pngbin0 -> 996 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@3x.pngbin0 -> 1595 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@4x.pngbin0 -> 2157 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered.pngbin0 -> 451 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@2x.pngbin0 -> 996 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@3x.pngbin0 -> 1595 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@4x.pngbin0 -> 2157 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed.pngbin0 -> 475 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@2x.pngbin0 -> 1030 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@3x.pngbin0 -> 1612 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@4x.pngbin0 -> 2224 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked.pngbin0 -> 471 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked@2x.pngbin0 -> 1028 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked@3x.pngbin0 -> 1604 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-checked@4x.pngbin0 -> 2224 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-disabled.pngbin0 -> 382 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-disabled@2x.pngbin0 -> 767 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-disabled@3x.pngbin0 -> 1182 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-disabled@4x.pngbin0 -> 1737 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-focused.pngbin0 -> 373 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-focused@2x.pngbin0 -> 765 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-focused@3x.pngbin0 -> 1182 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-focused@4x.pngbin0 -> 1705 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-hovered.pngbin0 -> 373 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-hovered@2x.pngbin0 -> 765 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-hovered@3x.pngbin0 -> 1182 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-hovered@4x.pngbin0 -> 1705 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-pressed.pngbin0 -> 401 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-pressed@2x.pngbin0 -> 791 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-pressed@3x.pngbin0 -> 1188 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator-pressed@4x.pngbin0 -> 1708 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator.pngbin0 -> 369 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator@2x.pngbin0 -> 791 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator@3x.pngbin0 -> 1190 bytes
-rw-r--r--src/imports/controls/imagine/images/radiodelegate-indicator@4x.pngbin0 -> 1740 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-background-horizontal.9.pngbin0 -> 360 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-background-horizontal@2x.9.pngbin0 -> 792 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-background-horizontal@3x.9.pngbin0 -> 1427 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-background-horizontal@4x.9.pngbin0 -> 2255 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-background-vertical.9.pngbin0 -> 430 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-background-vertical@2x.9.pngbin0 -> 1291 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-background-vertical@3x.9.pngbin0 -> 2041 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-background-vertical@4x.9.pngbin0 -> 3159 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-disabled.pngbin0 -> 478 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-disabled@2x.pngbin0 -> 1031 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-disabled@3x.pngbin0 -> 1685 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-disabled@4x.pngbin0 -> 2514 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused-hovered.pngbin0 -> 500 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@2x.pngbin0 -> 1113 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@3x.pngbin0 -> 1728 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@4x.pngbin0 -> 2541 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused-pressed.pngbin0 -> 500 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@2x.pngbin0 -> 1113 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@3x.pngbin0 -> 1728 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@4x.pngbin0 -> 2541 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused.pngbin0 -> 419 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused@2x.pngbin0 -> 1008 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused@3x.pngbin0 -> 1702 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-focused@4x.pngbin0 -> 2593 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-hovered.pngbin0 -> 478 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-hovered@2x.pngbin0 -> 1031 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-hovered@3x.pngbin0 -> 1685 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-hovered@4x.pngbin0 -> 2514 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-pressed.pngbin0 -> 478 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-pressed@2x.pngbin0 -> 1031 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-pressed@3x.pngbin0 -> 1685 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle-pressed@4x.pngbin0 -> 2514 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle.pngbin0 -> 441 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle@2x.pngbin0 -> 1010 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle@3x.pngbin0 -> 1687 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-handle@4x.pngbin0 -> 2518 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@2x.9.pngbin0 -> 316 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@3x.9.pngbin0 -> 417 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@4x.9.pngbin0 -> 576 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-horizontal.9.pngbin0 -> 195 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-horizontal@2x.9.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-horizontal@3x.9.pngbin0 -> 438 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-horizontal@4x.9.pngbin0 -> 567 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled.9.pngbin0 -> 206 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@2x.9.pngbin0 -> 328 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@3x.9.pngbin0 -> 442 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@4x.9.pngbin0 -> 607 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-vertical.9.pngbin0 -> 207 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-vertical@2x.9.pngbin0 -> 317 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-vertical@3x.9.pngbin0 -> 450 bytes
-rw-r--r--src/imports/controls/imagine/images/rangeslider-progress-vertical@4x.9.pngbin0 -> 593 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked-focused.pngbin0 -> 829 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked-focused@2x.pngbin0 -> 1748 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked-focused@3x.pngbin0 -> 3070 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked-focused@4x.pngbin0 -> 4349 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked-hovered.pngbin0 -> 829 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked-hovered@2x.pngbin0 -> 1748 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked-hovered@3x.pngbin0 -> 3070 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked-hovered@4x.pngbin0 -> 4349 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked.pngbin0 -> 890 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked@2x.pngbin0 -> 1805 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked@3x.pngbin0 -> 3147 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-checked@4x.pngbin0 -> 4489 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-disabled-checked.pngbin0 -> 767 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-disabled-checked@2x.pngbin0 -> 1737 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-disabled-checked@3x.pngbin0 -> 2990 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-disabled-checked@4x.pngbin0 -> 4284 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-disabled.pngbin0 -> 767 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-disabled@2x.pngbin0 -> 1737 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-disabled@3x.pngbin0 -> 2990 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-disabled@4x.pngbin0 -> 4284 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-focused.pngbin0 -> 779 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-focused@2x.pngbin0 -> 1731 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-focused@3x.pngbin0 -> 2999 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-focused@4x.pngbin0 -> 4278 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-focused.pngbin0 -> 777 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@2x.pngbin0 -> 1683 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@3x.pngbin0 -> 2942 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@4x.pngbin0 -> 4214 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered.pngbin0 -> 777 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@2x.pngbin0 -> 1683 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@3x.pngbin0 -> 2942 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@4x.pngbin0 -> 4214 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed.pngbin0 -> 791 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@2x.pngbin0 -> 1734 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@3x.pngbin0 -> 3009 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@4x.pngbin0 -> 4281 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted.pngbin0 -> 780 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted@2x.pngbin0 -> 1734 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted@3x.pngbin0 -> 3057 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-highlighted@4x.pngbin0 -> 4263 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-hovered.pngbin0 -> 779 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-hovered@2x.pngbin0 -> 1731 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-hovered@3x.pngbin0 -> 2999 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-hovered@4x.pngbin0 -> 4278 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-pressed.pngbin0 -> 890 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-pressed@2x.pngbin0 -> 1805 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-pressed@3x.pngbin0 -> 3147 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background-pressed@4x.pngbin0 -> 4489 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background.pngbin0 -> 791 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background@2x.pngbin0 -> 1708 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background@3x.pngbin0 -> 3035 bytes
-rw-r--r--src/imports/controls/imagine/images/roundbutton-background@4x.pngbin0 -> 4329 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-disabled.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-disabled@2x.pngbin0 -> 96 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-disabled@3x.pngbin0 -> 97 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-disabled@4x.pngbin0 -> 102 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled.pngbin0 -> 97 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@2x.pngbin0 -> 109 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@3x.pngbin0 -> 133 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@4x.pngbin0 -> 129 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered.pngbin0 -> 97 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@2x.pngbin0 -> 109 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@3x.pngbin0 -> 133 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@4x.pngbin0 -> 129 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed.pngbin0 -> 96 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@2x.pngbin0 -> 109 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@3x.pngbin0 -> 132 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@4x.pngbin0 -> 128 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive.pngbin0 -> 97 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive@2x.pngbin0 -> 109 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive@3x.pngbin0 -> 133 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle-interactive@4x.pngbin0 -> 129 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle@2x.pngbin0 -> 96 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle@3x.pngbin0 -> 97 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollbar-handle@4x.pngbin0 -> 102 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollindicator-handle.pngbin0 -> 95 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollindicator-handle@2x.pngbin0 -> 96 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollindicator-handle@3x.pngbin0 -> 97 bytes
-rw-r--r--src/imports/controls/imagine/images/scrollindicator-handle@4x.pngbin0 -> 102 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-background-horizontal.9.pngbin0 -> 360 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-background-horizontal@2x.9.pngbin0 -> 792 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-background-horizontal@3x.9.pngbin0 -> 1427 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-background-horizontal@4x.9.pngbin0 -> 2255 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-background-vertical.9.pngbin0 -> 430 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-background-vertical@2x.9.pngbin0 -> 1291 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-background-vertical@3x.9.pngbin0 -> 2041 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-background-vertical@4x.9.pngbin0 -> 3159 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-disabled.pngbin0 -> 478 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-disabled@2x.pngbin0 -> 1031 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-disabled@3x.pngbin0 -> 1685 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-disabled@4x.pngbin0 -> 2514 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused-hovered.pngbin0 -> 500 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused-hovered@2x.pngbin0 -> 1113 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused-hovered@3x.pngbin0 -> 1728 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused-hovered@4x.pngbin0 -> 2541 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused-pressed.pngbin0 -> 500 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused-pressed@2x.pngbin0 -> 1113 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused-pressed@3x.pngbin0 -> 1728 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused-pressed@4x.pngbin0 -> 2541 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused.pngbin0 -> 419 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused@2x.pngbin0 -> 1008 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused@3x.pngbin0 -> 1702 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-focused@4x.pngbin0 -> 2593 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-hovered.pngbin0 -> 478 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-hovered@2x.pngbin0 -> 1031 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-hovered@3x.pngbin0 -> 1685 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-hovered@4x.pngbin0 -> 2514 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-pressed.pngbin0 -> 478 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-pressed@2x.pngbin0 -> 1031 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-pressed@3x.pngbin0 -> 1685 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle-pressed@4x.pngbin0 -> 2514 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle.pngbin0 -> 441 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle@2x.pngbin0 -> 1010 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle@3x.pngbin0 -> 1687 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-handle@4x.pngbin0 -> 2518 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-horizontal-disabled.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-horizontal-disabled@2x.9.pngbin0 -> 316 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-horizontal-disabled@3x.9.pngbin0 -> 417 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-horizontal-disabled@4x.9.pngbin0 -> 576 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-horizontal.9.pngbin0 -> 195 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-horizontal@2x.9.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-horizontal@3x.9.pngbin0 -> 438 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-horizontal@4x.9.pngbin0 -> 567 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-vertical-disabled.9.pngbin0 -> 206 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-vertical-disabled@2x.9.pngbin0 -> 328 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-vertical-disabled@3x.9.pngbin0 -> 442 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-vertical-disabled@4x.9.pngbin0 -> 607 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-vertical.9.pngbin0 -> 207 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-vertical@2x.9.pngbin0 -> 317 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-vertical@3x.9.pngbin0 -> 450 bytes
-rw-r--r--src/imports/controls/imagine/images/slider-progress-vertical@4x.9.pngbin0 -> 593 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-disabled.9.pngbin0 -> 425 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-disabled@2x.9.pngbin0 -> 955 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-disabled@3x.9.pngbin0 -> 1600 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-disabled@4x.9.pngbin0 -> 2303 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-editable.9.pngbin0 -> 481 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-editable@2x.9.pngbin0 -> 1145 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-editable@3x.9.pngbin0 -> 1922 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-editable@4x.9.pngbin0 -> 2775 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-focused.9.pngbin0 -> 468 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-focused@2x.9.pngbin0 -> 1076 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-focused@3x.9.pngbin0 -> 1850 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background-focused@4x.9.pngbin0 -> 2733 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background.9.pngbin0 -> 454 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background@2x.9.pngbin0 -> 1087 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background@3x.9.pngbin0 -> 1892 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-background@4x.9.pngbin0 -> 2732 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-disabled.9.pngbin0 -> 226 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-disabled@2x.9.pngbin0 -> 413 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-disabled@3x.9.pngbin0 -> 663 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-disabled@4x.9.pngbin0 -> 1018 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused.9.pngbin0 -> 224 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@2x.9.pngbin0 -> 410 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@3x.9.pngbin0 -> 598 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@4x.9.pngbin0 -> 936 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered.9.pngbin0 -> 224 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@2x.9.pngbin0 -> 410 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@3x.9.pngbin0 -> 598 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@4x.9.pngbin0 -> 936 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused.9.pngbin0 -> 237 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@2x.9.pngbin0 -> 425 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@3x.9.pngbin0 -> 738 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-focused@4x.9.pngbin0 -> 965 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered.9.pngbin0 -> 237 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@2x.9.pngbin0 -> 425 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@3x.9.pngbin0 -> 738 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-hovered@4x.9.pngbin0 -> 965 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed.9.pngbin0 -> 244 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@2x.9.pngbin0 -> 417 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@3x.9.pngbin0 -> 745 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed@4x.9.pngbin0 -> 1000 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored.9.pngbin0 -> 244 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@2x.9.pngbin0 -> 441 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@3x.9.pngbin0 -> 741 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored@4x.9.pngbin0 -> 1003 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed.9.pngbin0 -> 227 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@2x.9.pngbin0 -> 418 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@3x.9.pngbin0 -> 642 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@4x.9.pngbin0 -> 959 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable.9.pngbin0 -> 227 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable@2x.9.pngbin0 -> 420 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable@3x.9.pngbin0 -> 740 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-editable@4x.9.pngbin0 -> 1033 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-focused.9.pngbin0 -> 227 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-focused@2x.9.pngbin0 -> 407 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-focused@3x.9.pngbin0 -> 608 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-focused@4x.9.pngbin0 -> 954 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-hovered.9.pngbin0 -> 227 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-hovered@2x.9.pngbin0 -> 407 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-hovered@3x.9.pngbin0 -> 608 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-hovered@4x.9.pngbin0 -> 954 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled.9.pngbin0 -> 242 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@2x.9.pngbin0 -> 404 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@3x.9.pngbin0 -> 749 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-disabled@4x.9.pngbin0 -> 971 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused.9.pngbin0 -> 244 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@2x.9.pngbin0 -> 417 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@3x.9.pngbin0 -> 738 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-focused@4x.9.pngbin0 -> 1005 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered.9.pngbin0 -> 244 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@2x.9.pngbin0 -> 417 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@3x.9.pngbin0 -> 738 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-hovered@4x.9.pngbin0 -> 1005 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed.9.pngbin0 -> 241 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@2x.9.pngbin0 -> 432 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@3x.9.pngbin0 -> 739 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored-pressed@4x.9.pngbin0 -> 970 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored.9.pngbin0 -> 244 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@2x.9.pngbin0 -> 434 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@3x.9.pngbin0 -> 729 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-mirrored@4x.9.pngbin0 -> 983 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-pressed.9.pngbin0 -> 227 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-pressed@2x.9.pngbin0 -> 432 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-pressed@3x.9.pngbin0 -> 723 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down-pressed@4x.9.pngbin0 -> 952 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down.9.pngbin0 -> 227 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down@2x.9.pngbin0 -> 422 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down@3x.9.pngbin0 -> 600 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-down@4x.9.pngbin0 -> 962 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-disabled.9.pngbin0 -> 260 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-disabled@2x.9.pngbin0 -> 429 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-disabled@3x.9.pngbin0 -> 762 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-disabled@4x.9.pngbin0 -> 1004 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused.9.pngbin0 -> 265 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@2x.9.pngbin0 -> 442 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@3x.9.pngbin0 -> 756 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@4x.9.pngbin0 -> 1002 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered.9.pngbin0 -> 265 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@2x.9.pngbin0 -> 442 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@3x.9.pngbin0 -> 756 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@4x.9.pngbin0 -> 1002 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused.9.pngbin0 -> 250 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@2x.9.pngbin0 -> 429 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@3x.9.pngbin0 -> 719 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-focused@4x.9.pngbin0 -> 988 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered.9.pngbin0 -> 250 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@2x.9.pngbin0 -> 429 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@3x.9.pngbin0 -> 719 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-hovered@4x.9.pngbin0 -> 988 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed.9.pngbin0 -> 251 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@2x.9.pngbin0 -> 437 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@3x.9.pngbin0 -> 731 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed@4x.9.pngbin0 -> 1010 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored.9.pngbin0 -> 251 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@2x.9.pngbin0 -> 448 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@3x.9.pngbin0 -> 775 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored@4x.9.pngbin0 -> 1044 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed.9.pngbin0 -> 262 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@2x.9.pngbin0 -> 444 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@3x.9.pngbin0 -> 764 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@4x.9.pngbin0 -> 1022 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable.9.pngbin0 -> 262 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable@2x.9.pngbin0 -> 456 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable@3x.9.pngbin0 -> 758 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-editable@4x.9.pngbin0 -> 1035 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-focused.9.pngbin0 -> 262 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-focused@2x.9.pngbin0 -> 436 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-focused@3x.9.pngbin0 -> 776 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-focused@4x.9.pngbin0 -> 1032 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-hovered.9.pngbin0 -> 262 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-hovered@2x.9.pngbin0 -> 436 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-hovered@3x.9.pngbin0 -> 776 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-hovered@4x.9.pngbin0 -> 1032 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled.9.pngbin0 -> 249 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@2x.9.pngbin0 -> 438 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@3x.9.pngbin0 -> 725 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-disabled@4x.9.pngbin0 -> 1041 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused.9.pngbin0 -> 251 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@2x.9.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@3x.9.pngbin0 -> 734 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-focused@4x.9.pngbin0 -> 1007 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered.9.pngbin0 -> 251 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@2x.9.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@3x.9.pngbin0 -> 734 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-hovered@4x.9.pngbin0 -> 1007 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed.9.pngbin0 -> 250 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@2x.9.pngbin0 -> 447 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@3x.9.pngbin0 -> 756 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored-pressed@4x.9.pngbin0 -> 1004 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored.9.pngbin0 -> 251 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@2x.9.pngbin0 -> 449 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@3x.9.pngbin0 -> 736 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@4x.9.pngbin0 -> 1013 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-pressed.9.pngbin0 -> 259 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-pressed@2x.9.pngbin0 -> 450 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-pressed@3x.9.pngbin0 -> 760 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up-pressed@4x.9.pngbin0 -> 1009 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up.9.pngbin0 -> 262 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up@2x.9.pngbin0 -> 462 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up@3x.9.pngbin0 -> 758 bytes
-rw-r--r--src/imports/controls/imagine/images/spinbox-indicator-up@4x.9.pngbin0 -> 1010 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-disabled.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-disabled@2x.9.pngbin0 -> 201 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-disabled@3x.9.pngbin0 -> 228 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-disabled@4x.9.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-focused.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-focused@2x.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-focused@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-focused@4x.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-highlighted.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-highlighted@2x.9.pngbin0 -> 205 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-highlighted@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-highlighted@4x.9.pngbin0 -> 307 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-hovered.9.pngbin0 -> 145 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-hovered@2x.9.pngbin0 -> 194 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-hovered@3x.9.pngbin0 -> 221 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-hovered@4x.9.pngbin0 -> 296 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-pressed.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-pressed@2x.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-pressed@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background-pressed@4x.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background.9.pngbin0 -> 145 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background@2x.9.pngbin0 -> 194 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background@3x.9.pngbin0 -> 221 bytes
-rw-r--r--src/imports/controls/imagine/images/swipedelegate-background@4x.9.pngbin0 -> 296 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle-disabled.pngbin0 -> 409 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle-disabled@2x.pngbin0 -> 811 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle-disabled@3x.pngbin0 -> 1317 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle-disabled@4x.pngbin0 -> 1908 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle-pressed.pngbin0 -> 409 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle-pressed@2x.pngbin0 -> 811 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle-pressed@3x.pngbin0 -> 1317 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle-pressed@4x.pngbin0 -> 1908 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle.pngbin0 -> 301 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle@2x.pngbin0 -> 599 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle@3x.pngbin0 -> 1002 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-handle@4x.pngbin0 -> 1563 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-focused.pngbin0 -> 550 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-focused@2x.pngbin0 -> 1129 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-focused@3x.pngbin0 -> 1984 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-focused@4x.pngbin0 -> 2835 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-hovered.pngbin0 -> 550 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-hovered@2x.pngbin0 -> 1129 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-hovered@3x.pngbin0 -> 1984 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-hovered@4x.pngbin0 -> 2835 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-pressed.pngbin0 -> 541 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-pressed@2x.pngbin0 -> 1090 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-pressed@3x.pngbin0 -> 2024 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked-pressed@4x.pngbin0 -> 2919 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked.pngbin0 -> 546 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked@2x.pngbin0 -> 1142 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked@3x.pngbin0 -> 2025 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-checked@4x.pngbin0 -> 2880 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-disabled.pngbin0 -> 572 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-disabled@2x.pngbin0 -> 1155 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-disabled@3x.pngbin0 -> 2007 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-disabled@4x.pngbin0 -> 2894 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-focused.pngbin0 -> 571 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-focused@2x.pngbin0 -> 1124 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-focused@3x.pngbin0 -> 2029 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-focused@4x.pngbin0 -> 2942 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-hovered.pngbin0 -> 571 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-hovered@2x.pngbin0 -> 1124 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-hovered@3x.pngbin0 -> 2029 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-hovered@4x.pngbin0 -> 2942 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-pressed.pngbin0 -> 563 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-pressed@2x.pngbin0 -> 1142 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-pressed@3x.pngbin0 -> 1996 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator-pressed@4x.pngbin0 -> 2885 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator.pngbin0 -> 564 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator@2x.pngbin0 -> 1086 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator@3x.pngbin0 -> 2042 bytes
-rw-r--r--src/imports/controls/imagine/images/switch-indicator@4x.pngbin0 -> 2920 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-disabled.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-disabled@2x.9.pngbin0 -> 201 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-disabled@3x.9.pngbin0 -> 228 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-disabled@4x.9.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-focused.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-focused@2x.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-focused@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-focused@4x.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-hovered.9.pngbin0 -> 145 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-hovered@2x.9.pngbin0 -> 194 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-hovered@3x.9.pngbin0 -> 221 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-hovered@4x.9.pngbin0 -> 296 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-pressed.9.pngbin0 -> 147 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-pressed@2x.9.pngbin0 -> 204 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-pressed@3x.9.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background-pressed@4x.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background.9.pngbin0 -> 145 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background@2x.9.pngbin0 -> 194 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background@3x.9.pngbin0 -> 221 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-background@4x.9.pngbin0 -> 296 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle-disabled.pngbin0 -> 409 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle-disabled@2x.pngbin0 -> 811 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle-disabled@3x.pngbin0 -> 1317 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle-disabled@4x.pngbin0 -> 1908 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle-pressed.pngbin0 -> 409 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle-pressed@2x.pngbin0 -> 811 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle-pressed@3x.pngbin0 -> 1317 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle-pressed@4x.pngbin0 -> 1908 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle.pngbin0 -> 301 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle@2x.pngbin0 -> 599 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle@3x.pngbin0 -> 1002 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-handle@4x.pngbin0 -> 1563 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused.pngbin0 -> 550 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@2x.pngbin0 -> 1129 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@3x.pngbin0 -> 1984 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@4x.pngbin0 -> 2835 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered.pngbin0 -> 550 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@2x.pngbin0 -> 1129 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@3x.pngbin0 -> 1984 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@4x.pngbin0 -> 2835 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed.pngbin0 -> 541 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@2x.pngbin0 -> 1090 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@3x.pngbin0 -> 2024 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@4x.pngbin0 -> 2919 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked.pngbin0 -> 546 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked@2x.pngbin0 -> 1142 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked@3x.pngbin0 -> 2025 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-checked@4x.pngbin0 -> 2880 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-disabled.pngbin0 -> 572 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-disabled@2x.pngbin0 -> 1155 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-disabled@3x.pngbin0 -> 2007 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-disabled@4x.pngbin0 -> 2894 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-focused.pngbin0 -> 571 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-focused@2x.pngbin0 -> 1124 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-focused@3x.pngbin0 -> 2029 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-focused@4x.pngbin0 -> 2942 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-hovered.pngbin0 -> 571 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-hovered@2x.pngbin0 -> 1124 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-hovered@3x.pngbin0 -> 2029 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-hovered@4x.pngbin0 -> 2942 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-pressed.pngbin0 -> 563 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-pressed@2x.pngbin0 -> 1142 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-pressed@3x.pngbin0 -> 1996 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator-pressed@4x.pngbin0 -> 2885 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator.pngbin0 -> 564 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator@2x.pngbin0 -> 1086 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator@3x.pngbin0 -> 2042 bytes
-rw-r--r--src/imports/controls/imagine/images/switchdelegate-indicator@4x.pngbin0 -> 2920 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbar-background.pngbin0 -> 90 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbar-background@2x.pngbin0 -> 101 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbar-background@3x.pngbin0 -> 107 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbar-background@4x.pngbin0 -> 128 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-checked.9.pngbin0 -> 210 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-checked@2x.9.pngbin0 -> 431 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-checked@3x.9.pngbin0 -> 608 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-checked@4x.9.pngbin0 -> 924 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-disabled-checked.9.pngbin0 -> 209 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-disabled-checked@2x.9.pngbin0 -> 430 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-disabled-checked@3x.9.pngbin0 -> 608 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-disabled-checked@4x.9.pngbin0 -> 923 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-disabled.9.pngbin0 -> 209 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-disabled@2x.9.pngbin0 -> 430 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-disabled@3x.9.pngbin0 -> 608 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-disabled@4x.9.pngbin0 -> 923 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-hovered.9.pngbin0 -> 209 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-hovered@2x.9.pngbin0 -> 430 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-hovered@3x.9.pngbin0 -> 607 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-hovered@4x.9.pngbin0 -> 923 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-pressed.9.pngbin0 -> 208 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-pressed@2x.9.pngbin0 -> 429 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-pressed@3x.9.pngbin0 -> 606 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background-pressed@4x.9.pngbin0 -> 922 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background.9.pngbin0 -> 208 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background@2x.9.pngbin0 -> 429 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background@3x.9.pngbin0 -> 606 bytes
-rw-r--r--src/imports/controls/imagine/images/tabbutton-background@4x.9.pngbin0 -> 922 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background-disabled.9.pngbin0 -> 306 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background-disabled@2x.9.pngbin0 -> 527 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background-disabled@3x.9.pngbin0 -> 865 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background-disabled@4x.9.pngbin0 -> 1246 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background-focused.9.pngbin0 -> 331 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background-focused@2x.9.pngbin0 -> 617 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background-focused@3x.9.pngbin0 -> 1017 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background-focused@4x.9.pngbin0 -> 1598 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background.9.pngbin0 -> 345 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background@2x.9.pngbin0 -> 652 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background@3x.9.pngbin0 -> 1019 bytes
-rw-r--r--src/imports/controls/imagine/images/textarea-background@4x.9.pngbin0 -> 1627 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background-disabled.9.pngbin0 -> 397 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background-disabled@2x.9.pngbin0 -> 829 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background-disabled@3x.9.pngbin0 -> 1349 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background-disabled@4x.9.pngbin0 -> 1940 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background-focused.9.pngbin0 -> 426 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background-focused@2x.9.pngbin0 -> 961 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background-focused@3x.9.pngbin0 -> 1591 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background-focused@4x.9.pngbin0 -> 2335 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background.9.pngbin0 -> 437 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background@2x.9.pngbin0 -> 1011 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background@3x.9.pngbin0 -> 1655 bytes
-rw-r--r--src/imports/controls/imagine/images/textfield-background@4x.9.pngbin0 -> 2386 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbar-background.pngbin0 -> 92 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbar-background@2x.pngbin0 -> 102 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbar-background@3x.pngbin0 -> 108 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbar-background@4x.pngbin0 -> 130 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked-focused.9.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked-focused@2x.9.pngbin0 -> 298 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked-focused@3x.9.pngbin0 -> 428 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked-focused@4x.9.pngbin0 -> 576 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked-hovered.9.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked-hovered@2x.9.pngbin0 -> 298 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked-hovered@3x.9.pngbin0 -> 428 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked-hovered@4x.9.pngbin0 -> 576 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked.9.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked@2x.9.pngbin0 -> 298 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked@3x.9.pngbin0 -> 428 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-checked@4x.9.pngbin0 -> 576 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-disabled-checked.9.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-disabled-checked@2x.9.pngbin0 -> 298 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-disabled-checked@3x.9.pngbin0 -> 428 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-disabled-checked@4x.9.pngbin0 -> 576 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-focused.9.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-focused@2x.9.pngbin0 -> 298 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-focused@3x.9.pngbin0 -> 428 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-focused@4x.9.pngbin0 -> 576 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-hovered.9.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-hovered@2x.9.pngbin0 -> 298 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-hovered@3x.9.pngbin0 -> 428 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-hovered@4x.9.pngbin0 -> 576 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-pressed.9.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-pressed@2x.9.pngbin0 -> 298 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-pressed@3x.9.pngbin0 -> 428 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background-pressed@4x.9.pngbin0 -> 576 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background.9.pngbin0 -> 189 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background@2x.9.pngbin0 -> 298 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background@3x.9.pngbin0 -> 428 bytes
-rw-r--r--src/imports/controls/imagine/images/toolbutton-background@4x.9.pngbin0 -> 576 bytes
-rw-r--r--src/imports/controls/imagine/images/toolseparator-separator-horizontal.9.pngbin0 -> 177 bytes
-rw-r--r--src/imports/controls/imagine/images/toolseparator-separator-horizontal@2x.9.pngbin0 -> 254 bytes
-rw-r--r--src/imports/controls/imagine/images/toolseparator-separator-horizontal@3x.9.pngbin0 -> 398 bytes
-rw-r--r--src/imports/controls/imagine/images/toolseparator-separator-horizontal@4x.9.pngbin0 -> 550 bytes
-rw-r--r--src/imports/controls/imagine/images/toolseparator-separator-vertical.9.pngbin0 -> 178 bytes
-rw-r--r--src/imports/controls/imagine/images/toolseparator-separator-vertical@2x.9.pngbin0 -> 250 bytes
-rw-r--r--src/imports/controls/imagine/images/toolseparator-separator-vertical@3x.9.pngbin0 -> 398 bytes
-rw-r--r--src/imports/controls/imagine/images/toolseparator-separator-vertical@4x.9.pngbin0 -> 557 bytes
-rw-r--r--src/imports/controls/imagine/images/tooltip-background.9.pngbin0 -> 360 bytes
-rw-r--r--src/imports/controls/imagine/images/tooltip-background@2x.9.pngbin0 -> 651 bytes
-rw-r--r--src/imports/controls/imagine/images/tooltip-background@3x.9.pngbin0 -> 986 bytes
-rw-r--r--src/imports/controls/imagine/images/tooltip-background@4x.9.pngbin0 -> 1515 bytes
-rw-r--r--src/imports/controls/imagine/imagine.pri58
-rw-r--r--src/imports/controls/imagine/imagine.pro27
-rw-r--r--src/imports/controls/imagine/qmldir4
-rw-r--r--src/imports/controls/imagine/qquickimageselector.cpp340
-rw-r--r--src/imports/controls/imagine/qquickimageselector_p.h151
-rw-r--r--src/imports/controls/imagine/qquickimaginestyle.cpp169
-rw-r--r--src/imports/controls/imagine/qquickimaginestyle_p.h93
-rw-r--r--src/imports/controls/imagine/qquickimaginetheme.cpp110
-rw-r--r--src/imports/controls/imagine/qquickimaginetheme_p.h79
-rw-r--r--src/imports/controls/imagine/qquickninepatchimage.cpp455
-rw-r--r--src/imports/controls/imagine/qquickninepatchimage_p.h106
-rw-r--r--src/imports/controls/imagine/qtquickcontrols2imaginestyleplugin.cpp109
-rw-r--r--src/imports/controls/material/ApplicationWindow.qml6
-rw-r--r--src/imports/controls/material/BoxShadow.qml6
-rw-r--r--src/imports/controls/material/BusyIndicator.qml8
-rw-r--r--src/imports/controls/material/Button.qml27
-rw-r--r--src/imports/controls/material/CheckBox.qml8
-rw-r--r--src/imports/controls/material/CheckDelegate.qml26
-rw-r--r--src/imports/controls/material/CheckIndicator.qml6
-rw-r--r--src/imports/controls/material/ComboBox.qml19
-rw-r--r--src/imports/controls/material/CursorDelegate.qml4
-rw-r--r--src/imports/controls/material/DelayButton.qml10
-rw-r--r--src/imports/controls/material/Dial.qml8
-rw-r--r--src/imports/controls/material/Dialog.qml21
-rw-r--r--src/imports/controls/material/DialogButtonBox.qml11
-rw-r--r--src/imports/controls/material/Drawer.qml20
-rw-r--r--src/imports/controls/material/ElevationEffect.qml6
-rw-r--r--src/imports/controls/material/Frame.qml8
-rw-r--r--src/imports/controls/material/GroupBox.qml8
-rw-r--r--src/imports/controls/material/ItemDelegate.qml27
-rw-r--r--src/imports/controls/material/Label.qml6
-rw-r--r--src/imports/controls/material/Menu.qml27
-rw-r--r--src/imports/controls/material/MenuBar.qml65
-rw-r--r--src/imports/controls/material/MenuBarItem.qml90
-rw-r--r--src/imports/controls/material/MenuItem.qml44
-rw-r--r--src/imports/controls/material/MenuSeparator.qml6
-rw-r--r--src/imports/controls/material/Page.qml6
-rw-r--r--src/imports/controls/material/PageIndicator.qml6
-rw-r--r--src/imports/controls/material/Pane.qml8
-rw-r--r--src/imports/controls/material/Popup.qml18
-rw-r--r--src/imports/controls/material/ProgressBar.qml12
-rw-r--r--src/imports/controls/material/RadioButton.qml8
-rw-r--r--src/imports/controls/material/RadioDelegate.qml26
-rw-r--r--src/imports/controls/material/RadioIndicator.qml6
-rw-r--r--src/imports/controls/material/RangeSlider.qml40
-rw-r--r--src/imports/controls/material/RoundButton.qml27
-rw-r--r--src/imports/controls/material/ScrollBar.qml6
-rw-r--r--src/imports/controls/material/ScrollIndicator.qml6
-rw-r--r--src/imports/controls/material/Slider.qml36
-rw-r--r--src/imports/controls/material/SliderHandle.qml7
-rw-r--r--src/imports/controls/material/SpinBox.qml8
-rw-r--r--src/imports/controls/material/StackView.qml5
-rw-r--r--src/imports/controls/material/SwipeDelegate.qml27
-rw-r--r--src/imports/controls/material/SwipeView.qml5
-rw-r--r--src/imports/controls/material/Switch.qml8
-rw-r--r--src/imports/controls/material/SwitchDelegate.qml26
-rw-r--r--src/imports/controls/material/SwitchIndicator.qml6
-rw-r--r--src/imports/controls/material/TabBar.qml9
-rw-r--r--src/imports/controls/material/TabButton.qml25
-rw-r--r--src/imports/controls/material/TextArea.qml12
-rw-r--r--src/imports/controls/material/TextField.qml19
-rw-r--r--src/imports/controls/material/ToolBar.qml8
-rw-r--r--src/imports/controls/material/ToolButton.qml25
-rw-r--r--src/imports/controls/material/ToolSeparator.qml6
-rw-r--r--src/imports/controls/material/ToolTip.qml6
-rw-r--r--src/imports/controls/material/Tumbler.qml10
-rw-r--r--src/imports/controls/material/images/arrow-indicator.pngbin0 -> 200 bytes
-rw-r--r--src/imports/controls/material/images/arrow-indicator.svg56
-rw-r--r--src/imports/controls/material/images/arrow-indicator@2x.pngbin0 -> 239 bytes
-rw-r--r--src/imports/controls/material/images/arrow-indicator@3x.pngbin0 -> 277 bytes
-rw-r--r--src/imports/controls/material/images/arrow-indicator@4x.pngbin0 -> 317 bytes
-rw-r--r--src/imports/controls/material/material.pri2
-rw-r--r--src/imports/controls/material/material.pro2
-rw-r--r--src/imports/controls/material/qmldir2
-rw-r--r--src/imports/controls/material/qquickmaterialstyle.cpp46
-rw-r--r--src/imports/controls/material/qquickmaterialstyle_p.h6
-rw-r--r--src/imports/controls/material/qquickmaterialtheme.cpp21
-rw-r--r--src/imports/controls/material/qquickmaterialtheme_p.h6
-rw-r--r--src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp4
-rw-r--r--src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc4
-rw-r--r--src/imports/controls/plugins.qmltypes653
-rw-r--r--src/imports/controls/qmldir2
-rw-r--r--src/imports/controls/qquickdefaultbusyindicator.cpp41
-rw-r--r--src/imports/controls/qquickdefaultbusyindicator_p.h11
-rw-r--r--src/imports/controls/qquickdefaultdial.cpp (renamed from src/imports/controls/qquickdialring.cpp)16
-rw-r--r--src/imports/controls/qquickdefaultdial_p.h (renamed from src/imports/controls/qquickdialring_p.h)18
-rw-r--r--src/imports/controls/qquickdefaultprogressbar.cpp21
-rw-r--r--src/imports/controls/qquickdefaultprogressbar_p.h12
-rw-r--r--src/imports/controls/qquickdefaulttheme.cpp92
-rw-r--r--src/imports/controls/qquickdefaulttheme_p.h68
-rw-r--r--src/imports/controls/qtquickcontrols2plugin.cpp61
-rw-r--r--src/imports/controls/qtquickcontrols2plugin.qrc4
-rw-r--r--src/imports/controls/universal/ApplicationWindow.qml8
-rw-r--r--src/imports/controls/universal/BusyIndicator.qml8
-rw-r--r--src/imports/controls/universal/Button.qml27
-rw-r--r--src/imports/controls/universal/CheckBox.qml8
-rw-r--r--src/imports/controls/universal/CheckDelegate.qml30
-rw-r--r--src/imports/controls/universal/CheckIndicator.qml15
-rw-r--r--src/imports/controls/universal/ComboBox.qml17
-rw-r--r--src/imports/controls/universal/DelayButton.qml6
-rw-r--r--src/imports/controls/universal/Dial.qml6
-rw-r--r--src/imports/controls/universal/Dialog.qml16
-rw-r--r--src/imports/controls/universal/DialogButtonBox.qml8
-rw-r--r--src/imports/controls/universal/Drawer.qml16
-rw-r--r--src/imports/controls/universal/Frame.qml6
-rw-r--r--src/imports/controls/universal/GroupBox.qml6
-rw-r--r--src/imports/controls/universal/ItemDelegate.qml29
-rw-r--r--src/imports/controls/universal/Label.qml6
-rw-r--r--src/imports/controls/universal/Menu.qml22
-rw-r--r--src/imports/controls/universal/MenuBar.qml64
-rw-r--r--src/imports/controls/universal/MenuBarItem.qml92
-rw-r--r--src/imports/controls/universal/MenuItem.qml49
-rw-r--r--src/imports/controls/universal/MenuSeparator.qml6
-rw-r--r--src/imports/controls/universal/Page.qml6
-rw-r--r--src/imports/controls/universal/PageIndicator.qml6
-rw-r--r--src/imports/controls/universal/Pane.qml6
-rw-r--r--src/imports/controls/universal/Popup.qml14
-rw-r--r--src/imports/controls/universal/ProgressBar.qml13
-rw-r--r--src/imports/controls/universal/RadioButton.qml8
-rw-r--r--src/imports/controls/universal/RadioDelegate.qml30
-rw-r--r--src/imports/controls/universal/RadioIndicator.qml4
-rw-r--r--src/imports/controls/universal/RangeSlider.qml58
-rw-r--r--src/imports/controls/universal/RoundButton.qml27
-rw-r--r--src/imports/controls/universal/ScrollBar.qml6
-rw-r--r--src/imports/controls/universal/ScrollIndicator.qml6
-rw-r--r--src/imports/controls/universal/Slider.qml48
-rw-r--r--src/imports/controls/universal/SpinBox.qml28
-rw-r--r--src/imports/controls/universal/StackView.qml6
-rw-r--r--src/imports/controls/universal/SwipeDelegate.qml29
-rw-r--r--src/imports/controls/universal/Switch.qml8
-rw-r--r--src/imports/controls/universal/SwitchDelegate.qml30
-rw-r--r--src/imports/controls/universal/SwitchIndicator.qml6
-rw-r--r--src/imports/controls/universal/TabBar.qml8
-rw-r--r--src/imports/controls/universal/TabButton.qml29
-rw-r--r--src/imports/controls/universal/TextArea.qml10
-rw-r--r--src/imports/controls/universal/TextField.qml10
-rw-r--r--src/imports/controls/universal/ToolBar.qml6
-rw-r--r--src/imports/controls/universal/ToolButton.qml27
-rw-r--r--src/imports/controls/universal/ToolSeparator.qml6
-rw-r--r--src/imports/controls/universal/ToolTip.qml6
-rw-r--r--src/imports/controls/universal/Tumbler.qml10
-rw-r--r--src/imports/controls/universal/qmldir2
-rw-r--r--src/imports/controls/universal/qquickuniversalstyle.cpp38
-rw-r--r--src/imports/controls/universal/qquickuniversalstyle_p.h6
-rw-r--r--src/imports/controls/universal/qquickuniversaltheme.cpp7
-rw-r--r--src/imports/controls/universal/qquickuniversaltheme_p.h6
-rw-r--r--src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp4
-rw-r--r--src/imports/controls/universal/universal.pri2
-rw-r--r--src/imports/controls/universal/universal.pro2
-rw-r--r--src/imports/imports.pro2
-rw-r--r--src/imports/platform/widgets/qwidgetplatformmenu.cpp12
-rw-r--r--src/imports/platform/widgets/qwidgetplatformmenu_p.h4
-rw-r--r--src/imports/platform/widgets/qwidgetplatformmenuitem.cpp12
-rw-r--r--src/imports/platform/widgets/qwidgetplatformmenuitem_p.h4
-rw-r--r--src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc4
-rw-r--r--src/imports/templates/plugins.qmltypes486
-rw-r--r--src/imports/templates/qquicktemplates2valuetypeprovider.cpp159
-rw-r--r--src/imports/templates/qquicktemplates2valuetypeprovider_p.h68
-rw-r--r--src/imports/templates/qtquicktemplates2plugin.cpp68
-rw-r--r--src/imports/templates/templates.pro6
-rw-r--r--src/quickcontrols2/configure.json18
-rw-r--r--src/quickcontrols2/qquickattachedobject.cpp249
-rw-r--r--src/quickcontrols2/qquickattachedobject_p.h (renamed from src/quickcontrols2/qquickstyleattached_p.h)35
-rw-r--r--src/quickcontrols2/qquickchecklabel.cpp49
-rw-r--r--src/quickcontrols2/qquickchecklabel_p.h (renamed from src/quickcontrols2/qquickcolorimageprovider_p.h)21
-rw-r--r--src/quickcontrols2/qquickcolor.cpp (renamed from src/quickcontrols2/qquickcolorimageprovider.cpp)49
-rw-r--r--src/quickcontrols2/qquickcolor_p.h70
-rw-r--r--src/quickcontrols2/qquickcolorimage.cpp103
-rw-r--r--src/quickcontrols2/qquickcolorimage_p.h88
-rw-r--r--src/quickcontrols2/qquickiconimage.cpp220
-rw-r--r--src/quickcontrols2/qquickiconimage_p.h94
-rw-r--r--src/quickcontrols2/qquickiconimage_p_p.h79
-rw-r--r--src/quickcontrols2/qquickiconlabel.cpp651
-rw-r--r--src/quickcontrols2/qquickiconlabel_p.h140
-rw-r--r--src/quickcontrols2/qquickiconlabel_p_p.h113
-rw-r--r--src/quickcontrols2/qquickmnemoniclabel.cpp133
-rw-r--r--src/quickcontrols2/qquickmnemoniclabel_p.h82
-rw-r--r--src/quickcontrols2/qquickpaddedrectangle.cpp5
-rw-r--r--src/quickcontrols2/qquickproxytheme_p.h2
-rw-r--r--src/quickcontrols2/qquickstyle.cpp42
-rw-r--r--src/quickcontrols2/qquickstyle_p.h5
-rw-r--r--src/quickcontrols2/qquickstyleattached.cpp269
-rw-r--r--src/quickcontrols2/qquickstyleplugin.cpp13
-rw-r--r--src/quickcontrols2/qquickstyleplugin_p.h1
-rw-r--r--src/quickcontrols2/qquickstyleselector.cpp12
-rw-r--r--src/quickcontrols2/qquicktheme.cpp163
-rw-r--r--src/quickcontrols2/qquicktheme_p.h77
-rw-r--r--src/quickcontrols2/quickcontrols2.pri26
-rw-r--r--src/quickcontrols2/quickcontrols2.pro2
-rw-r--r--src/quicktemplates2/qquickabstractbutton.cpp256
-rw-r--r--src/quicktemplates2/qquickabstractbutton_p.h36
-rw-r--r--src/quicktemplates2/qquickabstractbutton_p_p.h16
-rw-r--r--src/quicktemplates2/qquickaction.cpp556
-rw-r--r--src/quicktemplates2/qquickaction_p.h122
-rw-r--r--src/quicktemplates2/qquickaction_p_p.h127
-rw-r--r--src/quicktemplates2/qquickactiongroup.cpp480
-rw-r--r--src/quicktemplates2/qquickactiongroup_p.h130
-rw-r--r--src/quicktemplates2/qquickapplicationwindow.cpp388
-rw-r--r--src/quicktemplates2/qquickapplicationwindow_p.h20
-rw-r--r--src/quicktemplates2/qquickbutton.cpp9
-rw-r--r--src/quicktemplates2/qquickbutton_p.h1
-rw-r--r--src/quicktemplates2/qquickbuttongroup.cpp46
-rw-r--r--src/quicktemplates2/qquickbuttongroup_p.h9
-rw-r--r--src/quicktemplates2/qquickcheckbox.cpp5
-rw-r--r--src/quicktemplates2/qquickcheckbox_p.h1
-rw-r--r--src/quicktemplates2/qquickcombobox.cpp54
-rw-r--r--src/quicktemplates2/qquickcombobox_p.h1
-rw-r--r--src/quicktemplates2/qquickcontainer.cpp105
-rw-r--r--src/quicktemplates2/qquickcontainer_p.h6
-rw-r--r--src/quicktemplates2/qquickcontainer_p_p.h8
-rw-r--r--src/quicktemplates2/qquickcontrol.cpp483
-rw-r--r--src/quicktemplates2/qquickcontrol_p.h14
-rw-r--r--src/quicktemplates2/qquickcontrol_p_p.h36
-rw-r--r--src/quicktemplates2/qquickdelaybutton.cpp5
-rw-r--r--src/quicktemplates2/qquickdelaybutton_p.h1
-rw-r--r--src/quicktemplates2/qquickdialog.cpp141
-rw-r--r--src/quicktemplates2/qquickdialog_p.h23
-rw-r--r--src/quicktemplates2/qquickdialog_p_p.h10
-rw-r--r--src/quicktemplates2/qquickdialogbuttonbox.cpp52
-rw-r--r--src/quicktemplates2/qquickdialogbuttonbox_p.h5
-rw-r--r--src/quicktemplates2/qquickdrawer.cpp10
-rw-r--r--src/quicktemplates2/qquickdrawer_p_p.h8
-rw-r--r--src/quicktemplates2/qquickgroupbox.cpp5
-rw-r--r--src/quicktemplates2/qquickgroupbox_p.h1
-rw-r--r--src/quicktemplates2/qquickicon.cpp152
-rw-r--r--src/quicktemplates2/qquickicon_p.h104
-rw-r--r--src/quicktemplates2/qquickitemdelegate.cpp9
-rw-r--r--src/quicktemplates2/qquickitemdelegate_p.h1
-rw-r--r--src/quicktemplates2/qquicklabel.cpp138
-rw-r--r--src/quicktemplates2/qquicklabel_p.h10
-rw-r--r--src/quicktemplates2/qquicklabel_p_p.h29
-rw-r--r--src/quicktemplates2/qquickmenu.cpp999
-rw-r--r--src/quicktemplates2/qquickmenu_p.h61
-rw-r--r--src/quicktemplates2/qquickmenu_p_p.h45
-rw-r--r--src/quicktemplates2/qquickmenubar.cpp659
-rw-r--r--src/quicktemplates2/qquickmenubar_p.h126
-rw-r--r--src/quicktemplates2/qquickmenubar_p_p.h107
-rw-r--r--src/quicktemplates2/qquickmenubaritem.cpp185
-rw-r--r--src/quicktemplates2/qquickmenubaritem_p.h102
-rw-r--r--src/quicktemplates2/qquickmenubaritem_p_p.h85
-rw-r--r--src/quicktemplates2/qquickmenuitem.cpp133
-rw-r--r--src/quicktemplates2/qquickmenuitem_p.h17
-rw-r--r--src/quicktemplates2/qquickmenuitem_p_p.h83
-rw-r--r--src/quicktemplates2/qquickmenuseparator.cpp8
-rw-r--r--src/quicktemplates2/qquickmenuseparator_p.h2
-rw-r--r--src/quicktemplates2/qquickoverlay.cpp302
-rw-r--r--src/quicktemplates2/qquickoverlay_p.h35
-rw-r--r--src/quicktemplates2/qquickoverlay_p_p.h9
-rw-r--r--src/quicktemplates2/qquickpalette.cpp326
-rw-r--r--src/quicktemplates2/qquickpalette_p.h163
-rw-r--r--src/quicktemplates2/qquickpopup.cpp250
-rw-r--r--src/quicktemplates2/qquickpopup_p.h32
-rw-r--r--src/quicktemplates2/qquickpopup_p_p.h11
-rw-r--r--src/quicktemplates2/qquickpopupitem.cpp28
-rw-r--r--src/quicktemplates2/qquickpopupitem_p_p.h5
-rw-r--r--src/quicktemplates2/qquickradiobutton.cpp5
-rw-r--r--src/quicktemplates2/qquickradiobutton_p.h1
-rw-r--r--src/quicktemplates2/qquickrangeslider.cpp32
-rw-r--r--src/quicktemplates2/qquickrangeslider_p.h11
-rw-r--r--src/quicktemplates2/qquickscrollbar.cpp32
-rw-r--r--src/quicktemplates2/qquickscrollbar_p.h7
-rw-r--r--src/quicktemplates2/qquickscrollindicator.cpp32
-rw-r--r--src/quicktemplates2/qquickscrollindicator_p.h7
-rw-r--r--src/quicktemplates2/qquickshortcutcontext.cpp9
-rw-r--r--src/quicktemplates2/qquickslider.cpp32
-rw-r--r--src/quicktemplates2/qquickslider_p.h7
-rw-r--r--src/quicktemplates2/qquickspinbox.cpp86
-rw-r--r--src/quicktemplates2/qquickspinbox_p.h9
-rw-r--r--src/quicktemplates2/qquickstackview.cpp53
-rw-r--r--src/quicktemplates2/qquickstackview_p.cpp11
-rw-r--r--src/quicktemplates2/qquickstackview_p.h9
-rw-r--r--src/quicktemplates2/qquickstackview_p_p.h1
-rw-r--r--src/quicktemplates2/qquickswipedelegate_p.h2
-rw-r--r--src/quicktemplates2/qquickswipeview.cpp231
-rw-r--r--src/quicktemplates2/qquickswipeview_p.h10
-rw-r--r--src/quicktemplates2/qquickswitch.cpp6
-rw-r--r--src/quicktemplates2/qquickswitch_p.h2
-rw-r--r--src/quicktemplates2/qquicktabbar.cpp155
-rw-r--r--src/quicktemplates2/qquicktabbar_p.h32
-rw-r--r--src/quicktemplates2/qquicktabbutton.cpp5
-rw-r--r--src/quicktemplates2/qquicktabbutton_p.h1
-rw-r--r--src/quicktemplates2/qquicktextarea.cpp156
-rw-r--r--src/quicktemplates2/qquicktextarea_p.h10
-rw-r--r--src/quicktemplates2/qquicktextarea_p_p.h32
-rw-r--r--src/quicktemplates2/qquicktextfield.cpp150
-rw-r--r--src/quicktemplates2/qquicktextfield_p.h10
-rw-r--r--src/quicktemplates2/qquicktextfield_p_p.h33
-rw-r--r--src/quicktemplates2/qquicktoolbar.cpp5
-rw-r--r--src/quicktemplates2/qquicktoolbar_p.h2
-rw-r--r--src/quicktemplates2/qquicktoolbutton.cpp9
-rw-r--r--src/quicktemplates2/qquicktoolbutton_p.h1
-rw-r--r--src/quicktemplates2/qquicktoolseparator.cpp5
-rw-r--r--src/quicktemplates2/qquicktoolseparator_p.h2
-rw-r--r--src/quicktemplates2/qquicktooltip.cpp7
-rw-r--r--src/quicktemplates2/qquicktooltip_p.h1
-rw-r--r--src/quicktemplates2/qquicktumbler.cpp178
-rw-r--r--src/quicktemplates2/qquicktumbler_p.h10
-rw-r--r--src/quicktemplates2/qquicktumbler_p_p.h37
-rw-r--r--src/quicktemplates2/qtquicktemplates2global_p.h1
-rw-r--r--src/quicktemplates2/quicktemplates2.pri15
-rw-r--r--tests/auto/accessibility/tst_accessibility.cpp22
-rw-r--r--tests/auto/auto.pro13
-rw-r--r--tests/auto/controls/controls.pro2
-rw-r--r--tests/auto/controls/data/tst_abstractbutton.qml234
-rw-r--r--tests/auto/controls/data/tst_action.qml140
-rw-r--r--tests/auto/controls/data/tst_actiongroup.qml400
-rw-r--r--tests/auto/controls/data/tst_button.qml81
-rw-r--r--tests/auto/controls/data/tst_buttongroup.qml62
-rw-r--r--tests/auto/controls/data/tst_checkdelegate.qml81
-rw-r--r--tests/auto/controls/data/tst_combobox.qml66
-rw-r--r--tests/auto/controls/data/tst_container.qml42
-rw-r--r--tests/auto/controls/data/tst_dialog.qml42
-rw-r--r--tests/auto/controls/data/tst_dialogbuttonbox.qml12
-rw-r--r--tests/auto/controls/data/tst_drawer.qml4
-rw-r--r--tests/auto/controls/data/tst_itemdelegate.qml80
-rw-r--r--tests/auto/controls/data/tst_menuitem.qml94
-rw-r--r--tests/auto/controls/data/tst_page.qml6
-rw-r--r--tests/auto/controls/data/tst_pageindicator.qml2
-rw-r--r--tests/auto/controls/data/tst_popup.qml38
-rw-r--r--tests/auto/controls/data/tst_radiodelegate.qml81
-rw-r--r--tests/auto/controls/data/tst_rangeslider.qml7
-rw-r--r--tests/auto/controls/data/tst_roundbutton.qml79
-rw-r--r--tests/auto/controls/data/tst_scrollbar.qml14
-rw-r--r--tests/auto/controls/data/tst_scrollindicator.qml14
-rw-r--r--tests/auto/controls/data/tst_slider.qml7
-rw-r--r--tests/auto/controls/data/tst_spinbox.qml162
-rw-r--r--tests/auto/controls/data/tst_stackview.qml78
-rw-r--r--tests/auto/controls/data/tst_swipedelegate.qml80
-rw-r--r--tests/auto/controls/data/tst_swipeview.qml4
-rw-r--r--tests/auto/controls/data/tst_switch.qml8
-rw-r--r--tests/auto/controls/data/tst_switchdelegate.qml81
-rw-r--r--tests/auto/controls/data/tst_tabbar.qml161
-rw-r--r--tests/auto/controls/data/tst_tabbutton.qml80
-rw-r--r--tests/auto/controls/data/tst_textfield.qml12
-rw-r--r--tests/auto/controls/data/tst_toolbutton.qml59
-rw-r--r--tests/auto/controls/data/tst_tooltip.qml6
-rw-r--r--tests/auto/controls/data/tst_tumbler.qml4
-rw-r--r--tests/auto/controls/fusion/dependencies.qml6
-rw-r--r--tests/auto/controls/fusion/fusion.pro15
-rw-r--r--tests/auto/controls/fusion/tst_fusion.cpp47
-rw-r--r--tests/auto/controls/imagine/dependencies.qml6
-rw-r--r--tests/auto/controls/imagine/imagine.pro15
-rw-r--r--tests/auto/controls/imagine/tst_imagine.cpp47
-rw-r--r--tests/auto/cursor/tst_cursor.cpp5
-rw-r--r--tests/auto/font/data/font-appwindow-custom.qml2
-rw-r--r--tests/auto/font/data/font-appwindow-default.qml2
-rw-r--r--tests/auto/font/data/font-control-custom.qml2
-rw-r--r--tests/auto/font/data/font-control-default.qml2
-rw-r--r--tests/auto/font/data/font-popup-custom.qml2
-rw-r--r--tests/auto/font/data/font-popup-default.qml2
-rw-r--r--tests/auto/font/data/inheritance-childcontrol.qml2
-rw-r--r--tests/auto/font/data/inheritance-childpopup.qml2
-rw-r--r--tests/auto/font/data/inheritance-control.qml2
-rw-r--r--tests/auto/font/data/inheritance-dynamicchildcontrol.qml2
-rw-r--r--tests/auto/font/data/inheritance-dynamicchildpopup.qml2
-rw-r--r--tests/auto/font/data/inheritance-dynamiccontrol.qml2
-rw-r--r--tests/auto/font/data/inheritance-dynamicpopup.qml2
-rw-r--r--tests/auto/font/data/inheritance-popup.qml2
-rw-r--r--tests/auto/font/tst_font.cpp8
-rw-r--r--tests/auto/palette/data/inheritance-childcontrol.qml76
-rw-r--r--tests/auto/palette/data/inheritance-childpopup.qml76
-rw-r--r--tests/auto/palette/data/inheritance-control.qml74
-rw-r--r--tests/auto/palette/data/inheritance-dynamicchildcontrol.qml75
-rw-r--r--tests/auto/palette/data/inheritance-dynamicchildpopup.qml80
-rw-r--r--tests/auto/palette/data/inheritance-dynamiccontrol.qml71
-rw-r--r--tests/auto/palette/data/inheritance-dynamicpopup.qml76
-rw-r--r--tests/auto/palette/data/inheritance-popup.qml74
-rw-r--r--tests/auto/palette/data/listview.qml79
-rw-r--r--tests/auto/palette/data/palette-appwindow-custom.qml74
-rw-r--r--tests/auto/palette/data/palette-appwindow-default.qml55
-rw-r--r--tests/auto/palette/data/palette-control-custom.qml74
-rw-r--r--tests/auto/palette/data/palette-control-default.qml55
-rw-r--r--tests/auto/palette/data/palette-popup-custom.qml74
-rw-r--r--tests/auto/palette/data/palette-popup-default.qml55
-rw-r--r--tests/auto/palette/palette.pro16
-rw-r--r--tests/auto/palette/qtquickcontrols2.conf5
-rw-r--r--tests/auto/palette/tst_palette.cpp407
-rw-r--r--tests/auto/qquickapplicationwindow/data/layout.qml3
-rw-r--r--tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp68
-rw-r--r--tests/auto/qquickcolor/data/tst_color.qml65
-rw-r--r--tests/auto/qquickcolor/qquickcolor.pro12
-rw-r--r--tests/auto/qquickcolor/tst_qquickcolor.cpp38
-rw-r--r--tests/auto/qquickiconimage/data/alignment.qml16
-rw-r--r--tests/auto/qquickiconimage/data/color.qml18
-rw-r--r--tests/auto/qquickiconimage/data/fileSelectors.qml16
-rw-r--r--tests/auto/qquickiconimage/data/imageProvider.qml9
-rw-r--r--tests/auto/qquickiconimage/data/nameBindingNoSizes.qml7
-rw-r--r--tests/auto/qquickiconimage/data/nameBindingSourceSize.qml16
-rw-r--r--tests/auto/qquickiconimage/data/nameBindingSourceSizeWidthHeight.qml10
-rw-r--r--tests/auto/qquickiconimage/data/root.qml6
-rw-r--r--tests/auto/qquickiconimage/data/sourceBindingNoSizes.qml15
-rw-r--r--tests/auto/qquickiconimage/data/sourceBindingSourceSize.qml16
-rw-r--r--tests/auto/qquickiconimage/data/sourceBindingSourceSizeWidthHeight.qml10
-rw-r--r--tests/auto/qquickiconimage/data/sourceBindingSourceTooLarge.qml8
-rw-r--r--tests/auto/qquickiconimage/data/svgNoSizes.qml15
-rw-r--r--tests/auto/qquickiconimage/data/svgSourceBindingSourceSize.qml17
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/16x16/actions/appointment-new.pngbin0 -> 897 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new.pngbin0 -> 1146 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new@2x.pngbin0 -> 256 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new.pngbin0 -> 1411 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new@2x.pngbin0 -> 4075 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original.pngbin0 -> 1105 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original@2x.pngbin0 -> 173 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted.pngbin0 -> 1111 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted@2x.pngbin0 -> 172 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/+testselector/appointment-new.pngbin0 -> 256 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/appointment-new.pngbin0 -> 4075 bytes
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/appointment-new.svg425
-rw-r--r--tests/auto/qquickiconimage/icons/testtheme/index.theme21
-rw-r--r--tests/auto/qquickiconimage/qquickiconimage.pro17
-rw-r--r--tests/auto/qquickiconimage/resources.qrc17
-rw-r--r--tests/auto/qquickiconimage/tst_qquickiconimage.cpp532
-rw-r--r--tests/auto/qquickiconlabel/data/colorChanges.qml66
-rw-r--r--tests/auto/qquickiconlabel/data/iconlabel.qml66
-rw-r--r--tests/auto/qquickiconlabel/data/spacingWithOnlyIcon.qml66
-rw-r--r--tests/auto/qquickiconlabel/data/spacingWithOnlyText.qml63
-rw-r--r--tests/auto/qquickiconlabel/qquickiconlabel.pro13
-rw-r--r--tests/auto/qquickiconlabel/tst_qquickiconlabel.cpp326
-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/auto/qquickmaterialstyleconf/qtquickcontrols2.conf4
-rw-r--r--tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp10
-rw-r--r--tests/auto/qquickmenu/data/actions.qml67
-rw-r--r--tests/auto/qquickmenu/data/mnemonics.qml87
-rw-r--r--tests/auto/qquickmenu/data/popup.qml124
-rw-r--r--tests/auto/qquickmenu/data/removeTakeItem.qml91
-rw-r--r--tests/auto/qquickmenu/data/subMenus.qml92
-rw-r--r--tests/auto/qquickmenu/tst_qquickmenu.cpp832
-rw-r--r--tests/auto/qquickmenubar/data/empty.qml54
-rw-r--r--tests/auto/qquickmenubar/data/menubar.qml106
-rw-r--r--tests/auto/qquickmenubar/qquickmenubar.pro14
-rw-r--r--tests/auto/qquickmenubar/tst_qquickmenubar.cpp569
-rw-r--r--tests/auto/qquickninepatchimage/data/foo.9.pngbin0 -> 213 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/foo@2x.9.pngbin0 -> 295 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/foo@3x.9.pngbin0 -> 377 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/foo@4x.9.pngbin0 -> 482 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-all.9.pngbin0 -> 245 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-all@2x.9.pngbin0 -> 341 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-all@3x.9.pngbin0 -> 470 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-all@4x.9.pngbin0 -> 577 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-bottomright.9.pngbin0 -> 246 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-bottomright@2x.9.pngbin0 -> 348 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-bottomright@3x.9.pngbin0 -> 460 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-bottomright@4x.9.pngbin0 -> 565 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-topleft.9.pngbin0 -> 227 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-topleft@2x.9.pngbin0 -> 305 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-topleft@3x.9.pngbin0 -> 420 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/inset-topleft@4x.9.pngbin0 -> 516 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/ninepatchimage.qml7
-rw-r--r--tests/auto/qquickninepatchimage/data/padding.9.pngbin0 -> 226 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/padding@2x.9.pngbin0 -> 298 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/padding@3x.9.pngbin0 -> 381 bytes
-rw-r--r--tests/auto/qquickninepatchimage/data/padding@4x.9.pngbin0 -> 485 bytes
-rw-r--r--tests/auto/qquickninepatchimage/qquickninepatchimage.pro14
-rw-r--r--tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp245
-rw-r--r--tests/auto/qquickpopup/data/closeOnEscapeWithNestedPopups.qml2
-rw-r--r--tests/auto/qquickpopup/tst_qquickpopup.cpp64
-rw-r--r--tests/auto/qquickstyleselector/data/PlatformStyle/+linux/Button.qml2
-rw-r--r--tests/auto/qquickstyleselector/data/PlatformStyle/+macos/Button.qml2
-rw-r--r--tests/auto/qquickstyleselector/data/PlatformStyle/+windows/Button.qml2
-rw-r--r--tests/auto/qquickstyleselector/data/PlatformStyle/Button.qml2
-rw-r--r--tests/auto/qquickstyleselector/tst_qquickstyleselector.cpp20
-rw-r--r--tests/auto/qquickuniversalstyleconf/qtquickcontrols2.conf4
-rw-r--r--tests/auto/qquickuniversalstyleconf/tst_qquickuniversalstyleconf.cpp10
-rw-r--r--tests/auto/sanity/tst_sanity.cpp14
-rw-r--r--tests/auto/shared/qtest_quickcontrols.h86
-rw-r--r--tests/auto/shared/util.pri5
-rw-r--r--tests/auto/shared/visualtestutil.cpp23
-rw-r--r--tests/auto/shared/visualtestutil.h4
-rw-r--r--tests/auto/snippets/tst_snippets.cpp8
-rw-r--r--tests/benchmarks/creationtime/data/dependencies.qml2
-rw-r--r--tests/benchmarks/creationtime/tst_creationtime.cpp45
-rw-r--r--tests/benchmarks/objectcount/data/dependencies.qml2
-rw-r--r--tests/benchmarks/objectcount/tst_objectcount.cpp13
-rw-r--r--tests/manual/buttons/ButtonLoader.qml2
-rw-r--r--tests/manual/manual.pro2
-rw-r--r--tests/manual/styles-cover-flow/CoverFlowDelegate.qml136
-rw-r--r--tests/manual/styles-cover-flow/CoverFlowPath.qml157
-rw-r--r--tests/manual/styles-cover-flow/styles-cover-flow.cpp66
-rw-r--r--tests/manual/styles-cover-flow/styles-cover-flow.pro11
-rw-r--r--tests/manual/styles-cover-flow/styles-cover-flow.qml100
-rw-r--r--tests/manual/systemtrayicon/images/qt_logo_green_256.pngbin0 -> 3977 bytes
-rw-r--r--tests/manual/systemtrayicon/systemtrayicon.cpp64
-rw-r--r--tests/manual/systemtrayicon/systemtrayicon.pro9
-rw-r--r--tests/manual/systemtrayicon/systemtrayicon.qml89
-rw-r--r--tests/manual/systemtrayicon/systemtrayicon.qrc6
-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.md35
-rw-r--r--tests/manual/testbench/SettingsDialog.qml453
-rw-r--r--tests/manual/testbench/assetfixer.cpp564
-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.qml87
-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.qml87
-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.qml84
-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/MenuBar.qml79
-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.qml86
-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.qml78
-rw-r--r--tests/manual/testbench/controls/SwipeDelegate.qml106
-rw-r--r--tests/manual/testbench/controls/Switch.qml76
-rw-r--r--tests/manual/testbench/controls/SwitchDelegate.qml86
-rw-r--r--tests/manual/testbench/controls/TabBar.qml81
-rw-r--r--tests/manual/testbench/controls/TextArea.qml73
-rw-r--r--tests/manual/testbench/controls/TextField.qml73
-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.qrc39
-rw-r--r--tests/manual/testbench/testbench.pro15
-rw-r--r--tests/manual/testbench/testbench.qml1162
2388 files changed, 47612 insertions, 3949 deletions
diff --git a/.gitignore b/.gitignore
index a3f3abaf..c39bf6d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,8 @@
/examples/quickcontrols2/contactlist/contactlist
/examples/quickcontrols2/flatstyle/flatstyle
/examples/quickcontrols2/gallery/gallery
+/examples/quickcontrols2/imagine/automotive/automotive
+/examples/quickcontrols2/imagine/musicplayer/musicplayer
/examples/quickcontrols2/sidepanel/sidepanel
/examples/quickcontrols2/swipetoremove/swipetoremove
/examples/quickcontrols2/texteditor/texteditor
@@ -29,18 +31,27 @@
/tests/auto/accessibility/tst_accessibility
/tests/auto/calendar/tst_calendar
/tests/auto/controls/default/tst_default
+/tests/auto/controls/fusion/tst_fusion
+/tests/auto/controls/imagine/tst_imagine
/tests/auto/controls/material/tst_material
/tests/auto/controls/universal/tst_universal
/tests/auto/cursor/tst_cursor
/tests/auto/focus/tst_focus
/tests/auto/font/tst_font
+/tests/auto/palette/tst_palette
/tests/auto/platform/tst_platform
/tests/auto/pressandhold/tst_pressandhold
/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow
+/tests/auto/qquickcolor/tst_qquickcolor
/tests/auto/qquickdrawer/tst_qquickdrawer
+/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/qquickmenu/tst_qquickmenu
+/tests/auto/qquickmenubar/tst_qquickmenubar
+/tests/auto/qquickninepatchimage/tst_qquickninepatchimage
/tests/auto/qquickpopup/tst_qquickpopup
/tests/auto/qquickstyle/tst_qquickstyle
/tests/auto/qquickstyleselector/tst_qquickstyleselector
diff --git a/.qmake.conf b/.qmake.conf
index 80630dec..00c9f8dd 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -4,4 +4,4 @@ DEFINES += QT_NO_FOREACH
QQC2_SOURCE_TREE = $$PWD
-MODULE_VERSION = 5.9.3
+MODULE_VERSION = 5.10.0
diff --git a/dist/changes-5.10.0 b/dist/changes-5.10.0
new file mode 100644
index 00000000..88f2afe8
--- /dev/null
+++ b/dist/changes-5.10.0
@@ -0,0 +1,166 @@
+Qt 5.10 introduces many new features and improvements as well as bugfixes
+over the 5.9.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.10 series is binary compatible with the 5.10.x series.
+Applications compiled for 5.9 will continue to run with 5.10.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+ - [QTBUG-58060] DialogButtonBox with Material style now uses the Android
+ button layout.
+
+****************************************************************************
+* Controls *
+****************************************************************************
+
+ - AbstractButton:
+ * [QTBUG-49820] Added support for icons. The following properties are
+ now available for derived types to use: icon.name, icon.source,
+ icon.width, icon.height, icon.color.
+ * [QTBUG-49820] Added display property to allow control over how icons
+ and text are displayed within buttons, without having to implement
+ custom delegates.
+ * [QTBUG-50705] Added AbstractButton::action property.
+
+ - Action:
+ * [QTBUG-50705] Introduced Action, an abstract user interface action
+ that can have shortcuts and be assigned to buttons.
+
+ - ActionGroup:
+ * [QTBUG-50705] Introduced ActionGroup, a non-visual group of actions
+ that is mutually exclusive by default.
+
+ - ApplicationWindow:
+ * [QTBUG-61336] The attached activeFocusControl property has been made
+ functional with a plain QML Window to make the functionality available
+ when using QQuickWindow/View/Widget instead of ApplicationWindow.
+ * [QTBUG-61336] Deprecated the overlay grouped property in favor of the
+ newly introduced Overlay attached properties.
+
+ - ButtonGroup:
+ * Added exclusive property to allow creating non-exclusive button
+ groups.
+
+ - Container:
+ * Deprecated removeItem(int) in favor of removeItem(Item) and
+ takeItem(int) with clearer semantics. The former destroys the item,
+ whereas the latter transfers ownership to the caller.
+
+ - Dialog:
+ * Added "result" property that holds whether the dialog was previously
+ accepted or rejected.
+ * Added a standardButton() method for accessing the standard buttons in
+ the dialog's button box.
+ * [QTBUG-59423] Added missing applied(), discarded(), helpRequested(),
+ and reset() signals that are emitted when the respective standard
+ buttons are clicked.
+
+ - DialogButtonBox:
+ * [QTBUG-59423] Added missing applied(), reset(), and discarded()
+ signals.
+
+ - Menu:
+ * [QTBUG-50471] Added a popup() method that opens a menu at the mouse
+ cursor on desktop platforms that have a mouse cursor available, and
+ otherwise centers the menu over its parent item.
+ * Added support for declaring Actions. The new "delegate" property is
+ used to define a Component that is used to create menu items that
+ present the actions.
+ * Deprecated removeItem(int) in favor of removeItem(Item) and
+ takeItem(int) with clearer semantics. The former destroys the item,
+ whereas the latter transfers ownership to the caller.
+ * [QTBUG-60351] Added support for cascading sub-menus.
+ * Added addMenu(), insertMenu(), removeMenu(), and takeMenu() methods
+ for adding and removing sub-menus programmatically.
+ * Added addAction(), insertAction(), removeAction(), and takeAction()
+ methods for adding and removing actions programmatically.
+ * Added currentIndex property for styling purposes.
+ * Added actionAt() and menuAt() accessors.
+ * Added a dismiss() method. Unlike close() that only closes a menu and
+ its sub-menus, dismiss() closes the whole hierarchy of menus,
+ including the parent menus.
+ * Added "count" property.
+
+ - MenuBar:
+ * [QTBUG-60350] Introduced a MenuBar control.
+
+ - MenuItem:
+ * Added a "menu" property that provides access to the menu that contains
+ the menu item.
+ * Menu has been fixed to highlight its items while key navigating and
+ mouse hovering to ensure seamless item highlight between mouse hover
+ and key navigation. In order to provide appropriate highlighting that
+ works for key navigation and mouse hover, styles should bind their
+ visual highlight to MenuItem::highlighted instead of
+ Control::activeFocus or Control::hovered.
+
+ - Overlay:
+ * [QTBUG-61336] Introduced Overlay attached properties and signals that
+ supersede the overlay grouped property in Application Window. The
+ Overlay attached type allows providing background dimming for popups
+ without requiring an ApplicationWindow instance.
+
+ - Popup:
+ * Added an "opened" boolean property that holds whether a popup is fully
+ open. That is, the popup is visible and neither the enter nor exit
+ transitions are running.
+ * Added "enabled" property.
+ * Added a read-only "mirrored" property that is true when the popup's
+ locale is right-to-left.
+
+ - RangeSlider:
+ * Added horizontal and vertical properties to make it more convenient to
+ create orientation-dependent bindings in styles.
+
+ - ScrollBar:
+ * Added horizontal and vertical properties to make it more convenient to
+ create orientation-dependent bindings in styles.
+
+ - ScrollIndicator:
+ * Added horizontal and vertical properties to make it more convenient to
+ create orientation-dependent bindings in styles.
+
+ - Slider:
+ * Added horizontal and vertical properties to make it more convenient to
+ create orientation-dependent bindings in styles.
+
+ - SpinBox:
+ * [QTBUG-58760] Added wrap-property to allow wrapping circular
+ spinboxes.
+
+ - StackView:
+ * Allowed specifying a transition when clearing the stack view.
+
+ - SwipeView:
+ * Added horizontal and vertical properties to make it more convenient to
+ create orientation-dependent bindings in styles.
+
+ - TabBar:
+ * Added index/tabBar/position attached properties.
+
+****************************************************************************
+* Styles *
+****************************************************************************
+
+ - Introduced a Fusion style that offers a platform agnostic
+ desktop-oriented look'n'feel.
+ - Added the Imagine style, which is based on image assets that can be
+ provided using a predefined naming convention.
+ - Added support for specifying the default font for different styles in
+ qtquickcontrols2.conf.
+ - Fixed the style selection mechanism so that now it is possible to
+ organize platform and locale-specific files into sub-directories, such
+ as "+linux", "+macos", and "+windows".
diff --git a/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc b/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc
index f048b12c..519d1c7a 100644
--- a/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc
+++ b/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc
@@ -216,6 +216,9 @@ Now we can build and run the application:
\borderedimage qtquickcontrols2-chattutorial-chapter1.png
+\noautolist
+\generatelist examplefiles .*chapter1.*
+
\section1 Chapter 2: Lists
In this chapter, we'll explain how to create a list of interactive items using
@@ -290,6 +293,9 @@ vertical space.
\borderedimage qtquickcontrols2-chattutorial-chapter2.png
+\generatelist examplefiles .*(chapter2|shared).*
+\generatelist exampleimages .*shared.*(Einstein|Hemingway|Gude)\.png
+
\section1 Chapter 3: Navigation
In this chapter, you'll learn how to use \l StackView to navigate between pages
@@ -514,6 +520,9 @@ Finally, the button is only enabled when there is actually a message to send.
\borderedimage qtquickcontrols2-chattutorial-chapter3.gif
+\generatelist examplefiles .*(chapter3|shared).*
+\generatelist exampleimages .*shared.*(Einstein|Hemingway|Gude)\.png
+
\section1 Chapter 4: Models
In chapter 4, we'll take you through the process of creating both read-only and
@@ -730,6 +739,9 @@ text field to make way for future input.
\borderedimage qtquickcontrols2-chattutorial-chapter4.gif
+\generatelist examplefiles .*(chapter4|shared).*
+\generatelist exampleimages
+
\section1 Chapter 5: Styling
Styles in Qt Quick Controls 2 are designed to work on any platform. In this
@@ -856,6 +868,9 @@ After building and running the application, you should see these results:
\borderedimage qtquickcontrols2-chattutorial-chapter5-contacts-universal-dark.png
\borderedimage qtquickcontrols2-chattutorial-chapter5-conversations-universal-dark.png
+\generatelist examplefiles .*(chapter5|shared).*
+\generatelist exampleimages
+
\section1 Summary
In this tutorial, we've taken you through the following steps of writing a
diff --git a/examples/quickcontrols2/gallery/gallery.cpp b/examples/quickcontrols2/gallery/gallery.cpp
index 7b70f1c8..b4d59685 100644
--- a/examples/quickcontrols2/gallery/gallery.cpp
+++ b/examples/quickcontrols2/gallery/gallery.cpp
@@ -53,6 +53,7 @@
#include <QQmlContext>
#include <QSettings>
#include <QQuickStyle>
+#include <QIcon>
int main(int argc, char *argv[])
{
@@ -62,6 +63,8 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
+ QIcon::setThemeName("gallery");
+
QSettings settings;
QString style = QQuickStyle::name();
if (!style.isEmpty())
diff --git a/examples/quickcontrols2/gallery/gallery.pro b/examples/quickcontrols2/gallery/gallery.pro
index 45496a35..705eeae0 100644
--- a/examples/quickcontrols2/gallery/gallery.pro
+++ b/examples/quickcontrols2/gallery/gallery.pro
@@ -8,8 +8,9 @@ SOURCES += \
RESOURCES += \
gallery.qml \
qtquickcontrols2.conf \
+ icons/gallery/index.theme \
+ $$files(icons/*.png, true) \
$$files(images/*.png) \
- $$files(images/+material/*.png) \
$$files(pages/*.qml)
target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/gallery
diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml
index 9f253ab3..5344b74e 100644
--- a/examples/quickcontrols2/gallery/gallery.qml
+++ b/examples/quickcontrols2/gallery/gallery.qml
@@ -50,7 +50,7 @@
import QtQuick 2.9
import QtQuick.Layouts 1.3
-import QtQuick.Controls 2.2
+import QtQuick.Controls 2.3
import QtQuick.Controls.Material 2.1
import QtQuick.Controls.Universal 2.1
import Qt.labs.settings 1.0
@@ -89,12 +89,7 @@ ApplicationWindow {
anchors.fill: parent
ToolButton {
- contentItem: Image {
- fillMode: Image.Pad
- horizontalAlignment: Image.AlignHCenter
- verticalAlignment: Image.AlignVCenter
- source: stackView.depth > 1 ? "images/back.png" : "images/drawer.png"
- }
+ icon.name: stackView.depth > 1 ? "back" : "drawer"
onClicked: {
if (stackView.depth > 1) {
stackView.pop()
@@ -116,12 +111,7 @@ ApplicationWindow {
}
ToolButton {
- contentItem: Image {
- fillMode: Image.Pad
- horizontalAlignment: Image.AlignHCenter
- verticalAlignment: Image.AlignVCenter
- source: "images/menu.png"
- }
+ icon.name: "menu"
onClicked: optionsMenu.open()
Menu {
diff --git a/examples/quickcontrols2/gallery/images/back.png b/examples/quickcontrols2/gallery/icons/gallery/20x20/back.png
index db43e273..db43e273 100644
--- a/examples/quickcontrols2/gallery/images/back.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20/back.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/drawer.png b/examples/quickcontrols2/gallery/icons/gallery/20x20/drawer.png
index 1e974efa..1e974efa 100644
--- a/examples/quickcontrols2/gallery/images/drawer.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20/drawer.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/menu.png b/examples/quickcontrols2/gallery/icons/gallery/20x20/menu.png
index a10473d9..a10473d9 100644
--- a/examples/quickcontrols2/gallery/images/menu.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20/menu.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/back@2x.png b/examples/quickcontrols2/gallery/icons/gallery/20x20@2/back.png
index c55ab315..c55ab315 100644
--- a/examples/quickcontrols2/gallery/images/back@2x.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20@2/back.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/drawer@2x.png b/examples/quickcontrols2/gallery/icons/gallery/20x20@2/drawer.png
index eba3b6cc..eba3b6cc 100644
--- a/examples/quickcontrols2/gallery/images/drawer@2x.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20@2/drawer.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/menu@2x.png b/examples/quickcontrols2/gallery/icons/gallery/20x20@2/menu.png
index 649c2a08..649c2a08 100644
--- a/examples/quickcontrols2/gallery/images/menu@2x.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20@2/menu.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/back@3x.png b/examples/quickcontrols2/gallery/icons/gallery/20x20@3/back.png
index b228eb87..b228eb87 100644
--- a/examples/quickcontrols2/gallery/images/back@3x.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20@3/back.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/drawer@3x.png b/examples/quickcontrols2/gallery/icons/gallery/20x20@3/drawer.png
index 3584ed6d..3584ed6d 100644
--- a/examples/quickcontrols2/gallery/images/drawer@3x.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20@3/drawer.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/menu@3x.png b/examples/quickcontrols2/gallery/icons/gallery/20x20@3/menu.png
index 9554b695..9554b695 100644
--- a/examples/quickcontrols2/gallery/images/menu@3x.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20@3/menu.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/back@4x.png b/examples/quickcontrols2/gallery/icons/gallery/20x20@4/back.png
index dd157e78..dd157e78 100644
--- a/examples/quickcontrols2/gallery/images/back@4x.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20@4/back.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/drawer@4x.png b/examples/quickcontrols2/gallery/icons/gallery/20x20@4/drawer.png
index 60d93aff..60d93aff 100644
--- a/examples/quickcontrols2/gallery/images/drawer@4x.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20@4/drawer.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/menu@4x.png b/examples/quickcontrols2/gallery/icons/gallery/20x20@4/menu.png
index 187c171c..187c171c 100644
--- a/examples/quickcontrols2/gallery/images/menu@4x.png
+++ b/examples/quickcontrols2/gallery/icons/gallery/20x20@4/menu.png
Binary files differ
diff --git a/examples/quickcontrols2/gallery/icons/gallery/index.theme b/examples/quickcontrols2/gallery/icons/gallery/index.theme
new file mode 100644
index 00000000..a1bcd5e0
--- /dev/null
+++ b/examples/quickcontrols2/gallery/icons/gallery/index.theme
@@ -0,0 +1,24 @@
+[Icon Theme]
+Name=Gallery
+Comment=Qt Quick Controls 2 Gallery Example Icon Theme
+
+Directories=20x20,20x20@2,20x20@3,20x20@4
+
+[20x20]
+Size=20
+Type=Fixed
+
+[20x20@2]
+Size=20
+Scale=2
+Type=Fixed
+
+[20x20@3]
+Size=20
+Scale=3
+Type=Fixed
+
+[20x20@4]
+Size=20
+Scale=4
+Type=Fixed
diff --git a/examples/quickcontrols2/gallery/images/+material/back.png b/examples/quickcontrols2/gallery/images/+material/back.png
deleted file mode 100644
index ebc1000f..00000000
--- a/examples/quickcontrols2/gallery/images/+material/back.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/back@2x.png b/examples/quickcontrols2/gallery/images/+material/back@2x.png
deleted file mode 100644
index cf6163c8..00000000
--- a/examples/quickcontrols2/gallery/images/+material/back@2x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/back@3x.png b/examples/quickcontrols2/gallery/images/+material/back@3x.png
deleted file mode 100644
index 96376a5a..00000000
--- a/examples/quickcontrols2/gallery/images/+material/back@3x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/back@4x.png b/examples/quickcontrols2/gallery/images/+material/back@4x.png
deleted file mode 100644
index 578ac14f..00000000
--- a/examples/quickcontrols2/gallery/images/+material/back@4x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/drawer.png b/examples/quickcontrols2/gallery/images/+material/drawer.png
deleted file mode 100644
index 615cc817..00000000
--- a/examples/quickcontrols2/gallery/images/+material/drawer.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/drawer@2x.png b/examples/quickcontrols2/gallery/images/+material/drawer@2x.png
deleted file mode 100644
index b1dd106d..00000000
--- a/examples/quickcontrols2/gallery/images/+material/drawer@2x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/drawer@3x.png b/examples/quickcontrols2/gallery/images/+material/drawer@3x.png
deleted file mode 100644
index 289889bf..00000000
--- a/examples/quickcontrols2/gallery/images/+material/drawer@3x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/drawer@4x.png b/examples/quickcontrols2/gallery/images/+material/drawer@4x.png
deleted file mode 100644
index 215e6a82..00000000
--- a/examples/quickcontrols2/gallery/images/+material/drawer@4x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/menu.png b/examples/quickcontrols2/gallery/images/+material/menu.png
deleted file mode 100644
index f02429e9..00000000
--- a/examples/quickcontrols2/gallery/images/+material/menu.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/menu@2x.png b/examples/quickcontrols2/gallery/images/+material/menu@2x.png
deleted file mode 100644
index 9309ad9a..00000000
--- a/examples/quickcontrols2/gallery/images/+material/menu@2x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/menu@3x.png b/examples/quickcontrols2/gallery/images/+material/menu@3x.png
deleted file mode 100644
index 7bddf71f..00000000
--- a/examples/quickcontrols2/gallery/images/+material/menu@3x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/images/+material/menu@4x.png b/examples/quickcontrols2/gallery/images/+material/menu@4x.png
deleted file mode 100644
index e5c23a3b..00000000
--- a/examples/quickcontrols2/gallery/images/+material/menu@4x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/gallery/pages/DialogPage.qml b/examples/quickcontrols2/gallery/pages/DialogPage.qml
index daaa7329..8bade21f 100644
--- a/examples/quickcontrols2/gallery/pages/DialogPage.qml
+++ b/examples/quickcontrols2/gallery/pages/DialogPage.qml
@@ -50,7 +50,7 @@
import QtQuick 2.6
import QtQuick.Layouts 1.0
-import QtQuick.Controls 2.1
+import QtQuick.Controls 2.3
ScrollablePage {
id: page
@@ -101,7 +101,7 @@ ScrollablePage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
- parent: ApplicationWindow.overlay
+ parent: Overlay.overlay
modal: true
title: "Confirmation"
@@ -134,7 +134,7 @@ ScrollablePage {
y: (parent.height - height) / 2
width: Math.min(page.width, page.height) / 3 * 2
contentHeight: logo.height * 2
- parent: ApplicationWindow.overlay
+ parent: Overlay.overlay
modal: true
title: "Content"
@@ -194,7 +194,7 @@ ScrollablePage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
- parent: ApplicationWindow.overlay
+ parent: Overlay.overlay
focus: true
modal: true
diff --git a/examples/quickcontrols2/imagine/automotive/automotive.cpp b/examples/quickcontrols2/imagine/automotive/automotive.cpp
new file mode 100644
index 00000000..63cc702d
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/automotive.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples 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 <QGuiApplication>
+#include <QQmlApplicationEngine>
+#include <QQmlContext>
+#include <QSettings>
+#include <QQuickStyle>
+#include <QIcon>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication::setApplicationName("Automotive");
+ QGuiApplication::setOrganizationName("QtProject");
+ QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+
+ QGuiApplication app(argc, argv);
+
+ QIcon::setThemeName("automotive");
+
+ QQmlApplicationEngine engine;
+ engine.load(QUrl("qrc:/qml/automotive.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
+
+ return app.exec();
+}
diff --git a/examples/quickcontrols2/imagine/automotive/automotive.pro b/examples/quickcontrols2/imagine/automotive/automotive.pro
new file mode 100644
index 00000000..890e63d8
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/automotive.pro
@@ -0,0 +1,15 @@
+TEMPLATE = app
+TARGET = automotive
+QT += quick quickcontrols2
+
+SOURCES += \
+ automotive.cpp
+
+RESOURCES += \
+ icons/icons.qrc \
+ imagine-assets/imagine-assets.qrc \
+ qml/qml.qrc \
+ qtquickcontrols2.conf
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/imagine/automotive
+INSTALLS += target
diff --git a/examples/quickcontrols2/imagine/automotive/doc/images/qtquickcontrols2-automotive.png b/examples/quickcontrols2/imagine/automotive/doc/images/qtquickcontrols2-automotive.png
new file mode 100644
index 00000000..93ea2854
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/doc/images/qtquickcontrols2-automotive.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/doc/src/qtquickcontrols2-automotive.qdoc b/examples/quickcontrols2/imagine/automotive/doc/src/qtquickcontrols2-automotive.qdoc
new file mode 100644
index 00000000..2107e6ab
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/doc/src/qtquickcontrols2-automotive.qdoc
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example automotive
+ \title Qt Quick Controls 2 - Imagine Style Example: Automotive
+ \ingroup qtquickcontrols2-examples
+ \brief An automotive user interface using custom Imagine style assets.
+
+ This example demonstrates how custom Imagine style assets can be used to
+ style an automotive user interface.
+
+ \image qtquickcontrols2-automotive.png
+
+ \include examples-run.qdocinc
+*/
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/air-con.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/air-con.png
new file mode 100644
index 00000000..70175f6f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/air-con.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/command.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/command.png
new file mode 100644
index 00000000..8f712c78
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/command.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/message.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/message.png
new file mode 100644
index 00000000..7773ca63
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/message.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/music.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/music.png
new file mode 100644
index 00000000..dc73322b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/music.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/seats.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/seats.png
new file mode 100644
index 00000000..2f9eaa62
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/seats.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/settings.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/settings.png
new file mode 100644
index 00000000..b65598b5
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/settings.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/statistics.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/statistics.png
new file mode 100644
index 00000000..97970298
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/statistics.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/windows.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/windows.png
new file mode 100644
index 00000000..8ed8cec4
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44/windows.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/air-con.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/air-con.png
new file mode 100644
index 00000000..8822979e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/air-con.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/command.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/command.png
new file mode 100644
index 00000000..918e2b69
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/command.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/message.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/message.png
new file mode 100644
index 00000000..1debfdfb
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/message.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/music.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/music.png
new file mode 100644
index 00000000..01a3ece4
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/music.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/navigation.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/navigation.png
new file mode 100644
index 00000000..3a18fb5f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/navigation.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/seats.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/seats.png
new file mode 100644
index 00000000..7d67f1be
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/seats.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/settings.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/settings.png
new file mode 100644
index 00000000..3ce2a1f1
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/settings.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/statistics.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/statistics.png
new file mode 100644
index 00000000..afc2cc09
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/statistics.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/windows.png b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/windows.png
new file mode 100644
index 00000000..59bac584
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/44x44@2/windows.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/icons.svg b/examples/quickcontrols2/imagine/automotive/icons/automotive/icons.svg
new file mode 100644
index 00000000..daf4633c
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/icons.svg
@@ -0,0 +1,526 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="449"
+ height="384.99988"
+ viewBox="0 0 449.00001 384.99988"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.92.1 r15371"
+ sodipodi:docname="icons.svg"
+ inkscape:export-filename="/home/mitch/dev/qqc2-futuristic-style-demo/icons/futuristic/44x44@2/settings.png"
+ inkscape:export-xdpi="180"
+ inkscape:export-ydpi="180">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.3750001"
+ inkscape:cx="227.69632"
+ inkscape:cy="173.66895"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:window-width="1920"
+ inkscape:window-height="1137"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1"
+ showguides="true"
+ inkscape:snap-grids="false"
+ inkscape:snap-midpoints="false"
+ inkscape:object-paths="false"
+ inkscape:guide-bbox="true"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4380"
+ originx="-0.042045451"
+ originy="0.87827274" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-0.04204545,-668.2406)"
+ style="display:inline">
+ <g
+ id="g4481"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\automotive\44x44@4\navigation.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384">
+ <rect
+ y="1009.2405"
+ x="180.04205"
+ height="44"
+ width="44"
+ id="rect4273"
+ style="opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4147"
+ d="m 187.6832,1027.7359 29.7995,-11.9955 -8.46002,30.1783 -5.42957,-15.5311 z"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ <g
+ id="g4474"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\automotive\44x44@4\music.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384">
+ <rect
+ style="opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4279"
+ width="44"
+ height="44"
+ x="135.04205"
+ y="1009.2405" />
+ <path
+ sodipodi:nodetypes="cscccc"
+ inkscape:connector-curvature="0"
+ id="path4140"
+ d="m 167.59902,1035.8159 c -1.31413,-1.8397 -8.0497,1.4976 -5.98214,5.5357 1.67413,3.2698 7.60481,-0.9006 7.23214,-2.1428 l 0.043,-22.367 -1.3203,2.4448 z"
+ style="fill:#6affcd;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cscccccc"
+ inkscape:connector-curvature="0"
+ id="path4149-3"
+ d="m 151.55515,1038.884 c -1.31413,-1.8398 -8.0497,1.4975 -5.98214,5.5357 1.67413,3.2698 7.60481,-0.9006 7.23214,-2.1428 v -19.7322 l 14.7673,-3.2197 1.32996,-2.4891 -17.34726,3.4767 z"
+ style="fill:#6affcd;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ <g
+ id="g4518"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\automotive\44x44@4\message.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384">
+ <rect
+ y="1009.2405"
+ x="315.04205"
+ height="44"
+ width="44"
+ id="rect4281"
+ style="opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ y="1019.9489"
+ x="321.94974"
+ height="22.583223"
+ width="30.18462"
+ id="rect4144"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#6affcd;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4146"
+ d="m 322.03814,1020.1699 15.1144,15.1144 14.95973,-14.9597"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4148"
+ d="m 352.09018,1042.3996 -11.00435,-11.0044"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4150"
+ d="m 321.99394,1042.4438 11.13693,-11.137"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ <g
+ id="g4460"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\automotive\44x44@4\command.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384">
+ <rect
+ style="opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4287"
+ width="44"
+ height="44"
+ x="90.042053"
+ y="1009.2405" />
+ <circle
+ r="19.047689"
+ cy="1031.2406"
+ cx="112.04205"
+ id="path4152"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#6affcd;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ ry="5.5033379"
+ rx="4.5719934"
+ y="1018.0177"
+ x="107.24899"
+ height="17.67367"
+ width="9.1883745"
+ id="rect4156"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#6affcd;stroke-width:0.9598186;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ sodipodi:open="true"
+ d="m 118.4944,1031.2297 a 6.6733203,6.6733203 0 0 1 -3.33666,5.7793 6.6733203,6.6733203 0 0 1 -6.67332,0 6.6733203,6.6733203 0 0 1 -3.33666,-5.7793"
+ sodipodi:end="3.1415927"
+ sodipodi:start="0"
+ sodipodi:ry="6.6733203"
+ sodipodi:rx="6.6733203"
+ sodipodi:cy="1031.2297"
+ sodipodi:cx="111.82108"
+ sodipodi:type="arc"
+ id="path4160"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#6affcd;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4171"
+ d="m 111.68097,1037.9274 v 6.75"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4173"
+ d="m 108.71222,1044.6618 h 5.96875"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ <g
+ id="g4547"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\weather@4x.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384">
+ <rect
+ style="opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4275"
+ width="44"
+ height="44"
+ x="405.04205"
+ y="1009.2405" />
+ <path
+ sodipodi:nodetypes="sccssssssss"
+ inkscape:connector-curvature="0"
+ id="rect4181"
+ d="m 415.77154,1020.3319 h 1.72458 c 1.92048,-6.3943 13.78409,-9.9869 18.47317,0 h 2.34328 c 4.38985,0 7.92391,3.3764 7.92391,7.5705 v 0.3996 c 0,4.194 -3.53406,7.5704 -7.92391,7.5704 h -22.54103 c -4.38985,0 -7.92392,-3.3764 -7.92392,-7.5704 v -0.3996 c 0,-4.1941 3.53407,-7.5705 7.92392,-7.5705 z"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#c6c6c6;stroke-width:1.06007564;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4184"
+ d="m 418.4242,1048.7629 2.37846,-8.8765"
+ style="fill:none;fill-rule:evenodd;stroke:#c6c6c6;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#c6c6c6;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 425.80463,1048.7629 2.37846,-8.8765"
+ id="path4186"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4188"
+ d="m 433.36269,1048.7629 2.37846,-8.8765"
+ style="fill:none;fill-rule:evenodd;stroke:#c6c6c6;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ <g
+ id="g4408"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\automotive\44x44@4\settings.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384">
+ <rect
+ y="1009.2405"
+ x="0.042050309"
+ height="44"
+ width="44"
+ id="rect4289"
+ style="opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4175"
+ d="m 18.04247,1017.9491 1.40804,-5.2549 h 5.24319 l 1.47,5.4862 2.38326,1.376 4.34476,-3.4414 4.37522,4.3753 -3.31456,4.3973 1.149046,2.6737 h 5.08233 v 6.7396 l -4.596194,0.3315 -1.590992,3.1157 3.137788,4.0438 -4.209498,4.2095 -4.56007,-2.6328 -2.72092,1.5389 -1.3074,4.8793 h -5.14495 l -1.06066,-5.6527 -2.65524,-0.7114 -4.4148,2.5489 -3.89011,-4.3123 3.13778,-4.088 -1.73918,-3.0124 -4.66897,-0.8988 v -5.5905 l 4.83926,-0.4862 1.41421,-2.9831 -3.13778,-4.1321 4.08796,-4.088 4.04377,2.3644 z"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <circle
+ r="5.5242715"
+ cy="1031.0306"
+ cx="22.064146"
+ id="path4177"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#6affcd;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ </g>
+ <g
+ id="g4487"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\automotive\44x44@4\windows.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384">
+ <rect
+ y="1009.2405"
+ x="225.04205"
+ height="44"
+ width="44"
+ id="rect4277"
+ style="opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0"
+ id="rect4190"
+ d="m 261.03309,1017.2897 v 28 h -27.9375 c 2.35953,-27.5958 7.73302,-28.5625 27.9375,-28 z"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#6affcd;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ </g>
+ <g
+ id="g4538"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\automotive\44x44@4\air-con.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384"
+ transform="translate(-45.000003)">
+ <rect
+ style="opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4283"
+ width="44"
+ height="44"
+ x="405.04205"
+ y="1009.2405" />
+ <path
+ sodipodi:nodetypes="sscsscsscsscs"
+ inkscape:connector-curvature="0"
+ id="path4197"
+ d="m 421.26481,1044.4851 c -3.23157,3.5413 -10.47885,-3.4697 -9.9718,-8.4477 0.83559,-8.2035 7.65867,-5.1475 12.04763,-6.9077 -1.79559,-3.4382 -6.54603,-1.0408 -9.27801,-3.5338 -3.54131,-3.2316 3.46971,-10.4789 8.44775,-9.9718 8.20348,0.8356 5.14746,7.6586 6.84142,12.0034 3.37187,-1.8398 0.97447,-6.5902 3.4675,-9.3222 3.23157,-3.5413 10.47885,3.4697 9.9718,8.4478 -0.83559,8.2034 -7.65867,5.1474 -12.00344,6.753 1.83978,3.2835 6.59022,0.8861 9.3222,3.3791 3.54131,3.2316 -3.46971,10.4789 -8.44775,9.9718 -8.20348,-0.8356 -5.14746,-7.6587 -6.88561,-11.8488 -3.41606,1.9945 -1.01866,6.7449 -3.51169,9.4769 z"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ <g
+ id="g4531"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\automotive\44x44@4\seats.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384"
+ transform="translate(-90.000003)">
+ <rect
+ y="1009.2405"
+ x="360.04205"
+ height="44"
+ width="44"
+ id="rect4285"
+ style="opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="sccs"
+ inkscape:connector-curvature="0"
+ id="rect4203"
+ d="m 391.91622,1017.2238 c 0.17067,-5.6932 5.2149,-4.4637 5.2149,-4.4637 v 9.1924 c -0.7292,-0.07 -5.33548,-0.7063 -5.2149,-4.7287 z"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#6affcd;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cscccsc"
+ inkscape:connector-curvature="0"
+ id="path4206"
+ d="m 386.60297,1040.4014 c -5.60375,-1.1635 -16.63421,-2.7578 -18.84543,0.6535 -1.53027,2.3608 -0.87435,7.5961 2.06641,8.7796 h 21.0795 c 3.59502,-0.5935 6.26483,-6.7048 2.51333,-8.7058 3.19134,-0.9113 5.05406,-18.5249 2.48667,-19.5701 -1.7401,-0.7084 -5.84062,6.4475 -9.30048,18.8428 z"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ <g
+ id="g4435"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\automotive\44x44@4\statistics.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384">
+ <rect
+ style="opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4291"
+ width="44"
+ height="44"
+ x="45.042053"
+ y="1009.2405" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4208"
+ d="M 51.05768,1048.9905 V 1032.553"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 54.60974,1048.9905 v -35.5"
+ id="path4210"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4212"
+ d="M 58.16187,1048.9905 V 1019.178"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 61.71393,1048.9905 v -20"
+ id="path4214"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4216"
+ d="m 65.26599,1048.9905 v -22.875"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 68.81812,1048.9905 V 1034.178"
+ id="path4218"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4220"
+ d="m 72.37018,1048.9905 v -6.8125"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 75.92224,1048.9905 v -9.75"
+ id="path4222"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4224"
+ d="m 79.47437,1048.9905 v -19.75"
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 83.02643,1048.9905 V 1026.303"
+ id="path4226"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g4957"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\warning@4x.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384">
+ <g
+ id="g4952">
+ <g
+ id="g4984">
+ <rect
+ style="display:inline;opacity:1;fill:#dc7878;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4888"
+ width="44"
+ height="44"
+ x="405.04205"
+ y="964.24048" />
+ <path
+ transform="translate(91.459048,54.521538)"
+ d="m 335.89844,913.67383 a 6.7448861,6.7448861 0 0 0 -6.15625,3.36328 l -6.5293,11.30859 -6.5293,11.3086 a 6.7448861,6.7448861 0 0 0 5.83985,10.11718 h 13.05859 13.06055 a 6.7448861,6.7448861 0 0 0 5.83984,-10.11718 l -6.53125,-11.3086 -6.52929,-11.30859 a 6.7448861,6.7448861 0 0 0 -5.52344,-3.36328 z"
+ id="path4914"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#d5242f;stroke-width:1.10000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ inkscape:original="M 335.58203 920.41016 L 329.05273 931.71875 L 322.52344 943.02734 L 335.58203 943.02734 L 348.64258 943.02734 L 342.11133 931.71875 L 335.58203 920.41016 z "
+ inkscape:radius="6.7442117"
+ sodipodi:type="inkscape:offset" />
+ <text
+ id="text4916"
+ y="997.82135"
+ x="418.31409"
+ style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#d5232f;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ xml:space="preserve"><tspan
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.11217499px;line-height:1.25;font-family:'Liberation Mono';-inkscape-font-specification:'Liberation Mono';fill:#d5232f;fill-opacity:1"
+ y="997.82135"
+ x="418.31409"
+ id="tspan4918"
+ sodipodi:role="line">!</tspan></text>
+ </g>
+ </g>
+ </g>
+ <g
+ id="g4579"
+ transform="translate(0.91359708)"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\car@4x.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384">
+ <g
+ transform="translate(0,-0.52629089)"
+ inkscape:export-ydpi="180.02795"
+ inkscape:export-xdpi="180.02795"
+ inkscape:export-filename="/home/mitch/dev/qqc2-futuristic-style-demo/icons/car@2x.png"
+ id="g4940">
+ <g
+ inkscape:export-ydpi="288.18481"
+ inkscape:export-xdpi="288.18481"
+ inkscape:export-filename="C:\dev\qt5.10\qtquickcontrols2\examples\quickcontrols2\imagine\automotive\icons\car@3x.png"
+ transform="translate(-4.2105261)"
+ id="g5027">
+ <g
+ id="g4990"
+ transform="translate(38)">
+ <path
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 155.0705,782.17781 c 6.07598,2.81282 15.70745,5.54152 16.78045,0.12114 1.47822,-7.46742 -7.82673,-9.03073 -12.74213,-11.21517 0.35496,-28.39708 4.52948,-61.94987 -16.18718,-79.16009 -15.28126,-12.6948 -36.88923,-13.70761 -54.94737,-13.89474 -44.75939,1.12608 -72.2307,7.25376 -66.73684,92.42105 -5.10694,0.73154 -15.36618,6.19984 -11.96169,13.62693 2.26424,4.93957 10.32335,-1.55401 16.17222,-2.04798 l -4.42106,70.10526 c -4.88809,9.36444 -1.70447,13.26861 -0.21052,18.31579 l 2.31579,28.21053 c -5.87521,7.89365 -9.18606,65.22384 5.21645,80.45936 20.44842,21.63111 45.69753,20.41018 69.7353,20.35721 29.24164,-0.0644 46.2493,-7.41397 57.516,-25.0271 6.1501,-9.61441 6.80873,-24.11582 6.56857,-37.94412 -0.50608,-29.14019 -2.51723,-31.93372 -3.87843,-38.05588 0.24603,-10.87137 0.62319,-26.86855 0.62319,-26.86855 0.13708,-2.99847 -4.07078,-3.32117 -4.26379,-0.30212 -1.23557,19.32726 -2.52156,37.97398 -4.14887,52.01278 -5.15807,-50.19881 -8.22005,-100.65169 -0.42106,-152.42105 l 1.77142,14.22858"
+ id="path4198"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cscsccsccccssssccsccc" />
+ <rect
+ style="opacity:0;fill:none;fill-opacity:1;stroke:#6affcd;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4200"
+ width="75.39991"
+ height="41.533218"
+ x="52.331917"
+ y="811.89917" />
+ <rect
+ ry="5.0999999"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#6affcd;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4204"
+ width="74.730019"
+ height="42.277542"
+ x="53.001808"
+ y="811.97357"
+ rx="5.0999999" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 33.76375,753.50264 c 21.81505,-33.62758 93.76507,-29.21973 112.94736,0.52631 l -6.52631,45.1579 c -32.75184,-8.71732 -66.12565,-8.2607 -100,-0.42106 z"
+ id="path4207"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 30.39532,772.45 C 39.7558,824.45977 33.67511,874.57878 29.86901,924.97632 27.0264,874.92466 21.98491,825.44889 30.39532,772.45 Z"
+ id="path4209"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 40.07953,905.29211 c 31.5016,11.5654 64.23888,15.63953 100.21053,0.10526 l -1.68421,49.36842 c -34.36634,20.89476 -66.32657,16.8029 -97.05263,-0.10526 z"
+ id="path4211"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 132.39532,693.08158 c -0.1013,1.76525 -0.0679,3.42272 0.52632,4.63158 4.7808,3.23458 8.19086,9.38341 11.57895,15.57895 1.5083,-0.0482 2.87102,0.42463 4.63157,-0.52632 0.15986,-2.57309 0.37258,-5.12353 -0.42105,-8.10526 -3.09684,-4.12667 -6.44714,-7.87314 -10.10526,-11.15789 -2.00632,-0.36221 -3.93976,-0.97762 -6.21053,-0.42106 z"
+ id="path4213"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ sodipodi:nodetypes="ccccccc"
+ inkscape:connector-curvature="0"
+ id="path4215"
+ d="m 48.05537,693.08158 c 0.1013,1.76525 0.0679,3.42272 -0.52632,4.63158 -4.7808,3.23458 -8.19086,9.38341 -11.57895,15.57895 -1.5083,-0.0482 -2.87102,0.42463 -4.63157,-0.52632 -0.15986,-2.57309 -0.37258,-5.12353 0.42105,-8.10526 3.09684,-4.12667 6.44714,-7.87314 10.10526,-11.15789 2.00632,-0.36221 3.93976,-0.97762 6.21053,-0.42106 z"
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#6affcd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ style="display:inline;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#d5222f;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.87843137"
+ d="m 151.92716,785.02141 59.0707,63.0345 c 1.5809,-0.4544 3.3564,-1.3935 2.958,-3.8128 -1.0167,-6.1727 -4.9133,-10.6123 -10.7475,-11.7661 l -48.0616,-50.3775"
+ id="path4240"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+ <rect
+ y="669.29321"
+ x="4.2525716"
+ height="338.94736"
+ width="250.17281"
+ id="rect4844"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ </g>
+ </g>
+ <rect
+ y="668.2406"
+ x="-0.87155163"
+ height="340"
+ width="252"
+ id="rect4563"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.01560712;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ </g>
+</svg>
diff --git a/examples/quickcontrols2/imagine/automotive/icons/automotive/index.theme b/examples/quickcontrols2/imagine/automotive/icons/automotive/index.theme
new file mode 100644
index 00000000..cd84146e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/automotive/index.theme
@@ -0,0 +1,14 @@
+[Icon Theme]
+Name=Automotive
+Comment=Icon theme for the Qt Quick Controls 2 Automotive Imagine Style Example
+
+Directories=44x44,44x44@2
+
+[44x44]
+Size=44
+Type=Fixed
+
+[44x44@2]
+Size=44
+Scale=2
+Type=Fixed
diff --git a/examples/quickcontrols2/imagine/automotive/icons/car.png b/examples/quickcontrols2/imagine/automotive/icons/car.png
new file mode 100644
index 00000000..4bfc9a47
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/car.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/car@2x.png b/examples/quickcontrols2/imagine/automotive/icons/car@2x.png
new file mode 100644
index 00000000..966bc47b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/car@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/icons.qrc b/examples/quickcontrols2/imagine/automotive/icons/icons.qrc
new file mode 100644
index 00000000..5cb79781
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/icons.qrc
@@ -0,0 +1,29 @@
+<RCC>
+ <qresource prefix="/icons">
+ <file>car.png</file>
+ <file>car@2x.png</file>
+ <file>warning.png</file>
+ <file>warning@2x.png</file>
+ <file>weather.png</file>
+ <file>weather@2x.png</file>
+ <file>automotive/icons.svg</file>
+ <file>automotive/index.theme</file>
+ <file>automotive/44x44/air-con.png</file>
+ <file>automotive/44x44/command.png</file>
+ <file>automotive/44x44/message.png</file>
+ <file>automotive/44x44/music.png</file>
+ <file>automotive/44x44/seats.png</file>
+ <file>automotive/44x44/settings.png</file>
+ <file>automotive/44x44/statistics.png</file>
+ <file>automotive/44x44/windows.png</file>
+ <file>automotive/44x44@2/air-con.png</file>
+ <file>automotive/44x44@2/command.png</file>
+ <file>automotive/44x44@2/message.png</file>
+ <file>automotive/44x44@2/music.png</file>
+ <file>automotive/44x44@2/navigation.png</file>
+ <file>automotive/44x44@2/seats.png</file>
+ <file>automotive/44x44@2/settings.png</file>
+ <file>automotive/44x44@2/statistics.png</file>
+ <file>automotive/44x44@2/windows.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quickcontrols2/imagine/automotive/icons/warning.png b/examples/quickcontrols2/imagine/automotive/icons/warning.png
new file mode 100644
index 00000000..590a61eb
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/warning.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/warning@2x.png b/examples/quickcontrols2/imagine/automotive/icons/warning@2x.png
new file mode 100644
index 00000000..487fbafc
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/warning@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/weather.png b/examples/quickcontrols2/imagine/automotive/icons/weather.png
new file mode 100644
index 00000000..b1479de2
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/weather.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/icons/weather@2x.png b/examples/quickcontrols2/imagine/automotive/icons/weather@2x.png
new file mode 100644
index 00000000..8b4333ab
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/icons/weather@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/applicationwindow-background.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/applicationwindow-background.png
new file mode 100644
index 00000000..8f7152e5
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/applicationwindow-background.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/applicationwindow-background@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/applicationwindow-background@2x.png
new file mode 100644
index 00000000..72bd2f11
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/applicationwindow-background@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked-hovered.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked-hovered.9.png
new file mode 100644
index 00000000..0ec1a28d
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked-hovered.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked-hovered@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked-hovered@2x.9.png
new file mode 100644
index 00000000..53e1041f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked-hovered@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked.9.png
new file mode 100644
index 00000000..16ed8185
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked@2x.9.png
new file mode 100644
index 00000000..ca5d4db6
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-checked@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-hovered.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-hovered.9.png
new file mode 100644
index 00000000..a7a0252e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-hovered.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-hovered@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-hovered@2x.9.png
new file mode 100644
index 00000000..28a0d1f1
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-hovered@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-pressed.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-pressed.9.png
new file mode 100644
index 00000000..0f8b0c4e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-pressed.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-pressed@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-pressed@2x.9.png
new file mode 100644
index 00000000..6048dba0
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background-pressed@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background.9.png
new file mode 100644
index 00000000..65653dee
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background@2x.9.png
new file mode 100644
index 00000000..0cb87ad3
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/button-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-hovered.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-hovered.png
new file mode 100644
index 00000000..aaa24dea
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-hovered@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-hovered@2x.png
new file mode 100644
index 00000000..6c1a8d9e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-pressed.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-pressed.png
new file mode 100644
index 00000000..e730f74a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-pressed@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-pressed@2x.png
new file mode 100644
index 00000000..bf189c9a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background.png
new file mode 100644
index 00000000..6cb099ce
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background@2x.png
new file mode 100644
index 00000000..dca94220
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-background@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle-pressed.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle-pressed.png
new file mode 100644
index 00000000..a65e68bd
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle-pressed@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle-pressed@2x.png
new file mode 100644
index 00000000..c2b4c86a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle.png
new file mode 100644
index 00000000..1f338bbe
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle@2x.png
new file mode 100644
index 00000000..a894eb6c
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/dial-handle@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/frame-background.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/frame-background.9.png
new file mode 100644
index 00000000..bfb27a20
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/frame-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/frame-background@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/frame-background@2x.9.png
new file mode 100644
index 00000000..73db47d3
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/frame-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/imagine-assets.qrc b/examples/quickcontrols2/imagine/automotive/imagine-assets/imagine-assets.qrc
new file mode 100644
index 00000000..81eadda6
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/imagine-assets.qrc
@@ -0,0 +1,80 @@
+<RCC>
+ <qresource prefix="/imagine-assets">
+ <file>applicationwindow-background.png</file>
+ <file>applicationwindow-background@2x.png</file>
+ <file>button-background.9.png</file>
+ <file>button-background@2x.9.png</file>
+ <file>button-background-checked.9.png</file>
+ <file>button-background-checked@2x.9.png</file>
+ <file>button-background-checked-hovered.9.png</file>
+ <file>button-background-checked-hovered@2x.9.png</file>
+ <file>button-background-hovered.9.png</file>
+ <file>button-background-hovered@2x.9.png</file>
+ <file>button-background-pressed.9.png</file>
+ <file>button-background-pressed@2x.9.png</file>
+ <file>dial-background.png</file>
+ <file>dial-background@2x.png</file>
+ <file>dial-background-hovered.png</file>
+ <file>dial-background-hovered@2x.png</file>
+ <file>dial-background-pressed.png</file>
+ <file>dial-background-pressed@2x.png</file>
+ <file>dial-handle.png</file>
+ <file>dial-handle@2x.png</file>
+ <file>dial-handle-pressed.png</file>
+ <file>dial-handle-pressed@2x.png</file>
+ <file>frame-background.9.png</file>
+ <file>frame-background@2x.9.png</file>
+ <file>itemdelegate-background.9.png</file>
+ <file>itemdelegate-background@2x.9.png</file>
+ <file>itemdelegate-background-checked.9.png</file>
+ <file>itemdelegate-background-checked@2x.9.png</file>
+ <file>itemdelegate-background-hovered.9.png</file>
+ <file>itemdelegate-background-hovered@2x.9.png</file>
+ <file>itemdelegate-background-pressed.9.png</file>
+ <file>itemdelegate-background-pressed@2x.9.png</file>
+ <file>radiobutton-indicator.png</file>
+ <file>radiobutton-indicator@2x.png</file>
+ <file>radiobutton-indicator-checked.png</file>
+ <file>radiobutton-indicator-checked@2x.png</file>
+ <file>radiobutton-indicator-checked-hovered.png</file>
+ <file>radiobutton-indicator-checked-hovered@2x.png</file>
+ <file>radiobutton-indicator-checked-pressed.png</file>
+ <file>radiobutton-indicator-checked-pressed@2x.png</file>
+ <file>radiobutton-indicator-hovered.png</file>
+ <file>radiobutton-indicator-hovered@2x.png</file>
+ <file>radiobutton-indicator-pressed.png</file>
+ <file>radiobutton-indicator-pressed@2x.png</file>
+ <file>scrollindicator-handle.png</file>
+ <file>scrollindicator-handle@2x.png</file>
+ <file>slider-background-horizontal.9.png</file>
+ <file>slider-background-horizontal@2x.9.png</file>
+ <file>slider-handle.png</file>
+ <file>slider-handle@2x.png</file>
+ <file>slider-handle-hovered.png</file>
+ <file>slider-handle-hovered@2x.png</file>
+ <file>slider-handle-pressed.png</file>
+ <file>slider-handle-pressed@2x.png</file>
+ <file>slider-progress-horizontal.9.png</file>
+ <file>slider-progress-horizontal@2x.9.png</file>
+ <file>slider-progress-horizontal-pressed.9.png</file>
+ <file>slider-progress-horizontal-pressed@2x.9.png</file>
+ <file>switchdelegate-background.9.png</file>
+ <file>switchdelegate-background@2x.9.png</file>
+ <file>switchdelegate-handle.png</file>
+ <file>switchdelegate-handle@2x.png</file>
+ <file>switchdelegate-handle-checked.png</file>
+ <file>switchdelegate-handle-checked@2x.png</file>
+ <file>switchdelegate-handle-checked-hovered.png</file>
+ <file>switchdelegate-handle-checked-hovered@2x.png</file>
+ <file>switchdelegate-handle-hovered.png</file>
+ <file>switchdelegate-handle-hovered@2x.png</file>
+ <file>switchdelegate-handle-pressed.png</file>
+ <file>switchdelegate-handle-pressed@2x.png</file>
+ <file>switchdelegate-indicator.png</file>
+ <file>switchdelegate-indicator@2x.png</file>
+ <file>switchdelegate-indicator-pressed.png</file>
+ <file>switchdelegate-indicator-pressed@2x.png</file>
+ <file>toolseparator-separator-vertical.9.png</file>
+ <file>toolseparator-separator-vertical@2x.9.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-checked.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-checked.9.png
new file mode 100644
index 00000000..8941ad9f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-checked.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-checked@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-checked@2x.9.png
new file mode 100644
index 00000000..a17e4469
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-checked@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-hovered.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-hovered.9.png
new file mode 100644
index 00000000..ab6d2947
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-hovered.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-hovered@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-hovered@2x.9.png
new file mode 100644
index 00000000..65120b4b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-hovered@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-pressed.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-pressed.9.png
new file mode 100644
index 00000000..c9b86741
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-pressed.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-pressed@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-pressed@2x.9.png
new file mode 100644
index 00000000..cc3393e1
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background-pressed@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background.9.png
new file mode 100644
index 00000000..42d580b0
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background@2x.9.png
new file mode 100644
index 00000000..76008e8c
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/itemdelegate-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-hovered.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-hovered.png
new file mode 100644
index 00000000..f64c9665
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-hovered@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-hovered@2x.png
new file mode 100644
index 00000000..ace1717a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-pressed.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-pressed.png
new file mode 100644
index 00000000..c77ad470
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-pressed@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-pressed@2x.png
new file mode 100644
index 00000000..2798f77f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked.png
new file mode 100644
index 00000000..ea714eaa
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked@2x.png
new file mode 100644
index 00000000..4f29b80b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-checked@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-hovered.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-hovered.png
new file mode 100644
index 00000000..a7d07ed1
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-hovered@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-hovered@2x.png
new file mode 100644
index 00000000..b0fff06e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-pressed.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-pressed.png
new file mode 100644
index 00000000..7d657ac9
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-pressed@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-pressed@2x.png
new file mode 100644
index 00000000..9a8b9cd8
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator.png
new file mode 100644
index 00000000..b59ba0ce
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator@2x.png
new file mode 100644
index 00000000..e4a2b9a2
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/radiobutton-indicator@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/scrollindicator-handle.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/scrollindicator-handle.png
new file mode 100644
index 00000000..0faa2592
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/scrollindicator-handle.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/scrollindicator-handle@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/scrollindicator-handle@2x.png
new file mode 100644
index 00000000..09616c5e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/scrollindicator-handle@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-background-horizontal.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-background-horizontal.9.png
new file mode 100644
index 00000000..eafe5da0
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-background-horizontal.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-background-horizontal@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-background-horizontal@2x.9.png
new file mode 100644
index 00000000..c14bf788
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-background-horizontal@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-hovered.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-hovered.png
new file mode 100644
index 00000000..9f56b8c0
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-hovered@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-hovered@2x.png
new file mode 100644
index 00000000..87a8126a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-pressed.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-pressed.png
new file mode 100644
index 00000000..771b71c2
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-pressed@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-pressed@2x.png
new file mode 100644
index 00000000..b0edf7da
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle.png
new file mode 100644
index 00000000..9634d2ae
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle@2x.png
new file mode 100644
index 00000000..8983436c
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-handle@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal-pressed.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal-pressed.9.png
new file mode 100644
index 00000000..15726a9f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal-pressed.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal-pressed@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal-pressed@2x.9.png
new file mode 100644
index 00000000..d25c9e63
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal-pressed@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal.9.png
new file mode 100644
index 00000000..cff4e860
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal@2x.9.png
new file mode 100644
index 00000000..ecb5e15a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/slider-progress-horizontal@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-background.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-background.9.png
new file mode 100644
index 00000000..1fbb5626
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-background@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-background@2x.9.png
new file mode 100644
index 00000000..18880980
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked-hovered.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked-hovered.png
new file mode 100644
index 00000000..e66ef713
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked-hovered@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked-hovered@2x.png
new file mode 100644
index 00000000..05d6f82e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked.png
new file mode 100644
index 00000000..bcfa06ae
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked@2x.png
new file mode 100644
index 00000000..b9985f0f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-checked@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-hovered.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-hovered.png
new file mode 100644
index 00000000..3de8aa15
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-hovered@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-hovered@2x.png
new file mode 100644
index 00000000..b9551590
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-pressed.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-pressed.png
new file mode 100644
index 00000000..547b2c17
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-pressed@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-pressed@2x.png
new file mode 100644
index 00000000..b4bb748a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle.png
new file mode 100644
index 00000000..b30fdaa2
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle@2x.png
new file mode 100644
index 00000000..4e98604c
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-handle@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator-pressed.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator-pressed.png
new file mode 100644
index 00000000..6833d624
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator-pressed@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator-pressed@2x.png
new file mode 100644
index 00000000..3d5498a0
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator.png
new file mode 100644
index 00000000..3db5fe20
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator@2x.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator@2x.png
new file mode 100644
index 00000000..b5c10f74
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/switchdelegate-indicator@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/toolseparator-separator-vertical.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/toolseparator-separator-vertical.9.png
new file mode 100644
index 00000000..a6d2009b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/toolseparator-separator-vertical.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/imagine-assets/toolseparator-separator-vertical@2x.9.png b/examples/quickcontrols2/imagine/automotive/imagine-assets/toolseparator-separator-vertical@2x.9.png
new file mode 100644
index 00000000..9ab9ca56
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/imagine-assets/toolseparator-separator-vertical@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/automotive/qml/CustomGlow.qml b/examples/quickcontrols2/imagine/automotive/qml/CustomGlow.qml
new file mode 100644
index 00000000..dfd66ada
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/qml/CustomGlow.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples 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 QtGraphicalEffects 1.0
+
+Glow {
+ color: glowColor
+ samples: 20
+ spread: 0.3
+}
diff --git a/examples/quickcontrols2/imagine/automotive/qml/FeatureButton.qml b/examples/quickcontrols2/imagine/automotive/qml/FeatureButton.qml
new file mode 100644
index 00000000..e19d8665
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/qml/FeatureButton.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples 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.Layouts 1.3
+import QtQuick.Controls 2.3
+
+Button {
+ id: button
+ checkable: true
+ font.pixelSize: fontSizeExtraSmall
+ leftPadding: 4
+ rightPadding: 4
+ topPadding: 12
+ bottomPadding: 12
+ implicitWidth: 60
+ implicitHeight: 90
+
+ icon.name: "placeholder"
+ icon.width: 44
+ icon.height: 44
+ display: Button.TextUnderIcon
+}
diff --git a/examples/quickcontrols2/imagine/automotive/qml/GlowingLabel.qml b/examples/quickcontrols2/imagine/automotive/qml/GlowingLabel.qml
new file mode 100644
index 00000000..50f816ce
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/qml/GlowingLabel.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples 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.3
+
+// This container and the transform on the Label are
+// necessary to get precise bounding rect of the text for layouting reasons,
+// since some of the labels' font sizes can get quite large.
+Item {
+ id: root
+ implicitHeight: labelTextMetrics.tightBoundingRect.height
+ implicitWidth: label.implicitWidth
+
+ property alias text: label.text
+ property alias font: label.font
+ property alias horizontalAlignment: label.horizontalAlignment
+ property alias verticalAlignment: label.verticalAlignment
+ property bool glowEnabled: true
+ property color glowColor: colorGlow
+ property color color: colorBright
+
+ Label {
+ id: label
+ anchors.baseline: root.baseline
+ color: root.color
+
+ layer.enabled: root.glowEnabled
+ layer.effect: CustomGlow {
+ color: glowColor
+ }
+
+ TextMetrics {
+ id: labelTextMetrics
+ text: label.text
+ font: label.font
+ }
+
+ transform: Translate {
+ y: -labelTextMetrics.tightBoundingRect.y
+ }
+ }
+}
diff --git a/examples/quickcontrols2/imagine/automotive/qml/automotive.qml b/examples/quickcontrols2/imagine/automotive/qml/automotive.qml
new file mode 100644
index 00000000..a2985d0f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/qml/automotive.qml
@@ -0,0 +1,642 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples 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.Layouts 1.3
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Window 2.0
+
+ApplicationWindow {
+ id: window
+ width: 1280
+ height: 720
+ minimumWidth: 1180
+ minimumHeight: 663
+ visible: true
+ title: "Qt Quick Controls 2 - Imagine Style Example: Automotive"
+
+ readonly property color colorGlow: "#1d6d64"
+ readonly property color colorWarning: "#d5232f"
+ readonly property color colorMain: "#6affcd"
+ readonly property color colorBright: "#ffffff"
+ readonly property color colorLightGrey: "#888"
+ readonly property color colorDarkGrey: "#333"
+
+ readonly property int fontSizeExtraSmall: Qt.application.font.pixelSize * 0.8
+ readonly property int fontSizeMedium: Qt.application.font.pixelSize * 1.5
+ readonly property int fontSizeLarge: Qt.application.font.pixelSize * 2
+ readonly property int fontSizeExtraLarge: Qt.application.font.pixelSize * 5
+
+ Component.onCompleted: {
+ x = Screen.width / 2 - width / 2
+ y = Screen.height / 2 - height / 2
+ }
+
+ Shortcut {
+ sequence: "Ctrl+Q"
+ onActivated: Qt.quit()
+ }
+
+ Frame {
+ id: frame
+ anchors.fill: parent
+ anchors.margins: 90
+
+ RowLayout {
+ id: mainRowLayout
+ anchors.fill: parent
+ anchors.margins: 24
+ spacing: 36
+
+ Container {
+ id: leftTabBar
+
+ currentIndex: 1
+
+ Layout.fillWidth: false
+ Layout.fillHeight: true
+
+ ButtonGroup {
+ buttons: columnLayout.children
+ }
+
+ contentItem: ColumnLayout {
+ id: columnLayout
+ spacing: 3
+
+ Repeater {
+ model: leftTabBar.contentModel
+ }
+ }
+
+ FeatureButton {
+ id: navigationFeatureButton
+ text: qsTr("Navigation")
+ icon.name: "navigation"
+ Layout.fillHeight: true
+ }
+
+ FeatureButton {
+ text: qsTr("Music")
+ icon.name: "music"
+ checked: true
+ Layout.fillHeight: true
+ }
+
+ FeatureButton {
+ text: qsTr("Message")
+ icon.name: "message"
+ Layout.fillHeight: true
+ }
+
+ FeatureButton {
+ text: qsTr("Command")
+ icon.name: "command"
+ Layout.fillHeight: true
+ }
+
+ FeatureButton {
+ text: qsTr("Settings")
+ icon.name: "settings"
+ Layout.fillHeight: true
+ }
+ }
+
+ StackLayout {
+ currentIndex: leftTabBar.currentIndex
+
+ Layout.preferredWidth: 150
+ Layout.maximumWidth: 150
+ Layout.fillWidth: false
+
+ Item {}
+
+ ColumnLayout {
+ spacing: 16
+
+ ButtonGroup {
+ id: viewButtonGroup
+ buttons: viewTypeRowLayout.children
+ }
+
+ RowLayout {
+ id: viewTypeRowLayout
+ spacing: 3
+
+ Layout.bottomMargin: 12
+
+ Button {
+ text: qsTr("Compact")
+ font.pixelSize: fontSizeExtraSmall
+ checked: true
+
+ Layout.fillWidth: true
+ }
+ Button {
+ text: qsTr("Full")
+ font.pixelSize: fontSizeExtraSmall
+ checkable: true
+
+ Layout.fillWidth: true
+ }
+ }
+
+ GlowingLabel {
+ text: qsTr("VOLUME")
+ color: "white"
+ font.pixelSize: fontSizeMedium
+ }
+
+ Dial {
+ id: volumeDial
+ from: 0
+ value: 42
+ to: 100
+ stepSize: 1
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Layout.minimumWidth: 64
+ Layout.minimumHeight: 64
+ Layout.preferredWidth: 128
+ Layout.preferredHeight: 128
+ Layout.maximumWidth: 128
+ Layout.maximumHeight: 128
+ Layout.fillHeight: true
+
+ Label {
+ text: volumeDial.value.toFixed(0)
+ color: "white"
+ font.pixelSize: Qt.application.font.pixelSize * 3
+ anchors.centerIn: parent
+ }
+ }
+
+ ButtonGroup {
+ id: audioSourceButtonGroup
+ }
+
+ RowLayout {
+ Layout.topMargin: 16
+
+ GlowingLabel {
+ id: radioOption
+ text: qsTr("RADIO")
+ color: "white"
+ font.pixelSize: fontSizeMedium
+ horizontalAlignment: Label.AlignLeft
+
+ Layout.fillWidth: true
+ }
+ GlowingLabel {
+ text: qsTr("AUX")
+ color: colorLightGrey
+ font.pixelSize: fontSizeMedium * 0.8
+ horizontalAlignment: Label.AlignHCenter
+ glowEnabled: false
+ anchors.bottom: radioOption.bottom
+
+ Layout.fillWidth: true
+ }
+ GlowingLabel {
+ text: qsTr("MP3")
+ color: colorDarkGrey
+ font.pixelSize: fontSizeMedium * 0.6
+ horizontalAlignment: Label.AlignRight
+ glowEnabled: false
+ anchors.bottom: radioOption.bottom
+
+ Layout.fillWidth: true
+ }
+ }
+
+ Frame {
+ id: stationFrame
+ leftPadding: 1
+ rightPadding: 1
+ topPadding: 1
+ bottomPadding: 1
+
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ Layout.preferredHeight: 128
+
+ ListView {
+ clip: true
+ anchors.fill: parent
+
+ ScrollIndicator.vertical: ScrollIndicator {
+ parent: stationFrame
+ anchors.top: parent.top
+ anchors.right: parent.right
+ anchors.rightMargin: 1
+ anchors.bottom: parent.bottom
+ }
+
+ model: ListModel {
+ ListElement { name: "V-Radio"; frequency: "105.5 MHz" }
+ ListElement { name: "World News"; frequency: "93.4 MHz" }
+ ListElement { name: "TekStep FM"; frequency: "95.0 MHz" }
+ ListElement { name: "Classic Radio"; frequency: "89.9 MHz" }
+ ListElement { name: "Buena Vista FM"; frequency: "100.8 MHz" }
+ ListElement { name: "Drive-by Radio"; frequency: "99.1 MHz" }
+ ListElement { name: "Unknown #1"; frequency: "104.5 MHz" }
+ ListElement { name: "Unknown #2"; frequency: "91.2 MHz" }
+ ListElement { name: "Unknown #3"; frequency: "93.8 MHz" }
+ ListElement { name: "Unknown #4"; frequency: "80.4 MHz" }
+ ListElement { name: "Unknown #5"; frequency: "101.1 MHz" }
+ ListElement { name: "Unknown #6"; frequency: "92.2 MHz" }
+ }
+ delegate: ItemDelegate {
+ id: stationDelegate
+ width: parent.width
+ height: 22
+ text: model.name
+ font.pixelSize: fontSizeExtraSmall
+ topPadding: 0
+ bottomPadding: 0
+
+ contentItem: RowLayout {
+ Label {
+ text: model.name
+ font: stationDelegate.font
+ horizontalAlignment: Text.AlignLeft
+ Layout.fillWidth: true
+ }
+ Label {
+ text: model.frequency
+ font: stationDelegate.font
+ horizontalAlignment: Text.AlignRight
+ Layout.fillWidth: true
+ }
+ }
+ }
+ }
+ }
+
+ Frame {
+ Layout.fillWidth: true
+
+ RowLayout {
+ anchors.fill: parent
+
+ Label {
+ text: qsTr("Sort by")
+ font.pixelSize: fontSizeExtraSmall
+
+ Layout.alignment: Qt.AlignTop
+ }
+
+ ColumnLayout {
+ RadioButton {
+ text: qsTr("Name")
+ font.pixelSize: fontSizeExtraSmall
+ }
+ RadioButton {
+ text: qsTr("Frequency")
+ font.pixelSize: fontSizeExtraSmall
+ }
+ RadioButton {
+ text: qsTr("Favourites")
+ font.pixelSize: fontSizeExtraSmall
+ checked: true
+ }
+ }
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ color: colorMain
+ implicitWidth: 1
+ Layout.fillHeight: true
+ }
+
+ ColumnLayout {
+ Layout.preferredWidth: 350
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ GlowingLabel {
+ id: timeLabel
+ text: qsTr("11:02")
+ font.pixelSize: fontSizeExtraLarge
+
+ Layout.alignment: Qt.AlignHCenter
+
+ GlowingLabel {
+ text: qsTr("AM")
+ font.pixelSize: fontSizeLarge
+ anchors.left: parent.right
+ anchors.leftMargin: 8
+ }
+ }
+
+ Label {
+ text: qsTr("01/01/2018")
+ color: colorLightGrey
+ font.pixelSize: fontSizeMedium
+
+ Layout.alignment: Qt.AlignHCenter
+ Layout.topMargin: 2
+ Layout.bottomMargin: 10
+ }
+
+ Image {
+ source: "qrc:/icons/car.png"
+ fillMode: Image.PreserveAspectFit
+
+ Layout.fillHeight: true
+
+ Column {
+ x: parent.width * 0.88
+ y: parent.height * 0.56
+ spacing: 3
+
+ Image {
+ source: "qrc:/icons/warning.png"
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ layer.enabled: true
+ layer.effect: CustomGlow {
+ spread: 0.2
+ samples: 40
+ color: colorWarning
+ }
+ }
+
+ GlowingLabel {
+ text: qsTr("Door open")
+ color: colorWarning
+ glowColor: Qt.rgba(colorWarning.r, colorWarning.g, colorWarning.b, 0.4)
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ color: colorMain
+ implicitWidth: 1
+ Layout.fillHeight: true
+ }
+
+ ColumnLayout {
+ Row {
+ spacing: 8
+
+ Image {
+ source: "qrc:/icons/weather.png"
+ }
+
+ Column {
+ spacing: 8
+
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ GlowingLabel {
+ id: outsideTempValueLabel
+ text: qsTr("31")
+ font.pixelSize: fontSizeExtraLarge
+ }
+
+ GlowingLabel {
+ text: qsTr("°C")
+ font.pixelSize: Qt.application.font.pixelSize * 2.5
+ anchors.baseline: outsideTempValueLabel.baseline
+ }
+ }
+
+ Label {
+ text: qsTr("Osaka, Japan")
+ color: colorLightGrey
+ font.pixelSize: fontSizeMedium
+ }
+ }
+ }
+
+ ColumnLayout {
+ id: airConRowLayout
+ spacing: 8
+
+ Layout.preferredWidth: 128
+ Layout.preferredHeight: 380
+ Layout.fillHeight: true
+
+ Item {
+ Layout.fillHeight: true
+ }
+
+ SwitchDelegate {
+ text: qsTr("AC")
+ leftPadding: 0
+ rightPadding: 0
+ topPadding: 0
+ bottomPadding: 0
+
+ Layout.fillWidth: true
+ }
+
+ // QTBUG-63269
+ Item {
+ implicitHeight: temperatureValueLabel.implicitHeight
+ Layout.fillWidth: true
+ Layout.topMargin: 16
+
+ Label {
+ text: qsTr("Temperature")
+ anchors.baseline: temperatureValueLabel.bottom
+ anchors.left: parent.left
+ }
+
+ GlowingLabel {
+ id: temperatureValueLabel
+ text: qsTr("24°C")
+ font.pixelSize: fontSizeLarge
+ anchors.right: parent.right
+ }
+ }
+
+ Slider {
+ value: 0.35
+ Layout.fillWidth: true
+ }
+
+ // QTBUG-63269
+ Item {
+ implicitHeight: powerValueLabel.implicitHeight
+ Layout.fillWidth: true
+ Layout.topMargin: 16
+
+ Label {
+ text: qsTr("Power")
+ anchors.baseline: powerValueLabel.bottom
+ anchors.left: parent.left
+ }
+
+ GlowingLabel {
+ id: powerValueLabel
+ text: qsTr("10%")
+ font.pixelSize: fontSizeLarge
+ anchors.right: parent.right
+ }
+ }
+
+ Slider {
+ value: 0.25
+ Layout.fillWidth: true
+ }
+
+ SwitchDelegate {
+ text: qsTr("Low")
+ leftPadding: 0
+ rightPadding: 0
+ topPadding: 0
+ bottomPadding: 0
+
+ Layout.fillWidth: true
+ Layout.topMargin: 16
+ }
+
+ SwitchDelegate {
+ text: qsTr("High")
+ checked: true
+ leftPadding: 0
+ rightPadding: 0
+ topPadding: 0
+ bottomPadding: 0
+
+ Layout.fillWidth: true
+ }
+
+ SwitchDelegate {
+ text: qsTr("Defog")
+ leftPadding: 0
+ rightPadding: 0
+ topPadding: 0
+ bottomPadding: 0
+
+ Layout.fillWidth: true
+ }
+
+ SwitchDelegate {
+ text: qsTr("Recirculate")
+ leftPadding: 0
+ rightPadding: 0
+ topPadding: 0
+ bottomPadding: 0
+
+ Layout.fillWidth: true
+ }
+
+ Item {
+ Layout.fillHeight: true
+ }
+ }
+ }
+
+ Container {
+ id: rightTabBar
+
+ currentIndex: 1
+
+ Layout.fillHeight: true
+
+ ButtonGroup {
+ buttons: rightTabBarContentLayout.children
+ }
+
+ contentItem: ColumnLayout {
+ id: rightTabBarContentLayout
+ spacing: 3
+
+ Repeater {
+ model: rightTabBar.contentModel
+ }
+ }
+
+ Item {
+ Layout.fillHeight: true
+ }
+
+ FeatureButton {
+ text: qsTr("Windows")
+ icon.name: "windows"
+
+ Layout.maximumHeight: navigationFeatureButton.height
+ Layout.fillHeight: true
+ }
+ FeatureButton {
+ text: qsTr("Air Con.")
+ icon.name: "air-con"
+ checked: true
+
+ Layout.maximumHeight: navigationFeatureButton.height
+ Layout.fillHeight: true
+ }
+ FeatureButton {
+ text: qsTr("Seats")
+ icon.name: "seats"
+
+ Layout.maximumHeight: navigationFeatureButton.height
+ Layout.fillHeight: true
+ }
+ FeatureButton {
+ text: qsTr("Statistics")
+ icon.name: "statistics"
+
+ Layout.maximumHeight: navigationFeatureButton.height
+ Layout.fillHeight: true
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quickcontrols2/imagine/automotive/qml/qml.qrc b/examples/quickcontrols2/imagine/automotive/qml/qml.qrc
new file mode 100644
index 00000000..d193fd32
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/qml/qml.qrc
@@ -0,0 +1,8 @@
+<RCC>
+ <qresource prefix="/qml">
+ <file>FeatureButton.qml</file>
+ <file>GlowingLabel.qml</file>
+ <file>CustomGlow.qml</file>
+ <file>automotive.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/quickcontrols2/imagine/automotive/qtquickcontrols2.conf b/examples/quickcontrols2/imagine/automotive/qtquickcontrols2.conf
new file mode 100644
index 00000000..c8bcdd40
--- /dev/null
+++ b/examples/quickcontrols2/imagine/automotive/qtquickcontrols2.conf
@@ -0,0 +1,10 @@
+[Controls]
+Style=Imagine
+
+[Imagine]
+Path=qrc:/imagine-assets
+
+[Imagine\Palette]
+Text=#6affcd
+ButtonText=#6affcd
+WindowText=#6affcd
diff --git a/examples/quickcontrols2/imagine/musicplayer/doc/images/qtquickcontrols2-musicplayer.png b/examples/quickcontrols2/imagine/musicplayer/doc/images/qtquickcontrols2-musicplayer.png
new file mode 100644
index 00000000..25b6344f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/doc/images/qtquickcontrols2-musicplayer.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/doc/src/qtquickcontrols2-musicplayer.qdoc b/examples/quickcontrols2/imagine/musicplayer/doc/src/qtquickcontrols2-musicplayer.qdoc
new file mode 100644
index 00000000..cca44e83
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/doc/src/qtquickcontrols2-musicplayer.qdoc
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example musicplayer
+ \title Qt Quick Controls 2 - Imagine Style Example: Music Player
+ \ingroup qtquickcontrols2-examples
+ \brief An audio player user interface using custom Imagine style assets.
+
+ This example demonstrates how custom Imagine style assets
+ can be used to style a user interface for an audio player application.
+
+ \image qtquickcontrols2-musicplayer.png
+
+ \omit
+ The assets are generated from a Photoshop file: \e musicplayer.psd.
+ This file can found in the \e design folder in the example directory.
+ All objects related to a particular asset are collected in a layer group.
+ For example, the assets for Button's background element are under a layer group with the following name:
+
+ \badcode
+ 100% button-background.9.png, 200% button-background@2x.9.png, 300% button-background@3x.9.png, 400% button-background@4x.9.png
+ \endcode
+
+ Using Photoshop's \l {Generate Image Assets}{https://helpx.adobe.com/photoshop/using/generate-assets-layers.html} feature,
+ the size and name for each asset are encoded into the name of the layer group.
+
+ Where applicable, \l {Smart Objects}{https://helpx.adobe.com/photoshop/using/create-smart-objects.html}
+ are used to reduce duplication for common objects such as 9-patch lines.
+ \endomit
+
+ \include examples-run.qdocinc
+*/
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/icons.qrc b/examples/quickcontrols2/imagine/musicplayer/icons/icons.qrc
new file mode 100644
index 00000000..870b4445
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/icons.qrc
@@ -0,0 +1,40 @@
+<RCC>
+ <qresource prefix="/icons">
+ <file>musicplayer/index.theme</file>
+ <file>musicplayer/32x32/bluetooth.png</file>
+ <file>musicplayer/32x32/cart.png</file>
+ <file>musicplayer/32x32/cloud.png</file>
+ <file>musicplayer/32x32/filter.png</file>
+ <file>musicplayer/32x32/folder.png</file>
+ <file>musicplayer/32x32/message.png</file>
+ <file>musicplayer/32x32/music.png</file>
+ <file>musicplayer/32x32/next.png</file>
+ <file>musicplayer/32x32/pause.png</file>
+ <file>musicplayer/32x32/power.png</file>
+ <file>musicplayer/32x32/previous.png</file>
+ <file>musicplayer/32x32/repeat.png</file>
+ <file>musicplayer/32x32/save.png</file>
+ <file>musicplayer/32x32/settings.png</file>
+ <file>musicplayer/32x32/shuffle.png</file>
+ <file>musicplayer/32x32/stop.png</file>
+ <file>musicplayer/32x32@2/bluetooth.png</file>
+ <file>musicplayer/32x32@2/cart.png</file>
+ <file>musicplayer/32x32@2/cloud.png</file>
+ <file>musicplayer/32x32@2/filter.png</file>
+ <file>musicplayer/32x32@2/folder.png</file>
+ <file>musicplayer/32x32@2/grid.png</file>
+ <file>musicplayer/32x32@2/message.png</file>
+ <file>musicplayer/32x32@2/music.png</file>
+ <file>musicplayer/32x32@2/next.png</file>
+ <file>musicplayer/32x32@2/pause.png</file>
+ <file>musicplayer/32x32@2/power.png</file>
+ <file>musicplayer/32x32@2/previous.png</file>
+ <file>musicplayer/32x32@2/repeat.png</file>
+ <file>musicplayer/32x32@2/save.png</file>
+ <file>musicplayer/32x32@2/settings.png</file>
+ <file>musicplayer/32x32@2/shuffle.png</file>
+ <file>musicplayer/32x32@2/stop.png</file>
+ <file>musicplayer/32x32/favorite.png</file>
+ <file>musicplayer/32x32@2/favorite.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/bluetooth.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/bluetooth.png
new file mode 100644
index 00000000..925f564c
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/bluetooth.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/cart.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/cart.png
new file mode 100644
index 00000000..4d5ad099
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/cart.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/cloud.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/cloud.png
new file mode 100644
index 00000000..62ef5118
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/cloud.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/favorite.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/favorite.png
new file mode 100644
index 00000000..16ea84de
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/favorite.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/filter.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/filter.png
new file mode 100644
index 00000000..4472cead
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/filter.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/folder.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/folder.png
new file mode 100644
index 00000000..5dd05778
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/folder.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/message.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/message.png
new file mode 100644
index 00000000..1d93b3c6
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/message.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/music.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/music.png
new file mode 100644
index 00000000..44489213
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/music.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/next.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/next.png
new file mode 100644
index 00000000..ab9164e8
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/next.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/pause.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/pause.png
new file mode 100644
index 00000000..9c9ef8fa
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/pause.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/power.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/power.png
new file mode 100644
index 00000000..8f7d0c77
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/power.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/previous.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/previous.png
new file mode 100644
index 00000000..3a0880fd
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/previous.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/repeat.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/repeat.png
new file mode 100644
index 00000000..7c8e8c1c
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/repeat.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/save.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/save.png
new file mode 100644
index 00000000..c0b27483
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/save.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/settings.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/settings.png
new file mode 100644
index 00000000..7992146a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/settings.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/shuffle.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/shuffle.png
new file mode 100644
index 00000000..885782a2
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/shuffle.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/stop.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/stop.png
new file mode 100644
index 00000000..3e9c3327
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32/stop.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/bluetooth.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/bluetooth.png
new file mode 100644
index 00000000..2e70afc3
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/bluetooth.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/cart.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/cart.png
new file mode 100644
index 00000000..5717dd65
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/cart.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/cloud.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/cloud.png
new file mode 100644
index 00000000..ce5ab9f9
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/cloud.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/favorite.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/favorite.png
new file mode 100644
index 00000000..ddc9aa45
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/favorite.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/filter.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/filter.png
new file mode 100644
index 00000000..3632c556
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/filter.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/folder.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/folder.png
new file mode 100644
index 00000000..49d41e20
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/folder.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/grid.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/grid.png
new file mode 100644
index 00000000..8a1624e7
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/grid.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/message.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/message.png
new file mode 100644
index 00000000..6650f26b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/message.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/music.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/music.png
new file mode 100644
index 00000000..2cb8d49a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/music.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/next.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/next.png
new file mode 100644
index 00000000..d7bb4b27
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/next.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/pause.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/pause.png
new file mode 100644
index 00000000..8a081d02
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/pause.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/power.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/power.png
new file mode 100644
index 00000000..1201e55b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/power.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/previous.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/previous.png
new file mode 100644
index 00000000..4236afdb
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/previous.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/repeat.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/repeat.png
new file mode 100644
index 00000000..c8cb06d8
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/repeat.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/save.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/save.png
new file mode 100644
index 00000000..448b25e4
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/save.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/settings.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/settings.png
new file mode 100644
index 00000000..12a0cf6b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/settings.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/shuffle.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/shuffle.png
new file mode 100644
index 00000000..22b901cc
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/shuffle.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/stop.png b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/stop.png
new file mode 100644
index 00000000..0521a943
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/32x32@2/stop.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/icons.svg b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/icons.svg
new file mode 100644
index 00000000..4cede992
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/icons.svg
@@ -0,0 +1,648 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="svg4485"
+ width="1116.5374"
+ height="64"
+ viewBox="0 0 1116.5374 63.999997"
+ sodipodi:docname="icons.svg"
+ inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
+ <metadata
+ id="metadata4491">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs4489" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1017"
+ id="namedview4487"
+ showgrid="true"
+ inkscape:zoom="1.9019737"
+ inkscape:cx="833.25423"
+ inkscape:cy="74.046593"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4485"
+ inkscape:snap-grids="false"
+ inkscape:object-nodes="false"
+ fit-margin-top="2.7755576e-017"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4517"
+ originx="-8.3788162"
+ originy="-6.3974667" />
+ </sodipodi:namedview>
+ <g
+ id="g5472"
+ transform="translate(0,3.2401047)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\grid.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <g
+ transform="translate(-8.3787758,-966.40258)"
+ id="g5318">
+ <rect
+ y="998.53882"
+ x="27.755102"
+ height="9.2473469"
+ width="9.2473469"
+ id="rect4501"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ <rect
+ y="1014.5388"
+ x="11.755102"
+ height="9.2473469"
+ width="9.2473469"
+ id="rect4513"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect4515"
+ width="9.2473469"
+ height="9.2473469"
+ x="27.755102"
+ y="1014.5388" />
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect4519"
+ width="9.2473469"
+ height="9.2473469"
+ x="11.755102"
+ y="998.53882" />
+ </g>
+ <rect
+ y="28.759895"
+ x="0"
+ height="32"
+ width="32"
+ id="rect5360"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <g
+ id="g5478"
+ transform="translate(0,3.6478805)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32\settings.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ <g
+ transform="translate(-8.3787758,-966.40258)"
+ id="g5322">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 84.166529,1022.8327 69.433468,1008.4131"
+ id="path4507"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 64.778344,1000.0771 c 0.15838,-2.21589 0.892654,-3.97239 4.064921,-3.9244 l 5.79089,5.4089 -0.06518,5.0971 -6.56108,6.4293 -4.0079,0.3962 -6.391837,-5.0204 c 0.003,-1.8969 0.615654,-4.5976 3.391837,-4.2539 l 3.804082,2.5118 c 1.756369,-0.3456 2.524226,-1.6258 3.156295,-3.1014 z"
+ id="path4523"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccc" />
+ </g>
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5362"
+ width="32"
+ height="32"
+ x="47.771301"
+ y="28.352119" />
+ </g>
+ <g
+ id="g5484"
+ transform="translate(0,1.8732223)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\filter.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <g
+ transform="translate(-8.3787758,-966.40258)"
+ id="g5326">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 124.017,1012.8017 9.67769,-13.7927 H 108.6116 l 9.37299,13.931 v 13.1097 h 6.03241 z"
+ id="path4509"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 116.70205,1019.6217 h 7.31466"
+ id="path4525"
+ inkscape:connector-curvature="0" />
+ </g>
+ <rect
+ y="30.126778"
+ x="96.808228"
+ height="32"
+ width="32"
+ id="rect5364"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <g
+ id="g5490"
+ transform="translate(0,3.322319)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\message.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <g
+ transform="translate(-8.3787758,-966.40258)"
+ id="g5330">
+ <path
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ d="m 155.38109,1005.6573 14.74014,12.3019 14.29684,-12.3019 v 16.8459 h -29.03698 z"
+ id="rect4527"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ inkscape:connector-curvature="0"
+ id="path4532"
+ d="m 155.38109,1002.206 14.74014,12.8565 14.29684,-12.8565 v -2.5487 h -29.03698 z"
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5366"
+ width="32"
+ height="32"
+ x="145.52081"
+ y="28.677681" />
+ </g>
+ <g
+ id="g5497"
+ transform="translate(0,3.5476608)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\music.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <g
+ transform="translate(-8.3787758,-966.40258)"
+ id="g5335">
+ <circle
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="path4534"
+ cx="210.02449"
+ cy="1019.4025"
+ r="5.7991834" />
+ <circle
+ r="5.7991834"
+ cy="1019.4025"
+ cx="227.51147"
+ id="circle4536"
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ <path
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:2.77122235;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ d="m 214.45548,1019.7112 v -19.81316 c 0,-1.11042 0.86314,-2.00436 1.93529,-2.00436 h 13.59886 c 1.07214,0 1.93528,0.89394 1.93528,2.00436 v 19.81316"
+ id="rect4538"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cssssc" />
+ </g>
+ <rect
+ y="28.452339"
+ x="194.38922"
+ height="32"
+ width="32"
+ id="rect5368"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <g
+ id="g5501"
+ transform="translate(0,3.1662521)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\cloud.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <path
+ sodipodi:nodetypes="cccscc"
+ inkscape:connector-curvature="0"
+ id="rect4181"
+ d="m 251.48461,45.034419 c 0.4638,-10.8715 12.40207,-12.59447 15.43885,-2.5078 2.73388,0.2127 5.14555,2.6373 5.18665,5.068 0,3.4504 -2.90742,6.2281 -6.51889,6.2281 h -16.54418 c -5.83464,-1.7769 -4.57322,-9.6738 2.43757,-8.7883 z"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2.46805668;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5370"
+ width="32"
+ height="32"
+ x="242.73279"
+ y="28.833748" />
+ </g>
+ <g
+ id="g5506"
+ transform="translate(0,2.188591)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32\bluetooth.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ <g
+ transform="translate(-8.3787758,-966.40258)"
+ id="g5338">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 302.67171,1006.3777 22.49812,12.0249 -9.75572,5.6324 v -23.642 l 9.85555,5.6901 -22.32088,12.5411"
+ id="path5197"
+ inkscape:connector-curvature="0" />
+ </g>
+ <rect
+ y="29.811409"
+ x="290.75372"
+ height="32"
+ width="32"
+ id="rect5372"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <g
+ id="g5514"
+ transform="translate(0,3.6180954)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\cart.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <g
+ transform="translate(-8.3787758,-966.40258)"
+ id="g5344">
+ <rect
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.30289125;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5199"
+ width="19.591835"
+ height="14.419591"
+ x="355.70938"
+ y="1002.3185" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 373.79839,1003.2635 v -5.25054 h 7.75837"
+ id="path5201"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ <circle
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="path5207"
+ cx="357.12"
+ cy="1020.8915"
+ r="2.6644897" />
+ <circle
+ r="2.6644897"
+ cy="1020.8915"
+ cx="374.64978"
+ id="circle5209"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5374"
+ width="32"
+ height="32"
+ x="342.87732"
+ y="28.381905" />
+ </g>
+ <g
+ id="g5520"
+ transform="translate(0,3.3700485)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32\power.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ <g
+ transform="translate(-8.3787758,-966.40258)"
+ id="g5348">
+ <path
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ d="m 423.9111,999.19805 c 4.9899,1.81935 7.7689,6.19995 7.7689,11.81915 0,7.1847 -5.8243,13.009 -13.009,13.009 -7.1847,0 -13.009,-5.8243 -13.009,-13.009 0,-5.2414 3.0998,-9.7589 7.5661,-11.81915"
+ id="path5211"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cscsc" />
+ <rect
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.90877056;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5214"
+ width="3"
+ height="14.321534"
+ x="417.20502"
+ y="996.53888" />
+ </g>
+ <rect
+ y="28.629951"
+ x="394.29221"
+ height="32"
+ width="32"
+ id="rect5376"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <g
+ id="g5528"
+ transform="translate(0,1.3681564)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\save.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <g
+ transform="translate(-8.3787758,-966.40258)"
+ id="g5354">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 461.313,1007.55 7.71825,-7.7187 H 486.75 v 26.4062 h -25.437 z"
+ id="path5250"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 466.625,1002.4875 v 5.625 h 14.1875 v -7.5625"
+ id="path5252"
+ inkscape:connector-curvature="0" />
+ <rect
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.85498571;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5254"
+ width="3"
+ height="3"
+ x="469.43436"
+ y="1002.7332" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path5256"
+ d="m 466.625,1025.1125 v -7.9375 h 14.1875 v 7.875"
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="cccc" />
+ </g>
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5378"
+ width="32"
+ height="32"
+ x="449.65271"
+ y="30.631844" />
+ </g>
+ <g
+ id="g5534"
+ transform="translate(0,2.5602951)"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32\folder.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ <g
+ transform="translate(-8.3787758,-972.40258)"
+ id="g5358">
+ <path
+ id="rect5216"
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ d="m 510.7344,1007.7803 h 6.307 c 1.108,0 2,0.892 2,2 0.058,1.9158 0.4001,5.5746 -2,5.6471 l -6.307,-4e-4 h -2.0004 v -1.9996 l 4e-4,-3.6471 c 1e-4,-1.108 0.892,-2 2,-2 z m 3.3587,3.7123 h 13.2014 c 1.108,0 2.001,0.8774 2.0005,1.9674 v 1.967 h -2.0005 l -13.2014,5e-4 c -1.108,0 -2,-0.8775 -2,-1.9674 0,-1.09 0.892,-1.9674 2,-1.9674 z"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="sscccccsscssccsssc" />
+ <path
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ d="m 508.8555,1017.2315 v 8.6728 c 0,1.108 0.892,2 2,2 h 16.5957 c 1.108,0 2,-0.892 2,-2 v -8.6728 z"
+ id="rect5242"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="csssscc" />
+ </g>
+ <rect
+ y="29.439705"
+ x="494.71381"
+ height="32"
+ width="32"
+ id="rect5380"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <g
+ id="g3966"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\favorite.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <path
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0"
+ id="path5258"
+ d="m 679.76049,43.397888 c -11.16654,-4.90607 -6.54023,-14.887481 0.0528,-8.582499 6.18385,-6.259313 11.86465,3.625989 -0.0528,8.582499 z"
+ style="fill:none;stroke:#000000;stroke-width:2.2720654;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="22.143074"
+ x="663.8728"
+ height="32"
+ width="32"
+ id="rect5399"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <g
+ id="g3970"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32\stop.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ <rect
+ ry="2"
+ rx="2"
+ y="30.209908"
+ x="730.55872"
+ height="13.875"
+ width="13.875"
+ id="rect5260"
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5405"
+ width="32"
+ height="32"
+ x="721.49622"
+ y="21.147408" />
+ </g>
+ <g
+ id="g3976"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32\previous.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ <g
+ transform="matrix(0.92512795,0,0,0.92512795,49.646365,-1594.3495)"
+ id="g5275">
+ <path
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.84269726;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ inkscape:transform-center-x="1.6220757"
+ inkscape:transform-center-y="-9.5697762e-005"
+ d="m 809.37017,1768.9096 h -8.55767 -8.55877 v -4.1758 l 8.55877,-10.6475 8.55767,10.6475 z"
+ id="path5264"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc"
+ transform="matrix(0,-0.65656157,0.65656157,0,-358.61037,2289.4994)" />
+ <path
+ sodipodi:nodetypes="ccccccc"
+ inkscape:connector-curvature="0"
+ id="path5267"
+ d="m 810.35019,1758.0981 v 5.6186 5.6193 h -2.74167 l -6.99073,-5.6193 6.99073,-5.6186 z"
+ inkscape:transform-center-y="-9.5697762e-005"
+ inkscape:transform-center-x="1.6220757"
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.20984423;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <rect
+ y="21.314461"
+ x="777.32397"
+ height="32"
+ width="32"
+ id="rect5407"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <g
+ id="g3988"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\next.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <g
+ transform="matrix(-0.92512795,0,0,0.92512795,1729.0016,-1594.3495)"
+ id="g5281">
+ <path
+ transform="matrix(0,-0.65656157,0.65656157,0,-358.61037,2289.4994)"
+ sodipodi:nodetypes="ccccccc"
+ inkscape:connector-curvature="0"
+ id="path5277"
+ d="m 809.37017,1768.9096 h -8.55767 -8.55877 v -4.1758 l 8.55877,-10.6475 8.55767,10.6475 z"
+ inkscape:transform-center-y="-9.5697762e-005"
+ inkscape:transform-center-x="1.6220757"
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.84269726;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ <path
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.20984423;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ inkscape:transform-center-x="1.6220757"
+ inkscape:transform-center-y="-9.5697762e-005"
+ d="m 810.35019,1758.0981 v 5.6186 5.6193 h -2.74167 l -6.99073,-5.6193 6.99073,-5.6186 z"
+ id="path5279"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ </g>
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5409"
+ width="32"
+ height="32"
+ x="969.32397"
+ y="21.314461" />
+ </g>
+ <g
+ id="g3996"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\repeat.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <g
+ transform="matrix(0.61777671,0,0,0.61777671,393.26213,-582.60358)"
+ id="g5386">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1057,996.9258 h -11 c -1.7949,2e-4 -3.2498,1.4551 -3.25,3.25 v 3.375"
+ id="path5283"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1055.4787,992.6896 3.375,4.25 -3.75,3.875"
+ id="path5288"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0"
+ id="path5290"
+ d="m 1044.6035,1011.3192 h 11 c 1.7949,-2e-4 3.2498,-1.4551 3.25,-3.25 v -3.375"
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path5292"
+ d="m 1046.1248,1015.5554 -3.375,-4.25 3.75,-3.875"
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ <rect
+ y="21.719917"
+ x="1026.423"
+ height="32"
+ width="32"
+ id="rect5411"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <g
+ id="g4005"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\shuffle.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <g
+ transform="matrix(0.6410961,0,0,0.6410961,389.61554,-606.18813)"
+ id="g5393">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1101,997.8001 c 10.7776,0 1.9407,12.75 14.125,12.75"
+ id="path5294"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path5298"
+ d="m 1113.4787,992.6896 3.375,4.25 -3.75,3.875"
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1113.4787,1006.4897 3.375,4.25 -3.75,3.875"
+ id="path5300"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1101.2501,1010.2375 c 1.479,0.07 2.6346,-0.5915 3.875,-1.6562"
+ id="path5302"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path5312"
+ d="m 1113.6825,996.9157 c -1.479,-0.07 -2.6346,0.5915 -3.875,1.6562"
+ style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5413"
+ width="32"
+ height="32"
+ x="1084.5374"
+ y="21.248909" />
+ </g>
+ <g
+ id="g3982"
+ inkscape:export-filename="C:\dev\qqc2-technical-style-demo\icons\technical\32x32@2\pause.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <g
+ transform="matrix(0.26732473,0,0,0.26732473,607.52158,-229.58324)"
+ id="g5397">
+ <rect
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.19984221;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="rect5269"
+ width="14.495689"
+ height="54.800774"
+ x="877.34277"
+ y="971.0022" />
+ <rect
+ y="971.0022"
+ x="904.9892"
+ height="54.800774"
+ width="14.495689"
+ id="rect5271"
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.19984221;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+ <rect
+ y="21.314461"
+ x="831.68982"
+ height="32"
+ width="32"
+ id="rect5458"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.49999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ </g>
+</svg>
diff --git a/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/index.theme b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/index.theme
new file mode 100644
index 00000000..25232935
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/icons/musicplayer/index.theme
@@ -0,0 +1,14 @@
+[Icon Theme]
+Name=Music Player
+Comment=Icon theme for the Qt Quick Controls 2 Music Player Imagine Style Example
+
+Directories=32x32,32x32@2
+
+[32x32]
+Size=32
+Type=Fixed
+
+[32x32@2]
+Size=32
+Scale=2
+Type=Fixed
diff --git a/examples/quickcontrols2/imagine/musicplayer/images/album-cover.jpg b/examples/quickcontrols2/imagine/musicplayer/images/album-cover.jpg
new file mode 100644
index 00000000..48bd6231
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/images/album-cover.jpg
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/applicationwindow-background.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/applicationwindow-background.png
new file mode 100644
index 00000000..036bf746
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/applicationwindow-background.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked-hovered.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked-hovered.9.png
new file mode 100644
index 00000000..c275d324
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked-hovered.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked-hovered@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked-hovered@2x.9.png
new file mode 100644
index 00000000..eec285f3
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked-hovered@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked.9.png
new file mode 100644
index 00000000..2d284a5b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked@2x.9.png
new file mode 100644
index 00000000..fec385f5
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-checked@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-disabled.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-disabled.9.png
new file mode 100644
index 00000000..bcad1470
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-disabled.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-disabled@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-disabled@2x.9.png
new file mode 100644
index 00000000..03aba153
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-disabled@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-hovered.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-hovered.9.png
new file mode 100644
index 00000000..962cf677
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-hovered.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-hovered@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-hovered@2x.9.png
new file mode 100644
index 00000000..841c0064
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-hovered@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-pressed.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-pressed.9.png
new file mode 100644
index 00000000..f97f42b8
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-pressed.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-pressed@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-pressed@2x.9.png
new file mode 100644
index 00000000..97058349
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background-pressed@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background.9.png
new file mode 100644
index 00000000..74a8574f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background@2x.9.png
new file mode 100644
index 00000000..25163385
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/button-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-hovered.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-hovered.9.png
new file mode 100644
index 00000000..f9f90df4
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-hovered.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-hovered@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-hovered@2x.9.png
new file mode 100644
index 00000000..a4be50e1
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-hovered@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-open.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-open.9.png
new file mode 100644
index 00000000..147231ec
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-open.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-open@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-open@2x.9.png
new file mode 100644
index 00000000..0a978572
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-open@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-pressed.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-pressed.9.png
new file mode 100644
index 00000000..7726198a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-pressed.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-pressed@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-pressed@2x.9.png
new file mode 100644
index 00000000..d64d4052
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background-pressed@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background.9.png
new file mode 100644
index 00000000..e919d50a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background@2x.9.png
new file mode 100644
index 00000000..5effba7e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-hovered.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-hovered.png
new file mode 100644
index 00000000..78b06505
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-hovered@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-hovered@2x.png
new file mode 100644
index 00000000..ec3c8734
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-open.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-open.png
new file mode 100644
index 00000000..7a831632
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-open.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-open@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-open@2x.png
new file mode 100644
index 00000000..47c664a2
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-open@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-pressed.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-pressed.png
new file mode 100644
index 00000000..3340294f
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-pressed@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-pressed@2x.png
new file mode 100644
index 00000000..aa35b882
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator.png
new file mode 100644
index 00000000..2c7f5578
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator@2x.png
new file mode 100644
index 00000000..20b9c44c
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-indicator@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-popup.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-popup.9.png
new file mode 100644
index 00000000..cae75cd7
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-popup.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-popup@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-popup@2x.9.png
new file mode 100644
index 00000000..392607bc
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/combobox-popup@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-hovered.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-hovered.png
new file mode 100644
index 00000000..ac614678
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-hovered@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-hovered@2x.png
new file mode 100644
index 00000000..b13783c2
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-pressed.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-pressed.png
new file mode 100644
index 00000000..22e3958d
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-pressed@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-pressed@2x.png
new file mode 100644
index 00000000..72f6fadd
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background.png
new file mode 100644
index 00000000..4d9eb023
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background@2x.png
new file mode 100644
index 00000000..7ca50be8
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-background@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle-pressed.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle-pressed.png
new file mode 100644
index 00000000..39cd2b82
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle-pressed@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle-pressed@2x.png
new file mode 100644
index 00000000..01556b92
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle.png
new file mode 100644
index 00000000..8fb85691
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle@2x.png
new file mode 100644
index 00000000..f6dc4c90
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/dial-handle@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/frame-background.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/frame-background.9.png
new file mode 100644
index 00000000..aa305355
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/frame-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/frame-background@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/frame-background@2x.9.png
new file mode 100644
index 00000000..b4a4bc9d
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/frame-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/imagine-assets.qrc b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/imagine-assets.qrc
new file mode 100644
index 00000000..7bda4995
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/imagine-assets.qrc
@@ -0,0 +1,113 @@
+<RCC>
+ <qresource prefix="/imagine-assets">
+ <file>applicationwindow-background.png</file>
+ <file>button-background-checked-hovered.9.png</file>
+ <file>button-background-checked-hovered@2x.9.png</file>
+ <file>button-background-checked.9.png</file>
+ <file>button-background-checked@2x.9.png</file>
+ <file>button-background-disabled.9.png</file>
+ <file>button-background-disabled@2x.9.png</file>
+ <file>button-background-hovered.9.png</file>
+ <file>button-background-hovered@2x.9.png</file>
+ <file>button-background-pressed.9.png</file>
+ <file>button-background-pressed@2x.9.png</file>
+ <file>button-background.9.png</file>
+ <file>button-background@2x.9.png</file>
+ <file>combobox-background-hovered.9.png</file>
+ <file>combobox-background-hovered@2x.9.png</file>
+ <file>combobox-background-open.9.png</file>
+ <file>combobox-background-open@2x.9.png</file>
+ <file>combobox-background-pressed.9.png</file>
+ <file>combobox-background-pressed@2x.9.png</file>
+ <file>combobox-background.9.png</file>
+ <file>combobox-background@2x.9.png</file>
+ <file>combobox-indicator-hovered.png</file>
+ <file>combobox-indicator-hovered@2x.png</file>
+ <file>combobox-indicator-open.png</file>
+ <file>combobox-indicator-open@2x.png</file>
+ <file>combobox-indicator-pressed.png</file>
+ <file>combobox-indicator-pressed@2x.png</file>
+ <file>combobox-indicator.png</file>
+ <file>combobox-indicator@2x.png</file>
+ <file>combobox-popup.9.png</file>
+ <file>combobox-popup@2x.9.png</file>
+ <file>dial-background-hovered.png</file>
+ <file>dial-background-hovered@2x.png</file>
+ <file>dial-background-pressed.png</file>
+ <file>dial-background-pressed@2x.png</file>
+ <file>dial-background.png</file>
+ <file>dial-background@2x.png</file>
+ <file>dial-handle-pressed.png</file>
+ <file>dial-handle-pressed@2x.png</file>
+ <file>dial-handle.png</file>
+ <file>dial-handle@2x.png</file>
+ <file>frame-background.9.png</file>
+ <file>frame-background@2x.9.png</file>
+ <file>itemdelegate-background-checked.9.png</file>
+ <file>itemdelegate-background-checked@2x.9.png</file>
+ <file>itemdelegate-background-disabled.9.png</file>
+ <file>itemdelegate-background-disabled@2x.9.png</file>
+ <file>itemdelegate-background-hovered.9.png</file>
+ <file>itemdelegate-background-hovered@2x.9.png</file>
+ <file>itemdelegate-background-pressed.9.png</file>
+ <file>itemdelegate-background-pressed@2x.9.png</file>
+ <file>itemdelegate-background.9.png</file>
+ <file>itemdelegate-background@2x.9.png</file>
+ <file>roundbutton-background-checked-hovered.png</file>
+ <file>roundbutton-background-checked-hovered@2x.png</file>
+ <file>roundbutton-background-checked.png</file>
+ <file>roundbutton-background-checked@2x.png</file>
+ <file>roundbutton-background-disabled.png</file>
+ <file>roundbutton-background-disabled@2x.png</file>
+ <file>roundbutton-background-hovered.png</file>
+ <file>roundbutton-background-hovered@2x.png</file>
+ <file>roundbutton-background-pressed.png</file>
+ <file>roundbutton-background-pressed@2x.png</file>
+ <file>roundbutton-background.png</file>
+ <file>roundbutton-background@2x.png</file>
+ <file>scrollbar-handle-interactive-hovered.png</file>
+ <file>scrollbar-handle-interactive-hovered@2x.png</file>
+ <file>scrollbar-handle-interactive-pressed.png</file>
+ <file>scrollbar-handle-interactive-pressed@2x.png</file>
+ <file>scrollbar-handle-interactive.png</file>
+ <file>scrollbar-handle-interactive@2x.png</file>
+ <file>slider-background-horizontal-disabled.9.png</file>
+ <file>slider-background-horizontal-disabled@2x.9.png</file>
+ <file>slider-background-horizontal.9.png</file>
+ <file>slider-background-horizontal@2x.9.png</file>
+ <file>slider-background-vertical-disabled.9.png</file>
+ <file>slider-background-vertical-disabled@2x.9.png</file>
+ <file>slider-background-vertical.9.png</file>
+ <file>slider-background-vertical@2x.9.png</file>
+ <file>slider-handle-disabled.png</file>
+ <file>slider-handle-disabled@2x.png</file>
+ <file>slider-handle-hovered.png</file>
+ <file>slider-handle-hovered@2x.png</file>
+ <file>slider-handle.png</file>
+ <file>slider-handle@2x.png</file>
+ <file>slider-progress-horizontal.9.png</file>
+ <file>slider-progress-horizontal@2x.9.png</file>
+ <file>slider-progress-vertical-disabled.9.png</file>
+ <file>slider-progress-vertical-disabled@2x.9.png</file>
+ <file>slider-progress-vertical.9.png</file>
+ <file>slider-progress-vertical@2x.9.png</file>
+ <file>textfield-background-disabled.9.png</file>
+ <file>textfield-background-disabled@2x.9.png</file>
+ <file>textfield-background.9.png</file>
+ <file>textfield-background@2x.9.png</file>
+ <file>toolbar-background.9.png</file>
+ <file>toolbar-background@2x.9.png</file>
+ <file>toolbutton-background-checked-hovered.9.png</file>
+ <file>toolbutton-background-checked-hovered@2x.9.png</file>
+ <file>toolbutton-background-checked.9.png</file>
+ <file>toolbutton-background-checked@2x.9.png</file>
+ <file>toolbutton-background-hovered.9.png</file>
+ <file>toolbutton-background-hovered@2x.9.png</file>
+ <file>toolbutton-background-pressed.9.png</file>
+ <file>toolbutton-background-pressed@2x.9.png</file>
+ <file>toolbutton-background.9.png</file>
+ <file>toolbutton-background@2x.9.png</file>
+ <file>tooltip-background.9.png</file>
+ <file>tooltip-background@2x.9.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-checked.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-checked.9.png
new file mode 100644
index 00000000..a83c2577
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-checked.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-checked@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-checked@2x.9.png
new file mode 100644
index 00000000..ded49620
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-checked@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-disabled.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-disabled.9.png
new file mode 100644
index 00000000..2047e888
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-disabled.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-disabled@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-disabled@2x.9.png
new file mode 100644
index 00000000..422b2832
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-disabled@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-hovered.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-hovered.9.png
new file mode 100644
index 00000000..5c436be5
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-hovered.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-hovered@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-hovered@2x.9.png
new file mode 100644
index 00000000..2b98dc22
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-hovered@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-pressed.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-pressed.9.png
new file mode 100644
index 00000000..c3c2ac1d
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-pressed.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-pressed@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-pressed@2x.9.png
new file mode 100644
index 00000000..3b7ba51a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background-pressed@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background.9.png
new file mode 100644
index 00000000..b926d423
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background@2x.9.png
new file mode 100644
index 00000000..422b2832
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/itemdelegate-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked-hovered.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked-hovered.png
new file mode 100644
index 00000000..39e71430
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked-hovered@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked-hovered@2x.png
new file mode 100644
index 00000000..dd9610d1
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked.png
new file mode 100644
index 00000000..7020a0f5
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked@2x.png
new file mode 100644
index 00000000..b24dc0bf
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-checked@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-disabled.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-disabled.png
new file mode 100644
index 00000000..7f60101d
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-disabled.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-disabled@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-disabled@2x.png
new file mode 100644
index 00000000..ff0459ed
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-disabled@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-hovered.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-hovered.png
new file mode 100644
index 00000000..363d35e6
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-hovered@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-hovered@2x.png
new file mode 100644
index 00000000..61f109b7
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-pressed.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-pressed.png
new file mode 100644
index 00000000..7ca9d6c9
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-pressed@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-pressed@2x.png
new file mode 100644
index 00000000..5b35d944
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background.png
new file mode 100644
index 00000000..47f9decd
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background@2x.png
new file mode 100644
index 00000000..f6944b7a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/roundbutton-background@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-hovered.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-hovered.png
new file mode 100644
index 00000000..050e9edb
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-hovered@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-hovered@2x.png
new file mode 100644
index 00000000..096c750e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-pressed.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-pressed.png
new file mode 100644
index 00000000..2fd4bd65
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-pressed.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-pressed@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-pressed@2x.png
new file mode 100644
index 00000000..f5c9fe44
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive-pressed@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive.png
new file mode 100644
index 00000000..45edd220
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive@2x.png
new file mode 100644
index 00000000..2e02f30a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/scrollbar-handle-interactive@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal-disabled.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal-disabled.9.png
new file mode 100644
index 00000000..0a3e6d1a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal-disabled.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal-disabled@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal-disabled@2x.9.png
new file mode 100644
index 00000000..174c03fd
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal-disabled@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal.9.png
new file mode 100644
index 00000000..a4324dad
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal@2x.9.png
new file mode 100644
index 00000000..8a7127c8
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-horizontal@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical-disabled.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical-disabled.9.png
new file mode 100644
index 00000000..ee4486c7
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical-disabled.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical-disabled@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical-disabled@2x.9.png
new file mode 100644
index 00000000..b48efcd4
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical-disabled@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical.9.png
new file mode 100644
index 00000000..f3f8f75d
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical@2x.9.png
new file mode 100644
index 00000000..76397566
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-background-vertical@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-disabled.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-disabled.png
new file mode 100644
index 00000000..1157718c
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-disabled.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-disabled@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-disabled@2x.png
new file mode 100644
index 00000000..b9c55bdd
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-disabled@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-hovered.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-hovered.png
new file mode 100644
index 00000000..50ffc782
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-hovered.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-hovered@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-hovered@2x.png
new file mode 100644
index 00000000..a89d05e4
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle-hovered@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle.png
new file mode 100644
index 00000000..d9334948
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle@2x.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle@2x.png
new file mode 100644
index 00000000..a8c59db8
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-handle@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-horizontal.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-horizontal.9.png
new file mode 100644
index 00000000..08bd59da
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-horizontal.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-horizontal@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-horizontal@2x.9.png
new file mode 100644
index 00000000..ce1ca6e5
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-horizontal@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical-disabled.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical-disabled.9.png
new file mode 100644
index 00000000..f906bb7d
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical-disabled.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical-disabled@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical-disabled@2x.9.png
new file mode 100644
index 00000000..2ec0f792
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical-disabled@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical.9.png
new file mode 100644
index 00000000..7797c4ed
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical@2x.9.png
new file mode 100644
index 00000000..891eb100
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/slider-progress-vertical@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background-disabled.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background-disabled.9.png
new file mode 100644
index 00000000..0de72f69
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background-disabled.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background-disabled@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background-disabled@2x.9.png
new file mode 100644
index 00000000..6ed5134b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background-disabled@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background.9.png
new file mode 100644
index 00000000..d9396673
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background@2x.9.png
new file mode 100644
index 00000000..322b6c40
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/textfield-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbar-background.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbar-background.9.png
new file mode 100644
index 00000000..b1e8a08b
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbar-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbar-background@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbar-background@2x.9.png
new file mode 100644
index 00000000..d3a26620
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbar-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked-hovered.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked-hovered.9.png
new file mode 100644
index 00000000..dcd5e0db
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked-hovered.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked-hovered@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked-hovered@2x.9.png
new file mode 100644
index 00000000..f083b78e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked-hovered@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked.9.png
new file mode 100644
index 00000000..154b7d02
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked@2x.9.png
new file mode 100644
index 00000000..8c60ca6d
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-checked@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-hovered.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-hovered.9.png
new file mode 100644
index 00000000..52c7321a
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-hovered.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-hovered@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-hovered@2x.9.png
new file mode 100644
index 00000000..8eda3fc4
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-hovered@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-pressed.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-pressed.9.png
new file mode 100644
index 00000000..e1c29027
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-pressed.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-pressed@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-pressed@2x.9.png
new file mode 100644
index 00000000..604a3136
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background-pressed@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background.9.png
new file mode 100644
index 00000000..205b5f70
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background@2x.9.png
new file mode 100644
index 00000000..7c97b8d1
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/toolbutton-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/tooltip-background.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/tooltip-background.9.png
new file mode 100644
index 00000000..bc56e3bd
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/tooltip-background.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/imagine-assets/tooltip-background@2x.9.png b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/tooltip-background@2x.9.png
new file mode 100644
index 00000000..72990330
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/imagine-assets/tooltip-background@2x.9.png
Binary files differ
diff --git a/examples/quickcontrols2/imagine/musicplayer/musicplayer.cpp b/examples/quickcontrols2/imagine/musicplayer/musicplayer.cpp
new file mode 100644
index 00000000..a9fc2b9e
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/musicplayer.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples 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 <QGuiApplication>
+#include <QQmlApplicationEngine>
+#include <QSettings>
+#include <QIcon>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication::setApplicationName("Music Player");
+ QGuiApplication::setOrganizationName("QtProject");
+ QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+
+ QGuiApplication app(argc, argv);
+
+ QIcon::setThemeName("musicplayer");
+
+ QQmlApplicationEngine engine;
+ engine.load(QUrl("qrc:/musicplayer.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
+
+ return app.exec();
+}
diff --git a/examples/quickcontrols2/imagine/musicplayer/musicplayer.pro b/examples/quickcontrols2/imagine/musicplayer/musicplayer.pro
new file mode 100644
index 00000000..b1970ee9
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/musicplayer.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET = musicplayer
+QT += quick quickcontrols2
+
+SOURCES += \
+ musicplayer.cpp
+
+RESOURCES += \
+ icons/icons.qrc \
+ images/album-cover.jpg \
+ imagine-assets/imagine-assets.qrc \
+ qtquickcontrols2.conf \
+ musicplayer.qml
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/imagine/musicplayer
+INSTALLS += target
diff --git a/examples/quickcontrols2/imagine/musicplayer/musicplayer.qml b/examples/quickcontrols2/imagine/musicplayer/musicplayer.qml
new file mode 100644
index 00000000..84084862
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/musicplayer.qml
@@ -0,0 +1,467 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples 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.Layouts 1.3
+import QtQuick.Controls 2.3
+import QtQuick.Window 2.0
+
+ApplicationWindow {
+ id: window
+ width: 1280
+ height: 720
+ visible: true
+ title: "Qt Quick Controls 2 - Imagine Style Example: Music Player"
+
+ Component.onCompleted: {
+ x = Screen.width / 2 - width / 2
+ y = Screen.height / 2 - height / 2
+ }
+
+ Shortcut {
+ sequence: "Ctrl+Q"
+ onActivated: Qt.quit()
+ }
+
+ header: ToolBar {
+ RowLayout {
+ id: headerRowLayout
+ anchors.fill: parent
+ spacing: 0
+
+ ToolButton {
+ icon.name: "grid"
+ }
+ ToolButton {
+ icon.name: "settings"
+ }
+ ToolButton {
+ icon.name: "filter"
+ }
+ ToolButton {
+ icon.name: "message"
+ }
+ ToolButton {
+ icon.name: "music"
+ }
+ ToolButton {
+ icon.name: "cloud"
+ }
+ ToolButton {
+ icon.name: "bluetooth"
+ }
+ ToolButton {
+ icon.name: "cart"
+ }
+
+ Item {
+ Layout.fillWidth: true
+ }
+
+ ToolButton {
+ icon.name: "power"
+ onClicked: Qt.quit()
+ }
+ }
+ }
+
+ Label {
+ text: "Qtify"
+ font.pixelSize: Qt.application.font.pixelSize * 1.3
+ anchors.centerIn: header
+ z: header.z + 1
+ }
+
+ RowLayout {
+ spacing: 115
+ anchors.fill: parent
+ anchors.margins: 70
+
+ ColumnLayout {
+ spacing: 0
+ Layout.preferredWidth: 230
+
+ RowLayout {
+ Layout.maximumHeight: 170
+
+ ColumnLayout {
+ Label {
+ text: "12 dB"
+ Layout.fillHeight: true
+ }
+ Label {
+ text: "6 dB"
+ Layout.fillHeight: true
+ }
+ Label {
+ text: "0 dB"
+ Layout.fillHeight: true
+ }
+ Label {
+ text: "-6 dB"
+ Layout.fillHeight: true
+ }
+ Label {
+ text: "-12 dB"
+ Layout.fillHeight: true
+ }
+ }
+
+ Repeater {
+ model: 7
+
+ Slider {
+ value: Math.random()
+ orientation: Qt.Vertical
+
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ }
+ }
+ }
+
+ RowLayout {
+ spacing: 10
+ Layout.topMargin: 23
+
+ ComboBox {
+ currentIndex: 1
+ model: ["Blues", "Classical", "Jazz", "Metal"]
+ Layout.fillWidth: true
+ }
+
+ Button {
+ icon.name: "folder"
+ }
+
+ Button {
+ icon.name: "save"
+ enabled: false
+ }
+ }
+
+ Dial {
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Layout.topMargin: 50
+ }
+
+ Label {
+ text: "Volume"
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Layout.topMargin: 12
+ }
+ }
+
+ ColumnLayout {
+ spacing: 26
+ Layout.preferredWidth: 230
+
+ Item {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ Image {
+ anchors.fill: parent
+ fillMode: Image.PreserveAspectCrop
+ source: "images/album-cover.jpg"
+ }
+ }
+
+ Item {
+ id: songLabelContainer
+ clip: true
+
+ Layout.fillWidth: true
+ Layout.preferredHeight: songNameLabel.implicitHeight
+
+ SequentialAnimation {
+ running: true
+ loops: Animation.Infinite
+
+ PauseAnimation {
+ duration: 2000
+ }
+ ParallelAnimation {
+ XAnimator {
+ target: songNameLabel
+ from: 0
+ to: songLabelContainer.width - songNameLabel.implicitWidth
+ duration: 5000
+ }
+ OpacityAnimator {
+ target: leftGradient
+ from: 0
+ to: 1
+ }
+ }
+ OpacityAnimator {
+ target: rightGradient
+ from: 1
+ to: 0
+ }
+ PauseAnimation {
+ duration: 1000
+ }
+ OpacityAnimator {
+ target: rightGradient
+ from: 0
+ to: 1
+ }
+ ParallelAnimation {
+ XAnimator {
+ target: songNameLabel
+ from: songLabelContainer.width - songNameLabel.implicitWidth
+ to: 0
+ duration: 5000
+ }
+ OpacityAnimator {
+ target: leftGradient
+ from: 0
+ to: 1
+ }
+ }
+ OpacityAnimator {
+ target: leftGradient
+ from: 1
+ to: 0
+ }
+ }
+
+ Rectangle {
+ id: leftGradient
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: "#dfe4ea"
+ }
+ GradientStop {
+ position: 1
+ color: "#00dfe4ea"
+ }
+ }
+
+ width: height
+ height: parent.height
+ anchors.left: parent.left
+ z: 1
+ rotation: -90
+ opacity: 0
+ }
+
+ Label {
+ id: songNameLabel
+ text: "Edvard Grieg - In the Hall of the Mountain King"
+ font.pixelSize: Qt.application.font.pixelSize * 1.4
+ }
+
+ Rectangle {
+ id: rightGradient
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: "#00dfe4ea"
+ }
+ GradientStop {
+ position: 1
+ color: "#dfe4ea"
+ }
+ }
+
+ width: height
+ height: parent.height
+ anchors.right: parent.right
+ rotation: -90
+ }
+ }
+
+ RowLayout {
+ spacing: 8
+ Layout.alignment: Qt.AlignHCenter
+
+ RoundButton {
+ icon.name: "favorite"
+ icon.width: 32
+ icon.height: 32
+ }
+ RoundButton {
+ icon.name: "stop"
+ icon.width: 32
+ icon.height: 32
+ }
+ RoundButton {
+ icon.name: "previous"
+ icon.width: 32
+ icon.height: 32
+ }
+ RoundButton {
+ icon.name: "pause"
+ icon.width: 32
+ icon.height: 32
+ }
+ RoundButton {
+ icon.name: "next"
+ icon.width: 32
+ icon.height: 32
+ }
+ RoundButton {
+ icon.name: "repeat"
+ icon.width: 32
+ icon.height: 32
+ }
+ RoundButton {
+ icon.name: "shuffle"
+ icon.width: 32
+ icon.height: 32
+ }
+ }
+
+ Slider {
+ id: seekSlider
+ value: 113
+ to: 261
+
+ Layout.fillWidth: true
+
+ ToolTip {
+ parent: seekSlider.handle
+ visible: seekSlider.pressed
+ text: pad(Math.floor(value / 60)) + ":" + pad(Math.floor(value % 60))
+ y: parent.height
+
+ readonly property int value: seekSlider.valueAt(seekSlider.position)
+
+ function pad(number) {
+ if (number <= 9)
+ return "0" + number;
+ return number;
+ }
+ }
+ }
+ }
+
+ ColumnLayout {
+ spacing: 16
+ Layout.preferredWidth: 230
+
+ ButtonGroup {
+ buttons: libraryRowLayout.children
+ }
+
+ RowLayout {
+ id: libraryRowLayout
+ Layout.alignment: Qt.AlignHCenter
+
+ Button {
+ text: "Files"
+ checked: true
+ }
+ Button {
+ text: "Playlists"
+ checkable: true
+ }
+ Button {
+ text: "Favourites"
+ checkable: true
+ }
+ }
+
+ RowLayout {
+ TextField {
+ Layout.fillWidth: true
+ }
+ Button {
+ icon.name: "folder"
+ }
+ }
+
+ Frame {
+ id: filesFrame
+ leftPadding: 1
+ rightPadding: 1
+
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ ListView {
+ clip: true
+ anchors.fill: parent
+ model: ListModel {
+ Component.onCompleted: {
+ for (var i = 0; i < 100; ++i) {
+ append({
+ author: "Author",
+ album: "Album",
+ track: "Track 0" + (i % 9 + 1),
+ });
+ }
+ }
+ }
+ delegate: ItemDelegate {
+ text: model.author + " - " + model.album + " - " + model.track
+ width: parent.width
+ }
+
+ ScrollBar.vertical: ScrollBar {
+ parent: filesFrame
+ policy: ScrollBar.AlwaysOn
+ anchors.top: parent.top
+ anchors.topMargin: filesFrame.topPadding
+ anchors.right: parent.right
+ anchors.rightMargin: 1
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: filesFrame.bottomPadding
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/quickcontrols2/imagine/musicplayer/qtquickcontrols2.conf b/examples/quickcontrols2/imagine/musicplayer/qtquickcontrols2.conf
new file mode 100644
index 00000000..2fc304eb
--- /dev/null
+++ b/examples/quickcontrols2/imagine/musicplayer/qtquickcontrols2.conf
@@ -0,0 +1,10 @@
+[Controls]
+Style=Imagine
+
+[Imagine]
+Path=qrc:/imagine-assets
+
+[Imagine\Palette]
+Text=#6b7b89
+ButtonText=#6b7b89
+WindowText=#6b7b89
diff --git a/examples/quickcontrols2/quickcontrols2.pro b/examples/quickcontrols2/quickcontrols2.pro
index 858759fb..3e2e3948 100644
--- a/examples/quickcontrols2/quickcontrols2.pro
+++ b/examples/quickcontrols2/quickcontrols2.pro
@@ -7,4 +7,6 @@ SUBDIRS += \
sidepanel \
swipetoremove \
flatstyle \
- wearable
+ wearable \
+ imagine/automotive \
+ imagine/musicplayer
diff --git a/examples/quickcontrols2/sidepanel/doc/src/qtquickcontrols2-sidepanel.qdoc b/examples/quickcontrols2/sidepanel/doc/src/qtquickcontrols2-sidepanel.qdoc
index 7e4dfce6..bc630bb8 100644
--- a/examples/quickcontrols2/sidepanel/doc/src/qtquickcontrols2-sidepanel.qdoc
+++ b/examples/quickcontrols2/sidepanel/doc/src/qtquickcontrols2-sidepanel.qdoc
@@ -29,10 +29,10 @@
\example sidepanel
\title Qt Quick Controls 2 - Side Panel
\ingroup qtquickcontrols2-examples
- \brief A non-closable persistent side panel with Drawer.
+ \brief A persistent side panel with Drawer.
- This example demonstrates how \l Drawer can be used as a non-closable
- persistent side panel.
+ This example demonstrates how \l Drawer can be used as a persistent side
+ panel.
\raw HTML
<div class="table"><table style="background:transparent; border:0px">
@@ -52,17 +52,17 @@
When the application is in portrait mode, the drawer is an interactive
side panel that can be swiped open from the left edge. It appears on
- top of the content, and blocks user interaction through its modal
+ top of the content, blocking user interaction through its modal
background. When the application is in landscape mode, the drawer and
- the content are laid out side by side.
+ the content are laid out side-by-side.
The current orientation of the application is determined by comparing
the width and height of the window:
\snippet sidepanel/sidepanel.qml orientation
- This is used to specify whether the drawer is \l {Popup::}{modal} and
- \l {Drawer::}{interactive}, and to configure its \l {Drawer::}{position}
+ This is used to determine whether the drawer should be \l {Popup::}{modal}
+ and \l {Drawer::}{interactive}, and to configure its \l {Drawer::}{position}
and \l {Popup::visible}{visibility} accordingly.
\quotefromfile sidepanel/sidepanel.qml
diff --git a/examples/quickcontrols2/swipetoremove/doc/src/qtquickcontrols2-swipetoremove.qdoc b/examples/quickcontrols2/swipetoremove/doc/src/qtquickcontrols2-swipetoremove.qdoc
index 095bd837..476667bb 100644
--- a/examples/quickcontrols2/swipetoremove/doc/src/qtquickcontrols2-swipetoremove.qdoc
+++ b/examples/quickcontrols2/swipetoremove/doc/src/qtquickcontrols2-swipetoremove.qdoc
@@ -29,10 +29,10 @@
\example swipetoremove
\title Qt Quick Controls 2 - Swipe to Remove
\ingroup qtquickcontrols2-examples
- \brief Demonstrates removing list items by swipe.
+ \brief Demonstrates removal of list items by swipe gesture.
This example demonstrates how \l SwipeDelegate can be used to implement
- removal of list items by swipe. This UI pattern is often used in touch
+ removal of list items by swiping. This UI pattern is often used in touch
user interfaces.
\image qtquickcontrols2-swipetoremove.png
@@ -46,7 +46,7 @@
The following snippet presents how the logic of removing items is
implemented. When the swipe is \l {SwipeDelegate::swipe}{completed}, it
- starts a timer tha waits a few seconds to let the user undo the remove
+ starts a timer that waits a few seconds to let the user undo the remove
action. Once the undo timer triggers, the item is removed from the list:
\snippet swipetoremove/swipetoremove.qml removal
diff --git a/examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc b/examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc
index b56b4c1d..124984c1 100644
--- a/examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc
+++ b/examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc
@@ -38,7 +38,7 @@
\section1 Structure
- The main .qml file \c wearable.qml consists of an ApplicationWindow, a StackView
+ The main .qml file, \c wearable.qml, consists of an ApplicationWindow, a StackView
for a stack-based navigation model, and buttons for interactive navigation.
\quotefromfile wearable/wearable.qml
@@ -61,9 +61,9 @@
\section1 Styling
The demo uses a custom \l {Styling Qt Quick Controls 2}{Qt Quick Controls 2 style}
- embedded into the demo's resources. Since the style is specific to this particular
- demo, it only needs to implement a few controls. The style also provides a singleton
- type that contains various styling attributes, such as fonts and colors.
+ embedded into the demo's resources. The custom style is implemented for a
+ few controls only, as it is specific to this particular demo. It uses a
+ singleton type for various styling attributes, such as fonts and colors.
\list
\li \c qml/Style/PageIndicator.qml
@@ -83,10 +83,11 @@
\section1 Custom Type
- The demo application contains a custom button type implemented in \c qml/NaviButton.qml.
- The navigation button is used as a home and back button in \c wearable.qml. \c NaviButton
- extends the standard AbstractButton API with properties that control the slide in and slide
- out transitions and the button image.
+ The demo application contains a custom button type implemented in
+ \c qml/NaviButton.qml. The navigation button is used as a home and back
+ button in \c wearable.qml. \c NaviButton extends the AbstractButton type
+ with properties that control the slide in and slide out transitions and
+ the button image.
\quotefromfile wearable/qml/NaviButton.qml
\skipuntil import "Style"
@@ -98,12 +99,26 @@
\skipto }
\printuntil /^\}/
+ \section1 Icons
+
+ The demo ships a custom icon theme. The icons are bundled into the \c :/icons
+ folder in the application's resources. The \c index.theme file lists the contents
+ of the icon theme:
+
+ \quotefile wearable/icons/wearable/index.theme
+
+ Finally, the icon theme is selected in \c main():
+
+ \snippet wearable/wearable.cpp icons
+
+ The icons are used on the Launcher Page, which is presented below. See
+ \l {Icons in Qt Quick Controls 2} for more details about icons and themes.
+
\section1 Launcher Page
- The application launcher, which is specified as the initial content above, is
- implemented using a circular PathView in \c LauncherPage.qml. Each application is
- contained within its own .qml file, which is listed in a ListModel on the launcher
- page.
+ The application launcher is implemented using a circular PathView in
+ \c LauncherPage.qml. Each application is in a separate .qml file,
+ which is added to the ListModel on the launcher page.
\quotefromfile wearable/qml/LauncherPage.qml
\skipto PathView
@@ -116,6 +131,9 @@
\skipto "Settings"
\printuntil delegate:
\dots 8
+ \skipto icon.width
+ \printuntil icon.name
+ \dots 8
\skipto onClicked:
\printto path:
\dots
@@ -133,29 +151,28 @@
applications, data acquisition is implemented using \l XMLHttpRequest to
read from local files. These files were generated by storing responses from
remote servers in JSON format. This code can be easily modified to acquire
- data from real remote servers.
+ data from remote servers.
\section2 Navigation
This application displays a walking route from source to destination. This
- route is obtained as a response by invoking an API provided by
- \l {https://www.openstreetmap.org/}. The response is in JSON format and the
- corresponding JavaScript file associated with the application helps interpret
- the response. Currently, it is not possible to specify the source and destination
- from within the application, but it can be easily added based on the device's
- capabilities. For example, user input could be implemented as screens with
- input fields, or can be communicated over Bluetooth/Wifi from a paired app
- running on another device such as a smart phone or PC.
+ route information is obtained using the REST API provided by
+ \l {https://www.openstreetmap.org/}. The API response is in JSON format, which
+ is parsed using JavaScript by the application. Currently, it is not possible
+ to specify the source and destination from within the application, but it can
+ be added based on the device's capabilities. For example, user input
+ could be implemented as screens with input fields, or can be communicated
+ over Bluetooth/Wifi from a paired application running on another device
+ such as a smart phone or PC.
\section2 Weather
This application displays weather information such as temperature, sunrise
and sunset times, air pressure, and so on. This information is obtained
- as a response to invoking \l {https://openweathermap.org/}. The response is
- in JSON format and the corresponding JavaScript file associated with the
- application helps interpret the response. As with the Navigation application,
- this application can be modified by adding screens to accept location information
- to obtain weather data for a given location.
+ from \l {https://openweathermap.org/} using its REST API. The API response is
+ in JSON format, which is parsed using JavaScript by the application. This
+ application can also be modified by adding screens to obtain weather data for
+ a given location.
\section2 World Clock
@@ -165,7 +182,7 @@
\section2 Others
- The remaining applications return static data for now, but they can easily be
+ The remaining applications return static data for now, but they can be
modified to process response data obtained from respective services.
\include examples-run.qdocinc
diff --git a/examples/quickcontrols2/wearable/qml/Alarms/images/alarms.png b/examples/quickcontrols2/wearable/icons/wearable/36x36/alarms.png
index f38b3d4e..f38b3d4e 100644
--- a/examples/quickcontrols2/wearable/qml/Alarms/images/alarms.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36/alarms.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Fitness/images/fitness.png b/examples/quickcontrols2/wearable/icons/wearable/36x36/fitness.png
index 80ec43cc..80ec43cc 100644
--- a/examples/quickcontrols2/wearable/qml/Fitness/images/fitness.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36/fitness.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/icons/wearable/36x36/navigation.png b/examples/quickcontrols2/wearable/icons/wearable/36x36/navigation.png
new file mode 100644
index 00000000..9b8cb8e6
--- /dev/null
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36/navigation.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Notifications/images/notifications.png b/examples/quickcontrols2/wearable/icons/wearable/36x36/notifications.png
index bcbe85ef..bcbe85ef 100644
--- a/examples/quickcontrols2/wearable/qml/Notifications/images/notifications.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36/notifications.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/settings.png b/examples/quickcontrols2/wearable/icons/wearable/36x36/settings.png
index 093404f9..093404f9 100644
--- a/examples/quickcontrols2/wearable/qml/Settings/images/settings.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36/settings.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Weather/images/weather.png b/examples/quickcontrols2/wearable/icons/wearable/36x36/weather.png
index 07bf8187..07bf8187 100644
--- a/examples/quickcontrols2/wearable/qml/Weather/images/weather.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36/weather.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/worldclock.png b/examples/quickcontrols2/wearable/icons/wearable/36x36/worldclock.png
index 91a70493..91a70493 100644
--- a/examples/quickcontrols2/wearable/qml/WorldClock/images/worldclock.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36/worldclock.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Alarms/images/alarms@2x.png b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/alarms.png
index ba68519a..ba68519a 100644
--- a/examples/quickcontrols2/wearable/qml/Alarms/images/alarms@2x.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/alarms.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Fitness/images/fitness@2x.png b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/fitness.png
index 088c15b8..088c15b8 100644
--- a/examples/quickcontrols2/wearable/qml/Fitness/images/fitness@2x.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/fitness.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/icons/wearable/36x36@2/navigation.png b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/navigation.png
new file mode 100644
index 00000000..8d133abc
--- /dev/null
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/navigation.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Notifications/images/notifications@2x.png b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/notifications.png
index c3b284ed..c3b284ed 100644
--- a/examples/quickcontrols2/wearable/qml/Notifications/images/notifications@2x.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/notifications.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/settings@2x.png b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/settings.png
index a24a1df7..a24a1df7 100644
--- a/examples/quickcontrols2/wearable/qml/Settings/images/settings@2x.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/settings.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Weather/images/weather@2x.png b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/weather.png
index 6e4ce2f3..6e4ce2f3 100644
--- a/examples/quickcontrols2/wearable/qml/Weather/images/weather@2x.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/weather.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/worldclock@2x.png b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/worldclock.png
index 03abe162..03abe162 100644
--- a/examples/quickcontrols2/wearable/qml/WorldClock/images/worldclock@2x.png
+++ b/examples/quickcontrols2/wearable/icons/wearable/36x36@2/worldclock.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/icons/wearable/index.theme b/examples/quickcontrols2/wearable/icons/wearable/index.theme
new file mode 100644
index 00000000..da702d4a
--- /dev/null
+++ b/examples/quickcontrols2/wearable/icons/wearable/index.theme
@@ -0,0 +1,14 @@
+[Icon Theme]
+Name=Wearable
+Comment=Qt Quick Controls 2 Wearable Demo Icon Theme
+
+Directories=36x36,36x36@2
+
+[36x36]
+Size=36
+Type=Fixed
+
+[36x36@2]
+Size=36
+Scale=2
+Type=Fixed
diff --git a/examples/quickcontrols2/wearable/qml/LauncherPage.qml b/examples/quickcontrols2/wearable/qml/LauncherPage.qml
index 34f117c4..9d6d9ae9 100644
--- a/examples/quickcontrols2/wearable/qml/LauncherPage.qml
+++ b/examples/quickcontrols2/wearable/qml/LauncherPage.qml
@@ -49,7 +49,7 @@
****************************************************************************/
import QtQuick 2.7
-import QtQuick.Controls 2.0 as QQC2
+import QtQuick.Controls 2.1 as QQC2
import "Style"
PathView {
@@ -68,56 +68,53 @@ PathView {
model: ListModel {
ListElement {
title: qsTr("World Clock")
- icon: "WorldClock/images/worldclock.png"
+ icon: "worldclock"
page: "WorldClock/WorldClockPage.qml"
}
ListElement {
title: qsTr("Navigation")
- icon: "Navigation/images/navigation.png"
+ icon: "navigation"
page: "Navigation/NavigationPage.qml"
}
ListElement {
title: qsTr("Weather")
- icon: "Weather/images/weather.png"
+ icon: "weather"
page: "Weather/WeatherPage.qml"
}
ListElement {
title: qsTr("Fitness")
- icon: "Fitness/images/fitness.png"
+ icon: "fitness"
page: "Fitness/FitnessPage.qml"
}
ListElement {
title: qsTr("Notifications")
- icon: "Notifications/images/notifications.png"
+ icon: "notifications"
page: "Notifications/NotificationsPage.qml"
}
ListElement {
title: qsTr("Alarm")
- icon: "Alarms/images/alarms.png"
+ icon: "alarms"
page: "Alarms/AlarmsPage.qml"
}
ListElement {
title: qsTr("Settings")
- icon: "Settings/images/settings.png"
+ icon: "settings"
page: "Settings/SettingsPage.qml"
}
}
- delegate: QQC2.AbstractButton {
+ delegate: QQC2.RoundButton {
width: circularView.itemSize
height: circularView.itemSize
- text: model.title
+ property string title: model.title
+
+ icon.width: 36
+ icon.height: 36
+ icon.name: model.icon
opacity: PathView.itemOpacity
padding: 12
- contentItem: Image {
- source: model.icon
- fillMode: Image.Pad
- sourceSize.width: parent.availableWidth
- sourceSize.height: parent.availableHeight
- }
-
background: Rectangle {
radius: width / 2
border.width: 3
@@ -180,7 +177,7 @@ PathView {
visible: currentItem ? currentItem.PathView.itemOpacity === 1.0 : 0
- text: currentItem ? currentItem.text : ""
+ text: currentItem ? currentItem.title : ""
anchors.centerIn: parent
anchors.verticalCenterOffset: (circularView.itemSize + height) / 2
diff --git a/examples/quickcontrols2/wearable/wearable.cpp b/examples/quickcontrols2/wearable/wearable.cpp
index e6fdad74..e90ec413 100644
--- a/examples/quickcontrols2/wearable/wearable.cpp
+++ b/examples/quickcontrols2/wearable/wearable.cpp
@@ -51,6 +51,7 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickStyle>
+#include <QIcon>
int main(int argc, char *argv[])
{
@@ -61,6 +62,10 @@ int main(int argc, char *argv[])
QQuickStyle::setStyle(QStringLiteral("qrc:/qml/Style"));
//! [style]
+ //! [icons]
+ QIcon::setThemeName(QStringLiteral("wearable"));
+ //! [icons]
+
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/wearable.qml")));
diff --git a/examples/quickcontrols2/wearable/wearable.qrc b/examples/quickcontrols2/wearable/wearable.qrc
index c8143a18..ea81edc6 100644
--- a/examples/quickcontrols2/wearable/wearable.qrc
+++ b/examples/quickcontrols2/wearable/wearable.qrc
@@ -3,18 +3,29 @@
<file>wearable.qml</file>
<file>qml/LauncherPage.qml</file>
<file>qml/NaviButton.qml</file>
+ <file>icons/wearable/index.theme</file>
+ <file>icons/wearable/36x36/alarms.png</file>
+ <file>icons/wearable/36x36/fitness.png</file>
+ <file>icons/wearable/36x36/navigation.png</file>
+ <file>icons/wearable/36x36/notifications.png</file>
+ <file>icons/wearable/36x36/settings.png</file>
+ <file>icons/wearable/36x36/weather.png</file>
+ <file>icons/wearable/36x36/worldclock.png</file>
+ <file>icons/wearable/36x36@2/alarms.png</file>
+ <file>icons/wearable/36x36@2/fitness.png</file>
+ <file>icons/wearable/36x36@2/navigation.png</file>
+ <file>icons/wearable/36x36@2/notifications.png</file>
+ <file>icons/wearable/36x36@2/settings.png</file>
+ <file>icons/wearable/36x36@2/weather.png</file>
+ <file>icons/wearable/36x36@2/worldclock.png</file>
<file>images/background.png</file>
<file>images/back.png</file>
<file>images/back@2x.png</file>
<file>images/home.png</file>
<file>images/home@2x.png</file>
<file>qml/Alarms/AlarmsPage.qml</file>
- <file>qml/Alarms/images/alarms.png</file>
- <file>qml/Alarms/images/alarms@2x.png</file>
<file>qml/Fitness/fitness.js</file>
<file>qml/Fitness/FitnessPage.qml</file>
- <file>qml/Fitness/images/fitness.png</file>
- <file>qml/Fitness/images/fitness@2x.png</file>
<file>qml/Fitness/images/man-running.png</file>
<file>qml/Fitness/images/man-running@2x.png</file>
<file>qml/Fitness/images/man-walking.png</file>
@@ -45,8 +56,6 @@
<file>qml/Notifications/images/avatarm@2x.png</file>
<file>qml/Notifications/images/missedcall.png</file>
<file>qml/Notifications/images/missedcall@2x.png</file>
- <file>qml/Notifications/images/notifications.png</file>
- <file>qml/Notifications/images/notifications@2x.png</file>
<file>qml/Settings/SettingsPage.qml</file>
<file>qml/Settings/images/bluetooth.png</file>
<file>qml/Settings/images/bluetooth@2x.png</file>
@@ -54,8 +63,6 @@
<file>qml/Settings/images/brightness@2x.png</file>
<file>qml/Settings/images/contrast.png</file>
<file>qml/Settings/images/contrast@2x.png</file>
- <file>qml/Settings/images/settings.png</file>
- <file>qml/Settings/images/settings@2x.png</file>
<file>qml/Settings/images/wifi.png</file>
<file>qml/Settings/images/wifi@2x.png</file>
<file>qml/Style/qmldir</file>
@@ -76,8 +83,6 @@
<file>qml/Weather/images/sunset@2x.png</file>
<file>qml/Weather/images/temperature.png</file>
<file>qml/Weather/images/temperature@2x.png</file>
- <file>qml/Weather/images/weather.png</file>
- <file>qml/Weather/images/weather@2x.png</file>
<file>qml/Weather/images/wind.png</file>
<file>qml/Weather/images/wind@2x.png</file>
<file>qml/WorldClock/Clock.qml</file>
@@ -98,7 +103,5 @@
<file>qml/WorldClock/images/swissnighthour@2x.png</file>
<file>qml/WorldClock/images/swissnightminute.png</file>
<file>qml/WorldClock/images/swissnightminute@2x.png</file>
- <file>qml/WorldClock/images/worldclock.png</file>
- <file>qml/WorldClock/images/worldclock@2x.png</file>
</qresource>
</RCC>
diff --git a/src/imports/calendar/plugins.qmltypes b/src/imports/calendar/plugins.qmltypes
index 2ad527f7..ef9a5d49 100644
--- a/src/imports/calendar/plugins.qmltypes
+++ b/src/imports/calendar/plugins.qmltypes
@@ -86,6 +86,8 @@ Module {
Property { name: "wheelEnabled"; type: "bool" }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
+ Signal { name: "paletteChanged"; revision: 3 }
}
Component {
name: "QQuickDayOfWeekRow"
diff --git a/src/imports/calendar/qtlabscalendarplugin.cpp b/src/imports/calendar/qtlabscalendarplugin.cpp
index 6d2d5b97..178118fb 100644
--- a/src/imports/calendar/qtlabscalendarplugin.cpp
+++ b/src/imports/calendar/qtlabscalendarplugin.cpp
@@ -58,7 +58,7 @@ class QtLabsCalendarPlugin: public QQmlExtensionPlugin
public:
QtLabsCalendarPlugin(QObject *parent = nullptr);
- void registerTypes(const char *uri);
+ void registerTypes(const char *uri) override;
};
QtLabsCalendarPlugin::QtLabsCalendarPlugin(QObject *parent) : QQmlExtensionPlugin(parent)
diff --git a/src/imports/controls/AbstractButton.qml b/src/imports/controls/AbstractButton.qml
index 96987cf2..e65dd887 100644
--- a/src/imports/controls/AbstractButton.qml
+++ b/src/imports/controls/AbstractButton.qml
@@ -34,8 +34,8 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
T.AbstractButton {
id: control
diff --git a/src/imports/controls/Action.qml b/src/imports/controls/Action.qml
new file mode 100644
index 00000000..ad67300d
--- /dev/null
+++ b/src/imports/controls/Action.qml
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+
+T.Action { }
diff --git a/src/imports/controls/ActionGroup.qml b/src/imports/controls/ActionGroup.qml
new file mode 100644
index 00000000..44b174e6
--- /dev/null
+++ b/src/imports/controls/ActionGroup.qml
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+
+T.ActionGroup { }
diff --git a/src/imports/controls/ApplicationWindow.qml b/src/imports/controls/ApplicationWindow.qml
index af3986ac..12e877f7 100644
--- a/src/imports/controls/ApplicationWindow.qml
+++ b/src/imports/controls/ApplicationWindow.qml
@@ -34,22 +34,22 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Window 2.3
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ApplicationWindow {
id: window
- color: Default.backgroundColor
+ color: palette.window
overlay.modal: Rectangle {
- color: Default.overlayModalColor
+ color: Color.transparent(window.palette.shadow, 0.5)
}
overlay.modeless: Rectangle {
- color: Default.overlayDimColor
+ color: Color.transparent(window.palette.shadow, 0.12)
}
}
diff --git a/src/imports/controls/BusyIndicator.qml b/src/imports/controls/BusyIndicator.qml
index 234c2e01..06be00ec 100644
--- a/src/imports/controls/BusyIndicator.qml
+++ b/src/imports/controls/BusyIndicator.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.BusyIndicator {
id: control
@@ -51,6 +51,8 @@ T.BusyIndicator {
implicitWidth: 48
implicitHeight: 48
+ 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 6c150d5d..a5e86a38 100644
--- a/src/imports/controls/Button.qml
+++ b/src/imports/controls/Button.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Button {
id: control
@@ -51,27 +51,32 @@ T.Button {
padding: 6
leftPadding: padding + 2
rightPadding: padding + 2
+ spacing: 6
- contentItem: Text {
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.checked || control.highlighted ? control.palette.brightText :
+ control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
- opacity: enabled || control.highlighted || control.checked ? 1 : 0.3
- color: control.checked || control.highlighted ?
- Default.textLightColor :
- (control.visualFocus ? Default.focusColor : (control.down ? Default.textDarkColor : Default.textColor))
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- elide: Text.ElideRight
+ color: control.checked || control.highlighted ? control.palette.brightText :
+ control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
}
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
visible: !control.flat || control.down || control.checked || control.highlighted
- color: control.checked || control.highlighted ?
- (control.visualFocus ? (control.down ? Default.buttonCheckedFocusColor : Default.focusColor) : (control.down ? Default.buttonCheckedPressedColor : Default.textColor)) :
- (control.visualFocus ? (control.down ? Default.focusPressedColor : Default.focusLightColor) : (control.down ? Default.buttonPressedColor : Default.buttonColor))
- border.color: Default.focusColor
+ color: Color.blend(control.checked || control.highlighted ? control.palette.dark : control.palette.button,
+ control.palette.mid, control.down ? 0.5 : 0.0)
+ border.color: control.palette.highlight
border.width: control.visualFocus ? 2 : 0
}
}
diff --git a/src/imports/controls/ButtonGroup.qml b/src/imports/controls/ButtonGroup.qml
index 14a08361..a234583c 100644
--- a/src/imports/controls/ButtonGroup.qml
+++ b/src/imports/controls/ButtonGroup.qml
@@ -34,7 +34,7 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
T.ButtonGroup { }
diff --git a/src/imports/controls/CheckBox.qml b/src/imports/controls/CheckBox.qml
index 7945ca72..ec539b19 100644
--- a/src/imports/controls/CheckBox.qml
+++ b/src/imports/controls/CheckBox.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
T.CheckBox {
id: control
@@ -52,23 +52,43 @@ T.CheckBox {
padding: 6
spacing: 6
- indicator: CheckIndicator {
+ // keep in sync with CheckDelegate.qml (shared CheckIndicator.qml was removed for performance reasons)
+ indicator: Rectangle {
+ implicitWidth: 28
+ implicitHeight: 28
+
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- control: control
+
+ color: control.down ? control.palette.light : control.palette.base
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.palette.mid
+
+ ColorImage {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ defaultColor: "#353637"
+ color: control.palette.text
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png"
+ visible: control.checkState === Qt.Checked
+ }
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 16
+ height: 3
+ color: control.palette.text
+ visible: control.checkState === Qt.PartiallyChecked
+ }
}
- contentItem: Text {
+ contentItem: CheckLabel {
leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
- color: control.down ? Default.textDarkColor : Default.textColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
- opacity: enabled ? 1 : 0.3
+ color: control.palette.windowText
}
}
diff --git a/src/imports/controls/CheckDelegate.qml b/src/imports/controls/CheckDelegate.qml
index 05a0baf6..e8ee6731 100644
--- a/src/imports/controls/CheckDelegate.qml
+++ b/src/imports/controls/CheckDelegate.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
T.CheckDelegate {
id: control
@@ -52,30 +52,60 @@ T.CheckDelegate {
padding: 12
spacing: 12
- contentItem: Text {
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ contentItem: IconLabel {
leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
+ color: control.palette.text
}
- indicator: CheckIndicator {
+ // keep in sync with CheckBox.qml (shared CheckIndicator.qml was removed for performance reasons)
+ indicator: Rectangle {
+ implicitWidth: 28
+ implicitHeight: 28
+
x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
y: control.topPadding + (control.availableHeight - height) / 2
- control: control
+ color: control.down ? control.palette.light : control.palette.base
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.palette.mid
+
+ ColorImage {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ defaultColor: "#353637"
+ color: control.palette.text
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png"
+ visible: control.checkState === Qt.Checked
+ }
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 16
+ height: 3
+ color: control.palette.text
+ visible: control.checkState === Qt.PartiallyChecked
+ }
}
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
visible: control.down || control.highlighted
- color: control.down ? Default.delegatePressedColor : Default.delegateColor
+ color: control.down ? control.palette.midlight : control.palette.light
}
}
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index 6a885320..7e12f4e3 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -34,11 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Window 2.3
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ComboBox {
id: control
@@ -61,12 +61,12 @@ T.ComboBox {
hoverEnabled: control.hoverEnabled
}
- indicator: Image {
+ indicator: ColorImage {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
- source: "image://default/double-arrow/" + (!control.editable && control.visualFocus ? Default.focusColor : Default.textColor)
- sourceSize.width: width
- sourceSize.height: height
+ color: control.palette.dark
+ defaultColor: "#353637"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/double-arrow.png"
opacity: enabled ? 1 : 0.3
}
@@ -85,27 +85,26 @@ 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.palette.text : control.palette.buttonText
+ 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
+ visible: control.enabled && control.editable && !control.flat
border.width: parent && parent.activeFocus ? 2 : 1
- border.color: parent && parent.activeFocus ? Default.focusColor : Default.buttonColor
+ border.color: parent && parent.activeFocus ? control.palette.highlight : control.palette.button
+ color: control.palette.base
}
}
background: Rectangle {
- implicitWidth: 120
+ implicitWidth: 140
implicitHeight: 40
- color: !control.editable && control.visualFocus ? (control.pressed ? Default.focusPressedColor : Default.focusLightColor) :
- (control.down || popup.visible ? Default.buttonPressedColor : Default.buttonColor)
- border.color: Default.focusColor
+ color: control.down || popup.visible ? control.palette.mid : control.palette.button
+ border.color: control.palette.highlight
border.width: !control.editable && control.visualFocus ? 2 : 0
visible: !control.flat || control.down
}
@@ -122,7 +121,6 @@ T.ComboBox {
implicitHeight: contentHeight
model: control.popup.visible ? control.delegateModel : null
currentIndex: control.highlightedIndex
- highlightRangeMode: ListView.ApplyRange
highlightMoveDuration: 0
Rectangle {
@@ -130,7 +128,7 @@ T.ComboBox {
width: parent.width
height: parent.height
color: "transparent"
- border.color: Default.frameLightColor
+ border.color: control.palette.mid
}
T.ScrollIndicator.vertical: ScrollIndicator { }
diff --git a/src/imports/controls/Container.qml b/src/imports/controls/Container.qml
index 5844e0a2..b297b2ab 100644
--- a/src/imports/controls/Container.qml
+++ b/src/imports/controls/Container.qml
@@ -34,8 +34,8 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
T.Container {
id: control
diff --git a/src/imports/controls/Control.qml b/src/imports/controls/Control.qml
index 85f40ae5..64e0f35f 100644
--- a/src/imports/controls/Control.qml
+++ b/src/imports/controls/Control.qml
@@ -34,8 +34,8 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
T.Control {
id: control
diff --git a/src/imports/controls/DelayButton.qml b/src/imports/controls/DelayButton.qml
index 4a569fcf..461f4195 100644
--- a/src/imports/controls/DelayButton.qml
+++ b/src/imports/controls/DelayButton.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.DelayButton {
id: control
@@ -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.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
@@ -113,14 +113,15 @@ T.DelayButton {
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
- color: control.visualFocus ? (control.down ? Default.focusPressedColor : Default.focusLightColor) : (control.down ? Default.buttonPressedColor : Default.buttonColor)
- border.color: Default.focusColor
+ color: Color.blend(control.palette.button, control.palette.mid, control.down ? 0.5 : 0.0)
+ border.color: control.palette.highlight
border.width: control.visualFocus ? 2 : 0
- Rectangle {
+ PaddedRectangle {
+ padding: control.visualFocus ? 2 : 0
width: control.progress * parent.width
height: parent.height
- color: control.visualFocus ? (control.down ? Default.buttonCheckedFocusColor : Default.focusColor) : (control.down ? Default.buttonCheckedPressedColor : Default.textColor)
+ color: Color.blend(control.palette.dark, control.palette.mid, control.down ? 0.5 : 0.0)
}
}
}
diff --git a/src/imports/controls/Dial.qml b/src/imports/controls/Dial.qml
index affcfa62..f3706fa3 100644
--- a/src/imports/controls/Dial.qml
+++ b/src/imports/controls/Dial.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Dial {
id: control
@@ -45,23 +45,23 @@ T.Dial {
implicitWidth: 184
implicitHeight: 184
- background: DialRing {
+ background: DialImpl {
width: control.availableWidth
height: control.availableHeight
- color: control.visualFocus ? Default.focusColor : Default.frameDarkColor
+ color: control.visualFocus ? control.palette.highlight : control.palette.dark
progress: control.position
opacity: control.enabled ? 1 : 0.3
}
- handle: Image {
+ handle: ColorImage {
id: handleItem
x: background.x + background.width / 2 - handle.width / 2
y: background.y + background.height / 2 - handle.height / 2
width: 14
height: 10
- source: "image://default/dial-indicator/" + (control.visualFocus ? Default.focusColor : Default.textColor)
- sourceSize.width: width
- sourceSize.height: height
+ defaultColor: "#353637"
+ color: control.visualFocus ? control.palette.highlight : control.palette.dark
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/dial-indicator.png"
antialiasing: true
opacity: control.enabled ? 1 : 0.3
transform: [
diff --git a/src/imports/controls/Dialog.qml b/src/imports/controls/Dialog.qml
index 84c33b63..24556db0 100644
--- a/src/imports/controls/Dialog.qml
+++ b/src/imports/controls/Dialog.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
T.Dialog {
id: control
@@ -57,7 +57,8 @@ T.Dialog {
padding: 12
background: Rectangle {
- border.color: Default.frameDarkColor
+ color: control.palette.window
+ border.color: control.palette.dark
}
header: Label {
@@ -70,10 +71,19 @@ T.Dialog {
x: 1; y: 1
width: parent.width - 2
height: parent.height - 1
+ color: control.palette.window
}
}
footer: DialogButtonBox {
visible: count > 0
}
+
+ T.Overlay.modal: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.5)
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.12)
+ }
}
diff --git a/src/imports/controls/DialogButtonBox.qml b/src/imports/controls/DialogButtonBox.qml
index ba9fa52f..1a962d9b 100644
--- a/src/imports/controls/DialogButtonBox.qml
+++ b/src/imports/controls/DialogButtonBox.qml
@@ -34,8 +34,8 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
T.DialogButtonBox {
id: control
@@ -69,5 +69,6 @@ T.DialogButtonBox {
x: 1; y: 1
width: parent.width - 2
height: parent.height - 2
+ color: control.palette.window
}
}
diff --git a/src/imports/controls/Drawer.qml b/src/imports/controls/Drawer.qml
index b3240ca3..b512d14c 100644
--- a/src/imports/controls/Drawer.qml
+++ b/src/imports/controls/Drawer.qml
@@ -34,15 +34,15 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Drawer {
id: control
- parent: T.ApplicationWindow.overlay
+ parent: T.Overlay.overlay
implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
@@ -59,13 +59,22 @@ T.Drawer {
exit: Transition { SmoothedAnimation { velocity: 5 } }
background: Rectangle {
+ color: control.palette.window
Rectangle {
readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge
width: horizontal ? 1 : parent.width
height: horizontal ? parent.height : 1
- color: Default.frameDarkColor
+ color: control.palette.dark
x: control.edge === Qt.LeftEdge ? parent.width - 1 : 0
y: control.edge === Qt.TopEdge ? parent.height - 1 : 0
}
}
+
+ T.Overlay.modal: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.5)
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.12)
+ }
}
diff --git a/src/imports/controls/Frame.qml b/src/imports/controls/Frame.qml
index 5add003f..9b81b7be 100644
--- a/src/imports/controls/Frame.qml
+++ b/src/imports/controls/Frame.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Frame {
id: control
@@ -52,6 +52,6 @@ T.Frame {
background: Rectangle {
color: "transparent"
- border.color: Default.frameLightColor
+ border.color: control.palette.mid
}
}
diff --git a/src/imports/controls/GroupBox.qml b/src/imports/controls/GroupBox.qml
index ee81250b..967f591d 100644
--- a/src/imports/controls/GroupBox.qml
+++ b/src/imports/controls/GroupBox.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.GroupBox {
id: control
@@ -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
@@ -72,6 +72,6 @@ T.GroupBox {
height: parent.height - control.topPadding + control.padding
color: "transparent"
- border.color: Default.frameLightColor
+ border.color: control.palette.mid
}
}
diff --git a/src/imports/controls/ItemDelegate.qml b/src/imports/controls/ItemDelegate.qml
index 6ee03ca2..1180a997 100644
--- a/src/imports/controls/ItemDelegate.qml
+++ b/src/imports/controls/ItemDelegate.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ItemDelegate {
id: control
@@ -50,27 +50,29 @@ T.ItemDelegate {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 12
- spacing: 12
+ spacing: 8
- contentItem: Text {
- leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
- rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
+ color: control.palette.text
}
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
visible: control.down || control.highlighted || control.visualFocus
- color: control.visualFocus
- ? (control.pressed ? Default.focusPressedColor : Default.delegateFocusColor)
- : (control.down ? Default.delegatePressedColor : Default.delegateColor)
+ color: Color.blend(control.down ? control.palette.midlight : control.palette.light,
+ control.palette.highlight, control.visualFocus ? 0.15 : 0.0)
}
}
diff --git a/src/imports/controls/Label.qml b/src/imports/controls/Label.qml
index d2052774..c03c9b47 100644
--- a/src/imports/controls/Label.qml
+++ b/src/imports/controls/Label.qml
@@ -34,14 +34,14 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 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/Menu.qml b/src/imports/controls/Menu.qml
index dc428629..cb9f693d 100644
--- a/src/imports/controls/Menu.qml
+++ b/src/imports/controls/Menu.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Menu {
id: control
@@ -48,6 +48,9 @@ T.Menu {
contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding
margins: 0
+ overlap: 1
+
+ delegate: MenuItem { }
contentItem: ListView {
implicitHeight: contentHeight
@@ -55,8 +58,7 @@ T.Menu {
// TODO: improve this?
interactive: ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false
clip: true
- keyNavigationWraps: false
- currentIndex: -1
+ currentIndex: control.currentIndex
ScrollIndicator.vertical: ScrollIndicator {}
}
@@ -64,7 +66,15 @@ T.Menu {
background: Rectangle {
implicitWidth: 200
implicitHeight: 40
- color: Default.backgroundColor
- border.color: Default.frameDarkColor
+ color: control.palette.window
+ border.color: control.palette.dark
+ }
+
+ T.Overlay.modal: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.5)
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.12)
}
}
diff --git a/src/imports/controls/RadioIndicator.qml b/src/imports/controls/MenuBar.qml
index d9889fba..4c205465 100644
--- a/src/imports/controls/RadioIndicator.qml
+++ b/src/imports/controls/MenuBar.qml
@@ -34,31 +34,30 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
-Rectangle {
- implicitWidth: 28
- implicitHeight: 28
+T.MenuBar {
+ id: control
- radius: width / 2
- color: control.down
- ? (control.visualFocus ? Default.focusPressedColor : Default.indicatorPressedColor)
- : (control.visualFocus ? Default.focusLightColor : Default.backgroundColor)
- border.width: control.visualFocus ? 2 : 1
- border.color: control.visualFocus ? Default.focusColor : (control.down ? Default.indicatorFramePressedColor : Default.indicatorFrameColor)
- opacity: enabled ? 1 : 0.3
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight + topPadding + bottomPadding)
- property Item control
+ delegate: MenuBarItem { }
- Rectangle {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: 20
- height: 20
- radius: width / 2
- color: control.down ? Default.textDarkColor : Default.buttonCheckedColor
- visible: control.checked
+ contentItem: Row {
+ spacing: control.spacing
+ Repeater {
+ model: control.contentModel
+ }
+ }
+
+ background: Rectangle {
+ implicitHeight: 40
+ color: control.palette.button
}
}
diff --git a/src/imports/controls/MenuBarItem.qml b/src/imports/controls/MenuBarItem.qml
new file mode 100644
index 00000000..dfe20788
--- /dev/null
+++ b/src/imports/controls/MenuBarItem.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+T.MenuBarItem {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 6
+ padding: 6
+ leftPadding: 12
+ rightPadding: 16
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.buttonText
+ }
+
+ background: Rectangle {
+ implicitWidth: 40
+ implicitHeight: 40
+ color: control.down || control.highlighted ? control.palette.mid : "transparent"
+ }
+}
diff --git a/src/imports/controls/MenuItem.qml b/src/imports/controls/MenuItem.qml
index 2c8eab5f..3562669d 100644
--- a/src/imports/controls/MenuItem.qml
+++ b/src/imports/controls/MenuItem.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.MenuItem {
id: control
@@ -50,26 +50,48 @@ T.MenuItem {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
+ spacing: 6
- contentItem: Text {
- leftPadding: control.checkable && !control.mirrored ? control.indicator.width + control.spacing : 0
- rightPadding: control.checkable && control.mirrored ? control.indicator.width + control.spacing : 0
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.windowText
+ contentItem: IconLabel {
+ readonly property real arrowPadding: control.subMenu && control.arrow ? control.arrow.width + control.spacing : 0
+ readonly property real indicatorPadding: control.checkable && control.indicator ? control.indicator.width + control.spacing : 0
+ leftPadding: !control.mirrored ? indicatorPadding : arrowPadding
+ rightPadding: control.mirrored ? indicatorPadding : arrowPadding
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
+ color: control.palette.windowText
}
- indicator: Image {
+ indicator: ColorImage {
x: control.mirrored ? control.width - width - control.rightPadding : control.leftPadding
y: control.topPadding + (control.availableHeight - height) / 2
visible: control.checked
source: control.checkable ? "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png" : ""
+ color: control.palette.windowText
+ defaultColor: "#353637"
+ }
+
+ arrow: ColorImage {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ visible: control.subMenu
+ mirror: control.mirrored
+ source: control.subMenu ? "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/arrow-indicator.png" : ""
+ color: control.palette.windowText
+ defaultColor: "#353637"
}
background: Rectangle {
@@ -77,8 +99,8 @@ T.MenuItem {
implicitHeight: 40
x: 1
y: 1
- width: parent.width - 2
- height: parent.height - 2
- color: control.visualFocus || control.down ? Default.delegateColor : "transparent"
+ width: control.width - 2
+ height: control.height - 2
+ color: control.down ? control.palette.midlight : control.highlighted ? control.palette.light : "transparent"
}
}
diff --git a/src/imports/controls/MenuSeparator.qml b/src/imports/controls/MenuSeparator.qml
index f0c588b2..db34e746 100644
--- a/src/imports/controls/MenuSeparator.qml
+++ b/src/imports/controls/MenuSeparator.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.MenuSeparator {
id: control
@@ -52,6 +52,6 @@ T.MenuSeparator {
contentItem: Rectangle {
implicitWidth: 188
implicitHeight: 1
- color: Default.separatorColor
+ color: control.palette.mid
}
}
diff --git a/src/imports/controls/Page.qml b/src/imports/controls/Page.qml
index 64c16bf4..5bf3e0da 100644
--- a/src/imports/controls/Page.qml
+++ b/src/imports/controls/Page.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Page {
id: control
@@ -55,6 +55,6 @@ T.Page {
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
background: Rectangle {
- color: Default.backgroundColor
+ color: control.palette.window
}
}
diff --git a/src/imports/controls/PageIndicator.qml b/src/imports/controls/PageIndicator.qml
index 3ff7d0c1..a0b1e17a 100644
--- a/src/imports/controls/PageIndicator.qml
+++ b/src/imports/controls/PageIndicator.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.PageIndicator {
id: control
@@ -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/Pane.qml b/src/imports/controls/Pane.qml
index 7ed7f0d8..ac023bdd 100644
--- a/src/imports/controls/Pane.qml
+++ b/src/imports/controls/Pane.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Pane {
id: control
@@ -51,6 +51,6 @@ T.Pane {
padding: 12
background: Rectangle {
- color: Default.backgroundColor
+ color: control.palette.window
}
}
diff --git a/src/imports/controls/Popup.qml b/src/imports/controls/Popup.qml
index 4a7a1dfd..6a78e89a 100644
--- a/src/imports/controls/Popup.qml
+++ b/src/imports/controls/Popup.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Popup {
id: control
@@ -53,6 +53,15 @@ T.Popup {
padding: 12
background: Rectangle {
- border.color: Default.frameDarkColor
+ color: control.palette.window
+ border.color: control.palette.dark
+ }
+
+ T.Overlay.modal: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.5)
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.12)
}
}
diff --git a/src/imports/controls/ProgressBar.qml b/src/imports/controls/ProgressBar.qml
index eae6c019..00cdb28f 100644
--- a/src/imports/controls/ProgressBar.qml
+++ b/src/imports/controls/ProgressBar.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
T.ProgressBar {
id: control
@@ -53,16 +53,15 @@ T.ProgressBar {
scale: control.mirrored ? -1 : 1
progress: control.position
indeterminate: control.visible && control.indeterminate
+ color: control.palette.dark
}
background: Rectangle {
implicitWidth: 200
implicitHeight: 6
- x: control.leftPadding
- y: control.topPadding + (control.availableHeight - height) / 2
- width: control.availableWidth
+ y: (control.height - height) / 2
height: 6
- color: Default.progressBarColor
+ color: control.palette.midlight
}
}
diff --git a/src/imports/controls/RadioButton.qml b/src/imports/controls/RadioButton.qml
index 878a0fe3..a9f63652 100644
--- a/src/imports/controls/RadioButton.qml
+++ b/src/imports/controls/RadioButton.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.RadioButton {
id: control
@@ -52,23 +52,36 @@ T.RadioButton {
padding: 6
spacing: 6
- indicator: RadioIndicator {
+ // keep in sync with RadioDelegate.qml (shared RadioIndicator.qml was removed for performance reasons)
+ indicator: Rectangle {
+ implicitWidth: 28
+ implicitHeight: 28
+
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- control: control
+
+ radius: width / 2
+ color: control.down ? control.palette.light : control.palette.base
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.palette.mid
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 20
+ height: 20
+ radius: width / 2
+ color: control.palette.text
+ visible: control.checked
+ }
}
- contentItem: Text {
+ contentItem: CheckLabel {
leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
- color: control.down ? Default.textDarkColor : Default.textColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
- opacity: enabled ? 1 : 0.3
+ color: control.palette.windowText
}
}
diff --git a/src/imports/controls/RadioDelegate.qml b/src/imports/controls/RadioDelegate.qml
index 03cd83bd..8cfe6e5f 100644
--- a/src/imports/controls/RadioDelegate.qml
+++ b/src/imports/controls/RadioDelegate.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.RadioDelegate {
id: control
@@ -52,30 +52,53 @@ T.RadioDelegate {
padding: 12
spacing: 12
- contentItem: Text {
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ contentItem: IconLabel {
leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
+ color: control.palette.text
}
- indicator: RadioIndicator {
+ // keep in sync with RadioButton.qml (shared RadioIndicator.qml was removed for performance reasons)
+ indicator: Rectangle {
+ implicitWidth: 28
+ implicitHeight: 28
+
x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
y: control.topPadding + (control.availableHeight - height) / 2
- control: control
+ radius: width / 2
+ color: control.down ? control.palette.light : control.palette.base
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.palette.mid
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 20
+ height: 20
+ radius: width / 2
+ color: control.palette.text
+ visible: control.checked
+ }
}
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
visible: control.down || control.highlighted
- color: control.down ? Default.delegatePressedColor : Default.delegateColor
+ color: control.down ? control.palette.midlight : control.palette.light
}
}
diff --git a/src/imports/controls/RangeSlider.qml b/src/imports/controls/RangeSlider.qml
index b38cb0f6..c8b88a97 100644
--- a/src/imports/controls/RangeSlider.qml
+++ b/src/imports/controls/RangeSlider.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.RangeSlider {
id: control
@@ -52,59 +52,45 @@ T.RangeSlider {
padding: 6
first.handle: Rectangle {
- x: control.leftPadding + (horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height))
+ 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))
implicitWidth: 28
implicitHeight: 28
radius: width / 2
border.width: activeFocus ? 2 : 1
- border.color: control.enabled ? (activeFocus
- ? Default.focusColor
- : (control.first.pressed ? Default.indicatorFramePressedColor : Default.indicatorFrameColor)) : Default.indicatorFrameDisabledColor
- color: control.enabled ? (first.pressed
- ? (activeFocus ? Default.focusPressedColor : Default.indicatorPressedColor)
- : (activeFocus ? Default.focusLightColor : Default.backgroundColor)) : Default.indicatorDisabledColor
-
- readonly property bool horizontal: control.orientation === Qt.Horizontal
+ border.color: activeFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight
+ color: control.first.pressed ? control.palette.light : control.palette.window
}
second.handle: Rectangle {
- x: control.leftPadding + (horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height))
+ 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))
implicitWidth: 28
implicitHeight: 28
radius: width / 2
border.width: activeFocus ? 2 : 1
- border.color: control.enabled ? (activeFocus
- ? Default.focusColor
- : (control.second.pressed ? Default.indicatorFramePressedColor : Default.indicatorFrameColor)) : Default.indicatorFrameDisabledColor
- color: control.enabled ? (second.pressed
- ? (activeFocus ? Default.focusPressedColor : Default.indicatorPressedColor)
- : (activeFocus ? Default.focusLightColor : Default.backgroundColor)) : Default.indicatorDisabledColor
-
- readonly property bool horizontal: control.orientation === Qt.Horizontal
+ border.color: activeFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight
+ color: control.second.pressed ? control.palette.light : control.palette.window
}
background: Rectangle {
- x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
- implicitWidth: horizontal ? 200 : 6
- implicitHeight: horizontal ? 6 : 200
- width: horizontal ? control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.availableHeight
+ x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
+ y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
+ implicitWidth: control.horizontal ? 200 : 6
+ implicitHeight: control.horizontal ? 6 : 200
+ width: control.horizontal ? control.availableWidth : implicitWidth
+ height: control.horizontal ? implicitHeight : control.availableHeight
radius: 3
- color: Default.buttonColor
- scale: horizontal && control.mirrored ? -1 : 1
-
- readonly property bool horizontal: control.orientation === Qt.Horizontal
+ color: control.palette.midlight
+ scale: control.horizontal && control.mirrored ? -1 : 1
Rectangle {
- x: parent.horizontal ? control.first.position * parent.width + 3 : 0
- y: parent.horizontal ? 0 : control.second.visualPosition * parent.height + 3
- width: parent.horizontal ? control.second.position * parent.width - control.first.position * parent.width - 6 : 6
- height: parent.horizontal ? 6 : control.second.position * parent.height - control.first.position * parent.height - 6
+ x: control.horizontal ? control.first.position * parent.width + 3 : 0
+ y: control.horizontal ? 0 : control.second.visualPosition * parent.height + 3
+ width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width - 6 : 6
+ height: control.horizontal ? 6 : control.second.position * parent.height - control.first.position * parent.height - 6
- color: Default.textColor
+ color: control.palette.dark
}
}
}
diff --git a/src/imports/controls/RoundButton.qml b/src/imports/controls/RoundButton.qml
index 6b4000b1..13ccddc5 100644
--- a/src/imports/controls/RoundButton.qml
+++ b/src/imports/controls/RoundButton.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.RoundButton {
id: control
@@ -49,15 +49,23 @@ T.RoundButton {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
+ spacing: 6
- contentItem: Text {
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.checked || control.highlighted ? control.palette.brightText :
+ control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
- opacity: enabled || control.highlighted || control.checked ? 1 : 0.3
- color: control.checked || control.highlighted ? Default.textLightColor : (control.visualFocus ? Default.focusColor : (control.down ? Default.textDarkColor : Default.textColor))
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- elide: Text.ElideRight
+ color: control.checked || control.highlighted ? control.palette.brightText :
+ control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
}
background: Rectangle {
@@ -66,10 +74,9 @@ T.RoundButton {
radius: control.radius
opacity: enabled ? 1 : 0.3
visible: !control.flat || control.down || control.checked || control.highlighted
- color: control.checked || control.highlighted ?
- (control.visualFocus ? (control.down ? Default.buttonCheckedFocusColor : Default.focusColor) : (control.down ? Default.buttonCheckedPressedColor : Default.buttonCheckedColor)) :
- (control.visualFocus ? (control.down ? Default.focusPressedColor : Default.focusLightColor) : (control.down ? Default.buttonPressedColor : Default.buttonColor))
- border.color: Default.focusColor
+ color: Color.blend(control.checked || control.highlighted ? control.palette.dark : control.palette.button,
+ control.palette.mid, control.down ? 0.5 : 0.0)
+ border.color: control.palette.highlight
border.width: control.visualFocus ? 2 : 0
}
}
diff --git a/src/imports/controls/ScrollBar.qml b/src/imports/controls/ScrollBar.qml
index 79e3e1ee..cf6d7da6 100644
--- a/src/imports/controls/ScrollBar.qml
+++ b/src/imports/controls/ScrollBar.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ScrollBar {
id: control
@@ -57,7 +57,7 @@ T.ScrollBar {
implicitHeight: control.interactive ? 6 : 2
radius: width / 2
- color: control.pressed ? Default.scrollBarPressedColor : Default.scrollBarColor
+ color: control.pressed ? control.palette.dark : control.palette.mid
opacity: 0.0
states: State {
diff --git a/src/imports/controls/ScrollIndicator.qml b/src/imports/controls/ScrollIndicator.qml
index 12ec2d40..ee6a321e 100644
--- a/src/imports/controls/ScrollIndicator.qml
+++ b/src/imports/controls/ScrollIndicator.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ScrollIndicator {
id: control
@@ -55,7 +55,7 @@ T.ScrollIndicator {
implicitWidth: 2
implicitHeight: 2
- color: Default.scrollBarColor
+ color: control.palette.mid
visible: control.size < 1.0
opacity: 0.0
diff --git a/src/imports/controls/ScrollView.qml b/src/imports/controls/ScrollView.qml
index e10c5328..2618ee3f 100644
--- a/src/imports/controls/ScrollView.qml
+++ b/src/imports/controls/ScrollView.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ScrollView {
id: control
diff --git a/src/imports/controls/Slider.qml b/src/imports/controls/Slider.qml
index 37145cad..6e0fd24c 100644
--- a/src/imports/controls/Slider.qml
+++ b/src/imports/controls/Slider.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Slider {
id: control
@@ -50,33 +50,34 @@ T.Slider {
padding: 6
handle: Rectangle {
- x: control.leftPadding + (horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))
+ 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))
implicitWidth: 28
implicitHeight: 28
radius: width / 2
- color: control.enabled ? (control.pressed
- ? (control.visualFocus ? Default.focusPressedColor : Default.indicatorPressedColor)
- : (control.visualFocus ? Default.focusLightColor : Default.backgroundColor)) : Default.indicatorDisabledColor
+ color: control.pressed ? control.palette.light : control.palette.window
border.width: control.visualFocus ? 2 : 1
- border.color: control.enabled ? (control.visualFocus
- ? Default.focusColor
- : (control.pressed ? Default.indicatorFramePressedColor : Default.indicatorFrameColor)) : Default.indicatorFrameDisabledColor
-
- readonly property bool horizontal: control.orientation === Qt.Horizontal
+ border.color: control.visualFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight
}
background: Rectangle {
- x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
- implicitWidth: horizontal ? 200 : 6
- implicitHeight: horizontal ? 6 : 200
- width: horizontal ? control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.availableHeight
+ x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
+ y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
+ implicitWidth: control.horizontal ? 200 : 6
+ implicitHeight: control.horizontal ? 6 : 200
+ width: control.horizontal ? control.availableWidth : implicitWidth
+ height: control.horizontal ? implicitHeight : control.availableHeight
radius: 3
- color: Default.buttonColor
- scale: horizontal && control.mirrored ? -1 : 1
+ color: control.palette.midlight
+ scale: control.horizontal && control.mirrored ? -1 : 1
+
+ Rectangle {
+ y: control.horizontal ? 0 : control.visualPosition * parent.height
+ width: control.horizontal ? control.position * parent.width : 6
+ height: control.horizontal ? 6 : control.position * parent.height
- readonly property bool horizontal: control.orientation === Qt.Horizontal
+ radius: 3
+ color: control.palette.dark
+ }
}
}
diff --git a/src/imports/controls/SpinBox.qml b/src/imports/controls/SpinBox.qml
index 9aca4d7c..067507d8 100644
--- a/src/imports/controls/SpinBox.qml
+++ b/src/imports/controls/SpinBox.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.SpinBox {
id: control
@@ -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
@@ -85,7 +84,7 @@ T.SpinBox {
height: control.height
visible: control.activeFocus
color: "transparent"
- border.color: Default.focusColor
+ border.color: control.palette.highlight
border.width: 2
}
}
@@ -95,21 +94,21 @@ T.SpinBox {
height: parent.height
implicitWidth: 40
implicitHeight: 40
- color: up.pressed ? Default.buttonPressedColor : Default.buttonColor
+ color: up.pressed ? control.palette.mid : control.palette.button
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: parent.width / 3
height: 2
- color: enabled ? Default.textColor : Default.textDisabledColor
+ color: enabled ? control.palette.buttonText : control.palette.mid
}
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: 2
height: parent.width / 3
- color: enabled ? Default.textColor : Default.textDisabledColor
+ color: enabled ? control.palette.buttonText : control.palette.mid
}
}
@@ -118,19 +117,20 @@ T.SpinBox {
height: parent.height
implicitWidth: 40
implicitHeight: 40
- color: down.pressed ? Default.buttonPressedColor : Default.buttonColor
+ color: down.pressed ? control.palette.mid : control.palette.button
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: parent.width / 3
height: 2
- color: enabled ? Default.textColor : Default.textDisabledColor
+ color: enabled ? control.palette.buttonText : control.palette.mid
}
}
background: Rectangle {
implicitWidth: 140
- border.color: Default.buttonColor
+ color: enabled ? control.palette.base : control.palette.button
+ border.color: control.palette.button
}
}
diff --git a/src/imports/controls/StackView.qml b/src/imports/controls/StackView.qml
index 6d52aaed..166089bd 100644
--- a/src/imports/controls/StackView.qml
+++ b/src/imports/controls/StackView.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Templates 2.3 as T
T.StackView {
id: control
diff --git a/src/imports/controls/SwipeDelegate.qml b/src/imports/controls/SwipeDelegate.qml
index d9f72da9..70c76f26 100644
--- a/src/imports/controls/SwipeDelegate.qml
+++ b/src/imports/controls/SwipeDelegate.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.SwipeDelegate {
id: control
@@ -52,24 +52,28 @@ T.SwipeDelegate {
padding: 12
spacing: 12
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
- contentItem: Text {
- leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
- rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+ icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
+ color: control.palette.text
}
background: Rectangle {
- color: control.visualFocus
- ? (control.down ? Default.focusPressedColor : Default.delegateFocusColor)
- : (control.down ? Default.delegatePressedColor : Default.backgroundColor)
+ implicitWidth: 100
+ implicitHeight: 40
+ color: Color.blend(control.down ? control.palette.midlight : control.palette.light,
+ control.palette.highlight, control.visualFocus ? 0.15 : 0.0)
}
}
diff --git a/src/imports/controls/SwipeView.qml b/src/imports/controls/SwipeView.qml
index 4ccef22b..2b4e9c2e 100644
--- a/src/imports/controls/SwipeView.qml
+++ b/src/imports/controls/SwipeView.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Templates 2.3 as T
T.SwipeView {
id: control
diff --git a/src/imports/controls/Switch.qml b/src/imports/controls/Switch.qml
index 55b08039..71317967 100644
--- a/src/imports/controls/Switch.qml
+++ b/src/imports/controls/Switch.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
T.Switch {
id: control
@@ -52,22 +52,42 @@ T.Switch {
padding: 6
spacing: 6
- indicator: SwitchIndicator {
+ indicator: PaddedRectangle {
+ implicitWidth: 56
+ implicitHeight: 28
+
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- control: control
+
+ radius: 8
+ leftPadding: 0
+ rightPadding: 0
+ padding: (height - 16) / 2
+ color: control.checked ? control.palette.dark : control.palette.midlight
+
+ Rectangle {
+ x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+ width: 28
+ height: 28
+ radius: 16
+ color: control.down ? control.palette.light : control.palette.window
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight
+
+ Behavior on x {
+ enabled: !control.down
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
}
- contentItem: Text {
+ contentItem: CheckLabel {
leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
+ color: control.palette.windowText
}
}
diff --git a/src/imports/controls/SwitchDelegate.qml b/src/imports/controls/SwitchDelegate.qml
index 6536ac53..08a9d641 100644
--- a/src/imports/controls/SwitchDelegate.qml
+++ b/src/imports/controls/SwitchDelegate.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
T.SwitchDelegate {
id: control
@@ -52,29 +52,59 @@ T.SwitchDelegate {
padding: 12
spacing: 12
- indicator: SwitchIndicator {
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ indicator: PaddedRectangle {
+ implicitWidth: 56
+ implicitHeight: 28
+
x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- control: control
+
+ radius: 8
+ leftPadding: 0
+ rightPadding: 0
+ padding: (height - 16) / 2
+ color: control.checked ? control.palette.dark : control.palette.midlight
+
+ Rectangle {
+ x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+ width: 28
+ height: 28
+ radius: 16
+ color: control.down ? control.palette.light : control.palette.window
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight
+
+ Behavior on x {
+ enabled: !control.down
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
}
- contentItem: Text {
- leftPadding: control.indicator && !control.mirrored ? 0 : control.indicator.width + control.spacing
- rightPadding: control.indicator && control.mirrored ? 0 : control.indicator.width + control.spacing
+ contentItem: IconLabel {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+ icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
+ color: control.palette.text
}
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
visible: control.down || control.highlighted
- color: control.down ? Default.delegatePressedColor : Default.delegateColor
+ color: control.down ? control.palette.midlight : control.palette.light
}
}
diff --git a/src/imports/controls/TabBar.qml b/src/imports/controls/TabBar.qml
index 6e6b7d74..ed2382d3 100644
--- a/src/imports/controls/TabBar.qml
+++ b/src/imports/controls/TabBar.qml
@@ -34,8 +34,8 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
T.TabBar {
id: control
@@ -46,7 +46,6 @@ T.TabBar {
contentHeight + topPadding + bottomPadding)
spacing: 1
- contentHeight: 40
contentItem: ListView {
model: control.contentModel
@@ -64,5 +63,7 @@ T.TabBar {
preferredHighlightEnd: width - 40
}
- background: Rectangle { }
+ background: Rectangle {
+ color: control.palette.window
+ }
}
diff --git a/src/imports/controls/TabButton.qml b/src/imports/controls/TabButton.qml
index acdda056..a6671c04 100644
--- a/src/imports/controls/TabButton.qml
+++ b/src/imports/controls/TabButton.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.TabButton {
id: control
@@ -49,21 +49,26 @@ T.TabButton {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
+ spacing: 6
- contentItem: Text {
+ icon.width: 24
+ icon.height: 24
+ icon.color: checked ? control.palette.windowText : control.palette.brightText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
- opacity: enabled ? 1 : 0.3
- color: !control.checked ? Default.textLightColor : control.down ? Default.textDarkColor : Default.textColor
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
+ color: checked ? control.palette.windowText : control.palette.brightText
}
background: Rectangle {
implicitHeight: 40
- color: control.down
- ? (control.checked ? Default.tabButtonCheckedPressedColor : Default.tabButtonPressedColor)
- : (control.checked ? "transparent" : Default.tabButtonColor)
+ color: Color.blend(control.checked ? control.palette.window : control.palette.dark,
+ control.palette.mid, control.down ? 0.5 : 0.0)
}
}
diff --git a/src/imports/controls/TextArea.qml b/src/imports/controls/TextArea.qml
index ed83fb7d..9021d558 100644
--- a/src/imports/controls/TextArea.qml
+++ b/src/imports/controls/TextArea.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.TextArea {
id: control
@@ -52,9 +52,9 @@ T.TextArea {
padding: 6
leftPadding: padding + 4
- color: enabled ? Default.textColor : Default.textDisabledLightColor
- selectionColor: Default.textSelectionColor
- selectedTextColor: color
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
PlaceholderText {
id: placeholder
@@ -65,7 +65,8 @@ T.TextArea {
text: control.placeholderText
font: control.font
- color: enabled ? Default.textPlaceholderColor : Default.textDisabledColor
+ opacity: 0.5
+ color: control.palette.text
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 31336029..52125501 100644
--- a/src/imports/controls/TextField.qml
+++ b/src/imports/controls/TextField.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.TextField {
id: control
@@ -52,9 +52,9 @@ T.TextField {
padding: 6
leftPadding: padding + 4
- color: enabled ? Default.textColor : Default.textDisabledColor
- selectionColor: Default.textSelectionColor
- selectedTextColor: color
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
verticalAlignment: TextInput.AlignVCenter
PlaceholderText {
@@ -66,7 +66,8 @@ T.TextField {
text: control.placeholderText
font: control.font
- color: enabled ? Default.textPlaceholderColor : Default.textDisabledColor
+ opacity: 0.5
+ color: control.palette.text
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
@@ -76,7 +77,7 @@ T.TextField {
implicitWidth: 200
implicitHeight: 40
border.width: control.activeFocus ? 2 : 1
- color: control.enabled ? Default.backgroundColor : Default.indicatorFrameDisabledColor
- border.color: control.activeFocus ? Default.focusColor : (control.enabled ? Default.disabledLightColor : "transparent")
+ color: control.palette.base
+ border.color: control.activeFocus ? control.palette.highlight : control.palette.mid
}
}
diff --git a/src/imports/controls/ToolBar.qml b/src/imports/controls/ToolBar.qml
index e3d4fec3..cd1bbdc3 100644
--- a/src/imports/controls/ToolBar.qml
+++ b/src/imports/controls/ToolBar.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ToolBar {
id: control
@@ -50,6 +50,6 @@ T.ToolBar {
background: Rectangle {
implicitHeight: 40
- color: Default.delegateColor
+ color: control.palette.button
}
}
diff --git a/src/imports/controls/ToolButton.qml b/src/imports/controls/ToolButton.qml
index 6199607a..511bd6eb 100644
--- a/src/imports/controls/ToolButton.qml
+++ b/src/imports/controls/ToolButton.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ToolButton {
id: control
@@ -49,22 +49,28 @@ T.ToolButton {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
+ spacing: 6
- contentItem: Text {
+ icon.width: 24
+ icon.height: 24
+ icon.color: visualFocus ? control.palette.highlight : control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
- color: control.enabled ? (control.visualFocus ? Default.focusColor : Default.textDarkColor) : Default.textDisabledLightColor
- elide: Text.ElideRight
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
+ color: control.visualFocus ? control.palette.highlight : control.palette.buttonText
}
background: Rectangle {
implicitWidth: 40
implicitHeight: 40
- color: Qt.darker(Default.toolButtonColor, control.enabled && (control.checked || control.highlighted) ? 1.5 : 1.0)
- opacity: control.down ? 1.0 : control.enabled && (control.checked || control.highlighted) ? 0.5 : 0
- visible: control.down || (control.enabled && (control.checked || control.highlighted))
+ opacity: control.down ? 1.0 : 0.5
+ color: control.down || control.checked || control.highlighted ? control.palette.mid : control.palette.button
}
}
diff --git a/src/imports/controls/ToolSeparator.qml b/src/imports/controls/ToolSeparator.qml
index 3c588558..1a99953d 100644
--- a/src/imports/controls/ToolSeparator.qml
+++ b/src/imports/controls/ToolSeparator.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ToolSeparator {
id: control
@@ -52,6 +52,6 @@ T.ToolSeparator {
contentItem: Rectangle {
implicitWidth: vertical ? 1 : 30
implicitHeight: vertical ? 30 : 1
- color: Default.separatorColor
+ color: control.palette.mid
}
}
diff --git a/src/imports/controls/ToolTip.qml b/src/imports/controls/ToolTip.qml
index 587fc042..7682c07e 100644
--- a/src/imports/controls/ToolTip.qml
+++ b/src/imports/controls/ToolTip.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ToolTip {
id: control
@@ -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 3659e770..918144a0 100644
--- a/src/imports/controls/Tumbler.qml
+++ b/src/imports/controls/Tumbler.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Tumbler {
id: control
@@ -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/controls.pri b/src/imports/controls/controls.pri
index d7aedb4a..7840f6bf 100644
--- a/src/imports/controls/controls.pri
+++ b/src/imports/controls/controls.pri
@@ -1,24 +1,27 @@
HEADERS += \
- $$PWD/qquickdialring_p.h \
$$PWD/qquickdefaultbusyindicator_p.h \
+ $$PWD/qquickdefaultdial_p.h \
$$PWD/qquickdefaultprogressbar_p.h \
- $$PWD/qquickdefaultstyle_p.h
+ $$PWD/qquickdefaultstyle_p.h \
+ $$PWD/qquickdefaulttheme_p.h
SOURCES += \
- $$PWD/qquickdialring.cpp \
$$PWD/qquickdefaultbusyindicator.cpp \
+ $$PWD/qquickdefaultdial.cpp \
$$PWD/qquickdefaultprogressbar.cpp \
- $$PWD/qquickdefaultstyle.cpp
+ $$PWD/qquickdefaultstyle.cpp \
+ $$PWD/qquickdefaulttheme.cpp
QML_CONTROLS = \
$$PWD/AbstractButton.qml \
+ $$PWD/Action.qml \
+ $$PWD/ActionGroup.qml \
$$PWD/ApplicationWindow.qml \
$$PWD/BusyIndicator.qml \
$$PWD/Button.qml \
$$PWD/ButtonGroup.qml \
$$PWD/CheckBox.qml \
$$PWD/CheckDelegate.qml \
- $$PWD/CheckIndicator.qml \
$$PWD/ComboBox.qml \
$$PWD/Container.qml \
$$PWD/Control.qml \
@@ -32,6 +35,8 @@ QML_CONTROLS = \
$$PWD/ItemDelegate.qml \
$$PWD/Label.qml \
$$PWD/Menu.qml \
+ $$PWD/MenuBar.qml \
+ $$PWD/MenuBarItem.qml \
$$PWD/MenuItem.qml \
$$PWD/MenuSeparator.qml \
$$PWD/Page.qml \
@@ -41,7 +46,6 @@ QML_CONTROLS = \
$$PWD/ProgressBar.qml \
$$PWD/RadioButton.qml \
$$PWD/RadioDelegate.qml \
- $$PWD/RadioIndicator.qml \
$$PWD/RangeSlider.qml \
$$PWD/RoundButton.qml \
$$PWD/ScrollBar.qml \
@@ -52,7 +56,6 @@ QML_CONTROLS = \
$$PWD/StackView.qml \
$$PWD/SwipeDelegate.qml \
$$PWD/Switch.qml \
- $$PWD/SwitchIndicator.qml \
$$PWD/SwitchDelegate.qml \
$$PWD/SwipeView.qml \
$$PWD/TabBar.qml \
diff --git a/src/imports/controls/controls.pro b/src/imports/controls/controls.pro
index 8024bbf8..b75e4f56 100644
--- a/src/imports/controls/controls.pro
+++ b/src/imports/controls/controls.pro
@@ -1,6 +1,6 @@
TARGET = qtquickcontrols2plugin
TARGETPATH = QtQuick/Controls.2
-IMPORT_VERSION = 2.2
+IMPORT_VERSION = 2.3
QT += qml quick
QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
diff --git a/src/imports/controls/dependencies.json b/src/imports/controls/dependencies.json
index 4c9cfcd3..8cec519e 100644
--- a/src/imports/controls/dependencies.json
+++ b/src/imports/controls/dependencies.json
@@ -12,6 +12,6 @@
{
"name": "QtQuick.Templates",
"type": "module",
- "version": "2.2"
+ "version": "2.3"
}
]
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-applicationwindow-wireframe.png b/src/imports/controls/doc/images/qtquickcontrols2-applicationwindow-wireframe.png
index d9c8b261..522713bc 100644
--- a/src/imports/controls/doc/images/qtquickcontrols2-applicationwindow-wireframe.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-applicationwindow-wireframe.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-icononly.png b/src/imports/controls/doc/images/qtquickcontrols2-button-icononly.png
new file mode 100644
index 00000000..91a21d17
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-button-icononly.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-textbesideicon.png b/src/imports/controls/doc/images/qtquickcontrols2-button-textbesideicon.png
new file mode 100644
index 00000000..1d46133f
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-button-textbesideicon.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-textonly.png b/src/imports/controls/doc/images/qtquickcontrols2-button-textonly.png
new file mode 100644
index 00000000..4449e748
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-button-textonly.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-fusion-palettes.png b/src/imports/controls/doc/images/qtquickcontrols2-fusion-palettes.png
new file mode 100644
index 00000000..d649e137
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-fusion-palettes.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-fusion-thumbnail.png b/src/imports/controls/doc/images/qtquickcontrols2-fusion-thumbnail.png
new file mode 100644
index 00000000..d15fe970
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-fusion-thumbnail.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-fusion-violet.png b/src/imports/controls/doc/images/qtquickcontrols2-fusion-violet.png
new file mode 100644
index 00000000..4186a78f
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-fusion-violet.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-fusion.png b/src/imports/controls/doc/images/qtquickcontrols2-fusion.png
new file mode 100644
index 00000000..037069b5
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-fusion.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-4x.png b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-4x.png
new file mode 100644
index 00000000..426a72c4
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-4x.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-inset-boundaries.png b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-inset-boundaries.png
new file mode 100644
index 00000000..af078f9e
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-inset-boundaries.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-inset.png b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-inset.png
new file mode 100644
index 00000000..2f55b854
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-inset.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-resized-padding.png b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-resized-padding.png
new file mode 100644
index 00000000..003cb73d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-resized-padding.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-resized-stretchable.png b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-resized-stretchable.png
new file mode 100644
index 00000000..be3d8daa
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-resized-stretchable.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-size.png b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-size.png
new file mode 100644
index 00000000..5cc76d89
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch-size.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch.svgz b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch.svgz
new file mode 100644
index 00000000..5a1a1094
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine-9-patch.svgz
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine-customization-dark.png b/src/imports/controls/doc/images/qtquickcontrols2-imagine-customization-dark.png
new file mode 100644
index 00000000..d114d2cd
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine-customization-dark.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-imagine-customization.svgz b/src/imports/controls/doc/images/qtquickcontrols2-imagine-customization.svgz
new file mode 100644
index 00000000..fb830563
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-imagine-customization.svgz
Binary files differ
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/images/qtquickcontrols2-menu-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-menu-custom.png
index 7121fd0a..b631d871 100644
--- a/src/imports/controls/doc/images/qtquickcontrols2-menu-custom.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-menu-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-menubar-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-menubar-custom.png
new file mode 100644
index 00000000..3903e31d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-menubar-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-menubar.png b/src/imports/controls/doc/images/qtquickcontrols2-menubar.png
new file mode 100644
index 00000000..94e3676f
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-menubar.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-styles.png b/src/imports/controls/doc/images/qtquickcontrols2-styles.png
index aae046fd..39626e50 100644
--- a/src/imports/controls/doc/images/qtquickcontrols2-styles.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-styles.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..3d39e0a1
--- /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..da5b7e38 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(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/snippets/qtquickcontrols2-action.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-action.qml
new file mode 100644
index 00000000..1913e131
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-action.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+Item {
+ //! [action]
+ Action {
+ id: copyAction
+ text: qsTr("&Copy")
+ icon.name: "edit-copy"
+ shortcut: StandardKey.Copy
+ onTriggered: window.activeFocusItem.copy()
+ }
+ //! [action]
+
+ //! [toolbutton]
+ ToolButton {
+ id: toolButton
+ action: copyAction
+ }
+ //! [toolbutton]
+
+ //! [menuitem]
+ MenuItem {
+ id: menuItem
+ action: copyAction
+ text: qsTr("&Copy selected Text")
+ }
+ //! [menuitem]
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-button-icononly.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-button-icononly.qml
new file mode 100644
index 00000000..32b0797a
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-button-icononly.qml
@@ -0,0 +1,34 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+Button {
+ icon.source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png"
+ display: Button.IconOnly
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-button-textbesideicon.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-button-textbesideicon.qml
new file mode 100644
index 00000000..870da262
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-button-textbesideicon.qml
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+Button {
+ text: "Button"
+ icon.source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png"
+ display: Button.TextBesideIcon
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-button-textonly.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-button-textonly.qml
new file mode 100644
index 00000000..fe871639
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-button-textonly.qml
@@ -0,0 +1,34 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+Button {
+ text: "Button"
+ display: Button.TextOnly
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-menu-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-menu-custom.qml
index 7298b4d3..2d05b74a 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-menu-custom.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-menu-custom.qml
@@ -25,36 +25,109 @@
**
****************************************************************************/
-//! [file]
-import QtQuick 2.6
-import QtQuick.Controls 2.1
+import QtQuick 2.10
+import QtQuick.Controls 2.3
-Item {
+ApplicationWindow {
id: window
- width: menu.contentItem.width
- height: menu.contentItem.height
+ width: menu.width
+ height: menu.height
visible: true
+ Component.onCompleted: menu.popup(menu.itemAt(1))
+
// Indent it like this so that the indenting in the generated doc is normal.
Menu {
id: menu
- contentItem.parent: window
- background: Rectangle {
- implicitWidth: 200
- implicitHeight: 200
- color: "#ffffff"
- border.color: "#353637"
+
+ Action { text: qsTr("Tool Bar"); checkable: true }
+ Action { text: qsTr("Side Bar"); checkable: true; checked: true }
+ Action { text: qsTr("Status Bar"); checkable: true; checked: true }
+
+ MenuSeparator {
+ contentItem: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 1
+ color: "#21be2b"
+ }
}
- MenuItem {
- text: qsTr("New...")
+ Menu {
+ title: qsTr("Advanced")
+ // ...
}
- MenuItem {
- text: qsTr("Open...")
+
+ topPadding: 2
+ bottomPadding: 2
+
+ delegate: MenuItem {
+ id: menuItem
+ implicitWidth: 200
+ implicitHeight: 40
+
+ arrow: Canvas {
+ x: parent.width - width
+ implicitWidth: 40
+ implicitHeight: 40
+ visible: menuItem.subMenu
+ onPaint: {
+ var ctx = getContext("2d")
+ ctx.fillStyle = menuItem.highlighted ? "#ffffff" : "#21be2b"
+ ctx.moveTo(15, 15)
+ ctx.lineTo(width - 15, height / 2)
+ ctx.lineTo(15, height - 15)
+ ctx.closePath()
+ ctx.fill()
+ }
+ }
+
+ indicator: Item {
+ implicitWidth: 40
+ implicitHeight: 40
+ Rectangle {
+ width: 26
+ height: 26
+ anchors.centerIn: parent
+ visible: menuItem.checkable
+ border.color: "#21be2b"
+ radius: 3
+ Rectangle {
+ width: 14
+ height: 14
+ anchors.centerIn: parent
+ visible: menuItem.checked
+ color: "#21be2b"
+ radius: 2
+ }
+ }
+ }
+
+ contentItem: Text {
+ leftPadding: menuItem.indicator.width
+ rightPadding: menuItem.arrow.width
+ text: menuItem.text
+ font: menuItem.font
+ opacity: enabled ? 1.0 : 0.3
+ color: menuItem.highlighted ? "#ffffff" : "#21be2b"
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
+
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 40
+ opacity: enabled ? 1 : 0.3
+ color: menuItem.highlighted ? "#21be2b" : "transparent"
+ }
}
- MenuItem {
- text: qsTr("Save")
+
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 40
+ color: "#ffffff"
+ border.color: "#21be2b"
+ radius: 2
}
}
-}
-//! [file]
+} //! [eof]
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-menubar-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-menubar-custom.qml
new file mode 100644
index 00000000..513ad440
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-menubar-custom.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+ApplicationWindow {
+ id: window
+ visible: true
+ width: menuBar.implicitWidth
+ height: menuBar.height
+
+ Component.onCompleted: menuBar.itemAt(1).highlighted = true
+
+ header:
+
+// Indent it like this so that the indenting in the generated doc is normal.
+MenuBar {
+ id: menuBar
+
+ Menu { title: qsTr("File") }
+ Menu { title: qsTr("Edit") }
+ Menu { title: qsTr("View") }
+ Menu { title: qsTr("Help") }
+
+ delegate: MenuBarItem {
+ id: menuBarItem
+
+ contentItem: Text {
+ text: menuBarItem.text
+ font: menuBarItem.font
+ opacity: enabled ? 1.0 : 0.3
+ color: menuBarItem.highlighted ? "#ffffff" : "#21be2b"
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
+
+ background: Rectangle {
+ implicitWidth: 40
+ implicitHeight: 40
+ opacity: enabled ? 1 : 0.3
+ color: menuBarItem.highlighted ? "#21be2b" : "transparent"
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 40
+ implicitHeight: 40
+ color: "#ffffff"
+
+ Rectangle {
+ color: "#21be2b"
+ width: parent.width
+ height: 1
+ anchors.bottom: parent.bottom
+ }
+ }
+}
+} //! [eof]
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-menubar.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-menubar.qml
new file mode 100644
index 00000000..550680f6
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-menubar.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+//! [begin]
+ApplicationWindow {
+ id: window
+ width: 320
+ height: 260
+ visible: true
+
+ //! [skipfrom]
+ Component.onCompleted: {
+ menuBar.itemAt(0).triggered()
+ menuBar.itemAt(0).menu.itemAt(2).highlighted = true
+ }
+ //! [skipto]
+
+ menuBar: MenuBar {
+ Menu {
+ title: qsTr("&File")
+ Action { text: qsTr("&New...") }
+ Action { text: qsTr("&Open...") }
+ Action { text: qsTr("&Save") }
+ Action { text: qsTr("Save &As...") }
+ MenuSeparator { }
+ Action { text: qsTr("&Quit") }
+ }
+ Menu {
+ title: qsTr("&Edit")
+ Action { text: qsTr("Cu&t") }
+ Action { text: qsTr("&Copy") }
+ Action { text: qsTr("&Paste") }
+ }
+ Menu {
+ title: qsTr("&Help")
+ Action { text: qsTr("&About") }
+ }
+ }
+}
+//! [end]
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-policy.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-policy.qml
index 1862aa70..fdcef987 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-policy.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-policy.qml
@@ -25,7 +25,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
//! [1]
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-custom.qml
index e3d56a60..0d5686f3 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-custom.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-custom.qml
@@ -25,7 +25,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
Item {
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-interactive.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-interactive.qml
index 2485d363..9770de33 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-interactive.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-interactive.qml
@@ -25,7 +25,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
//! [file]
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-listview.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-listview.qml
index cf084425..b3eff14f 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-listview.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-listview.qml
@@ -25,7 +25,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
Item {
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-policy.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-policy.qml
index 853cbde6..efd23100 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-policy.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview-policy.qml
@@ -25,7 +25,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
//! [file]
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview.qml
index 0a76bfcd..74c0e85c 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollview.qml
@@ -25,7 +25,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
Rectangle {
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-stackview-visible.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-stackview-visible.qml
index 15717a7b..c80b6e4d 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-stackview-visible.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-stackview-visible.qml
@@ -25,7 +25,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
//! [1]
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml
index 82c2994b..a6936fe8 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml
@@ -25,7 +25,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
//! [1]
diff --git a/src/imports/controls/doc/src/includes/qquickicon.qdocinc b/src/imports/controls/doc/src/includes/qquickicon.qdocinc
new file mode 100644
index 00000000..a6ab90bb
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/qquickicon.qdocinc
@@ -0,0 +1,42 @@
+//! [grouped-properties]
+\table
+\header
+ \li Name
+ \li Description
+\row
+ \li name
+ \li This property holds the name of the icon to use.
+
+ The icon will be loaded from the platform theme. If the icon is found
+ in the theme, it will always be used; even if \l icon.source is also set.
+ If the icon is not found, \l icon.source will be used instead.
+
+ For more information on theme icons, see \l {QIcon::fromTheme()}.
+\row
+ \li source
+ \li This property holds the name of the icon to use.
+
+ The icon will be loaded as a regular image.
+
+ If \l icon.name is set and refers to a valid theme icon, it will always
+ be used instead of this property.
+\row
+ \li width
+ \li This property holds the width of the icon.
+
+ The icon's width will never exceed this value, though it will
+ shrink when necessary.
+\row
+ \li height
+ \li This property holds the height of the icon.
+
+ The icon's height will never exceed this value, though it will
+ shrink when necessary.
+\row
+ \li color
+ \li This property holds the color of the icon.
+
+ The icon is tinted with the specified color, unless the color is
+ set to \c "transparent".
+\endtable
+//! [grouped-properties]
diff --git a/src/imports/controls/doc/src/includes/qquickimaginestyle.qdocinc b/src/imports/controls/doc/src/includes/qquickimaginestyle.qdocinc
new file mode 100644
index 00000000..8acec2a8
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/qquickimaginestyle.qdocinc
@@ -0,0 +1,29 @@
+//! [conf]
+\table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \li \c Path
+ \li Specifies the \l {imagine-path-attached-prop}{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
+//! [conf]
+
+//! [env]
+\table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \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-configuration.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
index 36bce98d..33cfcdc8 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
@@ -53,16 +53,100 @@
Primary=BlueGrey
\endcode
- \l {Material style} specific values that can be specified in a \c Material
- section of the configuration file:
+ \section1 Imagine Style Configuration
+
+ The following table lists values that can be used to configure the
+ \l {Imagine style} in an \c Imagine section of the configuration file:
+
+ \include qquickimaginestyle.qdocinc conf
+
+ \section1 Material Style Configuration
+
+ The following table lists values that can be used to configure the
+ \l {Material style} in a \c Material section of the configuration file:
\include qquickmaterialstyle.qdocinc conf
- \l {Universal style} specific values that can be specified in a \c Universal
- section of the configuration file:
+ \section1 Universal Style Configuration
+
+ The following table lists values that can be used to configure the
+ \l {Universal style} in a \c Universal section of the configuration file:
\include qquickuniversalstyle.qdocinc conf
+ \section1 Font Configuration
+
+ The default \l {Control::font}{font} can be specified in a \c Font sub-group
+ in each style's section in the configuration file. The \c Font sub-group can
+ be defined in two alternative ways:
+
+ \code
+ [Default]
+ Font\Family=Open Sans
+ Font\PixelSize=20
+
+ [Material\Font]
+ Family=Open Sans
+ PixelSize=20
+ \endcode
+
+ Supported font attributes:
+ \table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \li \c Family
+ \li The \l {QFont::family}{font family}.
+ \row
+ \li \c PointSize
+ \li The \l {QFont::pointSizeF}{point size}.
+ \row
+ \li \c PixelSize
+ \li The \l {QFont::pixelSize}{pixel size}.
+ \row
+ \li \c StyleHint
+ \li The \l {QFont::styleHint}{style hint}.
+ Available values: \c SansSerif, \c Helvetica, \c Serif, \c Times, \c TypeWriter, \c Courier,
+ \c OldEnglish, \c Decorative, \c Monospace, \c Fantasy, \c Cursive.
+ \row
+ \li \c Weight
+ \li The \l {QFont::}{weight}. Qt uses a weighting scale from \c 0 to \c 99 similar to,
+ but not the same as, the scales used in Windows or CSS. A weight of \c 0 will be thin,
+ whilst \c 99 will be extremely black.
+ Available pre-defined weights: \c Thin (0), \c ExtraLight (12), \c Light (25), \c Normal (50),
+ \c Medium (57), \c DemiBold (63), \c Bold (75), \c ExtraBold (81),
+ \c Black (87).
+ \row
+ \li \c Style
+ \li The \l {QFont::}{style}.
+ Available values: \c StyleNormal, \c StyleItalic, \c StyleOblique.
+ \endtable
+
+ \section1 Palette Configuration
+
+ The default \l {Control::palette}{palette} can be specified in a \c Palette sub-group
+ in each style's section in the configuration file. The \c Palette sub-group can be
+ defined in two alternative ways:
+
+ \code
+ [Fusion]
+ Palette\Window=#dedede
+ Palette\WindowText=#212121
+ \endcode
+
+ or:
+ \code
+ [Fusion\Palette]
+ Window=#dedede
+ WindowText=#212121
+ \endcode
+
+ See \l {qtquickcontrols2-palette}{palette QML Basic Type} for a full list of supported
+ attributes.
+
+ \section1 Using the Configuration File in a Project
+
In order to make it possible for Qt Quick Controls 2 to find the configuration file,
it must be built into application's resources using the \l {The Qt Resource System}.
Here's an example \c .qrc file:
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
index c2b1e640..69e8bc59 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
@@ -542,41 +542,38 @@
\section2 Customizing Menu
- Menu consists of a \l {Popup::}{contentItem}.
+ \list
+ \li \l Menu consists of a visual \l {Popup::background}{background} item.
+ \li \l MenuItem consists of four visual items: \l {Control::background}{background},
+ \l {Control::contentItem}{content item}, \l {AbstractButton::}{indicator}, and
+ \l {MenuItem::}{arrow}.
+ \li \l MenuSeparator consists of a visual \l {Control::background}{background} and
+ \l {Control::contentItem}{content item}.
+ \endlist
+
+ \image qtquickcontrols2-menu-custom.png
\quotefromfile qtquickcontrols2-menu-custom.qml
- \skipto import QtQuick 2.6
- \printuntil import QtQuick.Controls 2.1
+ \skipto import QtQuick 2.10
+ \printuntil import QtQuick.Controls 2.3
\skipto Menu
- \printto contentItem.parent: window
- \skipline contentItem.parent: window
- \printuntil text: qsTr("Save")
- \printuntil }
- \printuntil }
-
+ \printto eof
- \section2 Customizing MenuItem
-
- MenuItem can be customized in the same manner as
- \l {Customizing Button}{Button}.
+ \section2 Customizing MenuBar
- \section2 Customizing MenuSeparator
+ MenuBar can have a visual \l {Control::background}{background} item,
+ and MenuBarItem consists of two visual items: \l {Control::background}
+ {background} and \l {Control::contentItem}{content item}.
- MenuSeparator consists of two visual items: \l {Control::background}{background}
- and \l {Control::contentItem}{content item}.
+ \image qtquickcontrols2-menubar-custom.png
- \image qtquickcontrols2-menuseparator-custom.png
+ \quotefromfile qtquickcontrols2-menubar-custom.qml
+ \skipto import QtQuick 2.10
+ \printuntil import QtQuick.Controls 2.3
+ \skipto MenuBar
+ \printto eof
- \quotefromfile qtquickcontrols2-menuseparator-custom.qml
- \skipto import QtQuick 2.6
- \printuntil import QtQuick.Controls 2.1
- \skipto Menu
- \printto contentItem.parent: window
- \skipline contentItem.parent: window
- \printuntil text: qsTr("Exit")
- \printuntil }
- \printuntil }
\section2 Customizing PageIndicator
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
index e6e2977f..c4416e14 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
@@ -203,15 +203,9 @@
\li Remarks
\row
\li \l [QML QtQuickControls] {Action}
- \li \mdash
+ \li \l [QML QtQuickControls2] {Action}
\li \l [QML QtQuick] {Shortcut} \br\sup {(Qt Quick)}
- \li \list
- \li \b {Qt Quick Controls 1}: \c Action is an abstract user interface
- action that is bound to buttons and menu items, and can provide
- shortcuts.
- \li \b {Qt Quick}: \c Shortcut provides the shortcut functionality that
- was previously only provided by \c Action.
- \endlist
+ \li
\row
\li \l [QML QtQuickControls] {ApplicationWindow}
\li \l [QML QtQuickControls2] {ApplicationWindow}
@@ -250,9 +244,10 @@
\row
\li \l [QML QtQuickControls] {ExclusiveGroup}
\li \mdash
- \li \l [QML QtQuickControls2] {ButtonGroup} \br\sup {(Qt Quick Controls 2)}
+ \li \l [QML QtQuickControls2] {ActionGroup},\br
+ \l [QML QtQuickControls2] {ButtonGroup} \br\sup {(Qt Quick Controls 2)}
\li \list
- \li \b {Qt Quick Controls 2}: \c ButtonGroup offers similar functionality.
+ \li \b {Qt Quick Controls 2}: \c ActionGroup and \c ButtonGroup offer similar functionality.
\endlist
\row
\li \l [QML QtQuickControls] {GroupBox}
@@ -287,12 +282,14 @@
\endlist
\row
\li \l [QML QtQuickControls] {MenuBar}
- \li \mdash
+ \li \l [QML QtQuickControls2] {MenuBar}
\li \l [QML QtLabsPlatform] {MenuBar} \br\sup {(Qt Labs Platform)}
\li \list
\li \b {Qt Quick Controls 1}: \c MenuBar is native on platforms where an
implementation is available in the Qt Platform Abstraction Layer. Other
platforms use a QML-based menubar item stacked at the top of the window.
+ \li \b {Qt Quick Controls 2}: \c MenuBar is a non-native QML-based menubar
+ that can be fully customized using QML and Qt Quick.
\li \b {Qt Labs Platform}: \c MenuBar is an \e experimental native menubar.
It is only available on platforms where a native implementation is available
in the Qt Platform Abstraction Layer.
@@ -521,6 +518,13 @@
\li
\row
\li \mdash
+ \li \l [QML QtQuickControls2] {ActionGroup}
+ \li \l [QML QtQuickControls] {ExclusiveGroup} \br\sup {(Qt Quick Controls 1)}
+ \li \list
+ \li \b {Qt Quick Controls 1}: \c ExclusiveGroup offers similar functionality.
+ \endlist
+ \row
+ \li \mdash
\li \l [QML QtQuickControls2] {ButtonGroup}
\li \l [QML QtQuickControls] {ExclusiveGroup} \br\sup {(Qt Quick Controls 1)}
\li \list
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
index 5652d8f5..39ee005b 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
@@ -63,6 +63,10 @@
The value can be set to \c 0 or \c 1 to disable or enable hover effects, respectively.
\endtable
+ \l {Imagine style} specific environment variables:
+
+ \include qquickimaginestyle.qdocinc env
+
\l {Material style} specific environment variables:
\include qquickmaterialstyle.qdocinc env
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-fusion.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-fusion.qdoc
new file mode 100644
index 00000000..4708a4be
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-fusion.qdoc
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-fusion.html
+ \title Fusion Style
+
+ The Fusion style is a desktop-oriented style.
+
+ The Fusion style is a platform-agnostic style that offers a desktop-oriented
+ look'n'feel. It implements the same design language as the \l {Qt Widget Gallery}
+ {Fusion style for Qt Widgets}.
+
+ \image qtquickcontrols2-fusion.png
+
+ To run an application with the Fusion style, see
+ \l {Using Styles in Qt Quick Controls 2}.
+
+ \note The Fusion style is not a native desktop style. The style runs on any
+ platform, and looks similar everywhere. Minor differences may occur due to
+ differences in the standard system palettes, available fonts, and font
+ rendering engines.
+
+ \section2 Customization
+
+ The Fusion style uses the standard system \l {Control::palette}{palettes}
+ to provide colors that match the desktop environment.
+
+ \image qtquickcontrols2-fusion-palettes.png
+
+ Custom palettes can be specified for any \l {Control::palette}{control},
+ \l {Popup::palette}{popup}, or \l {ApplicationWindow::palette}{application window}.
+ Explicit palette attributes are automatically propagated from parent to children,
+ overriding any system defaults for that attribute. In the following example,
+ the window and all three switches appear with a violet highlight color:
+
+ \table
+ \row
+ \li
+ \qml
+ import QtQuick 2.7
+ import QtQuick.Controls 2.3
+
+ ApplicationWindow {
+ visible: true
+
+ palette.highlight: "violet"
+
+ Column {
+ anchors.centerIn: parent
+
+ Switch { text: qsTr("First"); checked: true }
+ Switch { text: qsTr("Second"); checked: true }
+ Switch { text: qsTr("Third") }
+ }
+ }
+ \endqml
+ \li
+ \image qtquickcontrols2-fusion-violet.png
+ \endtable
+
+ \b {See also} \l {Default Style}, \l {Material Style}, \l {Universal Style}
+
+ \section1 Related Information
+
+ \list
+ \li \l{Styling Qt Quick Controls 2}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-icons.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-icons.qdoc
new file mode 100644
index 00000000..5e62a2ce
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-icons.qdoc
@@ -0,0 +1,169 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-icons.html
+ \title Icons in Qt Quick Controls 2
+
+ Qt Quick Controls 2.3 (Qt 5.10) introduced built-in support for icons. Buttons,
+ item delegates, and menu items are now capable of presenting an icon in addition
+ to a text label.
+
+ \section1 Using Icons
+
+ \l {AbstractButton::icon}{AbstractButton} and \l {Action::icon}{Action} provide
+ the following properties through which icons can be set:
+ \list
+ \li \c icon.name
+ \li \c icon.source
+ \li \c icon.width
+ \li \c icon.height
+ \li \c icon.color
+ \endlist
+
+ Theme icons are referenced by a name, and regular icons by a source URL. Both
+ \c icon.name and \c icon.source can be set to ensure that an icon will always
+ be found. If the icon is found in the theme, it will always be used; even if
+ \c icon.source is also set. If the icon is not found in the theme, \c icon.source
+ will be used instead.
+
+ \code
+ Button {
+ icon.name: "edit-cut"
+ icon.source: "images/cut.png"
+ }
+ \endcode
+
+ Each \l {Styling Qt Quick Controls 2}{Qt Quick Controls 2 style} requests a
+ default icon size and color according to their guidelines, but it is possible
+ to override these by setting the \c icon.width, \c icon.height, and \c icon.color
+ properties.
+
+ The image that is loaded by an icon whose \c width and \c height are not set
+ depends on the type of icon in use. For theme icons, the closest available size
+ will be chosen. For regular icons, the behavior is the same as the \l {Image::}
+ {sourceSize} property of \l Image.
+
+ The icon color is specified by default so that it matches the text color in
+ different states. In order to use an icon with the original colors, set the
+ color to \c "transparent".
+
+ \code
+ Button {
+ icon.color: "transparent"
+ icon.source: "images/logo.png"
+ }
+ \endcode
+
+ For buttons, the \l {AbstractButton::}{display} property can be used to control
+ how the icon and text are displayed within the button.
+
+ \section1 Icon Themes
+
+ Compliant icon themes must follow the freedesktop icon theme specification,
+ which can be obtained here: \l {http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html}.
+
+ Traditionally, only Linux and UNIX support icon themes on the platform level,
+ but it is possible to bundle a compliant icon theme in an application to use
+ themed icons on any platform.
+
+ The default \l {QIcon::themeSearchPaths()}{icon theme search paths} depend on
+ the platform. On Linux and UNIX, the search path will use the \c XDG_DATA_DIRS
+ environment variable if available. All platforms have the resource directory
+ \c :/icons as a fallback. Custom icon theme search paths can be set with
+ \l QIcon::setThemeSearchPaths().
+
+ The following example bundles an icon theme called \e mytheme into the application's
+ resources using \l {The Qt Resource System}{Qt's resource system}.
+
+ \badcode
+ <RCC>
+ <qresource prefix="/">
+ <file>icons/mytheme/index.theme</file>
+ <file>icons/mytheme/32x32/myicon.png</file>
+ <file>icons/mytheme/32x32@2/myicon.png</file>
+ </qresource>
+ </RCC>
+ \endcode
+
+ The \c index.theme file describes the general attributes of the icon theme, and
+ lists the available theme icon directories:
+
+ \badcode
+ [Icon Theme]
+ Name=mytheme
+ Comment=My Icon Theme
+
+ Directories=32x32,32x32@2
+
+ [32x32]
+ Size=32
+ Type=Fixed
+
+ [32x32@2]
+ Size=32
+ Scale=2
+ Type=Fixed
+ \endcode
+
+ In order to use the bundled icon theme, an application should call \l QIcon::setThemeName()
+ before loading the main QML file:
+
+ \code
+ #include <QGuiApplication>
+ #include <QQmlApplicationEngine>
+ #include <QIcon>
+
+ int main(int argc, char *argv[])
+ {
+ QGuiApplication app(argc, argv);
+
+ QIcon::setThemeName("mytheme"); // <--
+
+ QQmlApplicationEngine engine;
+ engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+ return app.exec();
+ }
+ \endcode
+
+ Now it is possible to use named icons from the bundled icon theme without having
+ to specify any fallback source:
+
+ \code
+ Button {
+ icon.name: "myicon"
+ }
+ \endcode
+
+ The \l {Qt Quick Controls 2 - Gallery}{Gallery example} and \l {Qt Quick Controls 2 - Wearable Demo}
+ {Wearable Demo} provide complete runnable applications with a bundled icon theme.
+
+ \section1 Related Information
+ \list
+ \li \l {High-DPI Support in Qt Quick Controls 2}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc
new file mode 100644
index 00000000..9f736e36
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc
@@ -0,0 +1,2450 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-imagine.html
+ \title Imagine Style
+
+ The Imagine Style is based on configurable image assets. \l{detailed-desc-imagine}{More...}
+
+ \styleimport {QtQuick.Controls.Imagine 2.3} {Qt 5.10}
+
+ \section1 Attached Properties
+
+ \list
+ \li \l {imagine-path-attached-prop}{\b path} : string
+ \endlist
+
+ \section1 Detailed Description
+ \target detailed-desc-imagine
+
+ The Imagine style is based on image assets. The style comes with a default
+ set of images, but the images can be easily changed by providing a directory
+ with images using a predefined naming convention.
+
+ \image qtquickcontrols2-imagine.png
+ \caption The Imagine style with the default images
+
+ To run an application with the Imagine style, see
+ \l {Using Styles in Qt Quick Controls 2}.
+
+ \section2 File Names
+
+ The image files are named using the following convention:
+
+ \c <control>-<element>-<states>
+
+ The \c <control> and \c <element> sections are mandatory, but the
+ \c <states> section is optional. For example, if a single file named
+ \c "button-background.9.png" is provided for \l {Button}, it will be used
+ for every state that \c Button supports. It is up to the developer to
+ decide the set of states that they will provide images for. However, it
+ is recommended to provide images for the most common control states where
+ possible, such as \c disabled, \c pressed, etc. This will ensure that
+ interactive controls visually behave as the end user would expect them to.
+
+ \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
+ that it expects. An element is an image that represents a certain visual
+ part of the control. For example, \c {Button}'s \c "background" element
+ represents its \l {Control::}{background}.
+
+ \table
+ \header
+ \li Control
+ \li Element
+ \li States
+ \li Extension
+ \row
+ \li \l ApplicationWindow
+ \li background
+ \li active
+ \li .9.png (or .png)
+ \row
+ \li
+ \li overlay
+ \li modal
+ \li .9.png (or .png)
+ \row
+ \li \l BusyIndicator
+ \li animation
+ \li disabled, running, mirrored, hovered
+ \li .webp
+ \row
+ \li
+ \li background
+ \li same as above
+ \li .webp
+ \row
+ \li \l Button
+ \li background
+ \li disabled, pressed, checked, checkable, focused, highlighted, flat, mirrored, hovered
+ \li .9.png
+ \row
+ \li \l CheckBox
+ \li background
+ \li disabled, pressed, checked, partially-checked, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li indicator
+ \li same as above
+ \li .png
+ \row
+ \li \l CheckDelegate
+ \li background
+ \li disabled, pressed, checked, partially-checked, focused, highlighted, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li indicator
+ \li same as above
+ \li .png
+ \row
+ \li \l ComboBox
+ \li background
+ \li disabled, pressed, editable, open, focused, mirrored, hovered, flat
+ \li .9.png (or .png)
+ \row
+ \li
+ \li indicator
+ \li same as above
+ \li .png
+ \row
+ \li
+ \li popup
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li \l DelayButton
+ \li background
+ \li disabled, pressed, checked, checkable, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li progress
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li
+ \li mask
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li \l Dial
+ \li background
+ \li disabled, pressed, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li handle
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li \l Dialog
+ \li background
+ \li modal, dim
+ \li .9.png (or .png)
+ \row
+ \li
+ \li title
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li
+ \li overlay
+ \li modal
+ \li .9.png (or .png)
+ \row
+ \li \l DialogButtonBox
+ \li background
+ \li disabled, mirrored
+ \li .9.png (or .png)
+ \row
+ \li \l Drawer
+ \li background
+ \li modal, dim, top, left, right, bottom
+ \li .9.png (or .png)
+ \row
+ \li
+ \li overlay
+ \li modal
+ \li .9.png (or .png)
+ \row
+ \li \l Frame
+ \li background
+ \li disabled, mirrored
+ \li .9.png (or .png)
+ \row
+ \li \l GroupBox
+ \li background
+ \li disabled, mirrored
+ \li .9.png (or .png)
+ \row
+ \li
+ \li title
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li \l ItemDelegate
+ \li background
+ \li disabled, pressed, focused, highlighted, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li \l Label
+ \li background
+ \li disabled, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li \l Menu
+ \li background
+ \li modal, dim
+ \li .9.png (or .png)
+ \row
+ \li
+ \li overlay
+ \li modal
+ \li .9.png (or .png)
+ \row
+ \li \l MenuItem
+ \li arrow
+ \li disabled, pressed, checked, focused, highlighted, mirrored, hovered
+ \li .png
+ \row
+ \li
+ \li background
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li
+ \li indicator
+ \li same as above
+ \li .png
+ \row
+ \li \l MenuSeparator
+ \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
+ \li .9.png (or .png)
+ \row
+ \li \l PageIndicator
+ \li background
+ \li disabled, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li delegate
+ \li disabled, pressed, current, mirrored, hovered
+ \li .png
+ \row
+ \li \l Pane
+ \li background
+ \li disabled, mirrored
+ \li .9.png (or .png)
+ \row
+ \li \l Popup
+ \li background
+ \li modal, dim
+ \li .9.png (or .png)
+ \row
+ \li
+ \li overlay
+ \li modal
+ \li .9.png (or .png)
+ \row
+ \li \l ProgressBar
+ \li animation
+ \li disabled, mirrored, hovered
+ \li .png
+ \row
+ \li
+ \li background
+ \li disabled, indeterminate, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li mask
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li
+ \li progress
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li \l RadioButton
+ \li background
+ \li disabled, pressed, checked, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li indicator
+ \li same as above
+ \li .png
+ \row
+ \li \l RadioDelegate
+ \li background
+ \li disabled, pressed, checked, focused, highlighted, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li indicator
+ \li same as above
+ \li .png
+ \row
+ \li \l RangeSlider
+ \li background
+ \li vertical, horizontal, disabled, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li \l RangeSlider
+ \li progress
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li
+ \li handle
+ \li first, second, vertical, horizontal, disabled, pressed, focused, mirrored, hovered
+ \li .png
+ \row
+ \li \l RoundButton
+ \li background
+ \li disabled, pressed, checked, checkable, focused, highlighted, flat, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li \l ScrollBar
+ \li background
+ \li vertical, horizontal, disabled, interactive, pressed, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li handle
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li \l ScrollIndicator
+ \li background
+ \li vertical, horizontal, disabled, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li handle
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li \l ScrollView
+ \li background
+ \li disabled, mirrored
+ \li .9.png (or .png)
+ \row
+ \li \l Slider
+ \li background
+ \li vertical, horizontal, disabled, pressed, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li handle
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li
+ \li progress
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li \l SpinBox
+ \li background
+ \li disabled, editable, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li editor
+ \li disabled, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li indicator
+ \li up, down, disabled, editable, pressed, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li \l StackView
+ \li background
+ \li disabled, mirrored
+ \li .9.png (or .png)
+ \row
+ \li \l SwipeDelegate
+ \li background
+ \li disabled, pressed, focused, highlighted, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li \l SwipeView
+ \li background
+ \li vertical, horizontal, disabled, interactive, focused, mirrored
+ \li .9.png (or .png)
+ \row
+ \li \l Switch
+ \li background
+ \li disabled, pressed, checked, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li handle
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li
+ \li indicator
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li \l SwitchDelegate
+ \li background
+ \li disabled, pressed, checked, focused, highlighted, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li
+ \li handle
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li
+ \li indicator
+ \li same as above
+ \li .9.png (or .png)
+ \row
+ \li \l TabBar
+ \li background
+ \li disabled, header, footer, mirrored
+ \li .9.png (or .png)
+ \row
+ \li \l TabButton
+ \li background
+ \li disabled, pressed, checked, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li \l TextArea
+ \li background
+ \li disabled, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li \l TextField
+ \li background
+ \li disabled, focused, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li \l ToolBar
+ \li background
+ \li disabled, header, footer, mirrored
+ \li .9.png (or .png)
+ \row
+ \li \l ToolButton
+ \li background
+ \li disabled, pressed, checked, checkable, focused, highlighted, flat, mirrored, hovered
+ \li .9.png (or .png)
+ \row
+ \li \l ToolSeparator
+ \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
+ \li .9.png (or .png)
+ \row
+ \li \l Tumbler
+ \li background
+ \li disabled, focused, mirrored, hovered
+ \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 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 \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 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 \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 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 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 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 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
+ {https://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch}{9-patch
+ images} in order to give designers control over how a particular element
+ responds to being resized. Here is an example of a 9-patch image that
+ represents a \l {Button}'s \l {Control::}{background}, alongside a
+ magnified version (to make it easier to see the 9-patch lines):
+
+ \image qtquickcontrols2-imagine-9-patch-4x.png
+
+ The content of the image is 44 pixels wide by 32 pixels high. Every 9-patch
+ image needs a one pixel thick border around every side, so the actual size
+ of the image becomes 46 pixels wide by 34 pixels high. The 9-patch lines
+ must be black, and the remaining areas must be transparent or white:
+
+ \image qtquickcontrols2-imagine-9-patch-size.png
+
+ \section3 Stretchable Areas
+
+ The 9-patch lines on the top and left edges determine which parts of the
+ image are stretched when it is resized.
+
+ Below are examples of the 9-patch image being resized to one and a half
+ times its original size in various dimensions:
+
+ \image qtquickcontrols2-imagine-9-patch-resized-stretchable.png
+
+ Notice how the the rounded corners keep their original size, as they are
+ outside the range of the lines.
+
+ \section3 Padding Areas
+
+ The 9-patch lines on the right and bottom edges determine how much space
+ is available for the control's \l {Control::}{contentItem}, which means it
+ can also be thought of as controlling the \l {Control::}{padding}. For a
+ diagram that illustrates padding, see \l {Control Layout}.
+
+ Below are more examples of the 9-patch image being resized, but this time
+ demonstrating how the padding 9-patch lines work.
+
+ \image qtquickcontrols2-imagine-9-patch-resized-padding.png
+
+ The \c contentItem can take up as much space as it needs within the shaded
+ areas. If the padding lines are left out, the \c contentItem will take as
+ much space as it needs without exceeding the stretchable areas.
+
+ \section3 Inset Areas
+
+ In some cases it is necessary for a control to have a drop shadow, for
+ example. However, if we were to add a drop shadow to the button above, it
+ would affect its size, which presents problems for both layouting and
+ mouse/touch input boundaries.
+
+ Inset areas accounts for this by telling the control that a certain area of
+ the 9-patch image should go outside of the control:
+
+ \image qtquickcontrols2-imagine-9-patch-inset.png
+
+ In the image below, the dashed line represents the button's clickable area,
+ as well as the space that it will take up in a layout. The shadow is marked
+ by the striped area behind it:
+
+ \image qtquickcontrols2-imagine-9-patch-inset-boundaries.png
+
+ \section2 Animated Images
+
+ The \l {https://developers.google.com/speed/webp/}{WebP} and GIF animated
+ image formats are supported by the Imagine style.
+
+ \section2 Palette
+
+ \section2 Customization
+
+ The Imagine style allows customizing the \l {imagine-path-attached-prop}{path}
+ that is used to do the image asset selection. The path can be specified for any
+ window or item, and it automatically propagates to children in the same manner as
+ \l {Control::font}{fonts}. In the following example, the window and all three radio
+ buttons appear with dark image assets (files that are located in "qrc:/themes/dark").
+
+ \table
+ \row
+ \li
+ \qml
+ import QtQuick 2.0
+ import QtQuick.Controls 2.3
+ import QtQuick.Controls.Imagine 2.3
+
+ ApplicationWindow {
+ visible: true
+
+ Imagine.path: "qrc:/themes/dark"
+
+ Column {
+ anchors.centerIn: parent
+
+ RadioButton { text: qsTr("Small") }
+ RadioButton { text: qsTr("Medium"); checked: true }
+ RadioButton { text: qsTr("Large") }
+ }
+ }
+ \endqml
+ \li
+ \image qtquickcontrols2-imagine-customization-dark.png
+ \endtable
+
+ In addition to specifying the path in QML, it is also possible to specify
+ it via an environment variable or in a configuration file. Attributes
+ specified in QML take precedence over all other methods.
+
+ \section3 Configuration File
+
+ \include qquickimaginestyle.qdocinc conf
+
+ See \l {Qt Quick Controls 2 Configuration File} for more details about the
+ configuration file.
+
+ \section3 Environment Variables
+
+ \include qquickimaginestyle.qdocinc env
+
+ See \l {Supported Environment Variables in Qt Quick Controls 2} for the full
+ list of supported environment variables.
+
+ \section2 Dependency
+
+ The Imagine style must be separately imported to gain access to the
+ attributes that are specific to the Imagine style. It should be noted
+ that regardless of the references to the Imagine style, the same
+ application code runs with any other style. Imagine-specific attributes
+ only have an effect when the application is run with the Imagine style.
+
+ If the Imagine style is imported in a QML file that is always loaded, the
+ Imagine style must be deployed with the application in order to be able
+ to run the application regardless of which style the application is run with.
+ By using \l {Using File Selectors with Qt Quick Controls 2}{file selectors},
+ style-specific tweaks can be applied without creating a hard dependency to
+ a style.
+
+ \b {See also} \l {Styling Qt Quick Controls 2}
+
+ \section1 Attached Property Documentation
+
+ \styleproperty {Imagine.path} {string} {imagine-path-attached-prop}
+ \target imagine-path-attached-prop
+ This attached property holds the path to the image assets...
+
+ \code
+ Button {
+ Imagine.path: "qrc:/themes/dark"
+ }
+ \endcode
+
+ \endstyleproperty
+
+ \section1 Related Information
+
+ \list
+ \li \l{Styling Qt Quick Controls 2}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
index 51d672f3..661266aa 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
@@ -46,7 +46,7 @@
application using the following import statement in your \c {.qml} file:
\code
- import QtQuick.Controls 2.2
+ import QtQuick.Controls 2.3
\endcode
The \l{Qt Quick Controls 2 C++ Classes}{C++ classes} can be included into
@@ -97,6 +97,11 @@
\li 2.2
\li 1.0
\row
+ \li 5.10
+ \li 2.10
+ \li 2.3
+ \li 1.0
+ \row
\li ...
\li ...
\li ...
@@ -108,6 +113,7 @@
\list
\li \l{Qt Quick Controls 2 Guidelines}{Guidelines}
\li \l{Styling Qt Quick Controls 2}{Styling}
+ \li \l{Icons in Qt Quick Controls 2}{Icons}
\li \l{Customizing Qt Quick Controls 2}{Customization}
\li \l{High-DPI Support in Qt Quick Controls 2}{High-DPI Support}
\li \l{Using File Selectors with Qt Quick Controls 2}{Using File Selectors}
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
index 0b3175d7..f1d1f1e6 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
@@ -32,7 +32,7 @@
The Material Style is based on the Google Material Design Guidelines.
\l{detailed-desc-material}{More...}
- \styleimport {QtQuick.Controls.Material 2.2} {Qt 5.7}
+ \styleimport {QtQuick.Controls.Material 2.3} {Qt 5.7}
\section1 Attached Properties
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-menus.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-menus.qdoc
index f4523260..43db2092 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-menus.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-menus.qdoc
@@ -45,11 +45,24 @@
right-clicking. It can also be used for popup menus; for example, a
menu that is shown after clicking a button.
- \l MenuItem is an item in the Menu control. Each item in a menu:
- \list
- \li displays text to the user
- \li allows checking/unchecking
- \li is highlighted (for example, on keyboard navigation)
- \li performs some action on activation
- \endlist
+ \l MenuItem is an item in the Menu control. Each item in a menu:
+ \list
+ \li displays text to the user
+ \li allows checking/unchecking
+ \li is highlighted (for example, on keyboard navigation)
+ \li performs some action on activation
+ \endlist
+
+ \section1 MenuBar Control
+
+ \image qtquickcontrols2-menubar.png
+
+ \l MenuBar control can be used for window menu bars.
+
+ \l MenuBarItem is an item in the MenuBar control. Each item in a menu bar:
+ \list
+ \li displays text to the user
+ \li is highlighted (for example, on keyboard navigation)
+ \li pops up the respective menu on activation
+ \endlist
*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-palette.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-palette.qdoc
new file mode 100644
index 00000000..e4bac54a
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-palette.qdoc
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \qmlbasictype palette
+ \brief a palette of colors.
+ \target qtquickcontrols2-palette
+
+ The \c palette type refers to a palette of colors for various roles.
+
+ Available properties:
+ \table
+ \header
+ \li Property
+ \li Description
+ \row
+ \li \b palette.alternateBase : color
+ \li Used as the alternate background color in item views with alternating row colors.
+ \row
+ \li \b palette.base : color
+ \li Used mostly as the background color for text editor controls and items views.
+ It is usually white or another light color.
+ \row
+ \li \b palette.brightText : color
+ \li A text color that is very different from \c palette.windowText, and contrasts
+ well with e.g. \c palette.dark. Typically used for text that needs to be drawn
+ where \c palette.text, \c palette.windowText or \c palette.buttonText would
+ give poor contrast, such as on highlighted buttons.
+ \row
+ \li \b palette.button : color
+ \li The general button background color. This background can be different from
+ \c palette.window as some styles require a different background color for buttons.
+ \row
+ \li \b palette.buttonText : color
+ \li A foreground color used with the \c palette.button color.
+ \row
+ \li \b palette.dark : color
+ \li Darker than \c palette.button.
+ \row
+ \li \b palette.highlight : color
+ \li A color to indicate a selected item or the current item.
+ \row
+ \li \b palette.highlightedText : color
+ \li A text color that contrasts with \c palette.highlight.
+ \row
+ \li \b palette.light : color
+ \li Lighter than \c palette.button.
+ \row
+ \li \b palette.link : color
+ \li A text color used for hyperlinks.
+ \row
+ \li \b palette.linkVisited : color
+ \li A text color used for already visited hyperlinks.
+ \row
+ \li \b palette.mid : color
+ \li Between \c palette.button and \c palette.dark.
+ \row
+ \li \b palette.midlight : color
+ \li Between \c palette.button and \c palette.light.
+ \row
+ \li \b palette.shadow : color
+ \li A very dark color.
+ \row
+ \li \b palette.text : color
+ \li The foreground color used with \c palette.base. This is usually the same as
+ the \c palette.windowText, in which case it must provide good contrast with
+ \c palette.window and \c palette.base.
+ \row
+ \li \b palette.toolTipBase : color
+ \li Used as the background color for tooltips.
+ \row
+ \li \b palette.toolTipText : color
+ \li Used as the foreground color for tooltips.
+ \row
+ \li \b palette.window : color
+ \li A general background color.
+ \row
+ \li \b palette.windowText : color
+ \li A general foreground color.
+ \endtable
+
+ \sa Control::palette, Popup::palette, ApplicationWindow::palette, QPalette::ColorRole
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
index 3b69da04..4bdccecc 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule QtQuick.Controls 2.2
+ \qmlmodule QtQuick.Controls 2.3
\title Qt Quick Controls 2 QML Types
\ingroup qmlmodules
\brief Provides QML types for user interfaces (Qt Quick Controls 2).
@@ -39,7 +39,7 @@
using the following import statement in your .qml file:
\badcode
- import QtQuick.Controls 2.2
+ import QtQuick.Controls 2.3
\endcode
\section1 QML Types
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
index f2df16ce..21eca464 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
@@ -39,6 +39,19 @@
The \l {Default Style} is a simple and light-weight all-round style that offers
the maximum performance for Qt Quick Controls 2.
+ \section2 Fusion Style
+
+ \image qtquickcontrols2-fusion-thumbnail.png
+ 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
@@ -120,6 +133,8 @@
\section1 Related Information
\list
\li \l {Default Style}
+ \li \l {Fusion Style}
+ \li \l {Imagine Style}
\li \l {Material Style}
\li \l {Universal Style}
\li \l {Using File Selectors with Qt Quick Controls 2}
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
index 4b5a2de2..8e88f345 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
@@ -32,7 +32,7 @@
The Universal Style is based on the Microsoft Universal Design Guidelines.
\l {detailed-desc-universal}{More...}
- \styleimport {QtQuick.Controls.Universal 2.2} {Qt 5.7}
+ \styleimport {QtQuick.Controls.Universal 2.3} {Qt 5.7}
\section1 Attached Properties
diff --git a/src/imports/controls/fusion/ApplicationWindow.qml b/src/imports/controls/fusion/ApplicationWindow.qml
new file mode 100644
index 00000000..80c4317b
--- /dev/null
+++ b/src/imports/controls/fusion/ApplicationWindow.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Window 2.2
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ApplicationWindow {
+ id: window
+
+ color: palette.window
+
+ overlay.modal: Rectangle {
+ color: Fusion.topShadow
+ }
+
+ overlay.modeless: Rectangle {
+ color: Fusion.topShadow
+ }
+}
diff --git a/src/imports/controls/fusion/BusyIndicator.qml b/src/imports/controls/fusion/BusyIndicator.qml
new file mode 100644
index 00000000..d0f2b531
--- /dev/null
+++ b/src/imports/controls/fusion/BusyIndicator.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.BusyIndicator {
+ id: control
+
+ implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
+ implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
+
+ padding: 6
+
+ contentItem: BusyIndicatorImpl {
+ implicitWidth: 28
+ implicitHeight: 28
+ color: control.palette.text
+
+ opacity: control.running ? 1 : 0
+ visible: control.running || opacityAnimator.running
+ Behavior on opacity { OpacityAnimator { id: opacityAnimator; duration: 250 } }
+
+ RotationAnimator on rotation {
+ running: control.running || opacityAnimator.running
+ from: 0
+ to: 360
+ duration: 1000
+ loops: Animation.Infinite
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/Button.qml b/src/imports/controls/fusion/Button.qml
new file mode 100644
index 00000000..1032446f
--- /dev/null
+++ b/src/imports/controls/fusion/Button.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Button {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 4
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.buttonText
+ }
+
+ background: ButtonPanel {
+ implicitWidth: 80
+ implicitHeight: 24
+
+ control: control
+ visible: !control.flat || control.down || control.checked || control.highlighted || control.visualFocus || control.hovered
+ }
+}
diff --git a/src/imports/controls/fusion/ButtonPanel.qml b/src/imports/controls/fusion/ButtonPanel.qml
new file mode 100644
index 00000000..801c2816
--- /dev/null
+++ b/src/imports/controls/fusion/ButtonPanel.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+Rectangle {
+ id: panel
+
+ property Item control
+ property bool highlighted: control.highlighted
+
+ visible: !control.flat || control.down || control.checked
+
+ color: Fusion.buttonColor(control.palette, panel.highlighted, control.down || control.checked, control.hovered)
+ gradient: control.down || control.checked ? null : buttonGradient
+
+ Gradient {
+ id: buttonGradient
+ GradientStop {
+ position: 0
+ color: Fusion.gradientStart(Fusion.buttonColor(control.palette, panel.highlighted, control.down, control.hovered))
+ }
+ GradientStop {
+ position: 1
+ color: Fusion.gradientStop(Fusion.buttonColor(control.palette, panel.highlighted, control.down, control.hovered))
+ }
+ }
+
+ radius: 2
+ border.color: Fusion.buttonOutline(control.palette, panel.highlighted || control.visualFocus, control.enabled)
+
+ Rectangle {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ border.color: Fusion.innerContrastLine
+ color: "transparent"
+ radius: 2
+ }
+}
diff --git a/src/imports/controls/fusion/CheckBox.qml b/src/imports/controls/fusion/CheckBox.qml
new file mode 100644
index 00000000..813d99b4
--- /dev/null
+++ b/src/imports/controls/fusion/CheckBox.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.CheckBox {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ indicator: CheckIndicator {
+ x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ color: control.palette.windowText
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+}
diff --git a/src/imports/controls/fusion/CheckDelegate.qml b/src/imports/controls/fusion/CheckDelegate.qml
new file mode 100644
index 00000000..e0b1611e
--- /dev/null
+++ b/src/imports/controls/fusion/CheckDelegate.qml
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.CheckDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ contentItem: IconLabel {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.highlighted ? Fusion.highlightedText(control.palette) : control.palette.text
+ }
+
+ indicator: CheckIndicator {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ control: control
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 20
+ color: control.down ? Fusion.buttonColor(control.palette, false, true, true)
+ : control.highlighted ? Fusion.highlight(control.palette) : control.palette.base
+ }
+}
diff --git a/src/imports/controls/fusion/CheckIndicator.qml b/src/imports/controls/fusion/CheckIndicator.qml
new file mode 100644
index 00000000..83ee9b3a
--- /dev/null
+++ b/src/imports/controls/fusion/CheckIndicator.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+Rectangle {
+ id: indicator
+
+ property Item control
+ readonly property color pressedColor: Fusion.mergedColors(control.palette.base, control.palette.windowText, 85)
+ readonly property color checkMarkColor: Qt.darker(control.palette.text, 1.2)
+
+ implicitWidth: 14
+ implicitHeight: 14
+
+ color: control.down ? indicator.pressedColor : control.palette.base
+ border.color: control.visualFocus ? Fusion.highlightedOutline(control.palette)
+ : Qt.lighter(Fusion.outline(control.palette), 1.1)
+
+ Rectangle {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: 1
+ color: Fusion.topShadow
+ visible: control.enabled && !control.down
+ }
+
+ ColorImage {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ color: Color.transparent(indicator.checkMarkColor, 210 / 255)
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/checkmark.png"
+ visible: control.checkState === Qt.Checked || (control.checked && control.checkState === undefined)
+ }
+
+ Rectangle {
+ x: 3; y: 3
+ width: parent.width - 6
+ height: parent.width - 6
+
+ visible: control.checkState === Qt.PartiallyChecked
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Color.transparent(indicator.checkMarkColor, 80 / 255)
+ }
+ GradientStop {
+ position: 1
+ color: Color.transparent(indicator.checkMarkColor, 140 / 255)
+ }
+ }
+ border.color: Color.transparent(indicator.checkMarkColor, 180 / 255)
+ }
+}
diff --git a/src/imports/controls/fusion/ComboBox.qml b/src/imports/controls/fusion/ComboBox.qml
new file mode 100644
index 00000000..fefa1131
--- /dev/null
+++ b/src/imports/controls/fusion/ComboBox.qml
@@ -0,0 +1,177 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Window 2.3
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ComboBox {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
+ rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
+
+ delegate: MenuItem {
+ width: parent.width
+ text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
+ highlighted: control.highlightedIndex === index
+ hoverEnabled: control.hoverEnabled
+ }
+
+ indicator: ColorImage {
+ x: control.mirrored ? control.padding : control.width - width - control.padding
+ y: control.topPadding + (control.availableHeight - height) / 2
+ color: control.editable ? control.palette.text : control.palette.buttonText
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/arrow.png"
+ width: 20
+ fillMode: Image.Pad
+ }
+
+ contentItem: T.TextField {
+ topPadding: 4
+ leftPadding: 4 - control.padding
+ rightPadding: 4 - control.padding
+ bottomPadding: 4
+
+ text: control.editable ? control.editText : control.displayText
+
+ enabled: control.editable
+ autoScroll: control.editable
+ readOnly: control.popup.visible
+ inputMethodHints: control.inputMethodHints
+ validator: control.validator
+
+ font: control.font
+ color: control.editable ? control.palette.text : control.palette.buttonText
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ background: PaddedRectangle {
+ clip: true
+ radius: 2
+ padding: 1
+ leftPadding: control.mirrored ? -2 : padding
+ rightPadding: !control.mirrored ? -2 : padding
+ color: control.palette.base
+ visible: control.editable && !control.flat
+
+ Rectangle {
+ x: parent.width - width
+ y: 1
+ width: 1
+ height: parent.height - 2
+ color: Fusion.buttonOutline(control.palette, control.activeFocus, control.enabled)
+ }
+
+ Rectangle {
+ x: 1
+ y: 1
+ width: parent.width - 3
+ height: 1
+ color: Fusion.topShadow
+ }
+ }
+
+ Rectangle {
+ x: 1 - control.leftPadding
+ y: 1
+ width: control.width - 2
+ height: control.height - 2
+ color: "transparent"
+ border.color: Color.transparent(Fusion.highlightedOutline(control.palette), 40 / 255)
+ visible: control.activeFocus
+ radius: 1.7
+ }
+ }
+
+ background: ButtonPanel {
+ implicitWidth: 120
+ implicitHeight: 24
+
+ control: control
+ visible: !control.flat || control.down
+ // ### TODO: fix control.contentItem.activeFocus
+ highlighted: control.visualFocus || control.contentItem.activeFocus
+ }
+
+ popup: T.Popup {
+ id: popup
+ width: control.width
+ height: Math.min(contentItem.implicitHeight + 2, control.Window.height - topMargin - bottomMargin)
+ topMargin: 6
+ bottomMargin: 6
+ palette: control.palette
+ padding: 1
+
+ contentItem: ListView {
+ clip: true
+ implicitHeight: contentHeight
+ model: control.popup.visible ? control.delegateModel : null
+ currentIndex: control.highlightedIndex
+ highlightRangeMode: ListView.ApplyRange
+ highlightMoveDuration: 0
+
+ T.ScrollBar.vertical: ScrollBar { }
+ }
+
+ background: Rectangle {
+ color: popup.palette.window
+ border.color: Fusion.outline(control.palette)
+
+ Rectangle {
+ z: -1
+ x: 1; y: 1
+ width: parent.width
+ height: parent.height
+ color: control.palette.shadow
+ opacity: 0.2
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/DelayButton.qml b/src/imports/controls/fusion/DelayButton.qml
new file mode 100644
index 00000000..abeda360
--- /dev/null
+++ b/src/imports/controls/fusion/DelayButton.qml
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.DelayButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+
+ transition: Transition {
+ NumberAnimation {
+ duration: control.delay * (control.pressed ? 1.0 - control.progress : 0.3 * control.progress)
+ }
+ }
+
+ contentItem: Item {
+ implicitWidth: label.implicitWidth
+ implicitHeight: label.implicitHeight
+
+ Item {
+ x: -control.leftPadding + (control.mirrored ? 0 : control.progress * control.width)
+ width: control.width
+ height: parent.height
+
+ clip: control.progress > 0
+ visible: control.mirrored ? control.progress > 0 : control.progress < 1
+
+ Text {
+ id: label
+ x: -parent.x
+ width: control.availableWidth
+ height: parent.height
+
+ text: control.text
+ font: control.font
+ color: control.mirrored ? control.palette.brightText : control.palette.buttonText
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
+ }
+
+ Item {
+ x: -control.leftPadding
+ width: (control.mirrored ? 1.0 - control.progress : control.progress) * control.width
+ height: parent.height
+
+ clip: control.progress > 0
+ visible: control.mirrored ? control.progress < 1 : control.progress > 0
+
+ Text {
+ x: -parent.x
+ width: control.availableWidth
+ height: parent.height
+
+ text: control.text
+ font: control.font
+ color: control.mirrored ? control.palette.buttonText : control.palette.brightText
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
+ }
+ }
+
+ background: ButtonPanel {
+ implicitWidth: 80
+ implicitHeight: 24
+
+ control: control
+ highlighted: false
+ scale: control.mirrored ? -1 : 1
+
+ Rectangle {
+ width: control.progress * parent.width
+ height: parent.height
+
+ radius: 2
+ border.color: Qt.darker(Fusion.highlight(control.palette), 1.4)
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Qt.lighter(Fusion.highlight(control.palette), 1.2)
+ }
+ GradientStop {
+ position: 1
+ color: Fusion.highlight(control.palette)
+ }
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/Dial.qml b/src/imports/controls/fusion/Dial.qml
new file mode 100644
index 00000000..e1df1740
--- /dev/null
+++ b/src/imports/controls/fusion/Dial.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Dial {
+ id: control
+
+ implicitWidth: 100
+ implicitHeight: 100
+
+ background: DialImpl {
+ palette: control.palette
+ highlight: control.visualFocus
+ }
+
+ handle: KnobImpl {
+ x: background.x + background.width / 2 - handle.width / 2
+ y: background.y + background.height / 2 - handle.height / 2
+ width: control.width / 7
+ height: control.height / 7
+ palette: control.palette
+ transform: [
+ Translate {
+ y: -Math.min(background.width, background.height) * 0.42 + handle.height
+ },
+ Rotation {
+ angle: control.angle
+ origin.x: handle.width / 2
+ origin.y: handle.height / 2
+ }
+ ]
+ }
+}
diff --git a/src/imports/controls/fusion/Dialog.qml b/src/imports/controls/fusion/Dialog.qml
new file mode 100644
index 00000000..098bd21c
--- /dev/null
+++ b/src/imports/controls/fusion/Dialog.qml
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Dialog {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ header && header.visible ? header.implicitWidth : 0,
+ footer && footer.visible ? footer.implicitWidth : 0,
+ contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ (header && header.visible ? header.implicitHeight + spacing : 0)
+ + (footer && footer.visible ? footer.implicitHeight + spacing : 0)
+ + (contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0))
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ padding: 6
+
+ background: Rectangle {
+ color: control.palette.window
+ border.color: control.palette.mid
+ radius: 2
+
+ Rectangle {
+ z: -1
+ x: 1; y: 1
+ width: parent.width
+ height: parent.height
+ color: control.palette.shadow
+ opacity: 0.2
+ radius: 2
+ }
+ }
+
+ header: Label {
+ text: control.title
+ visible: control.title
+ elide: Label.ElideRight
+ font.bold: true
+ padding: 6
+ background: Rectangle {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 1
+ color: control.palette.window
+ radius: 2
+ }
+ }
+
+ footer: DialogButtonBox {
+ visible: count > 0
+ }
+
+ T.Overlay.modal: Rectangle {
+ color: Fusion.topShadow
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Fusion.topShadow
+ }
+}
diff --git a/src/imports/controls/fusion/DialogButtonBox.qml b/src/imports/controls/fusion/DialogButtonBox.qml
new file mode 100644
index 00000000..d2085e94
--- /dev/null
+++ b/src/imports/controls/fusion/DialogButtonBox.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.DialogButtonBox {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ spacing: 6
+ padding: 6
+ alignment: Qt.AlignRight
+
+ delegate: Button { }
+
+ contentItem: ListView {
+ implicitWidth: contentWidth
+ implicitHeight: 24
+
+ model: control.contentModel
+ spacing: control.spacing
+ orientation: ListView.Horizontal
+ boundsBehavior: Flickable.StopAtBounds
+ snapMode: ListView.SnapToItem
+ }
+
+ background: Rectangle {
+ implicitHeight: 32
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ color: control.palette.window
+ radius: 2
+ }
+}
diff --git a/src/imports/controls/fusion/Drawer.qml b/src/imports/controls/fusion/Drawer.qml
new file mode 100644
index 00000000..b209c6f9
--- /dev/null
+++ b/src/imports/controls/fusion/Drawer.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Drawer {
+ id: control
+
+ parent: T.Overlay.overlay
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: control.edge === Qt.BottomEdge
+ leftPadding: control.edge === Qt.RightEdge
+ rightPadding: control.edge === Qt.LeftEdge
+ bottomPadding: control.edge === Qt.TopEdge
+
+ enter: Transition { SmoothedAnimation { velocity: 5 } }
+ exit: Transition { SmoothedAnimation { velocity: 5 } }
+
+ background: Rectangle {
+ color: control.palette.window
+ readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge
+ Rectangle {
+ width: parent.horizontal ? 1 : parent.width
+ height: parent.horizontal ? parent.height : 1
+ color: control.palette.mid
+ x: control.edge === Qt.LeftEdge ? parent.width - 1 : 0
+ y: control.edge === Qt.TopEdge ? parent.height - 1 : 0
+ }
+ Rectangle {
+ width: parent.horizontal ? 1 : parent.width
+ height: parent.horizontal ? parent.height : 1
+ color: control.palette.shadow
+ opacity: 0.2
+ x: control.edge === Qt.LeftEdge ? parent.width : 0
+ y: control.edge === Qt.TopEdge ? parent.height : 0
+ }
+ }
+
+ T.Overlay.modal: Rectangle {
+ color: Fusion.topShadow
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Fusion.topShadow
+ }
+}
diff --git a/src/imports/controls/fusion/Frame.qml b/src/imports/controls/fusion/Frame.qml
new file mode 100644
index 00000000..faefe1ad
--- /dev/null
+++ b/src/imports/controls/fusion/Frame.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Frame {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ padding: 9
+
+ background: Rectangle {
+ color: "transparent"
+ border.color: Qt.lighter(Fusion.outline(control.palette), 1.08)
+ }
+}
diff --git a/src/imports/controls/fusion/GroupBox.qml b/src/imports/controls/fusion/GroupBox.qml
new file mode 100644
index 00000000..16fbfbdb
--- /dev/null
+++ b/src/imports/controls/fusion/GroupBox.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.GroupBox {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ label ? label.implicitWidth + leftPadding + rightPadding : 0,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ spacing: 6
+ padding: 9
+ topPadding: padding + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0)
+
+ label: Text {
+ x: control.leftPadding
+ width: control.availableWidth
+
+ text: control.title
+ font: control.font
+ color: control.palette.windowText
+ elide: Text.ElideRight
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: Rectangle {
+ y: control.topPadding - control.padding
+ width: parent.width
+ height: parent.height - control.topPadding + control.padding
+
+ radius: 2
+ color: Color.transparent("black", 3 / 255)
+ border.color: Qt.lighter(Fusion.outline(control.palette), 1.08)
+ }
+}
diff --git a/src/imports/controls/fusion/ItemDelegate.qml b/src/imports/controls/fusion/ItemDelegate.qml
new file mode 100644
index 00000000..cf7167fc
--- /dev/null
+++ b/src/imports/controls/fusion/ItemDelegate.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ItemDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.highlighted ? Fusion.highlightedText(control.palette) : control.palette.text
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 20
+ color: control.down ? Fusion.buttonColor(control.palette, false, true, true)
+ : control.highlighted ? Fusion.highlight(control.palette) : control.palette.base
+ }
+}
diff --git a/src/imports/controls/fusion/Label.qml b/src/imports/controls/fusion/Label.qml
new file mode 100644
index 00000000..92881b4d
--- /dev/null
+++ b/src/imports/controls/fusion/Label.qml
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Label {
+ id: control
+
+ color: control.palette.windowText
+ linkColor: control.palette.link
+}
diff --git a/src/imports/controls/fusion/Menu.qml b/src/imports/controls/fusion/Menu.qml
new file mode 100644
index 00000000..a767354c
--- /dev/null
+++ b/src/imports/controls/fusion/Menu.qml
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Menu {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding
+
+ margins: 0
+ padding: 1
+ overlap: 2
+
+ delegate: MenuItem { }
+
+ contentItem: ListView {
+ implicitHeight: contentHeight
+ model: control.contentModel
+ // TODO: improve this?
+ interactive: ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false
+ clip: true
+ currentIndex: control.currentIndex
+
+ ScrollIndicator.vertical: ScrollIndicator {}
+ }
+
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 20
+
+ color: control.palette.base
+ border.color: Fusion.outline(control.palette)
+
+ Rectangle {
+ z: -1
+ x: 1; y: 1
+ width: parent.width
+ height: parent.height
+ color: control.palette.shadow
+ opacity: 0.2
+ }
+ }
+
+ T.Overlay.modal: Rectangle {
+ color: Fusion.topShadow
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Fusion.topShadow
+ }
+}
diff --git a/src/imports/controls/fusion/MenuBar.qml b/src/imports/controls/fusion/MenuBar.qml
new file mode 100644
index 00000000..061e718b
--- /dev/null
+++ b/src/imports/controls/fusion/MenuBar.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.MenuBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight + topPadding + bottomPadding)
+
+ delegate: MenuBarItem { }
+
+ contentItem: Row {
+ spacing: control.spacing
+ Repeater {
+ model: control.contentModel
+ }
+ }
+
+ background: Rectangle {
+ implicitHeight: 20
+
+ color: control.palette.window
+
+ Rectangle {
+ y: parent.height - height
+ width: parent.width
+ height: 1
+ color: Fusion.mergedColors(Qt.darker(control.palette.window, 1.2),
+ Qt.lighter(Fusion.outline(control.palette), 1.4), 60)
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/MenuBarItem.qml b/src/imports/controls/fusion/MenuBarItem.qml
new file mode 100644
index 00000000..6a23484a
--- /dev/null
+++ b/src/imports/controls/fusion/MenuBarItem.qml
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.MenuBarItem {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.down || control.highlighted ? Fusion.highlightedText(control.palette) : control.palette.text
+ }
+
+ background: Rectangle {
+ implicitWidth: 20
+ implicitHeight: 20
+
+ color: Fusion.highlight(control.palette)
+ visible: control.down || control.highlighted
+ }
+}
diff --git a/src/imports/controls/fusion/MenuItem.qml b/src/imports/controls/fusion/MenuItem.qml
new file mode 100644
index 00000000..21f42c53
--- /dev/null
+++ b/src/imports/controls/fusion/MenuItem.qml
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.MenuItem {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ contentItem: IconLabel {
+ readonly property real arrowPadding: control.subMenu && control.arrow ? control.arrow.width + control.spacing : 0
+ readonly property real indicatorPadding: control.checkable && control.indicator ? control.indicator.width + control.spacing : 0
+ leftPadding: !control.mirrored ? indicatorPadding : arrowPadding
+ rightPadding: control.mirrored ? indicatorPadding : arrowPadding
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.down || control.highlighted ? Fusion.highlightedText(control.palette) : control.palette.text
+ }
+
+ arrow: ColorImage {
+ x: control.mirrored ? control.padding : control.width - width - control.padding
+ y: control.topPadding + (control.availableHeight - height) / 2
+ width: 20
+
+ visible: control.subMenu
+ rotation: control.mirrored ? 90 : -90
+ color: control.down || control.hovered || control.highlighted ? Fusion.highlightedText(control.palette) : control.palette.text
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/arrow.png"
+ fillMode: Image.Pad
+ }
+
+ indicator: CheckIndicator {
+ x: control.mirrored ? control.width - width - control.rightPadding : control.leftPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ control: control
+ visible: control.checkable
+ }
+
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 20
+
+ color: Fusion.highlight(control.palette)
+ visible: control.down || control.highlighted
+ }
+}
diff --git a/src/imports/controls/fusion/MenuSeparator.qml b/src/imports/controls/fusion/MenuSeparator.qml
new file mode 100644
index 00000000..8bee8f65
--- /dev/null
+++ b/src/imports/controls/fusion/MenuSeparator.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.MenuSeparator {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding)
+
+ padding: 5
+ topPadding: 1
+ bottomPadding: 1
+
+ contentItem: Rectangle {
+ implicitWidth: 188
+ implicitHeight: 1
+ color: Qt.lighter(Fusion.darkShade, 1.06)
+ }
+}
diff --git a/src/imports/controls/fusion/Page.qml b/src/imports/controls/fusion/Page.qml
new file mode 100644
index 00000000..7c6cb934
--- /dev/null
+++ b/src/imports/controls/fusion/Page.qml
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Page {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ Math.max(contentWidth,
+ header && header.visible ? header.implicitWidth : 0,
+ footer && footer.visible ? footer.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight + topPadding + bottomPadding
+ + (header && header.visible ? header.implicitHeight + spacing : 0)
+ + (footer && footer.visible ? footer.implicitHeight + spacing : 0))
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ background: Rectangle {
+ color: palette.window
+ }
+}
diff --git a/src/imports/controls/fusion/PageIndicator.qml b/src/imports/controls/fusion/PageIndicator.qml
new file mode 100644
index 00000000..ff3a935b
--- /dev/null
+++ b/src/imports/controls/fusion/PageIndicator.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.PageIndicator {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ padding: 4
+ spacing: 4
+
+ delegate: Rectangle {
+ implicitWidth: 6
+ implicitHeight: 6
+
+ radius: width / 2
+ color: control.palette.shadow
+
+ opacity: index === currentIndex ? 0.95 : pressed ? 0.75 : 0.45
+ Behavior on opacity { OpacityAnimator { duration: 100 } }
+ }
+
+ contentItem: Row {
+ spacing: control.spacing
+
+ Repeater {
+ model: control.count
+ delegate: control.delegate
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/Pane.qml b/src/imports/controls/fusion/Pane.qml
new file mode 100644
index 00000000..b91e5414
--- /dev/null
+++ b/src/imports/controls/fusion/Pane.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Pane {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ padding: 9
+
+ background: Rectangle {
+ color: palette.window
+ }
+}
diff --git a/src/imports/controls/fusion/Popup.qml b/src/imports/controls/fusion/Popup.qml
new file mode 100644
index 00000000..4d3031eb
--- /dev/null
+++ b/src/imports/controls/fusion/Popup.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Popup {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ padding: 6
+
+ background: Rectangle {
+ color: control.palette.window
+ border.color: control.palette.mid
+ radius: 2
+ }
+
+ T.Overlay.modal: Rectangle {
+ color: Fusion.topShadow
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Fusion.topShadow
+ }
+}
diff --git a/src/imports/controls/fusion/ProgressBar.qml b/src/imports/controls/fusion/ProgressBar.qml
new file mode 100644
index 00000000..f7e21809
--- /dev/null
+++ b/src/imports/controls/fusion/ProgressBar.qml
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ProgressBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem ? contentItem.implicitHeight + topPadding + bottomPadding : 0)
+
+ contentItem: Item {
+ implicitWidth: 120
+ implicitHeight: 24
+ scale: control.mirrored ? -1 : 1
+
+ Rectangle {
+ height: parent.height
+ width: (control.indeterminate ? 1.0 : control.position) * parent.width
+
+ radius: 2
+ border.color: Qt.darker(Fusion.highlight(control.palette), 1.4)
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Qt.lighter(Fusion.highlight(control.palette), 1.2)
+ }
+ GradientStop {
+ position: 1
+ color: Fusion.highlight(control.palette)
+ }
+ }
+ }
+
+ Item {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ visible: control.indeterminate
+ clip: true
+
+ ColorImage {
+ id: mask
+ width: Math.ceil(parent.width / implicitWidth + 1) * implicitWidth
+ height: parent.height
+
+ mirror: control.mirrored
+ fillMode: Image.TileHorizontally
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/progressmask.png"
+ color: Color.transparent(Qt.lighter(Fusion.highlight(control.palette), 1.2), 160 / 255)
+
+ visible: control.indeterminate
+ NumberAnimation on x {
+ running: control.indeterminate && control.visible
+ from: -mask.implicitWidth
+ to: 0
+ loops: Animation.Infinite
+ duration: 750
+ }
+ }
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 120
+ implicitHeight: 24
+
+ radius: 2
+ color: control.palette.base
+ border.color: Fusion.outline(control.palette)
+
+ Rectangle {
+ x: 1; y: 1; height: 1
+ width: parent.width - 2
+ color: Fusion.topShadow
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/RadioButton.qml b/src/imports/controls/fusion/RadioButton.qml
new file mode 100644
index 00000000..c9484c7d
--- /dev/null
+++ b/src/imports/controls/fusion/RadioButton.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.RadioButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ indicator: RadioIndicator {
+ x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ color: control.palette.windowText
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+}
diff --git a/src/imports/controls/fusion/RadioDelegate.qml b/src/imports/controls/fusion/RadioDelegate.qml
new file mode 100644
index 00000000..9b7df468
--- /dev/null
+++ b/src/imports/controls/fusion/RadioDelegate.qml
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.RadioDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ contentItem: IconLabel {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.highlighted ? Fusion.highlightedText(control.palette) : control.palette.text
+ }
+
+ indicator: RadioIndicator {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ control: control
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 20
+ color: control.down ? Fusion.buttonColor(control.palette, false, true, true)
+ : control.highlighted ? Fusion.highlight(control.palette) : control.palette.base
+ }
+}
diff --git a/src/imports/controls/CheckIndicator.qml b/src/imports/controls/fusion/RadioIndicator.qml
index 0be3e6cd..2aceab2e 100644
--- a/src/imports/controls/CheckIndicator.qml
+++ b/src/imports/controls/fusion/RadioIndicator.qml
@@ -34,42 +34,45 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
Rectangle {
id: indicator
property Item control
+ readonly property color pressedColor: Fusion.mergedColors(control.palette.base, control.palette.windowText, 85)
+ readonly property color checkMarkColor: Qt.darker(control.palette.text, 1.2)
- implicitWidth: 28
- implicitHeight: 28
+ implicitWidth: 14
+ implicitHeight: 14
- color: control.enabled ? (control.down
- ? (control.visualFocus ? Default.focusPressedColor : Default.indicatorPressedColor)
- : Default.backgroundColor) : Default.disabledDarkColor
- border.width: control.visualFocus ? 2 : 1
- border.color: control.enabled ? (control.visualFocus
- ? Default.focusColor
- : (control.down ? Default.indicatorFramePressedColor : Default.indicatorFrameColor)) : "transparent"
- opacity: enabled ? 1 : 0.3
+ radius: width / 2
+ color: control.down ? indicator.pressedColor : control.palette.base
+ border.color: control.visualFocus ? Fusion.highlightedOutline(control.palette)
+ : Qt.darker(control.palette.window, 1.5)
- Image {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- source: "image://default/check/" + (control.visualFocus ? Default.focusColor : Default.textColor)
- sourceSize.width: width
- sourceSize.height: height
- visible: control.checkState === Qt.Checked
+ Rectangle {
+ y: 1
+ width: parent.width
+ height: parent.height - 1
+ radius: width / 2
+ color: "transparent"
+ border.color: Fusion.topShadow
+ visible: control.enabled && !control.down
}
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
- width: 16
- height: 3
- color: control.visualFocus ? Default.focusColor : Default.frameDarkColor
- visible: control.checkState === Qt.PartiallyChecked
+ width: parent.width / 2.32
+ height: parent.height / 2.32
+ radius: width / 2
+ color: Color.transparent(indicator.checkMarkColor, 180 / 255)
+ border.color: Color.transparent(indicator.checkMarkColor, 200 / 255)
+ visible: control.checked
}
}
diff --git a/src/imports/controls/fusion/RangeSlider.qml b/src/imports/controls/fusion/RangeSlider.qml
new file mode 100644
index 00000000..d5ec1e8a
--- /dev/null
+++ b/src/imports/controls/fusion/RangeSlider.qml
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.RangeSlider {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ Math.max(first.handle ? first.handle.implicitWidth : 0,
+ second.handle ? second.handle.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(first.handle ? first.handle.implicitHeight : 0,
+ second.handle ? second.handle.implicitHeight : 0) + topPadding + bottomPadding)
+
+ first.handle: SliderHandle {
+ x: control.leftPadding + Math.round(control.horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
+ y: control.topPadding + Math.round(control.horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height))
+
+ palette: control.palette
+ pressed: control.first.pressed
+ hovered: control.first.hovered
+ vertical: control.vertical
+ visualFocus: activeFocus
+ }
+
+ second.handle: SliderHandle {
+ x: control.leftPadding + Math.round(control.horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
+ y: control.topPadding + Math.round(control.horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height))
+
+ palette: control.palette
+ pressed: control.second.pressed
+ hovered: control.second.hovered
+ vertical: control.vertical
+ visualFocus: activeFocus
+ }
+
+ background: SliderGroove {
+ control: control
+ offset: control.first.position
+ progress: control.second.position
+ visualProgress: control.second.visualPosition
+ }
+}
diff --git a/src/imports/controls/fusion/RoundButton.qml b/src/imports/controls/fusion/RoundButton.qml
new file mode 100644
index 00000000..390f78f3
--- /dev/null
+++ b/src/imports/controls/fusion/RoundButton.qml
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.RoundButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.buttonText
+ }
+
+ background: Rectangle {
+ implicitWidth: 32
+ implicitHeight: 32
+ visible: !control.flat || control.down || control.checked
+
+ color: Fusion.buttonColor(control.palette, control.highlighted, control.down || control.checked, control.hovered)
+ gradient: control.down || control.checked ? null : buttonGradient
+
+ Gradient {
+ id: buttonGradient
+ GradientStop {
+ position: 0
+ color: Fusion.gradientStart(Fusion.buttonColor(control.palette, control.highlighted, control.down, control.hovered))
+ }
+ GradientStop {
+ position: 1
+ color: Fusion.gradientStop(Fusion.buttonColor(control.palette, control.highlighted, control.down, control.hovered))
+ }
+ }
+
+ radius: control.radius
+ border.color: Fusion.buttonOutline(control.palette, control.highlighted || control.visualFocus, control.enabled)
+
+ Rectangle {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ border.color: Fusion.innerContrastLine
+ color: "transparent"
+ radius: control.radius
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/ScrollBar.qml b/src/imports/controls/fusion/ScrollBar.qml
new file mode 100644
index 00000000..e85c8440
--- /dev/null
+++ b/src/imports/controls/fusion/ScrollBar.qml
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ScrollBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ padding: 2
+ visible: control.policy !== T.ScrollBar.AlwaysOff
+
+ contentItem: Rectangle {
+ id: handle
+
+ implicitWidth: control.interactive ? 6 : 2
+ implicitHeight: control.interactive ? 6 : 2
+
+ radius: width / 2
+ color: control.pressed ? control.palette.dark : control.palette.mid
+ opacity: 0.0
+
+ states: State {
+ name: "active"
+ when: control.policy === T.ScrollBar.AlwaysOn || (control.active && control.size < 1.0)
+ PropertyChanges { target: handle; opacity: 0.75 }
+ }
+
+ transitions: Transition {
+ from: "active"
+ SequentialAnimation {
+ PauseAnimation { duration: 450 }
+ NumberAnimation { target: handle; duration: 200; property: "opacity"; to: 0.0 }
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/ScrollIndicator.qml b/src/imports/controls/fusion/ScrollIndicator.qml
new file mode 100644
index 00000000..68147ea5
--- /dev/null
+++ b/src/imports/controls/fusion/ScrollIndicator.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ScrollIndicator {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ padding: 2
+
+ contentItem: Rectangle {
+ id: indicator
+
+ implicitWidth: 2
+ implicitHeight: 2
+
+ color: control.palette.mid
+ visible: control.size < 1.0
+ opacity: 0.0
+
+ states: State {
+ name: "active"
+ when: control.active
+ PropertyChanges { target: indicator; opacity: 0.75 }
+ }
+
+ transitions: [
+ Transition {
+ from: "active"
+ SequentialAnimation {
+ PauseAnimation { duration: 450 }
+ NumberAnimation { target: indicator; duration: 200; property: "opacity"; to: 0.0 }
+ }
+ }
+ ]
+ }
+}
diff --git a/src/imports/controls/fusion/ScrollView.qml b/src/imports/controls/fusion/ScrollView.qml
new file mode 100644
index 00000000..560f9f71
--- /dev/null
+++ b/src/imports/controls/fusion/ScrollView.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ScrollView {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : -1)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : -1)
+
+ ScrollBar.vertical: ScrollBar {
+ parent: control
+ x: control.mirrored ? 0 : control.width - width
+ y: control.topPadding
+ height: control.availableHeight
+ active: control.ScrollBar.horizontal.active
+ }
+
+ ScrollBar.horizontal: ScrollBar {
+ parent: control
+ x: control.leftPadding
+ y: control.height - height
+ width: control.availableWidth
+ active: control.ScrollBar.vertical.active
+ }
+}
diff --git a/src/imports/controls/fusion/Slider.qml b/src/imports/controls/fusion/Slider.qml
new file mode 100644
index 00000000..0df63f8e
--- /dev/null
+++ b/src/imports/controls/fusion/Slider.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Slider {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ (handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ (handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
+
+ handle: SliderHandle {
+ x: control.leftPadding + Math.round(control.horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
+ y: control.topPadding + Math.round(control.horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))
+
+ palette: control.palette
+ pressed: control.pressed
+ hovered: control.hovered
+ vertical: control.vertical
+ visualFocus: control.visualFocus
+ }
+
+ background: SliderGroove {
+ control: control
+ progress: control.position
+ visualProgress: control.visualPosition
+ }
+}
diff --git a/src/imports/controls/fusion/SliderGroove.qml b/src/imports/controls/fusion/SliderGroove.qml
new file mode 100644
index 00000000..abe659da
--- /dev/null
+++ b/src/imports/controls/fusion/SliderGroove.qml
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+Rectangle {
+ id: groove
+
+ property Item control
+ property real offset
+ property real progress
+ property real visualProgress
+
+ x: control.horizontal ? 0 : (control.availableWidth - width) / 2
+ y: control.horizontal ? (control.availableHeight - height) / 2 : 0
+
+ implicitWidth: control.horizontal ? 160 : 5
+ implicitHeight: control.horizontal ? 5 : 160
+ width: control.horizontal ? control.availableWidth : implicitWidth
+ height: control.horizontal ? implicitHeight : control.availableHeight
+
+ radius: 2
+ border.color: Fusion.outline(control.palette)
+ scale: control.horizontal && control.mirrored ? -1 : 1
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Qt.darker(Fusion.grooveColor(control.palette), 1.1)
+ }
+ GradientStop {
+ position: 1
+ color: Qt.lighter(Fusion.grooveColor(control.palette), 1.1)
+ }
+ }
+
+ Rectangle {
+ x: control.horizontal ? groove.offset * parent.width : 0
+ y: control.horizontal ? 0 : groove.visualProgress * parent.height
+ width: control.horizontal ? groove.progress * parent.width - groove.offset * parent.width : 5
+ height: control.horizontal ? 5 : groove.progress * parent.height - groove.offset * parent.height
+
+ radius: 2
+ border.color: Qt.darker(Fusion.highlightedOutline(control.palette), 1.1)
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Fusion.highlight(control.palette)
+ }
+ GradientStop {
+ position: 1
+ color: Qt.lighter(Fusion.highlight(control.palette), 1.2)
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/SwitchIndicator.qml b/src/imports/controls/fusion/SliderHandle.qml
index 347b2293..91f7711c 100644
--- a/src/imports/controls/SwitchIndicator.qml
+++ b/src/imports/controls/fusion/SliderHandle.qml
@@ -34,43 +34,53 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
-Item {
- implicitWidth: 56
- implicitHeight: 28
+Rectangle {
+ id: handle
- property Item control
+ property var palette
+ property bool pressed
+ property bool hovered
+ property bool vertical
+ property bool visualFocus
- Rectangle {
- y: parent.height / 2 - height / 2
- width: 56
- height: 16
- radius: 8
- color: control.checked ? (control.visualFocus ? Default.focusColor : Default.buttonCheckedColor) : Default.buttonColor
- border.width: control.visualFocus ? 2 : 0
- border.color: Default.focusColor
+ implicitWidth: 13
+ implicitHeight: 13
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Fusion.gradientStart(Fusion.buttonColor(handle.palette, handle.visualFocus, handle.pressed, handle.hovered))
+ }
+ GradientStop {
+ position: 1
+ color: Fusion.gradientStop(Fusion.buttonColor(handle.palette, handle.visualFocus, handle.pressed, handle.hovered))
+ }
}
+ rotation: handle.vertical ? -90 : 0
+ border.width: 1
+ border.color: "transparent"
+ radius: 2
Rectangle {
- x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
- y: (parent.height - height) / 2
- width: 28
- height: 28
- radius: 16
- color: control.enabled ? (control.down
- ? (control.visualFocus ? Default.focusPressedColor : Default.indicatorPressedColor)
- : (control.visualFocus ? Default.focusLightColor : Default.backgroundColor)) : Default.indicatorDisabledColor
- border.width: control.visualFocus ? 2 : 1
- border.color: control.enabled ? (control.visualFocus
- ? Default.focusColor
- : (control.down ? Default.indicatorFramePressedColor : Default.indicatorFrameColor)) : Default.indicatorFrameDisabledColor
+ width: parent.width
+ height: parent.height
+ border.color: handle.visualFocus ? Fusion.highlightedOutline(handle.palette) : Fusion.outline(handle.palette)
+ color: "transparent"
+ radius: 2
- Behavior on x {
- enabled: !control.down
- SmoothedAnimation { velocity: 200 }
+ Rectangle {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ border.color: Fusion.innerContrastLine
+ color: "transparent"
+ radius: 2
}
}
}
diff --git a/src/imports/controls/fusion/SpinBox.qml b/src/imports/controls/fusion/SpinBox.qml
new file mode 100644
index 00000000..ca9b2ed2
--- /dev/null
+++ b/src/imports/controls/fusion/SpinBox.qml
@@ -0,0 +1,183 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.SpinBox {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + 2 * padding +
+ Math.max(up.indicator ? up.indicator.implicitWidth : 0,
+ down.indicator ? down.indicator.implicitWidth : 0))
+ implicitHeight: Math.max(contentItem.implicitHeight + topPadding + bottomPadding,
+ background ? background.implicitHeight : 0,
+ (up.indicator ? up.indicator.implicitHeight : 0 +
+ down.indicator ? down.indicator.implicitHeight : 0))
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 4
+ leftPadding: padding + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
+ rightPadding: padding + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
+
+ validator: IntValidator {
+ locale: control.locale.name
+ bottom: Math.min(control.from, control.to)
+ top: Math.max(control.from, control.to)
+ }
+
+ contentItem: TextInput {
+ z: 2
+ text: control.textFromValue(control.value, control.locale)
+
+ font: control.font
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+ horizontalAlignment: Qt.AlignHCenter
+ verticalAlignment: Qt.AlignVCenter
+
+ readOnly: !control.editable
+ validator: control.validator
+ inputMethodHints: control.inputMethodHints
+ }
+
+ up.indicator: PaddedRectangle {
+ x: control.mirrored ? 1 : parent.width - width - 1
+ y: 1
+ height: parent.height / 2 - 1
+ implicitWidth: 16
+ implicitHeight: 10
+
+ radius: 1.7
+ clip: true
+ topPadding: -2
+ leftPadding: -2
+ color: control.up.pressed ? Fusion.buttonColor(control.palette, false, true, true) : "transparent"
+
+ ColorImage {
+ scale: -1
+ width: parent.width
+ height: parent.height
+ opacity: enabled ? 1.0 : 0.5
+ color: control.palette.buttonText
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/arrow.png"
+ fillMode: Image.Pad
+ }
+ }
+
+ down.indicator: PaddedRectangle {
+ x: control.mirrored ? 1 : parent.width - width - 1
+ y: parent.height - height - 1
+ height: parent.height / 2 - 1
+ implicitWidth: 16
+ implicitHeight: 10
+
+ radius: 1.7
+ clip: true
+ topPadding: -2
+ leftPadding: -2
+ color: control.down.pressed ? Fusion.buttonColor(control.palette, false, true, true) : "transparent"
+
+ ColorImage {
+ width: parent.width
+ height: parent.height
+ opacity: enabled ? 1.0 : 0.5
+ color: control.palette.buttonText
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/arrow.png"
+ fillMode: Image.Pad
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 120
+ implicitHeight: 24
+
+ radius: 2
+ color: control.palette.base
+ border.color: control.activeFocus ? Fusion.highlightedOutline(control.palette) : Fusion.outline(control.palette)
+
+ Rectangle {
+ x: 2
+ y: 1
+ width: parent.width - 4
+ height: 1
+ color: Fusion.topShadow
+ }
+
+ Rectangle {
+ x: control.mirrored ? 1 : parent.width - width - 1
+ y: 1
+ width: Math.max(up.indicator ? up.indicator.width : 0,
+ down.indicator ? down.indicator.width : 0) + 1
+ height: parent.height - 2
+
+ radius: 2
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Fusion.gradientStart(Fusion.buttonColor(control.palette, control.visualFocus, false, control.up.hovered || control.down.hovered))
+ }
+ GradientStop {
+ position: 1
+ color: Fusion.gradientStop(Fusion.buttonColor(control.palette, control.visualFocus, false, control.up.hovered || control.down.hovered))
+ }
+ }
+
+ Rectangle {
+ x: control.mirrored ? parent.width - 1 : 0
+ height: parent.height
+ width: 1
+ color: Fusion.outline(control.palette)
+ }
+ }
+
+ Rectangle {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ color: "transparent"
+ border.color: Color.transparent(Fusion.highlightedOutline(control.palette), 40 / 255)
+ visible: control.activeFocus
+ radius: 1.7
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/SwipeDelegate.qml b/src/imports/controls/fusion/SwipeDelegate.qml
new file mode 100644
index 00000000..7df4aa87
--- /dev/null
+++ b/src/imports/controls/fusion/SwipeDelegate.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.SwipeDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.highlighted ? Fusion.highlightedText(control.palette) : control.palette.text
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 20
+ color: control.down ? Fusion.buttonColor(control.palette, false, true, true)
+ : control.highlighted ? Fusion.highlight(control.palette) : control.palette.base
+ }
+}
diff --git a/src/imports/controls/fusion/Switch.qml b/src/imports/controls/fusion/Switch.qml
new file mode 100644
index 00000000..c9e01f3d
--- /dev/null
+++ b/src/imports/controls/fusion/Switch.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Switch {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ indicator: SwitchIndicator {
+ x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ color: control.palette.text
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+}
diff --git a/src/imports/controls/fusion/SwitchDelegate.qml b/src/imports/controls/fusion/SwitchDelegate.qml
new file mode 100644
index 00000000..718dab39
--- /dev/null
+++ b/src/imports/controls/fusion/SwitchDelegate.qml
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.SwitchDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ indicator: SwitchIndicator {
+ x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: IconLabel {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.highlighted ? Fusion.highlightedText(control.palette) : control.palette.text
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 20
+ color: control.down ? Fusion.buttonColor(control.palette, false, true, true)
+ : control.highlighted ? Fusion.highlight(control.palette) : control.palette.base
+ }
+}
diff --git a/src/imports/controls/fusion/SwitchIndicator.qml b/src/imports/controls/fusion/SwitchIndicator.qml
new file mode 100644
index 00000000..2aa7aee0
--- /dev/null
+++ b/src/imports/controls/fusion/SwitchIndicator.qml
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+Rectangle {
+ id: indicator
+
+ property Item control
+ readonly property color pressedColor: Fusion.mergedColors(control.palette.base, control.palette.windowText, 85)
+ readonly property color checkMarkColor: Qt.darker(control.palette.text, 1.2)
+
+ implicitWidth: 40
+ implicitHeight: 16
+
+ radius: 2
+ border.color: Fusion.outline(control.palette)
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Qt.darker(Fusion.grooveColor(control.palette), 1.1)
+ }
+ GradientStop {
+ position: 1
+ color: Qt.lighter(Fusion.grooveColor(control.palette), 1.1)
+ }
+ }
+
+ Rectangle {
+ x: control.mirrored ? handle.x : 0
+ width: control.mirrored ? parent.width - handle.x : handle.x + handle.width
+ height: parent.height
+
+ opacity: control.checked ? 1 : 0
+ Behavior on opacity {
+ enabled: !control.down
+ NumberAnimation { duration: 80 }
+ }
+
+ radius: 2
+ border.color: Qt.darker(Fusion.highlightedOutline(control.palette), 1.1)
+ border.width: control.enabled ? 1 : 0
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Fusion.highlight(control.palette)
+ }
+ GradientStop {
+ position: 1
+ color: Qt.lighter(Fusion.highlight(control.palette), 1.2)
+ }
+ }
+ }
+
+ Rectangle {
+ id: handle
+ x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+ width: 20
+ height: 16
+ radius: 2
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Fusion.gradientStart(Fusion.buttonColor(control.palette, control.visualFocus, control.pressed, control.hovered))
+ }
+ GradientStop {
+ position: 1
+ color: Fusion.gradientStop(Fusion.buttonColor(control.palette, control.visualFocus, control.pressed, control.hovered))
+ }
+ }
+ border.width: 1
+ border.color: "transparent"
+
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ border.color: control.visualFocus ? Fusion.highlightedOutline(control.palette) : Fusion.outline(control.palette)
+ color: "transparent"
+ radius: 2
+
+ Rectangle {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ border.color: Fusion.innerContrastLine
+ color: "transparent"
+ radius: 2
+ }
+ }
+
+ Behavior on x {
+ enabled: !control.down
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/TabBar.qml b/src/imports/controls/fusion/TabBar.qml
new file mode 100644
index 00000000..a06e0bae
--- /dev/null
+++ b/src/imports/controls/fusion/TabBar.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.TabBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight + topPadding + bottomPadding)
+
+ spacing: -1
+
+ contentItem: ListView {
+ model: control.contentModel
+ currentIndex: control.currentIndex
+
+ spacing: control.spacing
+ orientation: ListView.Horizontal
+ boundsBehavior: Flickable.StopAtBounds
+ flickableDirection: Flickable.AutoFlickIfNeeded
+ snapMode: ListView.SnapToItem
+
+ highlightMoveDuration: 0
+ highlightRangeMode: ListView.ApplyRange
+ preferredHighlightBegin: 40
+ preferredHighlightEnd: width - 40
+ }
+
+ background: Item {
+ implicitHeight: 21
+
+ Rectangle {
+ width: parent.width
+ height: 1
+ y: control.position === T.TabBar.Header ? parent.height - 1 : 0
+ color: Fusion.outline(control.palette)
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/TabButton.qml b/src/imports/controls/fusion/TabButton.qml
new file mode 100644
index 00000000..c4ec2029
--- /dev/null
+++ b/src/imports/controls/fusion/TabButton.qml
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.TabButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 2
+ leftPadding: 4
+ rightPadding: 4
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ z: checked
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.buttonText
+ }
+
+ background: Rectangle {
+ y: control.checked || control.TabBar.position !== T.TabBar.Header ? 0 : 2
+ implicitHeight: 21
+ height: control.height - (control.checked ? 0 : 2)
+
+ border.color: Qt.lighter(Fusion.outline(control.palette), 1.1)
+ gradient: control.checked ? selectedGradient : normalGradient
+
+ Gradient {
+ id: selectedGradient
+ GradientStop {
+ position: 0
+ color: Qt.lighter(Fusion.tabFrameColor(control.palette), 1.04)
+ }
+ GradientStop {
+ position: 1
+ color: Fusion.tabFrameColor(control.palette)
+ }
+ }
+
+ Gradient {
+ id: normalGradient
+ GradientStop {
+ position: 0
+ color: Qt.darker(Fusion.tabFrameColor(control.palette), 1.08)
+ }
+ GradientStop {
+ position: 0.85
+ color: Qt.darker(Fusion.tabFrameColor(control.palette), 1.08)
+ }
+ GradientStop {
+ position: 1
+ color: Qt.darker(Fusion.tabFrameColor(control.palette), 1.16)
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/TextArea.qml b/src/imports/controls/fusion/TextArea.qml
new file mode 100644
index 00000000..6d47e237
--- /dev/null
+++ b/src/imports/controls/fusion/TextArea.qml
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.TextArea {
+ id: control
+
+ implicitWidth: Math.max(contentWidth + leftPadding + rightPadding,
+ background ? background.implicitWidth : 0,
+ placeholder.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
+ background ? background.implicitHeight : 0,
+ placeholder.implicitHeight + topPadding + bottomPadding)
+
+ padding: 6
+ leftPadding: padding + 4
+
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+
+ PlaceholderText {
+ id: placeholder
+ x: control.leftPadding
+ y: control.topPadding
+ width: control.width - (control.leftPadding + control.rightPadding)
+ height: control.height - (control.topPadding + control.bottomPadding)
+
+ opacity: 0.5
+ text: control.placeholderText
+ font: control.font
+ color: control.palette.text
+ verticalAlignment: control.verticalAlignment
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ elide: Text.ElideRight
+ }
+}
diff --git a/src/imports/controls/fusion/TextField.qml b/src/imports/controls/fusion/TextField.qml
new file mode 100644
index 00000000..686690bb
--- /dev/null
+++ b/src/imports/controls/fusion/TextField.qml
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.TextField {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ placeholderText ? placeholder.implicitWidth + leftPadding + rightPadding : 0)
+ || contentWidth + leftPadding + rightPadding
+ implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
+ background ? background.implicitHeight : 0,
+ placeholder.implicitHeight + topPadding + bottomPadding)
+
+ padding: 4
+
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+ verticalAlignment: TextInput.AlignVCenter
+
+ PlaceholderText {
+ id: placeholder
+ x: control.leftPadding
+ y: control.topPadding
+ width: control.width - (control.leftPadding + control.rightPadding)
+ height: control.height - (control.topPadding + control.bottomPadding)
+
+ opacity: 0.5
+ text: control.placeholderText
+ font: control.font
+ color: control.palette.text
+ verticalAlignment: control.verticalAlignment
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ elide: Text.ElideRight
+ }
+
+ background: Rectangle {
+ implicitWidth: 120
+ implicitHeight: 24
+
+ radius: 2
+ color: control.palette.base
+ border.color: control.activeFocus ? Fusion.highlightedOutline(control.palette) : Fusion.outline(control.palette)
+
+ Rectangle {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ color: "transparent"
+ border.color: Color.transparent(Fusion.highlightedOutline(control.palette), 40 / 255)
+ visible: control.activeFocus
+ radius: 1.7
+ }
+
+ Rectangle {
+ x: 2
+ y: 1
+ width: parent.width - 4
+ height: 1
+ color: Fusion.topShadow
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/ToolBar.qml b/src/imports/controls/fusion/ToolBar.qml
new file mode 100644
index 00000000..3dbca03d
--- /dev/null
+++ b/src/imports/controls/fusion/ToolBar.qml
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ToolBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ leftPadding: 6
+ rightPadding: 6
+ topPadding: control.position === T.ToolBar.Footer ? 1 : 0
+ bottomPadding: control.position === T.ToolBar.Header ? 1 : 0
+
+ background: Rectangle {
+ implicitHeight: 26
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: Qt.lighter(control.palette.window, 1.04)
+ }
+ GradientStop {
+ position: 1
+ color: control.palette.window
+ }
+ }
+
+ Rectangle {
+ width: parent.width
+ height: 1
+ color: control.position === T.ToolBar.Header ? Fusion.lightShade : Fusion.darkShade
+ }
+
+ Rectangle {
+ y: parent.height - height
+ width: parent.width
+ height: 1
+ color: control.position === T.ToolBar.Header ? Fusion.darkShade : Fusion.lightShade
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/ToolButton.qml b/src/imports/controls/fusion/ToolButton.qml
new file mode 100644
index 00000000..c7dacbc4
--- /dev/null
+++ b/src/imports/controls/fusion/ToolButton.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ToolButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 16
+ icon.height: 16
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.buttonText
+ }
+
+ background: ButtonPanel {
+ implicitWidth: 20
+ implicitHeight: 20
+
+ control: control
+ visible: control.down || control.checked || control.highlighted || control.visualFocus || control.hovered
+ }
+}
diff --git a/src/imports/controls/fusion/ToolSeparator.qml b/src/imports/controls/fusion/ToolSeparator.qml
new file mode 100644
index 00000000..41868912
--- /dev/null
+++ b/src/imports/controls/fusion/ToolSeparator.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ToolSeparator {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding)
+
+ padding: vertical ? 6 : 2
+ topPadding: vertical ? 2 : 6
+ bottomPadding: vertical ? 2 : 6
+
+ contentItem: Rectangle {
+ implicitWidth: vertical ? 2 : 8
+ implicitHeight: vertical ? 8 : 2
+ color: Qt.darker(control.palette.window, 1.1)
+
+ Rectangle {
+ x: 1
+ width: 1
+ height: parent.height
+ color: Qt.lighter(control.palette.window, 1.1)
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/ToolTip.qml b/src/imports/controls/fusion/ToolTip.qml
new file mode 100644
index 00000000..6b24e209
--- /dev/null
+++ b/src/imports/controls/fusion/ToolTip.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.ToolTip {
+ id: control
+
+ x: parent ? (parent.width - implicitWidth) / 2 : 0
+ y: -implicitHeight - 3
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ margins: 6
+ padding: 6
+
+ closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ color: control.palette.toolTipText
+ // TODO: wrapMode: Label.Wrap
+ }
+
+ background: Rectangle {
+ color: control.palette.toolTipBase
+ border.color: control.palette.toolTipText
+
+ Rectangle {
+ z: -1
+ x: 1; y: 1
+ width: parent.width
+ height: parent.height
+ color: control.palette.shadow
+ opacity: 0.5
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/Tumbler.qml b/src/imports/controls/fusion/Tumbler.qml
new file mode 100644
index 00000000..6f06e8f5
--- /dev/null
+++ b/src/imports/controls/fusion/Tumbler.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Fusion.impl 2.3
+
+T.Tumbler {
+ id: control
+ implicitWidth: 60
+ implicitHeight: 200
+
+ delegate: Text {
+ id: label
+ text: modelData
+ color: control.palette.windowText
+ font: control.font
+ opacity: (1.0 - Math.abs(Tumbler.displacement) / (visibleItemCount / 2)) * (control.enabled ? 1 : 0.6)
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ contentItem: TumblerView {
+ id: tumblerView
+ model: control.model
+ delegate: control.delegate
+ path: Path {
+ startX: tumblerView.width / 2
+ startY: -tumblerView.delegateHeight / 2
+ PathLine {
+ x: tumblerView.width / 2
+ y: (control.visibleItemCount + 1) * tumblerView.delegateHeight - tumblerView.delegateHeight / 2
+ }
+ }
+
+ property real delegateHeight: control.availableHeight / control.visibleItemCount
+ }
+}
diff --git a/src/imports/controls/fusion/fusion.pri b/src/imports/controls/fusion/fusion.pri
new file mode 100644
index 00000000..4a6e8fb4
--- /dev/null
+++ b/src/imports/controls/fusion/fusion.pri
@@ -0,0 +1,67 @@
+HEADERS += \
+ $$PWD/qquickfusionbusyindicator_p.h \
+ $$PWD/qquickfusiondial_p.h \
+ $$PWD/qquickfusionknob_p.h \
+ $$PWD/qquickfusionstyle_p.h \
+ $$PWD/qquickfusiontheme_p.h
+
+SOURCES += \
+ $$PWD/qquickfusionbusyindicator.cpp \
+ $$PWD/qquickfusiondial.cpp \
+ $$PWD/qquickfusionknob.cpp \
+ $$PWD/qquickfusionstyle.cpp \
+ $$PWD/qquickfusiontheme.cpp
+
+QML_FILES += \
+ $$PWD/ApplicationWindow.qml \
+ $$PWD/BusyIndicator.qml \
+ $$PWD/Button.qml \
+ $$PWD/ButtonPanel.qml \
+ $$PWD/CheckBox.qml \
+ $$PWD/CheckDelegate.qml \
+ $$PWD/CheckIndicator.qml \
+ $$PWD/ComboBox.qml \
+ $$PWD/DelayButton.qml \
+ $$PWD/Dial.qml \
+ $$PWD/Dialog.qml \
+ $$PWD/DialogButtonBox.qml \
+ $$PWD/Drawer.qml \
+ $$PWD/Frame.qml \
+ $$PWD/GroupBox.qml \
+ $$PWD/ItemDelegate.qml \
+ $$PWD/Label.qml \
+ $$PWD/Menu.qml \
+ $$PWD/MenuBar.qml \
+ $$PWD/MenuBarItem.qml \
+ $$PWD/MenuItem.qml \
+ $$PWD/MenuSeparator.qml \
+ $$PWD/Page.qml \
+ $$PWD/PageIndicator.qml \
+ $$PWD/Pane.qml \
+ $$PWD/Popup.qml \
+ $$PWD/ProgressBar.qml \
+ $$PWD/RadioButton.qml \
+ $$PWD/RadioDelegate.qml \
+ $$PWD/RadioIndicator.qml \
+ $$PWD/RangeSlider.qml \
+ $$PWD/RoundButton.qml \
+ $$PWD/ScrollBar.qml \
+ $$PWD/ScrollIndicator.qml \
+ $$PWD/ScrollView.qml \
+ $$PWD/Slider.qml \
+ $$PWD/SliderGroove.qml \
+ $$PWD/SliderHandle.qml \
+ $$PWD/SpinBox.qml \
+ $$PWD/SwipeDelegate.qml \
+ $$PWD/SwitchDelegate.qml \
+ $$PWD/SwitchIndicator.qml \
+ $$PWD/Switch.qml \
+ $$PWD/TabBar.qml \
+ $$PWD/TabButton.qml \
+ $$PWD/TextArea.qml \
+ $$PWD/TextField.qml \
+ $$PWD/ToolBar.qml \
+ $$PWD/ToolButton.qml \
+ $$PWD/ToolSeparator.qml \
+ $$PWD/ToolTip.qml \
+ $$PWD/Tumbler.qml
diff --git a/src/imports/controls/fusion/fusion.pro b/src/imports/controls/fusion/fusion.pro
new file mode 100644
index 00000000..c2b649cf
--- /dev/null
+++ b/src/imports/controls/fusion/fusion.pro
@@ -0,0 +1,25 @@
+TARGET = qtquickcontrols2fusionstyleplugin
+TARGETPATH = QtQuick/Controls.2/Fusion
+IMPORT_VERSION = 2.3
+
+QT += qml quick
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+
+include(fusion.pri)
+
+OTHER_FILES += \
+ qmldir \
+ $$QML_FILES
+
+SOURCES += \
+ $$PWD/qtquickcontrols2fusionstyleplugin.cpp
+
+RESOURCES += \
+ $$PWD/qtquickcontrols2fusionstyle.qrc
+
+CONFIG += no_cxx_module
+load(qml_plugin)
+
+requires(qtConfig(quickcontrols2-fusion))
diff --git a/src/imports/controls/fusion/images/arrow.png b/src/imports/controls/fusion/images/arrow.png
new file mode 100644
index 00000000..ad8cdc95
--- /dev/null
+++ b/src/imports/controls/fusion/images/arrow.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/arrow.svg b/src/imports/controls/fusion/images/arrow.svg
new file mode 100644
index 00000000..44383924
--- /dev/null
+++ b/src/imports/controls/fusion/images/arrow.svg
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="10"
+ height="6"
+ viewBox="0 0 10 6"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/Users/jpnurmi/Downloads/arrow@4x.png"
+ inkscape:export-xdpi="360"
+ inkscape:export-ydpi="360"
+ sodipodi:docname="arrow.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="31.678384"
+ inkscape:cx="7.9810383"
+ inkscape:cy="3.0344775"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-to-guides="true"
+ inkscape:snap-page="true"
+ inkscape:window-width="1440"
+ inkscape:window-height="851"
+ inkscape:window-x="0"
+ inkscape:window-y="1"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1046.3622)">
+ <path
+ transform="matrix(1.2371791,0,0,0.85714284,1.0769252,150.19463)"
+ style="fill:#000000;fill-opacity:0.7254902"
+ inkscape:transform-center-y="1.4999605"
+ d="m 3.1709837,1051.3622 -3.2331616,-4.6667 6.4663233,0 z"
+ id="path3365"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc" />
+ </g>
+</svg>
diff --git a/src/imports/controls/fusion/images/arrow@2x.png b/src/imports/controls/fusion/images/arrow@2x.png
new file mode 100644
index 00000000..4f94c58f
--- /dev/null
+++ b/src/imports/controls/fusion/images/arrow@2x.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/arrow@3x.png b/src/imports/controls/fusion/images/arrow@3x.png
new file mode 100644
index 00000000..68928ea9
--- /dev/null
+++ b/src/imports/controls/fusion/images/arrow@3x.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/arrow@4x.png b/src/imports/controls/fusion/images/arrow@4x.png
new file mode 100644
index 00000000..edde50f3
--- /dev/null
+++ b/src/imports/controls/fusion/images/arrow@4x.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/checkmark.png b/src/imports/controls/fusion/images/checkmark.png
new file mode 100644
index 00000000..9cb04883
--- /dev/null
+++ b/src/imports/controls/fusion/images/checkmark.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/checkmark.svg b/src/imports/controls/fusion/images/checkmark.svg
new file mode 100644
index 00000000..f1afdc4f
--- /dev/null
+++ b/src/imports/controls/fusion/images/checkmark.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="14"
+ height="14"
+ viewBox="0 0 14 14"
+ id="svg3386"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/Users/jpnurmi/Downloads/checkmark@4x.png"
+ inkscape:export-xdpi="360"
+ inkscape:export-ydpi="360"
+ sodipodi:docname="checkmark.svg">
+ <defs
+ id="defs3388" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="1.9865044"
+ inkscape:cy="6.0706667"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ units="px"
+ inkscape:snap-page="true"
+ inkscape:snap-grids="true"
+ inkscape:snap-to-guides="true"
+ inkscape:window-width="1440"
+ inkscape:window-height="851"
+ inkscape:window-x="0"
+ inkscape:window-y="1"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata3391">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1038.3622)">
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.79999995;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 5,1045.3622 2,4 2.5,-8"
+ id="path4198"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ </g>
+</svg>
diff --git a/src/imports/controls/fusion/images/checkmark@2x.png b/src/imports/controls/fusion/images/checkmark@2x.png
new file mode 100644
index 00000000..ae9a7749
--- /dev/null
+++ b/src/imports/controls/fusion/images/checkmark@2x.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/checkmark@3x.png b/src/imports/controls/fusion/images/checkmark@3x.png
new file mode 100644
index 00000000..4a67e88a
--- /dev/null
+++ b/src/imports/controls/fusion/images/checkmark@3x.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/checkmark@4x.png b/src/imports/controls/fusion/images/checkmark@4x.png
new file mode 100644
index 00000000..0890d2ba
--- /dev/null
+++ b/src/imports/controls/fusion/images/checkmark@4x.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/progressmask.png b/src/imports/controls/fusion/images/progressmask.png
new file mode 100644
index 00000000..683f9e2f
--- /dev/null
+++ b/src/imports/controls/fusion/images/progressmask.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/progressmask.svg b/src/imports/controls/fusion/images/progressmask.svg
new file mode 100644
index 00000000..a0dfc426
--- /dev/null
+++ b/src/imports/controls/fusion/images/progressmask.svg
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="31"
+ height="22"
+ viewBox="0 0 8.202083 5.8208335"
+ version="1.1"
+ id="svg8"
+ inkscape:export-filename="/home/jpnurmi/Projects/qt-dev/qtquickcontrols2/src/imports/controls/fusion/images/progressmask@4x.png"
+ inkscape:export-xdpi="384"
+ inkscape:export-ydpi="384"
+ inkscape:version="0.92.1 r"
+ sodipodi:docname="progressmask.svg">
+ <defs
+ id="defs2" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="15.839192"
+ inkscape:cx="61.144853"
+ inkscape:cy="14.574824"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ units="px"
+ inkscape:pagecheckerboard="true"
+ inkscape:window-width="3840"
+ inkscape:window-height="2031"
+ inkscape:window-x="0"
+ inkscape:window-y="55"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata5">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-291.17915)">
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:4.5;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 0,296.99998 4.7625,-5.82083"
+ id="path4485"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:4.5;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 8.2020833,296.99998 4.7624997,-5.82083"
+ id="path4485-3"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ </g>
+</svg>
diff --git a/src/imports/controls/fusion/images/progressmask@2x.png b/src/imports/controls/fusion/images/progressmask@2x.png
new file mode 100644
index 00000000..e101f5de
--- /dev/null
+++ b/src/imports/controls/fusion/images/progressmask@2x.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/progressmask@3x.png b/src/imports/controls/fusion/images/progressmask@3x.png
new file mode 100644
index 00000000..784f01c0
--- /dev/null
+++ b/src/imports/controls/fusion/images/progressmask@3x.png
Binary files differ
diff --git a/src/imports/controls/fusion/images/progressmask@4x.png b/src/imports/controls/fusion/images/progressmask@4x.png
new file mode 100644
index 00000000..8af0b2c2
--- /dev/null
+++ b/src/imports/controls/fusion/images/progressmask@4x.png
Binary files differ
diff --git a/src/imports/controls/fusion/qmldir b/src/imports/controls/fusion/qmldir
new file mode 100644
index 00000000..c37b9f9f
--- /dev/null
+++ b/src/imports/controls/fusion/qmldir
@@ -0,0 +1,4 @@
+module QtQuick.Controls.Fusion
+plugin qtquickcontrols2fusionstyleplugin
+classname QtQuickControls2FusionStylePlugin
+depends QtQuick.Controls 2.3
diff --git a/src/imports/controls/fusion/qquickfusionbusyindicator.cpp b/src/imports/controls/fusion/qquickfusionbusyindicator.cpp
new file mode 100644
index 00000000..7254b7b7
--- /dev/null
+++ b/src/imports/controls/fusion/qquickfusionbusyindicator.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickfusionbusyindicator_p.h"
+
+#include <QtGui/qpainter.h>
+
+QT_BEGIN_NAMESPACE
+
+QQuickFusionBusyIndicator::QQuickFusionBusyIndicator(QQuickItem *parent)
+ : QQuickPaintedItem(parent)
+{
+}
+
+QColor QQuickFusionBusyIndicator::color() const
+{
+ return m_color;
+}
+
+void QQuickFusionBusyIndicator::setColor(const QColor &color)
+{
+ if (color == m_color)
+ return;
+
+ m_color = color;
+ update();
+}
+
+void QQuickFusionBusyIndicator::paint(QPainter *painter)
+{
+ const qreal w = width();
+ const qreal h = height();
+ if (w <= 0 || h <= 0 || !isVisible())
+ return;
+
+ const qreal sz = qMin(w, h);
+ const qreal dx = (w - sz) / 2;
+ const qreal dy = (h - sz) / 2;
+ const int hpw = qRound(qMax(1.0, sz / 14)) & -1;
+ const int pw = 2 * hpw;
+ const QRectF bounds(dx + hpw, dy + hpw, sz - pw - 1, sz - pw - 1);
+
+ QConicalGradient gradient;
+ gradient.setCenter(QPointF(dx + sz / 2, dy + sz / 2));
+ gradient.setColorAt(0, m_color);
+ gradient.setColorAt(0.1, m_color);
+ gradient.setColorAt(1, Qt::transparent);
+
+ painter->translate(0.5, 0.5);
+ painter->setRenderHint(QPainter::Antialiasing, true);
+ painter->setPen(QPen(gradient, pw, Qt::SolidLine));
+ painter->drawArc(bounds, 0, 360 * 16);
+ painter->setPen(QPen(m_color, pw, Qt::SolidLine, Qt::RoundCap));
+ painter->drawArc(bounds, 0, 20 * 16);
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/fusion/qquickfusionbusyindicator_p.h b/src/imports/controls/fusion/qquickfusionbusyindicator_p.h
new file mode 100644
index 00000000..c8af3311
--- /dev/null
+++ b/src/imports/controls/fusion/qquickfusionbusyindicator_p.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKFUSIONBUSYINDICATOR_P_H
+#define QQUICKFUSIONBUSYINDICATOR_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtGui/qcolor.h>
+#include <QtQuick/qquickpainteditem.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickFusionBusyIndicator : public QQuickPaintedItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
+
+public:
+ explicit QQuickFusionBusyIndicator(QQuickItem *parent = nullptr);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+ void paint(QPainter *painter) override;
+
+private:
+ QColor m_color;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKFUSIONBUSYINDICATOR_P_H
diff --git a/src/imports/controls/fusion/qquickfusiondial.cpp b/src/imports/controls/fusion/qquickfusiondial.cpp
new file mode 100644
index 00000000..014078e6
--- /dev/null
+++ b/src/imports/controls/fusion/qquickfusiondial.cpp
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickfusiondial_p.h"
+
+#include <QtGui/qpainter.h>
+#include <QtGui/private/qmath_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QQuickFusionDial::QQuickFusionDial(QQuickItem *parent)
+ : QQuickPaintedItem(parent),
+ m_highlight(false)
+{
+}
+
+bool QQuickFusionDial::highlight() const
+{
+ return m_highlight;
+}
+
+void QQuickFusionDial::setHighlight(bool highlight)
+{
+ if (m_highlight == highlight)
+ return;
+
+ m_highlight = highlight;
+ update();
+}
+
+QPalette QQuickFusionDial::palette() const
+{
+ return m_palette;
+}
+
+void QQuickFusionDial::setPalette(const QPalette &palette)
+{
+ if (palette == m_palette)
+ return;
+
+ m_palette = palette;
+ update();
+}
+
+// based on QStyleHelper::drawDial()
+void QQuickFusionDial::paint(QPainter *painter)
+{
+ const int width = QQuickItem::width();
+ const int height = QQuickItem::height();
+ if (width <= 0 || height <= 0 || !isVisible())
+ return;
+
+ QColor buttonColor = m_palette.button().color();
+ const bool enabled = isEnabled();
+ qreal r = qMin(width, height) / 2;
+ r -= r/50;
+ const qreal penSize = r/20.0;
+
+ painter->setRenderHint(QPainter::Antialiasing);
+
+ const qreal d_ = r / 6;
+ const qreal dx = d_ + (width - 2 * r) / 2 + 1;
+ const qreal dy = d_ + (height - 2 * r) / 2 + 1;
+
+ QRectF br = QRectF(dx + 0.5, dy + 0.5,
+ int(r * 2 - 2 * d_ - 2),
+ int(r * 2 - 2 * d_ - 2));
+ buttonColor.setHsv(buttonColor .hue(),
+ qMin(140, buttonColor .saturation()),
+ qMax(180, buttonColor.value()));
+
+ if (enabled) {
+ // Drop shadow
+ qreal shadowSize = qMax(1.0, penSize/2.0);
+ QRectF shadowRect= br.adjusted(-2*shadowSize, -2*shadowSize,
+ 2*shadowSize, 2*shadowSize);
+ QRadialGradient shadowGradient(shadowRect.center().x(),
+ shadowRect.center().y(), shadowRect.width()/2.0,
+ shadowRect.center().x(), shadowRect.center().y());
+ shadowGradient.setColorAt(qreal(0.91), QColor(0, 0, 0, 40));
+ shadowGradient.setColorAt(qreal(1.0), Qt::transparent);
+ painter->setBrush(shadowGradient);
+ painter->setPen(Qt::NoPen);
+ painter->translate(shadowSize, shadowSize);
+ painter->drawEllipse(shadowRect);
+ painter->translate(-shadowSize, -shadowSize);
+
+ // Main gradient
+ QRadialGradient gradient(br.center().x() - br.width()/3, dy,
+ br.width()*1.3, br.center().x(),
+ br.center().y() - br.height()/2);
+ gradient.setColorAt(0, buttonColor.lighter(110));
+ gradient.setColorAt(qreal(0.5), buttonColor);
+ gradient.setColorAt(qreal(0.501), buttonColor.darker(102));
+ gradient.setColorAt(1, buttonColor.darker(115));
+ painter->setBrush(gradient);
+ } else {
+ painter->setBrush(Qt::NoBrush);
+ }
+
+ painter->setPen(QPen(buttonColor.darker(280)));
+ painter->drawEllipse(br);
+ painter->setBrush(Qt::NoBrush);
+ painter->setPen(buttonColor.lighter(110));
+ painter->drawEllipse(br.adjusted(1, 1, -1, -1));
+
+ if (m_highlight) {
+ QColor highlight = m_palette.highlight().color();
+ highlight.setHsv(highlight.hue(),
+ qMin(160, highlight.saturation()),
+ qMax(230, highlight.value()));
+ highlight.setAlpha(127);
+ painter->setPen(QPen(highlight, 2.0));
+ painter->setBrush(Qt::NoBrush);
+ painter->drawEllipse(br.adjusted(-1, -1, 1, 1));
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/fusion/qquickfusiondial_p.h b/src/imports/controls/fusion/qquickfusiondial_p.h
new file mode 100644
index 00000000..d3216521
--- /dev/null
+++ b/src/imports/controls/fusion/qquickfusiondial_p.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKFUSIONDIAL_P_H
+#define QQUICKFUSIONDIAL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtGui/qpalette.h>
+#include <QtQuick/qquickpainteditem.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickFusionDial : public QQuickPaintedItem
+{
+ Q_OBJECT
+ Q_PROPERTY(bool highlight READ highlight WRITE setHighlight FINAL)
+ Q_PROPERTY(QPalette palette READ palette WRITE setPalette FINAL)
+
+public:
+ explicit QQuickFusionDial(QQuickItem *parent = nullptr);
+
+ bool highlight() const;
+ void setHighlight(bool highlight);
+
+ QPalette palette() const;
+ void setPalette(const QPalette &palette);
+
+ void paint(QPainter *painter) override;
+
+private:
+ bool m_highlight;
+ QPalette m_palette;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKFUSIONDIAL_P_H
diff --git a/src/imports/controls/fusion/qquickfusionknob.cpp b/src/imports/controls/fusion/qquickfusionknob.cpp
new file mode 100644
index 00000000..9f1824a6
--- /dev/null
+++ b/src/imports/controls/fusion/qquickfusionknob.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickfusionknob_p.h"
+
+#include <QtCore/qmath.h>
+#include <QtGui/qpainter.h>
+
+QT_BEGIN_NAMESPACE
+
+QQuickFusionKnob::QQuickFusionKnob(QQuickItem *parent)
+ : QQuickPaintedItem(parent)
+{
+}
+
+QPalette QQuickFusionKnob::palette() const
+{
+ return m_palette;
+}
+
+void QQuickFusionKnob::setPalette(const QPalette &palette)
+{
+ if (palette == m_palette)
+ return;
+
+ m_palette = palette;
+ update();
+}
+
+// extracted from QStyleHelper::drawDial()
+void QQuickFusionKnob::paint(QPainter *painter)
+{
+ const qreal w = width();
+ const qreal h = height();
+ if (w <= 0 || h <= 0)
+ return;
+
+ QColor color = m_palette.color(QPalette::Button);
+ color.setHsv(color.hue(),
+ qMin(140, color .saturation()),
+ qMax(180, color.value()));
+ color = color.lighter(104);
+ color.setAlphaF(qreal(0.8));
+
+ const qreal sz = qMin(w, h);
+ QRectF rect(0, 0, sz, sz);
+ rect.moveCenter(QPointF(w / 2.0, h / 2.0));
+ const QPointF center = rect.center();
+
+ QRadialGradient gradient(center.x() + rect.width() / 2,
+ center.y() + rect.width(),
+ rect.width() * 2,
+ center.x(), center.y());
+ gradient.setColorAt(1, color.darker(140));
+ gradient.setColorAt(qreal(0.4), color.darker(120));
+ gradient.setColorAt(0, color.darker(110));
+
+ painter->setRenderHint(QPainter::Antialiasing);
+ painter->setBrush(gradient);
+ painter->setPen(QColor(255, 255, 255, 150));
+ painter->drawEllipse(rect);
+ painter->setPen(QColor(0, 0, 0, 80));
+ painter->drawEllipse(rect.adjusted(1, 1, -1, -1));
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/fusion/qquickfusionknob_p.h b/src/imports/controls/fusion/qquickfusionknob_p.h
new file mode 100644
index 00000000..062aaf21
--- /dev/null
+++ b/src/imports/controls/fusion/qquickfusionknob_p.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKFUSIONKNOB_P_H
+#define QQUICKFUSIONKNOB_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtGui/qpalette.h>
+#include <QtQuick/qquickpainteditem.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickFusionKnob : public QQuickPaintedItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QPalette palette READ palette WRITE setPalette FINAL)
+
+public:
+ explicit QQuickFusionKnob(QQuickItem *parent = nullptr);
+
+ QPalette palette() const;
+ void setPalette(const QPalette &palette);
+
+ void paint(QPainter *painter) override;
+
+private:
+ QPalette m_palette;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKFUSIONKNOB_P_H
diff --git a/src/imports/controls/fusion/qquickfusionstyle.cpp b/src/imports/controls/fusion/qquickfusionstyle.cpp
new file mode 100644
index 00000000..a66665fc
--- /dev/null
+++ b/src/imports/controls/fusion/qquickfusionstyle.cpp
@@ -0,0 +1,172 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickfusionstyle_p.h"
+
+#include <QtGui/qcolor.h>
+#include <QtGui/qpalette.h>
+#include <QtGui/qpa/qplatformtheme.h>
+#include <QtGui/private/qguiapplication_p.h>
+
+QT_BEGIN_NAMESPACE
+
+// On mac we want a standard blue color used when the system palette is used
+static bool isMacSystemPalette(const QPalette &palette)
+{
+ Q_UNUSED(palette);
+#if defined(Q_OS_MACOS)
+ const QPalette *themePalette = QGuiApplicationPrivate::platformTheme()->palette();
+ if (themePalette && themePalette->color(QPalette::Normal, QPalette::Highlight) ==
+ palette.color(QPalette::Normal, QPalette::Highlight) &&
+ themePalette->color(QPalette::Normal, QPalette::HighlightedText) ==
+ palette.color(QPalette::Normal, QPalette::HighlightedText))
+ return true;
+#endif
+ return false;
+}
+
+QQuickFusionStyle::QQuickFusionStyle(QObject *parent)
+ : QObject(parent)
+{
+}
+
+QColor QQuickFusionStyle::lightShade()
+{
+ return QColor(255, 255, 255, 90);
+}
+
+QColor QQuickFusionStyle::darkShade()
+{
+ return QColor(0, 0, 0, 60);
+}
+
+QColor QQuickFusionStyle::topShadow()
+{
+ return QColor(0, 0, 0, 18);
+}
+
+QColor QQuickFusionStyle::innerContrastLine()
+{
+ return QColor(255, 255, 255, 30);
+}
+
+QColor QQuickFusionStyle::highlight(const QPalette &palette)
+{
+ if (isMacSystemPalette(palette))
+ return QColor(60, 140, 230);
+ return palette.color(QPalette::Highlight);
+}
+
+QColor QQuickFusionStyle::highlightedText(const QPalette &palette)
+{
+ if (isMacSystemPalette(palette))
+ return Qt::white;
+ return palette.color(QPalette::HighlightedText);
+}
+
+QColor QQuickFusionStyle::outline(const QPalette &palette)
+{
+ if (palette.window().style() == Qt::TexturePattern)
+ return QColor(0, 0, 0, 160);
+ return palette.background().color().darker(140);
+}
+
+QColor QQuickFusionStyle::highlightedOutline(const QPalette &palette)
+{
+ QColor highlightedOutline = highlight(palette).darker(125);
+ if (highlightedOutline.value() > 160)
+ highlightedOutline.setHsl(highlightedOutline.hue(), highlightedOutline.saturation(), 160);
+ return highlightedOutline;
+}
+
+QColor QQuickFusionStyle::tabFrameColor(const QPalette &palette)
+{
+ if (palette.window().style() == Qt::TexturePattern)
+ return QColor(255, 255, 255, 8);
+ return buttonColor(palette).lighter(104);
+}
+
+QColor QQuickFusionStyle::buttonColor(const QPalette &palette, bool highlighted, bool down, bool hovered)
+{
+ QColor buttonColor = palette.button().color();
+ int val = qGray(buttonColor.rgb());
+ buttonColor = buttonColor.lighter(100 + qMax(1, (180 - val)/6));
+ buttonColor.setHsv(buttonColor.hue(), buttonColor.saturation() * 0.75, buttonColor.value());
+ if (highlighted)
+ buttonColor = mergedColors(buttonColor, highlightedOutline(palette).lighter(130), 90);
+ if (!hovered)
+ buttonColor = buttonColor.darker(104);
+ if (down)
+ buttonColor = buttonColor.darker(110);
+ return buttonColor;
+}
+
+QColor QQuickFusionStyle::buttonOutline(const QPalette &palette, bool highlighted, bool enabled)
+{
+ QColor darkOutline = enabled && highlighted ? highlightedOutline(palette) : outline(palette);
+ return !enabled ? darkOutline.lighter(115) : darkOutline;
+}
+
+QColor QQuickFusionStyle::gradientStart(const QColor &baseColor)
+{
+ return baseColor.lighter(124);
+}
+
+QColor QQuickFusionStyle::gradientStop(const QColor &baseColor)
+{
+ return baseColor.lighter(102);
+}
+
+QColor QQuickFusionStyle::mergedColors(const QColor &colorA, const QColor &colorB, int factor)
+{
+ const int maxFactor = 100;
+ QColor tmp = colorA;
+ tmp.setRed((tmp.red() * factor) / maxFactor + (colorB.red() * (maxFactor - factor)) / maxFactor);
+ tmp.setGreen((tmp.green() * factor) / maxFactor + (colorB.green() * (maxFactor - factor)) / maxFactor);
+ tmp.setBlue((tmp.blue() * factor) / maxFactor + (colorB.blue() * (maxFactor - factor)) / maxFactor);
+ return tmp;
+}
+
+QColor QQuickFusionStyle::grooveColor(const QPalette &palette)
+{
+ QColor color = buttonColor(palette);
+ color.setHsv(color.hue(),
+ qMin(255, color.saturation()),
+ qMin<int>(255, color.value() * 0.9));
+ return color;
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/fusion/qquickfusionstyle_p.h b/src/imports/controls/fusion/qquickfusionstyle_p.h
new file mode 100644
index 00000000..e0a99cc6
--- /dev/null
+++ b/src/imports/controls/fusion/qquickfusionstyle_p.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKFUSIONSTYLE_P_H
+#define QQUICKFUSIONSTYLE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qobject.h>
+#include <QtGui/qcolor.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickFusionStyle : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor lightShade READ lightShade CONSTANT)
+ Q_PROPERTY(QColor darkShade READ darkShade CONSTANT)
+ Q_PROPERTY(QColor topShadow READ topShadow CONSTANT)
+ Q_PROPERTY(QColor innerContrastLine READ innerContrastLine CONSTANT)
+
+public:
+ explicit QQuickFusionStyle(QObject *parent = nullptr);
+
+ static QColor lightShade();
+ static QColor darkShade();
+ static QColor topShadow();
+ static QColor innerContrastLine();
+
+ Q_INVOKABLE static QColor highlight(const QPalette &palette);
+ Q_INVOKABLE static QColor highlightedText(const QPalette &palette);
+ Q_INVOKABLE static QColor outline(const QPalette &palette);
+ Q_INVOKABLE static QColor highlightedOutline(const QPalette &palette);
+ Q_INVOKABLE static QColor tabFrameColor(const QPalette &palette);
+ Q_INVOKABLE static QColor buttonColor(const QPalette &palette, bool highlighted = false, bool down = false, bool hovered = false);
+ Q_INVOKABLE static QColor buttonOutline(const QPalette &palette, bool highlighted = false, bool enabled = true);
+ Q_INVOKABLE static QColor gradientStart(const QColor &baseColor);
+ Q_INVOKABLE static QColor gradientStop(const QColor &baseColor);
+ Q_INVOKABLE static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50);
+ Q_INVOKABLE static QColor grooveColor(const QPalette &palette);
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKFUSIONSTYLE_P_H
diff --git a/src/imports/controls/fusion/qquickfusiontheme.cpp b/src/imports/controls/fusion/qquickfusiontheme.cpp
new file mode 100644
index 00000000..31494efb
--- /dev/null
+++ b/src/imports/controls/fusion/qquickfusiontheme.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickfusiontheme_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QQuickFusionTheme::QQuickFusionTheme()
+ : QQuickTheme(QStringLiteral("Fusion"))
+{
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/fusion/qquickfusiontheme_p.h b/src/imports/controls/fusion/qquickfusiontheme_p.h
new file mode 100644
index 00000000..5dcfcf61
--- /dev/null
+++ b/src/imports/controls/fusion/qquickfusiontheme_p.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKFUSIONTHEME_P_H
+#define QQUICKFUSIONTHEME_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qvariant.h>
+#include <QtGui/qpalette.h>
+#include <QtQuickControls2/private/qquicktheme_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickFusionTheme : public QQuickTheme
+{
+public:
+ explicit QQuickFusionTheme();
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKFUSIONTHEME_P_H
diff --git a/src/imports/controls/fusion/qtquickcontrols2fusionstyle.qrc b/src/imports/controls/fusion/qtquickcontrols2fusionstyle.qrc
new file mode 100644
index 00000000..74c8e671
--- /dev/null
+++ b/src/imports/controls/fusion/qtquickcontrols2fusionstyle.qrc
@@ -0,0 +1,16 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="qt-project.org/imports/QtQuick/Controls.2/Fusion">
+ <file>images/arrow.png</file>
+ <file>images/arrow@2x.png</file>
+ <file>images/arrow@3x.png</file>
+ <file>images/arrow@4x.png</file>
+ <file>images/checkmark.png</file>
+ <file>images/checkmark@2x.png</file>
+ <file>images/checkmark@3x.png</file>
+ <file>images/checkmark@4x.png</file>
+ <file>images/progressmask.png</file>
+ <file>images/progressmask@2x.png</file>
+ <file>images/progressmask@3x.png</file>
+ <file>images/progressmask@4x.png</file>
+</qresource>
+</RCC>
diff --git a/src/imports/controls/fusion/qtquickcontrols2fusionstyleplugin.cpp b/src/imports/controls/fusion/qtquickcontrols2fusionstyleplugin.cpp
new file mode 100644
index 00000000..1fcacc5e
--- /dev/null
+++ b/src/imports/controls/fusion/qtquickcontrols2fusionstyleplugin.cpp
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 <QtQuickControls2/private/qquickstyleplugin_p.h>
+#include <QtQml/qqml.h>
+
+#include "qquickfusionbusyindicator_p.h"
+#include "qquickfusiondial_p.h"
+#include "qquickfusionknob_p.h"
+#include "qquickfusionstyle_p.h"
+#include "qquickfusiontheme_p.h"
+
+static inline void initResources()
+{
+ Q_INIT_RESOURCE(qtquickcontrols2fusionstyle);
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_QtQuick_Controls_2_Fusion);
+#endif
+}
+
+QT_BEGIN_NAMESPACE
+
+static QObject *styleSingleton(QQmlEngine *engine, QJSEngine *scriptEngine)
+{
+ Q_UNUSED(engine);
+ Q_UNUSED(scriptEngine);
+ return new QQuickFusionStyle;
+}
+
+class QtQuickControls2FusionStylePlugin: public QQuickStylePlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2FusionStylePlugin(QObject *parent = nullptr);
+
+ void registerTypes(const char *uri) override;
+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
+
+ QString name() const override;
+ QQuickProxyTheme *createTheme() const override;
+};
+
+QtQuickControls2FusionStylePlugin::QtQuickControls2FusionStylePlugin(QObject *parent) : QQuickStylePlugin(parent)
+{
+ initResources();
+}
+
+void QtQuickControls2FusionStylePlugin::registerTypes(const char *uri)
+{
+ qmlRegisterModule(uri, 2, QT_VERSION_MINOR - 7); // Qt 5.10->2.3, 5.11->2.4...
+}
+
+void QtQuickControls2FusionStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri)
+{
+ QQuickStylePlugin::initializeEngine(engine, uri);
+
+ QByteArray import = QByteArray(uri) + ".impl";
+ qmlRegisterModule(import, 2, QT_VERSION_MINOR - 7); // Qt 5.10->2.3, 5.11->2.4...
+
+ qmlRegisterSingletonType<QQuickFusionStyle>(import, 2, 3, "Fusion", styleSingleton);
+
+ qmlRegisterType<QQuickFusionBusyIndicator>(import, 2, 3, "BusyIndicatorImpl");
+ qmlRegisterType<QQuickFusionDial>(import, 2, 3, "DialImpl");
+ qmlRegisterType<QQuickFusionKnob>(import, 2, 3, "KnobImpl");
+
+ qmlRegisterType(typeUrl(QStringLiteral("ButtonPanel.qml")), import, 2, 3, "ButtonPanel");
+ qmlRegisterType(typeUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 3, "CheckIndicator");
+ qmlRegisterType(typeUrl(QStringLiteral("RadioIndicator.qml")), import, 2, 3, "RadioIndicator");
+ qmlRegisterType(typeUrl(QStringLiteral("SliderGroove.qml")), import, 2, 3, "SliderGroove");
+ qmlRegisterType(typeUrl(QStringLiteral("SliderHandle.qml")), import, 2, 3, "SliderHandle");
+ qmlRegisterType(typeUrl(QStringLiteral("SwitchIndicator.qml")), import, 2, 3, "SwitchIndicator");
+}
+
+QString QtQuickControls2FusionStylePlugin::name() const
+{
+ return QStringLiteral("fusion");
+}
+
+QQuickProxyTheme *QtQuickControls2FusionStylePlugin::createTheme() const
+{
+ return new QQuickFusionTheme;
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2fusionstyleplugin.moc"
diff --git a/src/imports/controls/images/arrow-indicator.png b/src/imports/controls/images/arrow-indicator.png
new file mode 100644
index 00000000..50f230dc
--- /dev/null
+++ b/src/imports/controls/images/arrow-indicator.png
Binary files differ
diff --git a/src/imports/controls/images/arrow-indicator@2x.png b/src/imports/controls/images/arrow-indicator@2x.png
new file mode 100644
index 00000000..457cdde0
--- /dev/null
+++ b/src/imports/controls/images/arrow-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/images/arrow-indicator@3x.png b/src/imports/controls/images/arrow-indicator@3x.png
new file mode 100644
index 00000000..8d624154
--- /dev/null
+++ b/src/imports/controls/images/arrow-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/images/arrow-indicator@4x.png b/src/imports/controls/images/arrow-indicator@4x.png
new file mode 100644
index 00000000..7d2c49e2
--- /dev/null
+++ b/src/imports/controls/images/arrow-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/ApplicationWindow.qml b/src/imports/controls/imagine/ApplicationWindow.qml
new file mode 100644
index 00000000..d0219da0
--- /dev/null
+++ b/src/imports/controls/imagine/ApplicationWindow.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Window 2.2
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.ApplicationWindow {
+ id: window
+
+ // ### remove?
+ overlay.modal: NinePatchImage {
+ source: Imagine.url + "applicationwindow-overlay"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": true}
+ ]
+ }
+ }
+
+ // ### remove?
+ overlay.modeless: NinePatchImage {
+ source: Imagine.url + "applicationwindow-overlay"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": false}
+ ]
+ }
+ }
+
+ background: NinePatchImage {
+ width: window.width
+ height: window.height
+
+ 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
new file mode 100644
index 00000000..a1ce3f7b
--- /dev/null
+++ b/src/imports/controls/imagine/BusyIndicator.qml
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.BusyIndicator {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ contentItem: AnimatedImage {
+ playing: control.running
+ opacity: control.running ? 1 : 0
+ visible: control.running || animator.running
+ Behavior on opacity { OpacityAnimator { id: animator; duration: 250 } }
+
+ source: Imagine.url + "busyindicator-animation"
+ AnimatedImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"running": control.running},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "busyindicator-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"running": control.running},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Button.qml b/src/imports/controls/imagine/Button.qml
new file mode 100644
index 00000000..8ccedbf8
--- /dev/null
+++ b/src/imports/controls/imagine/Button.qml
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Button {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 6 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.enabled && control.flat && control.highlighted ? control.palette.highlight
+ : control.enabled && (control.down || control.checked || control.highlighted) && !control.flat
+ ? control.palette.brightText : control.flat ? control.palette.windowText : control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.enabled && control.flat && control.highlighted ? control.palette.highlight
+ : control.enabled && (control.down || control.checked || control.highlighted) && !control.flat
+ ? control.palette.brightText : control.flat ? control.palette.windowText : control.palette.buttonText
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "button-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"checkable": control.checkable},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"flat": control.flat},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/CheckBox.qml b/src/imports/controls/imagine/CheckBox.qml
new file mode 100644
index 00000000..01426054
--- /dev/null
+++ b/src/imports/controls/imagine/CheckBox.qml
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.CheckBox {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 6 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ indicator: Image {
+ 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.url + "checkbox-indicator"
+ ImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checkState === Qt.Checked},
+ {"partially-checked": control.checkState === Qt.PartiallyChecked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ color: control.palette.windowText
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "checkbox-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checkState === Qt.Checked},
+ {"partially-checked": control.checkState === Qt.PartiallyChecked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/CheckDelegate.qml b/src/imports/controls/imagine/CheckDelegate.qml
new file mode 100644
index 00000000..e98a612c
--- /dev/null
+++ b/src/imports/controls/imagine/CheckDelegate.qml
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.CheckDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 12 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ indicator: Image {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ source: Imagine.url + "checkdelegate-indicator"
+ ImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checkState === Qt.Checked},
+ {"partially-checked": control.checkState === Qt.PartiallyChecked},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ contentItem: IconLabel {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.text
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "checkdelegate-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checkState === Qt.Checked},
+ {"partially-checked": control.checkState === Qt.PartiallyChecked},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/ComboBox.qml b/src/imports/controls/imagine/ComboBox.qml
new file mode 100644
index 00000000..1a85b675
--- /dev/null
+++ b/src/imports/controls/imagine/ComboBox.qml
@@ -0,0 +1,172 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Window 2.3
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.ComboBox {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + background ? (background.leftPadding + background.rightPadding) : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + background ? (background.topPadding + background.bottomPadding) : 0)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
+ rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
+
+ delegate: ItemDelegate {
+ width: parent.width
+ text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
+ highlighted: control.highlightedIndex === index
+ hoverEnabled: control.hoverEnabled
+ }
+
+ indicator: Image {
+ x: control.mirrored ? control.padding : control.width - width - control.padding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ source: Imagine.url + "combobox-indicator"
+ ImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.pressed},
+ {"editable": control.editable},
+ {"open": control.popup.visible},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered},
+ {"flat": control.flat}
+ ]
+ }
+ }
+
+ contentItem: T.TextField {
+ topPadding: control.background ? control.background.topPadding : 0
+ leftPadding: control.background ? control.background.leftPadding : 0
+ rightPadding: control.background ? control.background.rightPadding : 0
+ bottomPadding: control.background ? control.background.bottomPadding : 0
+
+ text: control.editable ? control.editText : control.displayText
+
+ enabled: control.editable
+ autoScroll: control.editable
+ readOnly: control.popup.visible
+ inputMethodHints: control.inputMethodHints
+ validator: control.validator
+
+ font: control.font
+ color: control.flat ? control.palette.windowText : control.editable ? control.palette.text : control.palette.buttonText
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "combobox-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.pressed},
+ {"editable": control.editable},
+ {"open": control.popup.visible},
+ {"focused": control.visualFocus || (control.editable && control.activeFocus)},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered},
+ {"flat": control.flat}
+ ]
+ }
+ }
+
+ popup: T.Popup {
+ width: control.width
+ height: Math.min(contentItem.implicitHeight + topPadding + bottomPadding, control.Window.height - topMargin - bottomMargin)
+
+ topMargin: background.topInset
+ bottomMargin: background.bottomInset
+
+ topPadding: background.topPadding
+ leftPadding: background.leftPadding
+ rightPadding: background.rightPadding
+ bottomPadding: background.bottomPadding
+
+ palette.text: control.palette.text
+ palette.highlight: control.palette.highlight
+ palette.highlightedText: control.palette.highlightedText
+ palette.windowText: control.palette.windowText
+ palette.buttonText: control.palette.buttonText
+
+ contentItem: ListView {
+ clip: true
+ implicitHeight: contentHeight
+ model: control.popup.visible ? control.delegateModel : null
+ currentIndex: control.highlightedIndex
+ highlightMoveDuration: 0
+
+ T.ScrollIndicator.vertical: ScrollIndicator { }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.popup.width + leftInset + rightInset
+ height: control.popup.height + topInset + bottomInset
+
+ source: Imagine.url + "combobox-popup"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.pressed},
+ {"editable": control.editable},
+ {"focused": control.visualFocus || (control.editable && control.activeFocus)},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered},
+ {"flat": control.flat}
+ ]
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/DelayButton.qml b/src/imports/controls/imagine/DelayButton.qml
new file mode 100644
index 00000000..3b2eb8bb
--- /dev/null
+++ b/src/imports/controls/imagine/DelayButton.qml
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+import QtGraphicalEffects 1.0
+
+T.DelayButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ transition: Transition {
+ NumberAnimation {
+ duration: control.delay * (control.pressed ? 1.0 - control.progress : 0.3 * control.progress)
+ }
+ }
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ color: control.palette.buttonText
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "delaybutton-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+
+ NinePatchImage {
+ id: progress
+ width: control.progress * parent.width
+ height: parent.height
+ visible: false
+
+ source: Imagine.url + "delaybutton-progress"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ NinePatchImage {
+ id: mask
+ width: parent.width
+ height: parent.height
+ visible: false
+
+ source: Imagine.url + "delaybutton-mask"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ OpacityMask {
+ id: effect
+ width: source.width
+ height: source.height
+ source: progress
+
+ maskSource: ShaderEffectSource {
+ sourceItem: mask
+ sourceRect: Qt.rect(0, 0, effect.width, effect.height)
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Dial.qml b/src/imports/controls/imagine/Dial.qml
new file mode 100644
index 00000000..04f8e1b8
--- /dev/null
+++ b/src/imports/controls/imagine/Dial.qml
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Dial {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ (handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ (handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ handle: Image {
+ x: background.x + background.width / 2 - handle.width / 2
+ y: background.y + background.height / 2 - handle.height / 2
+
+ source: Imagine.url + "dial-handle"
+ ImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.pressed},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+
+ transform: [
+ Translate {
+ y: -background.height * 0.4 + handle.height / 2
+ },
+ Rotation {
+ angle: control.angle
+ origin.x: handle.width / 2
+ origin.y: handle.height / 2
+ }
+ ]
+ }
+
+ background: NinePatchImage {
+ x: control.width / 2 - width / 2
+ y: control.height / 2 - height / 2
+ width: Math.max(64, Math.min(control.width, control.height))
+ height: width
+
+ source: Imagine.url + "dial-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.pressed},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Dialog.qml b/src/imports/controls/imagine/Dialog.qml
new file mode 100644
index 00000000..e7a8cce5
--- /dev/null
+++ b/src/imports/controls/imagine/Dialog.qml
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Dialog {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ header && header.visible ? header.implicitWidth : 0,
+ footer && footer.visible ? footer.implicitWidth : 0,
+ contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ (header && header.visible ? header.implicitHeight + spacing : 0)
+ + (footer && footer.visible ? footer.implicitHeight + spacing : 0)
+ + (contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0))
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "dialog-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": control.modal},
+ {"dim": control.dim}
+ ]
+ }
+ }
+
+ header: Label {
+ text: control.title
+ visible: control.title
+ elide: Label.ElideRight
+ font.bold: true
+ padding: 12
+
+ background: NinePatchImage {
+ width: parent.width
+ height: parent.height
+
+ source: Imagine.url + "dialog-title"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": control.modal},
+ {"dim": control.dim}
+ ]
+ }
+ }
+ }
+
+ footer: DialogButtonBox {
+ visible: count > 0
+ }
+
+ T.Overlay.modal: NinePatchImage {
+ source: Imagine.url + "dialog-overlay"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": true}
+ ]
+ }
+ }
+
+ T.Overlay.modeless: NinePatchImage {
+ 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
new file mode 100644
index 00000000..ae0e64de
--- /dev/null
+++ b/src/imports/controls/imagine/DialogButtonBox.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.DialogButtonBox {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+ spacing: 6
+
+ delegate: Button {
+ width: control.count === 1 ? control.availableWidth / 2 : undefined
+ flat: true
+ }
+
+ contentItem: ListView {
+ implicitWidth: contentWidth
+ implicitHeight: 32
+
+ model: control.contentModel
+ spacing: control.spacing
+ orientation: ListView.Horizontal
+ boundsBehavior: Flickable.StopAtBounds
+ snapMode: ListView.SnapToItem
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "dialogbuttonbox-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Drawer.qml b/src/imports/controls/imagine/Drawer.qml
new file mode 100644
index 00000000..f52f9554
--- /dev/null
+++ b/src/imports/controls/imagine/Drawer.qml
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Drawer {
+ id: control
+
+ parent: T.ApplicationWindow.overlay
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ enter: Transition { SmoothedAnimation { velocity: 5 } }
+ exit: Transition { SmoothedAnimation { velocity: 5 } }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "drawer-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": control.modal},
+ {"dim": control.dim},
+ {"top": control.edge === Qt.TopEdge},
+ {"left": control.edge === Qt.LeftEdge},
+ {"right": control.edge === Qt.RightEdge},
+ {"bottom": control.edge === Qt.BottomEdge}
+ ]
+ }
+ }
+
+ T.Overlay.modal: NinePatchImage {
+ source: Imagine.url + "drawer-overlay"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": true}
+ ]
+ }
+ }
+
+ T.Overlay.modeless: NinePatchImage {
+ 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
new file mode 100644
index 00000000..43c852f1
--- /dev/null
+++ b/src/imports/controls/imagine/Frame.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Frame {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "frame-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/GroupBox.qml b/src/imports/controls/imagine/GroupBox.qml
new file mode 100644
index 00000000..8ff48c42
--- /dev/null
+++ b/src/imports/controls/imagine/GroupBox.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.GroupBox {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ label ? label.implicitWidth + leftPadding + rightPadding : 0,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: (background ? background.topPadding : 0) + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0)
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+ padding: 12
+
+ label: Label {
+ width: control.width
+
+ topPadding: header.topPadding
+ leftPadding: header.leftPadding
+ rightPadding: header.rightPadding
+ bottomPadding: header.bottomPadding
+
+ text: control.title
+ font: control.font
+ elide: Text.ElideRight
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ color: control.palette.windowText
+
+ background: NinePatchImage {
+ id: header
+ width: parent.width
+ height: parent.height
+
+ source: Imagine.url + "groupbox-title"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset
+ y: control.topPadding - control.padding - topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset - control.topPadding + control.padding
+
+ source: Imagine.url + "groupbox-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/ItemDelegate.qml b/src/imports/controls/imagine/ItemDelegate.qml
new file mode 100644
index 00000000..1d16faf4
--- /dev/null
+++ b/src/imports/controls/imagine/ItemDelegate.qml
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.ItemDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 12 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.text
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "itemdelegate-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Label.qml b/src/imports/controls/imagine/Label.qml
new file mode 100644
index 00000000..0db416e1
--- /dev/null
+++ b/src/imports/controls/imagine/Label.qml
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Label {
+ id: control
+
+ color: control.palette.windowText
+ linkColor: control.palette.link
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "label-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Menu.qml b/src/imports/controls/imagine/Menu.qml
new file mode 100644
index 00000000..80bda5ec
--- /dev/null
+++ b/src/imports/controls/imagine/Menu.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Menu {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding
+
+ topMargin: background ? background.topInset : 0
+ leftMargin: background ? background.leftInset : 0
+ rightMargin: background ? background.rightInset : 0
+ bottomMargin: background ? background.bottomInset : 0
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ delegate: MenuItem { }
+
+ contentItem: ListView {
+ implicitHeight: contentHeight
+ model: control.contentModel
+ // TODO: improve this?
+ interactive: T.ApplicationWindow.window ? contentHeight > T.ApplicationWindow.window.height : false
+ clip: true
+ currentIndex: control.currentIndex
+
+ T.ScrollIndicator.vertical: ScrollIndicator { }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "menu-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": control.modal},
+ {"dim": control.dim}
+ ]
+ }
+ }
+
+ T.Overlay.modal: NinePatchImage {
+ source: Imagine.url + "menu-overlay"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": true}
+ ]
+ }
+ }
+
+ T.Overlay.modeless: NinePatchImage {
+ 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
new file mode 100644
index 00000000..8b576444
--- /dev/null
+++ b/src/imports/controls/imagine/MenuItem.qml
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.MenuItem {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 6 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.windowText
+
+ contentItem: IconLabel {
+ readonly property real arrowPadding: control.subMenu && control.arrow ? control.arrow.width + control.spacing : 0
+ readonly property real indicatorPadding: control.checkable && control.indicator ? control.indicator.width + control.spacing : 0
+ leftPadding: !control.mirrored ? indicatorPadding : arrowPadding
+ rightPadding: control.mirrored ? indicatorPadding : arrowPadding
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.windowText
+ }
+
+ arrow: Image {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ visible: control.subMenu
+ source: Imagine.url + "menuitem-arrow"
+ ImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ indicator: Image {
+ x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ visible: control.checkable
+ source: Imagine.url + "menuitem-indicator"
+ ImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "menuitem-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/MenuSeparator.qml b/src/imports/controls/imagine/MenuSeparator.qml
new file mode 100644
index 00000000..d445a9e1
--- /dev/null
+++ b/src/imports/controls/imagine/MenuSeparator.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.MenuSeparator {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem ? contentItem.implicitHeight + topPadding + bottomPadding : 0)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ contentItem: NinePatchImage {
+ source: Imagine.url + "menuseparator-separator"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "menuseparator-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Page.qml b/src/imports/controls/imagine/Page.qml
new file mode 100644
index 00000000..f3bdba51
--- /dev/null
+++ b/src/imports/controls/imagine/Page.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Page {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ Math.max(contentWidth,
+ header && header.visible ? header.implicitWidth : 0,
+ footer && footer.visible ? footer.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight + topPadding + bottomPadding
+ + (header && header.visible ? header.implicitHeight + spacing : 0)
+ + (footer && footer.visible ? footer.implicitHeight + spacing : 0))
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "page-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/PageIndicator.qml b/src/imports/controls/imagine/PageIndicator.qml
new file mode 100644
index 00000000..fafd73d3
--- /dev/null
+++ b/src/imports/controls/imagine/PageIndicator.qml
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.PageIndicator {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ delegate: Image {
+ source: Imagine.url + "pageindicator-delegate"
+ ImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": pressed},
+ {"current": index === control.currentIndex},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered} // ### TODO: context property
+ ]
+ }
+ }
+
+ contentItem: Row {
+ spacing: control.spacing
+
+ Repeater {
+ model: control.count
+ delegate: control.delegate
+ }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "pageindicator-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Pane.qml b/src/imports/controls/imagine/Pane.qml
new file mode 100644
index 00000000..b0029d49
--- /dev/null
+++ b/src/imports/controls/imagine/Pane.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Pane {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "pane-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Popup.qml b/src/imports/controls/imagine/Popup.qml
new file mode 100644
index 00000000..08fcfc69
--- /dev/null
+++ b/src/imports/controls/imagine/Popup.qml
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Popup {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: background ? background.topPadding : undefined
+ leftPadding: background ? background.leftPadding : undefined
+ rightPadding: background ? background.rightPadding : undefined
+ bottomPadding: background ? background.bottomPadding : undefined
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "popup-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": control.modal},
+ {"dim": control.dim}
+ ]
+ }
+ }
+
+ T.Overlay.modal: NinePatchImage {
+ source: Imagine.url + "popup-overlay"
+ NinePatchImageSelector on source {
+ states: [
+ {"modal": true}
+ ]
+ }
+ }
+
+ T.Overlay.modeless: NinePatchImage {
+ 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
new file mode 100644
index 00000000..89645d3c
--- /dev/null
+++ b/src/imports/controls/imagine/ProgressBar.qml
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+import QtGraphicalEffects 1.0
+
+T.ProgressBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ contentItem: Item {
+ implicitWidth: control.indeterminate ? animation.implicitWidth || progress.implicitWidth : progress.implicitWidth
+ implicitHeight: control.indeterminate ? animation.implicitHeight || progress.implicitHeight : progress.implicitHeight
+ scale: control.mirrored ? -1 : 1
+
+ NinePatchImage {
+ id: progress
+ width: control.position * parent.width
+ height: parent.height
+ visible: !control.indeterminate && mask.status === Image.Null
+
+ source: Imagine.url + "progressbar-progress"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"indeterminate": control.indeterminate},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ AnimatedImage {
+ id: animation
+ width: parent.width
+ height: parent.height
+ playing: control.indeterminate
+ visible: control.indeterminate && mask.status === Image.Null
+
+ source: Imagine.url + "progressbar-animation"
+ AnimatedImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ NinePatchImage {
+ id: mask
+ width: parent.width
+ height: parent.height
+ visible: false
+
+ source: Imagine.url + "progressbar-mask"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"indeterminate": control.indeterminate},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ OpacityMask {
+ id: effect
+ width: source.width
+ height: source.height
+ source: control.indeterminate ? animation : progress
+
+ maskSource: ShaderEffectSource {
+ sourceItem: mask
+ sourceRect: Qt.rect(0, 0, effect.width, effect.height)
+ }
+ }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "progressbar-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"indeterminate": control.indeterminate},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/RadioButton.qml b/src/imports/controls/imagine/RadioButton.qml
new file mode 100644
index 00000000..8df27fcc
--- /dev/null
+++ b/src/imports/controls/imagine/RadioButton.qml
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.RadioButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 6 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ indicator: Image {
+ 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.url + "radiobutton-indicator"
+ ImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ color: control.palette.windowText
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "radiobutton-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/RadioDelegate.qml b/src/imports/controls/imagine/RadioDelegate.qml
new file mode 100644
index 00000000..25d7dd2d
--- /dev/null
+++ b/src/imports/controls/imagine/RadioDelegate.qml
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.RadioDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 12 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ indicator: Image {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ source: Imagine.url + "radiodelegate-indicator"
+ ImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ contentItem: IconLabel {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.text
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "radiodelegate-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/RangeSlider.qml b/src/imports/controls/imagine/RangeSlider.qml
new file mode 100644
index 00000000..b902806a
--- /dev/null
+++ b/src/imports/controls/imagine/RangeSlider.qml
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.RangeSlider {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ Math.max(first.handle ? first.handle.implicitWidth : 0,
+ second.handle ? second.handle.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(first.handle ? first.handle.implicitHeight : 0,
+ second.handle ? second.handle.implicitHeight : 0) + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ first.handle: Image {
+ 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.url + "rangeslider-handle"
+ ImageSelector on source {
+ states: [
+ {"first": true},
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"pressed": control.first.pressed},
+ {"focused": control.first.handle.activeFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.first.hovered}
+ ]
+ }
+ }
+
+ second.handle: Image {
+ 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.url + "rangeslider-handle"
+ ImageSelector on source {
+ states: [
+ {"second": true},
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"pressed": control.second.pressed},
+ {"focused": control.second.handle.activeFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.second.hovered}
+ ]
+ }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+ scale: control.horizontal && control.mirrored ? -1 : 1
+
+ source: Imagine.url + "rangeslider-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+
+ NinePatchImage {
+ x: control.horizontal ? control.first.handle.width / 2 + control.first.position * (parent.width - control.first.handle.width) : (parent.width - width) / 2
+ y: control.horizontal ? (parent.height - height) / 2 : control.first.handle.height / 2 + control.second.visualPosition * (parent.height - control.first.handle.height)
+ 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.url + "rangeslider-progress"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/RoundButton.qml b/src/imports/controls/imagine/RoundButton.qml
new file mode 100644
index 00000000..4f8a195e
--- /dev/null
+++ b/src/imports/controls/imagine/RoundButton.qml
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.RoundButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.enabled && control.flat && control.highlighted ? control.palette.highlight
+ : control.enabled && (control.down || control.checked || control.highlighted) && !control.flat
+ ? control.palette.brightText : control.flat ? control.palette.windowText : control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.enabled && control.flat && control.highlighted ? control.palette.highlight
+ : control.enabled && (control.down || control.checked || control.highlighted) && !control.flat
+ ? control.palette.brightText : control.flat ? control.palette.windowText : control.palette.buttonText
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ // ### TODO: radius?
+ source: Imagine.url + "roundbutton-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"checkable": control.checkable},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"flat": control.flat},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/ScrollBar.qml b/src/imports/controls/imagine/ScrollBar.qml
new file mode 100644
index 00000000..ad764242
--- /dev/null
+++ b/src/imports/controls/imagine/ScrollBar.qml
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.ScrollBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ visible: control.policy !== T.ScrollBar.AlwaysOff
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ contentItem: NinePatchImage {
+ width: control.availableWidth
+ height: control.availableHeight
+
+ source: Imagine.url + "scrollbar-handle"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"interactive": control.interactive},
+ {"pressed": control.pressed},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ opacity: 0.0
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "scrollbar-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"interactive": control.interactive},
+ {"pressed": control.pressed},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ opacity: 0.0
+ }
+
+ states: [
+ State {
+ name: "active"
+ when: control.policy === T.ScrollBar.AlwaysOn || (control.active && control.size < 1.0)
+ }
+ ]
+
+ transitions: [
+ Transition {
+ to: "active"
+ NumberAnimation { targets: [contentItem, background]; property: "opacity"; to: 1.0 }
+ },
+ Transition {
+ from: "active"
+ SequentialAnimation {
+ PropertyAction{ targets: [contentItem, background]; property: "opacity"; value: 1.0 }
+ PauseAnimation { duration: 3000 }
+ NumberAnimation { targets: [contentItem, background]; property: "opacity"; to: 0.0 }
+ }
+ }
+ ]
+}
diff --git a/src/imports/controls/imagine/ScrollIndicator.qml b/src/imports/controls/imagine/ScrollIndicator.qml
new file mode 100644
index 00000000..a0ab8783
--- /dev/null
+++ b/src/imports/controls/imagine/ScrollIndicator.qml
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.ScrollIndicator {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ contentItem: NinePatchImage {
+ width: control.availableWidth
+ height: control.availableHeight
+
+ source: Imagine.url + "scrollindicator-handle"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ opacity: 0.0
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "scrollindicator-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ opacity: 0.0
+ }
+
+ states: [
+ State {
+ name: "active"
+ when: (control.active && control.size < 1.0)
+ }
+ ]
+
+ transitions: [
+ Transition {
+ to: "active"
+ NumberAnimation { targets: [contentItem, background]; property: "opacity"; to: 1.0 }
+ },
+ Transition {
+ from: "active"
+ SequentialAnimation {
+ PauseAnimation { duration: 5000 }
+ NumberAnimation { targets: [contentItem, background]; property: "opacity"; to: 0.0 }
+ }
+ }
+ ]
+}
diff --git a/src/imports/controls/imagine/ScrollView.qml b/src/imports/controls/imagine/ScrollView.qml
new file mode 100644
index 00000000..8d623f9a
--- /dev/null
+++ b/src/imports/controls/imagine/ScrollView.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.ScrollView {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : -1)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : -1)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ T.ScrollBar.vertical: ScrollBar {
+ parent: control
+ x: control.mirrored ? 0 : control.width - width
+ y: control.topPadding
+ height: control.availableHeight
+ active: control.T.ScrollBar.horizontal.active
+ }
+
+ T.ScrollBar.horizontal: ScrollBar {
+ parent: control
+ x: control.leftPadding
+ y: control.height - height
+ width: control.availableWidth
+ active: control.T.ScrollBar.vertical.active
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.path + "scrollview-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Slider.qml b/src/imports/controls/imagine/Slider.qml
new file mode 100644
index 00000000..e997f411
--- /dev/null
+++ b/src/imports/controls/imagine/Slider.qml
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Slider {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ (handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ (handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ handle: Image {
+ x: Math.round(control.leftPadding + (control.horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2))
+ y: Math.round(control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height)))
+
+ source: Imagine.url + "slider-handle"
+ ImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"pressed": control.pressed},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+ scale: control.horizontal && control.mirrored ? -1 : 1
+
+ source: Imagine.url + "slider-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+
+ NinePatchImage {
+ x: control.horizontal ? 0 : (parent.width - width) / 2
+ y: control.horizontal
+ ? (parent.height - height) / 2
+ : control.handle.height / 2 + control.visualPosition * (parent.height - control.handle.height)
+ width: control.horizontal
+ ? control.handle.width / 2 + control.position * (parent.width - control.handle.width)
+ : parent.width
+ height: control.vertical
+ ? control.handle.height / 2 + control.position * (parent.height - control.handle.height)
+ : parent.height
+
+ source: Imagine.url + "slider-progress"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/SpinBox.qml b/src/imports/controls/imagine/SpinBox.qml
new file mode 100644
index 00000000..ebadb860
--- /dev/null
+++ b/src/imports/controls/imagine/SpinBox.qml
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.SpinBox {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + 2 * padding +
+ (up.indicator ? up.indicator.implicitWidth : 0) +
+ (down.indicator ? down.indicator.implicitWidth : 0))
+ implicitHeight: Math.max(contentItem.implicitHeight + topPadding + bottomPadding,
+ background ? background.implicitHeight : 0,
+ up.indicator ? up.indicator.implicitHeight : 0,
+ down.indicator ? down.indicator.implicitHeight : 0)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: (background ? background.leftPadding : 0) + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
+ rightPadding: (background ? background.rightPadding : 0) + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
+ bottomPadding: background ? background.bottomPadding : 0
+
+ validator: IntValidator {
+ locale: control.locale.name
+ bottom: Math.min(control.from, control.to)
+ top: Math.max(control.from, control.to)
+ }
+
+ contentItem: TextInput {
+ z: 2
+ text: control.textFromValue(control.value, control.locale)
+ opacity: control.enabled ? 1 : 0.3
+
+ font: control.font
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+ horizontalAlignment: Qt.AlignHCenter
+ verticalAlignment: Qt.AlignVCenter
+
+ readOnly: !control.editable
+ validator: control.validator
+ inputMethodHints: control.inputMethodHints
+
+ NinePatchImage {
+ z: -1
+ width: control.width
+ height: control.height
+ visible: control.editable
+
+ source: Imagine.url + "spinbox-editor"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"focused": control.activeFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+ }
+
+ up.indicator: NinePatchImage {
+ id: upIndicator
+ x: control.mirrored ? 0 : parent.width - width
+ height: parent.height
+
+ source: Imagine.url + "spinbox-indicator"
+ NinePatchImageSelector on source {
+ states: [
+ {"up": true},
+ {"disabled": !upIndicator.enabled},
+ {"editable": control.editable},
+ {"pressed": control.up.pressed},
+ {"focused": control.activeFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.up.hovered}
+ ]
+ }
+ }
+
+ down.indicator: NinePatchImage {
+ id: downIndicator
+ x: control.mirrored ? parent.width - width : 0
+ height: parent.height
+
+ source: Imagine.url + "spinbox-indicator"
+ NinePatchImageSelector on source {
+ states: [
+ {"down": true},
+ {"disabled": !downIndicator.enabled},
+ {"editable": control.editable},
+ {"pressed": control.down.pressed},
+ {"focused": control.activeFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.down.hovered}
+ ]
+ }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "spinbox-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"editable": control.editable},
+ {"focused": control.activeFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/StackView.qml b/src/imports/controls/imagine/StackView.qml
new file mode 100644
index 00000000..d462239a
--- /dev/null
+++ b/src/imports/controls/imagine/StackView.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.StackView {
+ id: control
+
+ implicitWidth: background ? background.implicitWidth : 0
+ implicitHeight: background ? background.implicitHeight : 0
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ popEnter: Transition {
+ XAnimator { from: (control.mirrored ? -1 : 1) * -control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ popExit: Transition {
+ XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * control.width; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ pushEnter: Transition {
+ XAnimator { from: (control.mirrored ? -1 : 1) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ pushExit: Transition {
+ XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * -control.width; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ replaceEnter: Transition {
+ XAnimator { from: (control.mirrored ? -1 : 1) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ replaceExit: Transition {
+ XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * -control.width; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "stackview-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/SwipeDelegate.qml b/src/imports/controls/imagine/SwipeDelegate.qml
new file mode 100644
index 00000000..be88fb7d
--- /dev/null
+++ b/src/imports/controls/imagine/SwipeDelegate.qml
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.SwipeDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 12 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.text
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "swipedelegate-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/SwipeView.qml b/src/imports/controls/imagine/SwipeView.qml
new file mode 100644
index 00000000..8410d0bd
--- /dev/null
+++ b/src/imports/controls/imagine/SwipeView.qml
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.SwipeView {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ contentItem: ListView {
+ model: control.contentModel
+ interactive: control.interactive
+ currentIndex: control.currentIndex
+
+ spacing: control.spacing
+ orientation: control.orientation
+ snapMode: ListView.SnapOneItem
+ boundsBehavior: Flickable.StopAtBounds
+
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ preferredHighlightBegin: 0
+ preferredHighlightEnd: 0
+ highlightMoveDuration: 250
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "swipeview-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"interactive": control.interactive},
+ {"focused": control.contentItem.activeFocus},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/Switch.qml b/src/imports/controls/imagine/Switch.qml
new file mode 100644
index 00000000..a4a33e29
--- /dev/null
+++ b/src/imports/controls/imagine/Switch.qml
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Switch {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 6 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ indicator: NinePatchImage {
+ x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ width: Math.max(implicitWidth, handle.leftPadding && handle.rightPadding ? handle.implicitWidth : 2 * handle.implicitWidth)
+ height: Math.max(implicitHeight, handle.implicitHeight)
+
+ source: Imagine.url + "switch-indicator"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+
+ NinePatchImage {
+ id: handle
+ readonly property real minPos: parent.leftPadding - leftPadding
+ readonly property real maxPos: parent.width - width + rightPadding - parent.rightPadding
+ readonly property real dragPos: control.visualPosition * parent.width - (width / 2)
+
+ x: Math.max(minPos, Math.min(maxPos, control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+
+ source: Imagine.url + "switch-handle"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+
+ Behavior on x {
+ enabled: !control.down
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
+ }
+
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ color: control.palette.windowText
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "switch-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/SwitchDelegate.qml b/src/imports/controls/imagine/SwitchDelegate.qml
new file mode 100644
index 00000000..0c9bfb15
--- /dev/null
+++ b/src/imports/controls/imagine/SwitchDelegate.qml
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.SwitchDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 12 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ indicator: NinePatchImage {
+ x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ width: Math.max(implicitWidth, handle.leftPadding && handle.rightPadding ? handle.implicitWidth : 2 * handle.implicitWidth)
+ height: Math.max(implicitHeight, handle.implicitHeight)
+
+ source: Imagine.url + "switchdelegate-indicator"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+
+ NinePatchImage {
+ id: handle
+ readonly property real minPos: parent.leftPadding - leftPadding
+ readonly property real maxPos: parent.width - width + rightPadding - parent.rightPadding
+ readonly property real dragPos: control.visualPosition * parent.width - (width / 2)
+
+ x: Math.max(minPos, Math.min(maxPos, control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+
+ source: Imagine.url + "switchdelegate-handle"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+
+ Behavior on x {
+ enabled: !control.down
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
+ }
+
+ contentItem: IconLabel {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.text
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "switchdelegate-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/TabBar.qml b/src/imports/controls/imagine/TabBar.qml
new file mode 100644
index 00000000..49e7b425
--- /dev/null
+++ b/src/imports/controls/imagine/TabBar.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.TabBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ contentItem: ListView {
+ model: control.contentModel
+ currentIndex: control.currentIndex
+
+ spacing: control.spacing
+ orientation: ListView.Horizontal
+ boundsBehavior: Flickable.StopAtBounds
+ flickableDirection: Flickable.AutoFlickIfNeeded
+ snapMode: ListView.SnapToItem
+
+ highlightMoveDuration: 0
+ highlightRangeMode: ListView.ApplyRange
+ preferredHighlightBegin: 48
+ preferredHighlightEnd: width - 48
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "tabbar-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"header": control.position === T.TabBar.Header },
+ {"footer": control.position === T.TabBar.Footer },
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/TabButton.qml b/src/imports/controls/imagine/TabButton.qml
new file mode 100644
index 00000000..aa87f472
--- /dev/null
+++ b/src/imports/controls/imagine/TabButton.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.TabButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 6 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.buttonText
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "tabbutton-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/TextArea.qml b/src/imports/controls/imagine/TextArea.qml
new file mode 100644
index 00000000..ac212b95
--- /dev/null
+++ b/src/imports/controls/imagine/TextArea.qml
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.TextArea {
+ id: control
+
+ implicitWidth: Math.max(contentWidth + leftPadding + rightPadding,
+ background ? background.implicitWidth : 0,
+ placeholder.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
+ background ? background.implicitHeight : 0,
+ placeholder.implicitHeight + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+ verticalAlignment: Qt.AlignVCenter
+
+ PlaceholderText {
+ id: placeholder
+ x: control.leftPadding
+ y: control.topPadding
+ width: control.width - (control.leftPadding + control.rightPadding)
+ height: control.height - (control.topPadding + control.bottomPadding)
+
+ text: control.placeholderText
+ font: control.font
+ color: control.palette.text
+ verticalAlignment: control.verticalAlignment
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ elide: Text.ElideRight
+ opacity: 0.5
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "textarea-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"focused": control.activeFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/TextField.qml b/src/imports/controls/imagine/TextField.qml
new file mode 100644
index 00000000..a6449884
--- /dev/null
+++ b/src/imports/controls/imagine/TextField.qml
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.TextField {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ placeholderText ? placeholder.implicitWidth + leftPadding + rightPadding : 0)
+ || contentWidth + leftPadding + rightPadding
+ implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
+ background ? background.implicitHeight : 0,
+ placeholder.implicitHeight + topPadding + bottomPadding)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+ verticalAlignment: Qt.AlignVCenter
+
+ PlaceholderText {
+ id: placeholder
+ x: control.leftPadding
+ y: control.topPadding
+ width: control.width - (control.leftPadding + control.rightPadding)
+ height: control.height - (control.topPadding + control.bottomPadding)
+
+ text: control.placeholderText
+ font: control.font
+ color: control.palette.text
+ verticalAlignment: control.verticalAlignment
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ elide: Text.ElideRight
+ opacity: 0.5
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "textfield-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"focused": control.activeFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/ToolBar.qml b/src/imports/controls/imagine/ToolBar.qml
new file mode 100644
index 00000000..a4bf9c1f
--- /dev/null
+++ b/src/imports/controls/imagine/ToolBar.qml
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.ToolBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "toolbar-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"header": control.position === T.ToolBar.Header },
+ {"footer": control.position === T.ToolBar.Footer },
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/ToolButton.qml b/src/imports/controls/imagine/ToolButton.qml
new file mode 100644
index 00000000..b82b59fd
--- /dev/null
+++ b/src/imports/controls/imagine/ToolButton.qml
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.ToolButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 6 // ###
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.palette.buttonText
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "toolbutton-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"pressed": control.down},
+ {"checked": control.checked},
+ {"checkable": control.checkable},
+ {"focused": control.visualFocus},
+ {"highlighted": control.highlighted},
+ {"flat": control.flat},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/ToolSeparator.qml b/src/imports/controls/imagine/ToolSeparator.qml
new file mode 100644
index 00000000..99a45938
--- /dev/null
+++ b/src/imports/controls/imagine/ToolSeparator.qml
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.ToolSeparator {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem ? contentItem.implicitHeight + topPadding + bottomPadding : 0)
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ contentItem: NinePatchImage {
+ source: Imagine.url + "toolseparator-separator"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "toolseparator-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"vertical": control.vertical},
+ {"horizontal": control.horizontal},
+ {"disabled": !control.enabled},
+ {"mirrored": control.mirrored}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/ToolTip.qml b/src/imports/controls/imagine/ToolTip.qml
new file mode 100644
index 00000000..cc89a728
--- /dev/null
+++ b/src/imports/controls/imagine/ToolTip.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.ToolTip {
+ id: control
+
+ x: parent ? (parent.width - implicitWidth) / 2 : 0 - (background ? background.leftInset : 0)
+ y: -implicitHeight - (background ? background.topInset : 0)
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ topMargin: background ? background.topInset : 0
+ leftMargin: background ? background.leftInset : 0
+ rightMargin: background ? background.rightInset : 0
+ bottomMargin: background ? background.bottomInset : 0
+
+ topPadding: background ? background.topPadding : 0
+ leftPadding: background ? background.leftPadding : 0
+ rightPadding: background ? background.rightPadding : 0
+ bottomPadding: background ? background.bottomPadding : 0
+
+ closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ // TODO: wrapMode: Label.Wrap
+ color: control.palette.toolTipText
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ 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
new file mode 100644
index 00000000..5e1c913c
--- /dev/null
+++ b/src/imports/controls/imagine/Tumbler.qml
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+T.Tumbler {
+ id: control
+ implicitWidth: 60
+ implicitHeight: 200
+
+ delegate: Text {
+ text: modelData
+ font: control.font
+ color: control.palette.text
+ opacity: (1.0 - Math.abs(Tumbler.displacement) / (visibleItemCount / 2)) * (control.enabled ? 1 : 0.6)
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ contentItem: TumblerView {
+ id: tumblerView
+ model: control.model
+ delegate: control.delegate
+ path: Path {
+ startX: tumblerView.width / 2
+ startY: -tumblerView.delegateHeight / 2
+ PathLine {
+ x: tumblerView.width / 2
+ y: (control.visibleItemCount + 1) * tumblerView.delegateHeight - tumblerView.delegateHeight / 2
+ }
+ }
+
+ property real delegateHeight: control.availableHeight / control.visibleItemCount
+ }
+
+ background: NinePatchImage {
+ x: -leftInset; y: -topInset
+ width: control.width + leftInset + rightInset
+ height: control.height + topInset + bottomInset
+
+ source: Imagine.url + "tumbler-background"
+ NinePatchImageSelector on source {
+ states: [
+ {"disabled": !control.enabled},
+ {"focused": control.visualFocus},
+ {"mirrored": control.mirrored},
+ {"hovered": control.hovered}
+ ]
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/design/9-patch-export.sketchplugin/Contents/Sketch/9-patch-export.js b/src/imports/controls/imagine/design/9-patch-export.sketchplugin/Contents/Sketch/9-patch-export.js
new file mode 100644
index 00000000..a7f9a459
--- /dev/null
+++ b/src/imports/controls/imagine/design/9-patch-export.sketchplugin/Contents/Sketch/9-patch-export.js
@@ -0,0 +1,24 @@
+// 9-patch export
+//
+// This plugin crops upscaled 9-patch PNG assets when exported from Sketch,
+// to ensure that 9-patch borders remain 1px wide when upscaled.
+//
+function onExportSlices(context) {
+ var exports = context.actionContext.exports;
+ for (var i = 0; i < exports.count(); ++i) {
+ var name = exports[i].request.name();
+ var scale = exports[i].request.scale();
+ if (scale > 1 && name.endsWith(".9"))
+ cropAsset(exports[i].path, scale - 1);
+ }
+}
+
+function cropAsset(path, inset) {
+ var url = NSURL.fileURLWithPath(path);
+ var img = CIImage.imageWithContentsOfURL(url);
+ var rect = NSInsetRect(img.extent(), inset, inset);
+ var cropped = img.imageByCroppingToRect(rect);
+ var rep = NSBitmapImageRep.alloc().initWithCIImage(cropped);
+ var data = rep.PNGRepresentationWithInterlaced(false);
+ data.writeToFile(path);
+}
diff --git a/src/imports/controls/imagine/design/9-patch-export.sketchplugin/Contents/Sketch/manifest.json b/src/imports/controls/imagine/design/9-patch-export.sketchplugin/Contents/Sketch/manifest.json
new file mode 100644
index 00000000..40807aa3
--- /dev/null
+++ b/src/imports/controls/imagine/design/9-patch-export.sketchplugin/Contents/Sketch/manifest.json
@@ -0,0 +1,19 @@
+{
+ "name" : "9-patch export",
+ "description" : "Crops upscaled 9-patch PNG assets when exported from Sketch.",
+ "version" : "0.1",
+ "identifier" : "org.qt-project.sketch.9-patch-export",
+ "author" : "The Qt Project",
+ "commands" : [
+ {
+ "name" : "9-patch export",
+ "identifier" : "9-patch-export",
+ "script" : "9-patch-export.js",
+ "handlers" : {
+ "actions" : {
+ "ExportSlices": "onExportSlices",
+ },
+ },
+ },
+ ],
+}
diff --git a/src/imports/controls/imagine/design/imagine.sketch b/src/imports/controls/imagine/design/imagine.sketch
new file mode 100644
index 00000000..ecb437f7
--- /dev/null
+++ b/src/imports/controls/imagine/design/imagine.sketch
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-background.png b/src/imports/controls/imagine/images/applicationwindow-background.png
new file mode 100644
index 00000000..01eb7c73
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-background.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-background@2x.png b/src/imports/controls/imagine/images/applicationwindow-background@2x.png
new file mode 100644
index 00000000..72be785c
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-background@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-background@3x.png b/src/imports/controls/imagine/images/applicationwindow-background@3x.png
new file mode 100644
index 00000000..a488f592
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-background@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-background@4x.png b/src/imports/controls/imagine/images/applicationwindow-background@4x.png
new file mode 100644
index 00000000..9343da95
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-background@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-overlay-modal.png b/src/imports/controls/imagine/images/applicationwindow-overlay-modal.png
new file mode 100644
index 00000000..296e914a
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-overlay-modal.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-overlay-modal@2x.png b/src/imports/controls/imagine/images/applicationwindow-overlay-modal@2x.png
new file mode 100644
index 00000000..10c89300
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-overlay-modal@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-overlay-modal@3x.png b/src/imports/controls/imagine/images/applicationwindow-overlay-modal@3x.png
new file mode 100644
index 00000000..f65996e9
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-overlay-modal@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-overlay-modal@4x.png b/src/imports/controls/imagine/images/applicationwindow-overlay-modal@4x.png
new file mode 100644
index 00000000..a586f381
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-overlay-modal@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-overlay.png b/src/imports/controls/imagine/images/applicationwindow-overlay.png
new file mode 100644
index 00000000..e7175b46
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-overlay.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-overlay@2x.png b/src/imports/controls/imagine/images/applicationwindow-overlay@2x.png
new file mode 100644
index 00000000..db6566e0
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-overlay@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-overlay@3x.png b/src/imports/controls/imagine/images/applicationwindow-overlay@3x.png
new file mode 100644
index 00000000..140e4692
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-overlay@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/applicationwindow-overlay@4x.png b/src/imports/controls/imagine/images/applicationwindow-overlay@4x.png
new file mode 100644
index 00000000..5115c28a
--- /dev/null
+++ b/src/imports/controls/imagine/images/applicationwindow-overlay@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/busyindicator-animation.webp b/src/imports/controls/imagine/images/busyindicator-animation.webp
new file mode 100644
index 00000000..ebf04c4a
--- /dev/null
+++ b/src/imports/controls/imagine/images/busyindicator-animation.webp
Binary files differ
diff --git a/src/imports/controls/imagine/images/busyindicator-animation@2x.webp b/src/imports/controls/imagine/images/busyindicator-animation@2x.webp
new file mode 100644
index 00000000..43805a0b
--- /dev/null
+++ b/src/imports/controls/imagine/images/busyindicator-animation@2x.webp
Binary files differ
diff --git a/src/imports/controls/imagine/images/busyindicator-animation@3x.webp b/src/imports/controls/imagine/images/busyindicator-animation@3x.webp
new file mode 100644
index 00000000..b700b81f
--- /dev/null
+++ b/src/imports/controls/imagine/images/busyindicator-animation@3x.webp
Binary files differ
diff --git a/src/imports/controls/imagine/images/busyindicator-animation@4x.webp b/src/imports/controls/imagine/images/busyindicator-animation@4x.webp
new file mode 100644
index 00000000..bfaa8df9
--- /dev/null
+++ b/src/imports/controls/imagine/images/busyindicator-animation@4x.webp
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-disabled.9.png b/src/imports/controls/imagine/images/button-background-checked-disabled.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-disabled@2x.9.png b/src/imports/controls/imagine/images/button-background-checked-disabled@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-disabled@3x.9.png b/src/imports/controls/imagine/images/button-background-checked-disabled@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-disabled@4x.9.png b/src/imports/controls/imagine/images/button-background-checked-disabled@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-focused.9.png b/src/imports/controls/imagine/images/button-background-checked-focused.9.png
new file mode 100644
index 00000000..829d68a9
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-focused@2x.9.png b/src/imports/controls/imagine/images/button-background-checked-focused@2x.9.png
new file mode 100644
index 00000000..bf375d43
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-focused@3x.9.png b/src/imports/controls/imagine/images/button-background-checked-focused@3x.9.png
new file mode 100644
index 00000000..8759c337
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-focused@4x.9.png b/src/imports/controls/imagine/images/button-background-checked-focused@4x.9.png
new file mode 100644
index 00000000..7b8f3616
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-hovered.9.png b/src/imports/controls/imagine/images/button-background-checked-hovered.9.png
new file mode 100644
index 00000000..829d68a9
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-hovered@2x.9.png b/src/imports/controls/imagine/images/button-background-checked-hovered@2x.9.png
new file mode 100644
index 00000000..bf375d43
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-hovered@3x.9.png b/src/imports/controls/imagine/images/button-background-checked-hovered@3x.9.png
new file mode 100644
index 00000000..8759c337
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked-hovered@4x.9.png b/src/imports/controls/imagine/images/button-background-checked-hovered@4x.9.png
new file mode 100644
index 00000000..7b8f3616
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked.9.png b/src/imports/controls/imagine/images/button-background-checked.9.png
new file mode 100644
index 00000000..3ca06e6c
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked@2x.9.png b/src/imports/controls/imagine/images/button-background-checked@2x.9.png
new file mode 100644
index 00000000..0afc3dea
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked@3x.9.png b/src/imports/controls/imagine/images/button-background-checked@3x.9.png
new file mode 100644
index 00000000..348687ad
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-checked@4x.9.png b/src/imports/controls/imagine/images/button-background-checked@4x.9.png
new file mode 100644
index 00000000..4dff0ba8
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-checked@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-disabled.9.png b/src/imports/controls/imagine/images/button-background-disabled.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-disabled@2x.9.png b/src/imports/controls/imagine/images/button-background-disabled@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-disabled@3x.9.png b/src/imports/controls/imagine/images/button-background-disabled@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-disabled@4x.9.png b/src/imports/controls/imagine/images/button-background-disabled@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-checked-pressed.9.png b/src/imports/controls/imagine/images/button-background-flat-checked-pressed.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-checked-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-checked-pressed@2x.9.png b/src/imports/controls/imagine/images/button-background-flat-checked-pressed@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-checked-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-checked-pressed@3x.9.png b/src/imports/controls/imagine/images/button-background-flat-checked-pressed@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-checked-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-checked-pressed@4x.9.png b/src/imports/controls/imagine/images/button-background-flat-checked-pressed@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-checked-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-checked.9.png b/src/imports/controls/imagine/images/button-background-flat-checked.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-checked.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-checked@2x.9.png b/src/imports/controls/imagine/images/button-background-flat-checked@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-checked@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-checked@3x.9.png b/src/imports/controls/imagine/images/button-background-flat-checked@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-checked@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-checked@4x.9.png b/src/imports/controls/imagine/images/button-background-flat-checked@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-checked@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-disabled.9.png b/src/imports/controls/imagine/images/button-background-flat-disabled.9.png
new file mode 100644
index 00000000..a76e7b86
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-disabled@2x.9.png b/src/imports/controls/imagine/images/button-background-flat-disabled@2x.9.png
new file mode 100644
index 00000000..58445d50
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-disabled@3x.9.png b/src/imports/controls/imagine/images/button-background-flat-disabled@3x.9.png
new file mode 100644
index 00000000..0a18be32
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-disabled@4x.9.png b/src/imports/controls/imagine/images/button-background-flat-disabled@4x.9.png
new file mode 100644
index 00000000..f60c994d
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted-checked.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted-checked.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted-checked.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted-checked@2x.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted-checked@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted-checked@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted-checked@3x.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted-checked@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted-checked@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted-checked@4x.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted-checked@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted-checked@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@2x.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@3x.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@4x.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted.9.png
new file mode 100644
index 00000000..a76e7b86
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted@2x.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted@2x.9.png
new file mode 100644
index 00000000..58445d50
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted@3x.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted@3x.9.png
new file mode 100644
index 00000000..0a18be32
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-highlighted@4x.9.png b/src/imports/controls/imagine/images/button-background-flat-highlighted@4x.9.png
new file mode 100644
index 00000000..f60c994d
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-highlighted@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-hovered.9.png b/src/imports/controls/imagine/images/button-background-flat-hovered.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-hovered@2x.9.png b/src/imports/controls/imagine/images/button-background-flat-hovered@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-hovered@3x.9.png b/src/imports/controls/imagine/images/button-background-flat-hovered@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-hovered@4x.9.png b/src/imports/controls/imagine/images/button-background-flat-hovered@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-pressed.9.png b/src/imports/controls/imagine/images/button-background-flat-pressed.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-pressed@2x.9.png b/src/imports/controls/imagine/images/button-background-flat-pressed@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-pressed@3x.9.png b/src/imports/controls/imagine/images/button-background-flat-pressed@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat-pressed@4x.9.png b/src/imports/controls/imagine/images/button-background-flat-pressed@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat.9.png b/src/imports/controls/imagine/images/button-background-flat.9.png
new file mode 100644
index 00000000..a76e7b86
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat@2x.9.png b/src/imports/controls/imagine/images/button-background-flat@2x.9.png
new file mode 100644
index 00000000..58445d50
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat@3x.9.png b/src/imports/controls/imagine/images/button-background-flat@3x.9.png
new file mode 100644
index 00000000..0a18be32
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-flat@4x.9.png b/src/imports/controls/imagine/images/button-background-flat@4x.9.png
new file mode 100644
index 00000000..f60c994d
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-flat@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-focused.9.png b/src/imports/controls/imagine/images/button-background-focused.9.png
new file mode 100644
index 00000000..04573ce4
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-focused@2x.9.png b/src/imports/controls/imagine/images/button-background-focused@2x.9.png
new file mode 100644
index 00000000..ad25d378
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-focused@3x.9.png b/src/imports/controls/imagine/images/button-background-focused@3x.9.png
new file mode 100644
index 00000000..2f599e72
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-focused@4x.9.png b/src/imports/controls/imagine/images/button-background-focused@4x.9.png
new file mode 100644
index 00000000..6ac51521
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-checked.9.png b/src/imports/controls/imagine/images/button-background-highlighted-checked.9.png
new file mode 100644
index 00000000..d8803419
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-checked.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-checked@2x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-checked@2x.9.png
new file mode 100644
index 00000000..09cae1c0
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-checked@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-checked@3x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-checked@3x.9.png
new file mode 100644
index 00000000..b37485bb
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-checked@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-checked@4x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-checked@4x.9.png
new file mode 100644
index 00000000..d4991f75
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-checked@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-disabled.9.png b/src/imports/controls/imagine/images/button-background-highlighted-disabled.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-disabled@2x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-disabled@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-disabled@3x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-disabled@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-disabled@4x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-disabled@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-focused.9.png b/src/imports/controls/imagine/images/button-background-highlighted-focused.9.png
new file mode 100644
index 00000000..594e7446
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-focused@2x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-focused@2x.9.png
new file mode 100644
index 00000000..ddd405a2
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-focused@3x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-focused@3x.9.png
new file mode 100644
index 00000000..085c233e
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-focused@4x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-focused@4x.9.png
new file mode 100644
index 00000000..b9e4aa27
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-hovered.9.png b/src/imports/controls/imagine/images/button-background-highlighted-hovered.9.png
new file mode 100644
index 00000000..594e7446
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-hovered@2x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-hovered@2x.9.png
new file mode 100644
index 00000000..ddd405a2
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-hovered@3x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-hovered@3x.9.png
new file mode 100644
index 00000000..085c233e
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-hovered@4x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-hovered@4x.9.png
new file mode 100644
index 00000000..b9e4aa27
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-pressed.9.png b/src/imports/controls/imagine/images/button-background-highlighted-pressed.9.png
new file mode 100644
index 00000000..d8803419
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-pressed@2x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-pressed@2x.9.png
new file mode 100644
index 00000000..09cae1c0
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-pressed@3x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-pressed@3x.9.png
new file mode 100644
index 00000000..b37485bb
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted-pressed@4x.9.png b/src/imports/controls/imagine/images/button-background-highlighted-pressed@4x.9.png
new file mode 100644
index 00000000..d4991f75
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted.9.png b/src/imports/controls/imagine/images/button-background-highlighted.9.png
new file mode 100644
index 00000000..f214ba22
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted@2x.9.png b/src/imports/controls/imagine/images/button-background-highlighted@2x.9.png
new file mode 100644
index 00000000..f363d8df
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted@3x.9.png b/src/imports/controls/imagine/images/button-background-highlighted@3x.9.png
new file mode 100644
index 00000000..65ed9ca9
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-highlighted@4x.9.png b/src/imports/controls/imagine/images/button-background-highlighted@4x.9.png
new file mode 100644
index 00000000..25be69ca
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-highlighted@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-hovered.9.png b/src/imports/controls/imagine/images/button-background-hovered.9.png
new file mode 100644
index 00000000..04573ce4
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-hovered@2x.9.png b/src/imports/controls/imagine/images/button-background-hovered@2x.9.png
new file mode 100644
index 00000000..ad25d378
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-hovered@3x.9.png b/src/imports/controls/imagine/images/button-background-hovered@3x.9.png
new file mode 100644
index 00000000..2f599e72
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-hovered@4x.9.png b/src/imports/controls/imagine/images/button-background-hovered@4x.9.png
new file mode 100644
index 00000000..6ac51521
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-pressed.9.png b/src/imports/controls/imagine/images/button-background-pressed.9.png
new file mode 100644
index 00000000..3ca06e6c
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-pressed@2x.9.png b/src/imports/controls/imagine/images/button-background-pressed@2x.9.png
new file mode 100644
index 00000000..0afc3dea
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-pressed@3x.9.png b/src/imports/controls/imagine/images/button-background-pressed@3x.9.png
new file mode 100644
index 00000000..348687ad
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background-pressed@4x.9.png b/src/imports/controls/imagine/images/button-background-pressed@4x.9.png
new file mode 100644
index 00000000..4dff0ba8
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background.9.png b/src/imports/controls/imagine/images/button-background.9.png
new file mode 100644
index 00000000..053da917
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background@2x.9.png b/src/imports/controls/imagine/images/button-background@2x.9.png
new file mode 100644
index 00000000..471940f1
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background@3x.9.png b/src/imports/controls/imagine/images/button-background@3x.9.png
new file mode 100644
index 00000000..06155e8a
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/button-background@4x.9.png b/src/imports/controls/imagine/images/button-background@4x.9.png
new file mode 100644
index 00000000..7d776e51
--- /dev/null
+++ b/src/imports/controls/imagine/images/button-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-focused.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-focused.png
new file mode 100644
index 00000000..f22ebf09
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-focused@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-focused@2x.png
new file mode 100644
index 00000000..fd3080a1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-focused@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-focused@3x.png
new file mode 100644
index 00000000..6393373f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-focused@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-focused@4x.png
new file mode 100644
index 00000000..32dedb7f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered.png
new file mode 100644
index 00000000..f22ebf09
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@2x.png
new file mode 100644
index 00000000..fd3080a1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@3x.png
new file mode 100644
index 00000000..6393373f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@4x.png
new file mode 100644
index 00000000..32dedb7f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed.png
new file mode 100644
index 00000000..846416aa
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@2x.png
new file mode 100644
index 00000000..bc85bf94
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@3x.png
new file mode 100644
index 00000000..17ef9e58
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@4x.png
new file mode 100644
index 00000000..7e9dd750
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked.png b/src/imports/controls/imagine/images/checkbox-indicator-checked.png
new file mode 100644
index 00000000..f06cc5f6
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked@2x.png
new file mode 100644
index 00000000..3db78a17
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked@3x.png
new file mode 100644
index 00000000..eadb5968
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-checked@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-checked@4x.png
new file mode 100644
index 00000000..9bdfac8a
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-disabled.png b/src/imports/controls/imagine/images/checkbox-indicator-disabled.png
new file mode 100644
index 00000000..a8305968
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-disabled@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-disabled@2x.png
new file mode 100644
index 00000000..e8046c5e
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-disabled@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-disabled@3x.png
new file mode 100644
index 00000000..d44111bb
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-disabled@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-disabled@4x.png
new file mode 100644
index 00000000..24fa0c0d
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-focused.png b/src/imports/controls/imagine/images/checkbox-indicator-focused.png
new file mode 100644
index 00000000..1c598c1f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-focused@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-focused@2x.png
new file mode 100644
index 00000000..31ff320e
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-focused@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-focused@3x.png
new file mode 100644
index 00000000..15a1b487
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-focused@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-focused@4x.png
new file mode 100644
index 00000000..db11c0c1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-hovered.png b/src/imports/controls/imagine/images/checkbox-indicator-hovered.png
new file mode 100644
index 00000000..1c598c1f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-hovered@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-hovered@2x.png
new file mode 100644
index 00000000..31ff320e
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-hovered@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-hovered@3x.png
new file mode 100644
index 00000000..15a1b487
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-hovered@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-hovered@4x.png
new file mode 100644
index 00000000..db11c0c1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused.png
new file mode 100644
index 00000000..23c8197a
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@2x.png
new file mode 100644
index 00000000..046a0e6c
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@3x.png
new file mode 100644
index 00000000..890b4c66
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@4x.png
new file mode 100644
index 00000000..1dcc73c9
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered.png
new file mode 100644
index 00000000..23c8197a
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@2x.png
new file mode 100644
index 00000000..046a0e6c
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@3x.png
new file mode 100644
index 00000000..890b4c66
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@4x.png
new file mode 100644
index 00000000..1dcc73c9
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed.png
new file mode 100644
index 00000000..bdd3b6f7
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@2x.png
new file mode 100644
index 00000000..8e5e3478
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@3x.png
new file mode 100644
index 00000000..aa60fac0
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@4x.png
new file mode 100644
index 00000000..98c43e17
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked.png
new file mode 100644
index 00000000..9d09b33b
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked@2x.png
new file mode 100644
index 00000000..bf4ee4b8
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked@3x.png
new file mode 100644
index 00000000..6726df07
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-partially-checked@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked@4x.png
new file mode 100644
index 00000000..400daa58
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-partially-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-pressed.png b/src/imports/controls/imagine/images/checkbox-indicator-pressed.png
new file mode 100644
index 00000000..e4f02db1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-pressed@2x.png b/src/imports/controls/imagine/images/checkbox-indicator-pressed@2x.png
new file mode 100644
index 00000000..e2342547
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-pressed@3x.png b/src/imports/controls/imagine/images/checkbox-indicator-pressed@3x.png
new file mode 100644
index 00000000..8ae24d75
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator-pressed@4x.png b/src/imports/controls/imagine/images/checkbox-indicator-pressed@4x.png
new file mode 100644
index 00000000..04a32370
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator.png b/src/imports/controls/imagine/images/checkbox-indicator.png
new file mode 100644
index 00000000..d7b4c6d1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator@2x.png b/src/imports/controls/imagine/images/checkbox-indicator@2x.png
new file mode 100644
index 00000000..0ae3fa8f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator@3x.png b/src/imports/controls/imagine/images/checkbox-indicator@3x.png
new file mode 100644
index 00000000..f8de503c
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkbox-indicator@4x.png b/src/imports/controls/imagine/images/checkbox-indicator@4x.png
new file mode 100644
index 00000000..4f16042d
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkbox-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-disabled.9.png b/src/imports/controls/imagine/images/checkdelegate-background-disabled.9.png
new file mode 100644
index 00000000..4b56fe35
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-disabled@2x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-disabled@2x.9.png
new file mode 100644
index 00000000..34edef58
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-disabled@3x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-disabled@3x.9.png
new file mode 100644
index 00000000..dd2cc6ba
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-disabled@4x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-disabled@4x.9.png
new file mode 100644
index 00000000..b7890a3c
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-focused.9.png b/src/imports/controls/imagine/images/checkdelegate-background-focused.9.png
new file mode 100644
index 00000000..b31343dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-focused@2x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-focused@2x.9.png
new file mode 100644
index 00000000..c56c62da
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-focused@3x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-focused@3x.9.png
new file mode 100644
index 00000000..bfbc82f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-focused@4x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-focused@4x.9.png
new file mode 100644
index 00000000..e31ab63b
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-highlighted.9.png b/src/imports/controls/imagine/images/checkdelegate-background-highlighted.9.png
new file mode 100644
index 00000000..32847cfa
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-highlighted.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-highlighted@2x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-highlighted@2x.9.png
new file mode 100644
index 00000000..126fcb29
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-highlighted@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-highlighted@3x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-highlighted@3x.9.png
new file mode 100644
index 00000000..22b7c9f2
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-highlighted@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-highlighted@4x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-highlighted@4x.9.png
new file mode 100644
index 00000000..4e67f310
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-highlighted@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-hovered.9.png b/src/imports/controls/imagine/images/checkdelegate-background-hovered.9.png
new file mode 100644
index 00000000..a53f63cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-hovered@2x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-hovered@2x.9.png
new file mode 100644
index 00000000..07510b10
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-hovered@3x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-hovered@3x.9.png
new file mode 100644
index 00000000..db2a210a
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-hovered@4x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-hovered@4x.9.png
new file mode 100644
index 00000000..6427d7ab
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-pressed.9.png b/src/imports/controls/imagine/images/checkdelegate-background-pressed.9.png
new file mode 100644
index 00000000..b31343dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-pressed@2x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-pressed@2x.9.png
new file mode 100644
index 00000000..c56c62da
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-pressed@3x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-pressed@3x.9.png
new file mode 100644
index 00000000..bfbc82f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background-pressed@4x.9.png b/src/imports/controls/imagine/images/checkdelegate-background-pressed@4x.9.png
new file mode 100644
index 00000000..e31ab63b
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background.9.png b/src/imports/controls/imagine/images/checkdelegate-background.9.png
new file mode 100644
index 00000000..a53f63cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background@2x.9.png b/src/imports/controls/imagine/images/checkdelegate-background@2x.9.png
new file mode 100644
index 00000000..07510b10
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background@3x.9.png b/src/imports/controls/imagine/images/checkdelegate-background@3x.9.png
new file mode 100644
index 00000000..db2a210a
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-background@4x.9.png b/src/imports/controls/imagine/images/checkdelegate-background@4x.9.png
new file mode 100644
index 00000000..6427d7ab
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused.png
new file mode 100644
index 00000000..f22ebf09
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@2x.png
new file mode 100644
index 00000000..fd3080a1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@3x.png
new file mode 100644
index 00000000..6393373f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@4x.png
new file mode 100644
index 00000000..32dedb7f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered.png
new file mode 100644
index 00000000..f22ebf09
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@2x.png
new file mode 100644
index 00000000..fd3080a1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@3x.png
new file mode 100644
index 00000000..6393373f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@4x.png
new file mode 100644
index 00000000..32dedb7f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed.png
new file mode 100644
index 00000000..846416aa
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@2x.png
new file mode 100644
index 00000000..bc85bf94
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@3x.png
new file mode 100644
index 00000000..17ef9e58
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@4x.png
new file mode 100644
index 00000000..7e9dd750
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked.png
new file mode 100644
index 00000000..f06cc5f6
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked@2x.png
new file mode 100644
index 00000000..3db78a17
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked@3x.png
new file mode 100644
index 00000000..eadb5968
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-checked@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-checked@4x.png
new file mode 100644
index 00000000..9bdfac8a
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-disabled.png b/src/imports/controls/imagine/images/checkdelegate-indicator-disabled.png
new file mode 100644
index 00000000..a8305968
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-disabled@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-disabled@2x.png
new file mode 100644
index 00000000..e8046c5e
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-disabled@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-disabled@3x.png
new file mode 100644
index 00000000..d44111bb
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-disabled@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-disabled@4x.png
new file mode 100644
index 00000000..24fa0c0d
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-focused.png b/src/imports/controls/imagine/images/checkdelegate-indicator-focused.png
new file mode 100644
index 00000000..1c598c1f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-focused@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-focused@2x.png
new file mode 100644
index 00000000..31ff320e
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-focused@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-focused@3x.png
new file mode 100644
index 00000000..15a1b487
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-focused@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-focused@4x.png
new file mode 100644
index 00000000..db11c0c1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-hovered.png b/src/imports/controls/imagine/images/checkdelegate-indicator-hovered.png
new file mode 100644
index 00000000..1c598c1f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-hovered@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-hovered@2x.png
new file mode 100644
index 00000000..31ff320e
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-hovered@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-hovered@3x.png
new file mode 100644
index 00000000..15a1b487
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-hovered@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-hovered@4x.png
new file mode 100644
index 00000000..db11c0c1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused.png
new file mode 100644
index 00000000..23c8197a
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@2x.png
new file mode 100644
index 00000000..046a0e6c
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@3x.png
new file mode 100644
index 00000000..890b4c66
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@4x.png
new file mode 100644
index 00000000..1dcc73c9
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered.png
new file mode 100644
index 00000000..23c8197a
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@2x.png
new file mode 100644
index 00000000..046a0e6c
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@3x.png
new file mode 100644
index 00000000..890b4c66
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@4x.png
new file mode 100644
index 00000000..1dcc73c9
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed.png
new file mode 100644
index 00000000..bdd3b6f7
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@2x.png
new file mode 100644
index 00000000..8e5e3478
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@3x.png
new file mode 100644
index 00000000..aa60fac0
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@4x.png
new file mode 100644
index 00000000..98c43e17
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked.png
new file mode 100644
index 00000000..9d09b33b
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@2x.png
new file mode 100644
index 00000000..bf4ee4b8
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@3x.png
new file mode 100644
index 00000000..6726df07
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@4x.png
new file mode 100644
index 00000000..400daa58
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-partially-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-pressed.png b/src/imports/controls/imagine/images/checkdelegate-indicator-pressed.png
new file mode 100644
index 00000000..e4f02db1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-pressed@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-pressed@2x.png
new file mode 100644
index 00000000..e2342547
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-pressed@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-pressed@3x.png
new file mode 100644
index 00000000..8ae24d75
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator-pressed@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator-pressed@4x.png
new file mode 100644
index 00000000..04a32370
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator.png b/src/imports/controls/imagine/images/checkdelegate-indicator.png
new file mode 100644
index 00000000..d7b4c6d1
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator@2x.png b/src/imports/controls/imagine/images/checkdelegate-indicator@2x.png
new file mode 100644
index 00000000..0ae3fa8f
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator@3x.png b/src/imports/controls/imagine/images/checkdelegate-indicator@3x.png
new file mode 100644
index 00000000..f8de503c
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/checkdelegate-indicator@4x.png b/src/imports/controls/imagine/images/checkdelegate-indicator@4x.png
new file mode 100644
index 00000000..4f16042d
--- /dev/null
+++ b/src/imports/controls/imagine/images/checkdelegate-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-disabled.9.png b/src/imports/controls/imagine/images/combobox-background-disabled.9.png
new file mode 100644
index 00000000..695ccd71
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-disabled@2x.9.png b/src/imports/controls/imagine/images/combobox-background-disabled@2x.9.png
new file mode 100644
index 00000000..10e8d681
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-disabled@3x.9.png b/src/imports/controls/imagine/images/combobox-background-disabled@3x.9.png
new file mode 100644
index 00000000..6297b4cf
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-disabled@4x.9.png b/src/imports/controls/imagine/images/combobox-background-disabled@4x.9.png
new file mode 100644
index 00000000..715c6cb4
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable-disabled.9.png b/src/imports/controls/imagine/images/combobox-background-editable-disabled.9.png
new file mode 100644
index 00000000..49335bde
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable-disabled@2x.9.png b/src/imports/controls/imagine/images/combobox-background-editable-disabled@2x.9.png
new file mode 100644
index 00000000..792ae742
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable-disabled@3x.9.png b/src/imports/controls/imagine/images/combobox-background-editable-disabled@3x.9.png
new file mode 100644
index 00000000..b391c100
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable-disabled@4x.9.png b/src/imports/controls/imagine/images/combobox-background-editable-disabled@4x.9.png
new file mode 100644
index 00000000..51641c3e
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable-focused.9.png b/src/imports/controls/imagine/images/combobox-background-editable-focused.9.png
new file mode 100644
index 00000000..6710bf1e
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable-focused@2x.9.png b/src/imports/controls/imagine/images/combobox-background-editable-focused@2x.9.png
new file mode 100644
index 00000000..d61bac87
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable-focused@3x.9.png b/src/imports/controls/imagine/images/combobox-background-editable-focused@3x.9.png
new file mode 100644
index 00000000..380a6e37
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable-focused@4x.9.png b/src/imports/controls/imagine/images/combobox-background-editable-focused@4x.9.png
new file mode 100644
index 00000000..7d2e2cbb
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable.9.png b/src/imports/controls/imagine/images/combobox-background-editable.9.png
new file mode 100644
index 00000000..f624616e
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable@2x.9.png b/src/imports/controls/imagine/images/combobox-background-editable@2x.9.png
new file mode 100644
index 00000000..fbfa7fea
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable@3x.9.png b/src/imports/controls/imagine/images/combobox-background-editable@3x.9.png
new file mode 100644
index 00000000..d67dda03
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-editable@4x.9.png b/src/imports/controls/imagine/images/combobox-background-editable@4x.9.png
new file mode 100644
index 00000000..5a24717a
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-editable@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-focused.9.png b/src/imports/controls/imagine/images/combobox-background-focused.9.png
new file mode 100644
index 00000000..a44ad0a7
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-focused@2x.9.png b/src/imports/controls/imagine/images/combobox-background-focused@2x.9.png
new file mode 100644
index 00000000..80c8c612
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-focused@3x.9.png b/src/imports/controls/imagine/images/combobox-background-focused@3x.9.png
new file mode 100644
index 00000000..dca2a6fe
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-focused@4x.9.png b/src/imports/controls/imagine/images/combobox-background-focused@4x.9.png
new file mode 100644
index 00000000..f578a3bb
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-hovered.9.png b/src/imports/controls/imagine/images/combobox-background-hovered.9.png
new file mode 100644
index 00000000..a44ad0a7
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-hovered@2x.9.png b/src/imports/controls/imagine/images/combobox-background-hovered@2x.9.png
new file mode 100644
index 00000000..80c8c612
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-hovered@3x.9.png b/src/imports/controls/imagine/images/combobox-background-hovered@3x.9.png
new file mode 100644
index 00000000..dca2a6fe
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-hovered@4x.9.png b/src/imports/controls/imagine/images/combobox-background-hovered@4x.9.png
new file mode 100644
index 00000000..f578a3bb
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-open.9.png b/src/imports/controls/imagine/images/combobox-background-open.9.png
new file mode 100644
index 00000000..00dad7f0
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-open.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-open@2x.9.png b/src/imports/controls/imagine/images/combobox-background-open@2x.9.png
new file mode 100644
index 00000000..e7bff6c4
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-open@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-open@3x.9.png b/src/imports/controls/imagine/images/combobox-background-open@3x.9.png
new file mode 100644
index 00000000..96f4d58b
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-open@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-open@4x.9.png b/src/imports/controls/imagine/images/combobox-background-open@4x.9.png
new file mode 100644
index 00000000..7c65290a
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-open@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-pressed.9.png b/src/imports/controls/imagine/images/combobox-background-pressed.9.png
new file mode 100644
index 00000000..00dad7f0
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-pressed@2x.9.png b/src/imports/controls/imagine/images/combobox-background-pressed@2x.9.png
new file mode 100644
index 00000000..e7bff6c4
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-pressed@3x.9.png b/src/imports/controls/imagine/images/combobox-background-pressed@3x.9.png
new file mode 100644
index 00000000..96f4d58b
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background-pressed@4x.9.png b/src/imports/controls/imagine/images/combobox-background-pressed@4x.9.png
new file mode 100644
index 00000000..7c65290a
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background.9.png b/src/imports/controls/imagine/images/combobox-background.9.png
new file mode 100644
index 00000000..ff9be7f7
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background@2x.9.png b/src/imports/controls/imagine/images/combobox-background@2x.9.png
new file mode 100644
index 00000000..bda0a45e
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background@3x.9.png b/src/imports/controls/imagine/images/combobox-background@3x.9.png
new file mode 100644
index 00000000..c34beccf
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-background@4x.9.png b/src/imports/controls/imagine/images/combobox-background@4x.9.png
new file mode 100644
index 00000000..22d34bd5
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-disabled.png b/src/imports/controls/imagine/images/combobox-indicator-disabled.png
new file mode 100644
index 00000000..cf4e0879
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-disabled@2x.png b/src/imports/controls/imagine/images/combobox-indicator-disabled@2x.png
new file mode 100644
index 00000000..74306ec7
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-disabled@3x.png b/src/imports/controls/imagine/images/combobox-indicator-disabled@3x.png
new file mode 100644
index 00000000..d69fea5c
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-disabled@4x.png b/src/imports/controls/imagine/images/combobox-indicator-disabled@4x.png
new file mode 100644
index 00000000..9e63c449
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-disabled.png b/src/imports/controls/imagine/images/combobox-indicator-editable-disabled.png
new file mode 100644
index 00000000..89f4efa2
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-disabled@2x.png b/src/imports/controls/imagine/images/combobox-indicator-editable-disabled@2x.png
new file mode 100644
index 00000000..e50ed17b
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-disabled@3x.png b/src/imports/controls/imagine/images/combobox-indicator-editable-disabled@3x.png
new file mode 100644
index 00000000..c82a5b2a
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-disabled@4x.png b/src/imports/controls/imagine/images/combobox-indicator-editable-disabled@4x.png
new file mode 100644
index 00000000..6415ef59
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled.png b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled.png
new file mode 100644
index 00000000..f4e9b366
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@2x.png b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@2x.png
new file mode 100644
index 00000000..cdbc9773
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@3x.png b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@3x.png
new file mode 100644
index 00000000..fbb520b0
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@4x.png b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@4x.png
new file mode 100644
index 00000000..da6d1c24
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored.png b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored.png
new file mode 100644
index 00000000..13a7a520
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@2x.png b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@2x.png
new file mode 100644
index 00000000..c8f74b13
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@3x.png b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@3x.png
new file mode 100644
index 00000000..a330edf3
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@4x.png b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@4x.png
new file mode 100644
index 00000000..2acedf54
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable-mirrored@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable.png b/src/imports/controls/imagine/images/combobox-indicator-editable.png
new file mode 100644
index 00000000..a3899a11
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable@2x.png b/src/imports/controls/imagine/images/combobox-indicator-editable@2x.png
new file mode 100644
index 00000000..2cec8359
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable@3x.png b/src/imports/controls/imagine/images/combobox-indicator-editable@3x.png
new file mode 100644
index 00000000..23911865
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator-editable@4x.png b/src/imports/controls/imagine/images/combobox-indicator-editable@4x.png
new file mode 100644
index 00000000..8095e11b
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator-editable@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator.png b/src/imports/controls/imagine/images/combobox-indicator.png
new file mode 100644
index 00000000..4859714d
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator@2x.png b/src/imports/controls/imagine/images/combobox-indicator@2x.png
new file mode 100644
index 00000000..d492a9d4
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator@3x.png b/src/imports/controls/imagine/images/combobox-indicator@3x.png
new file mode 100644
index 00000000..bf2e4f78
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-indicator@4x.png b/src/imports/controls/imagine/images/combobox-indicator@4x.png
new file mode 100644
index 00000000..5c107a07
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-popup.9.png b/src/imports/controls/imagine/images/combobox-popup.9.png
new file mode 100644
index 00000000..646419d1
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-popup.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-popup@2x.9.png b/src/imports/controls/imagine/images/combobox-popup@2x.9.png
new file mode 100644
index 00000000..9bce26ac
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-popup@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-popup@3x.9.png b/src/imports/controls/imagine/images/combobox-popup@3x.9.png
new file mode 100644
index 00000000..1857d8e0
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-popup@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/combobox-popup@4x.9.png b/src/imports/controls/imagine/images/combobox-popup@4x.9.png
new file mode 100644
index 00000000..b2132f49
--- /dev/null
+++ b/src/imports/controls/imagine/images/combobox-popup@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked-focused.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked-focused.9.png
new file mode 100644
index 00000000..829d68a9
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked-focused@2x.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked-focused@2x.9.png
new file mode 100644
index 00000000..bf375d43
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked-focused@3x.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked-focused@3x.9.png
new file mode 100644
index 00000000..8759c337
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked-focused@4x.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked-focused@4x.9.png
new file mode 100644
index 00000000..7b8f3616
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked-hovered.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked-hovered.9.png
new file mode 100644
index 00000000..829d68a9
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked-hovered@2x.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked-hovered@2x.9.png
new file mode 100644
index 00000000..bf375d43
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked-hovered@3x.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked-hovered@3x.9.png
new file mode 100644
index 00000000..8759c337
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked-hovered@4x.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked-hovered@4x.9.png
new file mode 100644
index 00000000..7b8f3616
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked.9.png
new file mode 100644
index 00000000..3ca06e6c
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked@2x.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked@2x.9.png
new file mode 100644
index 00000000..0afc3dea
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked@3x.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked@3x.9.png
new file mode 100644
index 00000000..348687ad
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-checked@4x.9.png b/src/imports/controls/imagine/images/delaybutton-background-checked@4x.9.png
new file mode 100644
index 00000000..4dff0ba8
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-checked@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-disabled-checked.9.png b/src/imports/controls/imagine/images/delaybutton-background-disabled-checked.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-disabled-checked.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-disabled-checked@2x.9.png b/src/imports/controls/imagine/images/delaybutton-background-disabled-checked@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-disabled-checked@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-disabled-checked@3x.9.png b/src/imports/controls/imagine/images/delaybutton-background-disabled-checked@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-disabled-checked@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-disabled-checked@4x.9.png b/src/imports/controls/imagine/images/delaybutton-background-disabled-checked@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-disabled-checked@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-disabled.9.png b/src/imports/controls/imagine/images/delaybutton-background-disabled.9.png
new file mode 100644
index 00000000..c06fd7cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-disabled@2x.9.png b/src/imports/controls/imagine/images/delaybutton-background-disabled@2x.9.png
new file mode 100644
index 00000000..b86a13cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-disabled@3x.9.png b/src/imports/controls/imagine/images/delaybutton-background-disabled@3x.9.png
new file mode 100644
index 00000000..7fa4dd83
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-disabled@4x.9.png b/src/imports/controls/imagine/images/delaybutton-background-disabled@4x.9.png
new file mode 100644
index 00000000..676bb0dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-focused.9.png b/src/imports/controls/imagine/images/delaybutton-background-focused.9.png
new file mode 100644
index 00000000..5f304316
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-focused@2x.9.png b/src/imports/controls/imagine/images/delaybutton-background-focused@2x.9.png
new file mode 100644
index 00000000..eaf07709
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-focused@3x.9.png b/src/imports/controls/imagine/images/delaybutton-background-focused@3x.9.png
new file mode 100644
index 00000000..405fe421
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-focused@4x.9.png b/src/imports/controls/imagine/images/delaybutton-background-focused@4x.9.png
new file mode 100644
index 00000000..f5582735
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-hovered.9.png b/src/imports/controls/imagine/images/delaybutton-background-hovered.9.png
new file mode 100644
index 00000000..04573ce4
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-hovered@2x.9.png b/src/imports/controls/imagine/images/delaybutton-background-hovered@2x.9.png
new file mode 100644
index 00000000..ad25d378
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-hovered@3x.9.png b/src/imports/controls/imagine/images/delaybutton-background-hovered@3x.9.png
new file mode 100644
index 00000000..2f599e72
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-hovered@4x.9.png b/src/imports/controls/imagine/images/delaybutton-background-hovered@4x.9.png
new file mode 100644
index 00000000..6ac51521
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-pressed.9.png b/src/imports/controls/imagine/images/delaybutton-background-pressed.9.png
new file mode 100644
index 00000000..3ca06e6c
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-pressed@2x.9.png b/src/imports/controls/imagine/images/delaybutton-background-pressed@2x.9.png
new file mode 100644
index 00000000..0afc3dea
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-pressed@3x.9.png b/src/imports/controls/imagine/images/delaybutton-background-pressed@3x.9.png
new file mode 100644
index 00000000..348687ad
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background-pressed@4x.9.png b/src/imports/controls/imagine/images/delaybutton-background-pressed@4x.9.png
new file mode 100644
index 00000000..4dff0ba8
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background.9.png b/src/imports/controls/imagine/images/delaybutton-background.9.png
new file mode 100644
index 00000000..053da917
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background@2x.9.png b/src/imports/controls/imagine/images/delaybutton-background@2x.9.png
new file mode 100644
index 00000000..471940f1
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background@3x.9.png b/src/imports/controls/imagine/images/delaybutton-background@3x.9.png
new file mode 100644
index 00000000..06155e8a
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-background@4x.9.png b/src/imports/controls/imagine/images/delaybutton-background@4x.9.png
new file mode 100644
index 00000000..7d776e51
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-mask.9.png b/src/imports/controls/imagine/images/delaybutton-mask.9.png
new file mode 100644
index 00000000..06864c1b
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-mask.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-mask@2x.9.png b/src/imports/controls/imagine/images/delaybutton-mask@2x.9.png
new file mode 100644
index 00000000..808d25d3
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-mask@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-mask@3x.9.png b/src/imports/controls/imagine/images/delaybutton-mask@3x.9.png
new file mode 100644
index 00000000..4efdcd05
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-mask@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-mask@4x.9.png b/src/imports/controls/imagine/images/delaybutton-mask@4x.9.png
new file mode 100644
index 00000000..ec246a02
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-mask@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-progress-disabled.9.png b/src/imports/controls/imagine/images/delaybutton-progress-disabled.9.png
new file mode 100644
index 00000000..bdf56055
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-progress-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-progress-disabled@2x.9.png b/src/imports/controls/imagine/images/delaybutton-progress-disabled@2x.9.png
new file mode 100644
index 00000000..a58c93a1
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-progress-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-progress-disabled@3x.9.png b/src/imports/controls/imagine/images/delaybutton-progress-disabled@3x.9.png
new file mode 100644
index 00000000..259f68ea
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-progress-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-progress-disabled@4x.9.png b/src/imports/controls/imagine/images/delaybutton-progress-disabled@4x.9.png
new file mode 100644
index 00000000..a075d444
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-progress-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-progress.9.png b/src/imports/controls/imagine/images/delaybutton-progress.9.png
new file mode 100644
index 00000000..0848cbcd
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-progress.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-progress@2x.9.png b/src/imports/controls/imagine/images/delaybutton-progress@2x.9.png
new file mode 100644
index 00000000..1a376399
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-progress@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-progress@3x.9.png b/src/imports/controls/imagine/images/delaybutton-progress@3x.9.png
new file mode 100644
index 00000000..704ab464
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-progress@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/delaybutton-progress@4x.9.png b/src/imports/controls/imagine/images/delaybutton-progress@4x.9.png
new file mode 100644
index 00000000..ec568ce0
--- /dev/null
+++ b/src/imports/controls/imagine/images/delaybutton-progress@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background-disabled.png b/src/imports/controls/imagine/images/dial-background-disabled.png
new file mode 100644
index 00000000..eaea9591
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background-disabled@2x.png b/src/imports/controls/imagine/images/dial-background-disabled@2x.png
new file mode 100644
index 00000000..de2d3fbe
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background-disabled@3x.png b/src/imports/controls/imagine/images/dial-background-disabled@3x.png
new file mode 100644
index 00000000..15d53353
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background-disabled@4x.png b/src/imports/controls/imagine/images/dial-background-disabled@4x.png
new file mode 100644
index 00000000..d6708c83
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background-focused.png b/src/imports/controls/imagine/images/dial-background-focused.png
new file mode 100644
index 00000000..c7c4f8ad
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background-focused@2x.png b/src/imports/controls/imagine/images/dial-background-focused@2x.png
new file mode 100644
index 00000000..01febba4
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background-focused@3x.png b/src/imports/controls/imagine/images/dial-background-focused@3x.png
new file mode 100644
index 00000000..2f4533ca
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background-focused@4x.png b/src/imports/controls/imagine/images/dial-background-focused@4x.png
new file mode 100644
index 00000000..806a784d
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background.png b/src/imports/controls/imagine/images/dial-background.png
new file mode 100644
index 00000000..7836be2d
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background@2x.png b/src/imports/controls/imagine/images/dial-background@2x.png
new file mode 100644
index 00000000..b80fb882
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background@3x.png b/src/imports/controls/imagine/images/dial-background@3x.png
new file mode 100644
index 00000000..76dd0ba5
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-background@4x.png b/src/imports/controls/imagine/images/dial-background@4x.png
new file mode 100644
index 00000000..774d91f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-background@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-disabled.png b/src/imports/controls/imagine/images/dial-handle-disabled.png
new file mode 100644
index 00000000..e7ecf615
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-disabled@2x.png b/src/imports/controls/imagine/images/dial-handle-disabled@2x.png
new file mode 100644
index 00000000..5bf4a433
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-disabled@3x.png b/src/imports/controls/imagine/images/dial-handle-disabled@3x.png
new file mode 100644
index 00000000..8fc3d43c
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-disabled@4x.png b/src/imports/controls/imagine/images/dial-handle-disabled@4x.png
new file mode 100644
index 00000000..6356c101
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused-hovered.png b/src/imports/controls/imagine/images/dial-handle-focused-hovered.png
new file mode 100644
index 00000000..a64faa7b
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused-hovered@2x.png b/src/imports/controls/imagine/images/dial-handle-focused-hovered@2x.png
new file mode 100644
index 00000000..3fb2b8d4
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused-hovered@3x.png b/src/imports/controls/imagine/images/dial-handle-focused-hovered@3x.png
new file mode 100644
index 00000000..05d5b798
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused-hovered@4x.png b/src/imports/controls/imagine/images/dial-handle-focused-hovered@4x.png
new file mode 100644
index 00000000..eecba9d6
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused-pressed.png b/src/imports/controls/imagine/images/dial-handle-focused-pressed.png
new file mode 100644
index 00000000..e310a90d
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused-pressed@2x.png b/src/imports/controls/imagine/images/dial-handle-focused-pressed@2x.png
new file mode 100644
index 00000000..770572a8
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused-pressed@3x.png b/src/imports/controls/imagine/images/dial-handle-focused-pressed@3x.png
new file mode 100644
index 00000000..b58f1909
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused-pressed@4x.png b/src/imports/controls/imagine/images/dial-handle-focused-pressed@4x.png
new file mode 100644
index 00000000..2c71a0ac
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused.png b/src/imports/controls/imagine/images/dial-handle-focused.png
new file mode 100644
index 00000000..21969bc5
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused@2x.png b/src/imports/controls/imagine/images/dial-handle-focused@2x.png
new file mode 100644
index 00000000..753b6ce7
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused@3x.png b/src/imports/controls/imagine/images/dial-handle-focused@3x.png
new file mode 100644
index 00000000..00232d38
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-focused@4x.png b/src/imports/controls/imagine/images/dial-handle-focused@4x.png
new file mode 100644
index 00000000..834850d6
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-hovered.png b/src/imports/controls/imagine/images/dial-handle-hovered.png
new file mode 100644
index 00000000..ad76fda7
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-hovered@2x.png b/src/imports/controls/imagine/images/dial-handle-hovered@2x.png
new file mode 100644
index 00000000..215097a3
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-hovered@3x.png b/src/imports/controls/imagine/images/dial-handle-hovered@3x.png
new file mode 100644
index 00000000..6653f555
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-hovered@4x.png b/src/imports/controls/imagine/images/dial-handle-hovered@4x.png
new file mode 100644
index 00000000..213e27b3
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-pressed.png b/src/imports/controls/imagine/images/dial-handle-pressed.png
new file mode 100644
index 00000000..9f8619c0
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-pressed@2x.png b/src/imports/controls/imagine/images/dial-handle-pressed@2x.png
new file mode 100644
index 00000000..78a9b9fe
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-pressed@3x.png b/src/imports/controls/imagine/images/dial-handle-pressed@3x.png
new file mode 100644
index 00000000..0d6d1e7e
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle-pressed@4x.png b/src/imports/controls/imagine/images/dial-handle-pressed@4x.png
new file mode 100644
index 00000000..1673343a
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle.png b/src/imports/controls/imagine/images/dial-handle.png
new file mode 100644
index 00000000..b4ad6b9a
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle@2x.png b/src/imports/controls/imagine/images/dial-handle@2x.png
new file mode 100644
index 00000000..0e6147d9
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle@3x.png b/src/imports/controls/imagine/images/dial-handle@3x.png
new file mode 100644
index 00000000..24ff1519
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dial-handle@4x.png b/src/imports/controls/imagine/images/dial-handle@4x.png
new file mode 100644
index 00000000..c6b82488
--- /dev/null
+++ b/src/imports/controls/imagine/images/dial-handle@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-background.9.png b/src/imports/controls/imagine/images/dialog-background.9.png
new file mode 100644
index 00000000..495d2f0d
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-background@2x.9.png b/src/imports/controls/imagine/images/dialog-background@2x.9.png
new file mode 100644
index 00000000..ba0df866
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-background@3x.9.png b/src/imports/controls/imagine/images/dialog-background@3x.9.png
new file mode 100644
index 00000000..e71856a5
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-background@4x.9.png b/src/imports/controls/imagine/images/dialog-background@4x.9.png
new file mode 100644
index 00000000..d756cda5
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-overlay-modal.png b/src/imports/controls/imagine/images/dialog-overlay-modal.png
new file mode 100644
index 00000000..296e914a
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-overlay-modal.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-overlay-modal@2x.png b/src/imports/controls/imagine/images/dialog-overlay-modal@2x.png
new file mode 100644
index 00000000..10c89300
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-overlay-modal@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-overlay-modal@3x.png b/src/imports/controls/imagine/images/dialog-overlay-modal@3x.png
new file mode 100644
index 00000000..f65996e9
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-overlay-modal@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-overlay-modal@4x.png b/src/imports/controls/imagine/images/dialog-overlay-modal@4x.png
new file mode 100644
index 00000000..a586f381
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-overlay-modal@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-overlay.png b/src/imports/controls/imagine/images/dialog-overlay.png
new file mode 100644
index 00000000..e7175b46
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-overlay.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-overlay@2x.png b/src/imports/controls/imagine/images/dialog-overlay@2x.png
new file mode 100644
index 00000000..db6566e0
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-overlay@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-overlay@3x.png b/src/imports/controls/imagine/images/dialog-overlay@3x.png
new file mode 100644
index 00000000..140e4692
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-overlay@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialog-overlay@4x.png b/src/imports/controls/imagine/images/dialog-overlay@4x.png
new file mode 100644
index 00000000..5115c28a
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialog-overlay@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialogbuttonbox-background.9.png b/src/imports/controls/imagine/images/dialogbuttonbox-background.9.png
new file mode 100644
index 00000000..347300bb
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialogbuttonbox-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialogbuttonbox-background@2x.9.png b/src/imports/controls/imagine/images/dialogbuttonbox-background@2x.9.png
new file mode 100644
index 00000000..8eddd6f4
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialogbuttonbox-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialogbuttonbox-background@3x.9.png b/src/imports/controls/imagine/images/dialogbuttonbox-background@3x.9.png
new file mode 100644
index 00000000..d4a407ba
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialogbuttonbox-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/dialogbuttonbox-background@4x.9.png b/src/imports/controls/imagine/images/dialogbuttonbox-background@4x.9.png
new file mode 100644
index 00000000..7af78edb
--- /dev/null
+++ b/src/imports/controls/imagine/images/dialogbuttonbox-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-bottom.9.png b/src/imports/controls/imagine/images/drawer-background-bottom.9.png
new file mode 100644
index 00000000..d33adad1
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-bottom.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-bottom@2x.9.png b/src/imports/controls/imagine/images/drawer-background-bottom@2x.9.png
new file mode 100644
index 00000000..c2becf9e
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-bottom@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-bottom@3x.9.png b/src/imports/controls/imagine/images/drawer-background-bottom@3x.9.png
new file mode 100644
index 00000000..52439206
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-bottom@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-bottom@4x.9.png b/src/imports/controls/imagine/images/drawer-background-bottom@4x.9.png
new file mode 100644
index 00000000..abf6964e
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-bottom@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-left.9.png b/src/imports/controls/imagine/images/drawer-background-left.9.png
new file mode 100644
index 00000000..95485ea1
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-left.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-left@2x.9.png b/src/imports/controls/imagine/images/drawer-background-left@2x.9.png
new file mode 100644
index 00000000..9060bf37
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-left@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-left@3x.9.png b/src/imports/controls/imagine/images/drawer-background-left@3x.9.png
new file mode 100644
index 00000000..70e39930
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-left@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-left@4x.9.png b/src/imports/controls/imagine/images/drawer-background-left@4x.9.png
new file mode 100644
index 00000000..8f26bbf0
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-left@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-right.9.png b/src/imports/controls/imagine/images/drawer-background-right.9.png
new file mode 100644
index 00000000..9951229e
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-right.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-right@2x.9.png b/src/imports/controls/imagine/images/drawer-background-right@2x.9.png
new file mode 100644
index 00000000..850811c6
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-right@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-right@3x.9.png b/src/imports/controls/imagine/images/drawer-background-right@3x.9.png
new file mode 100644
index 00000000..a955e241
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-right@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-right@4x.9.png b/src/imports/controls/imagine/images/drawer-background-right@4x.9.png
new file mode 100644
index 00000000..51011c8c
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-right@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-top.9.png b/src/imports/controls/imagine/images/drawer-background-top.9.png
new file mode 100644
index 00000000..8685246c
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-top.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-top@2x.9.png b/src/imports/controls/imagine/images/drawer-background-top@2x.9.png
new file mode 100644
index 00000000..b4ebf860
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-top@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-top@3x.9.png b/src/imports/controls/imagine/images/drawer-background-top@3x.9.png
new file mode 100644
index 00000000..2075c6eb
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-top@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-background-top@4x.9.png b/src/imports/controls/imagine/images/drawer-background-top@4x.9.png
new file mode 100644
index 00000000..fad0cc13
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-background-top@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-overlay-modal.png b/src/imports/controls/imagine/images/drawer-overlay-modal.png
new file mode 100644
index 00000000..296e914a
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-overlay-modal.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-overlay-modal@2x.png b/src/imports/controls/imagine/images/drawer-overlay-modal@2x.png
new file mode 100644
index 00000000..10c89300
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-overlay-modal@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-overlay-modal@3x.png b/src/imports/controls/imagine/images/drawer-overlay-modal@3x.png
new file mode 100644
index 00000000..f65996e9
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-overlay-modal@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-overlay-modal@4x.png b/src/imports/controls/imagine/images/drawer-overlay-modal@4x.png
new file mode 100644
index 00000000..a586f381
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-overlay-modal@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-overlay.png b/src/imports/controls/imagine/images/drawer-overlay.png
new file mode 100644
index 00000000..e7175b46
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-overlay.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-overlay@2x.png b/src/imports/controls/imagine/images/drawer-overlay@2x.png
new file mode 100644
index 00000000..db6566e0
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-overlay@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-overlay@3x.png b/src/imports/controls/imagine/images/drawer-overlay@3x.png
new file mode 100644
index 00000000..140e4692
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-overlay@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/drawer-overlay@4x.png b/src/imports/controls/imagine/images/drawer-overlay@4x.png
new file mode 100644
index 00000000..5115c28a
--- /dev/null
+++ b/src/imports/controls/imagine/images/drawer-overlay@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/frame-background.9.png b/src/imports/controls/imagine/images/frame-background.9.png
new file mode 100644
index 00000000..3d3ae702
--- /dev/null
+++ b/src/imports/controls/imagine/images/frame-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/frame-background@2x.9.png b/src/imports/controls/imagine/images/frame-background@2x.9.png
new file mode 100644
index 00000000..8df38fe9
--- /dev/null
+++ b/src/imports/controls/imagine/images/frame-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/frame-background@3x.9.png b/src/imports/controls/imagine/images/frame-background@3x.9.png
new file mode 100644
index 00000000..41012873
--- /dev/null
+++ b/src/imports/controls/imagine/images/frame-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/frame-background@4x.9.png b/src/imports/controls/imagine/images/frame-background@4x.9.png
new file mode 100644
index 00000000..7da718de
--- /dev/null
+++ b/src/imports/controls/imagine/images/frame-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/groupbox-background.9.png b/src/imports/controls/imagine/images/groupbox-background.9.png
new file mode 100644
index 00000000..3d3ae702
--- /dev/null
+++ b/src/imports/controls/imagine/images/groupbox-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/groupbox-background@2x.9.png b/src/imports/controls/imagine/images/groupbox-background@2x.9.png
new file mode 100644
index 00000000..8df38fe9
--- /dev/null
+++ b/src/imports/controls/imagine/images/groupbox-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/groupbox-background@3x.9.png b/src/imports/controls/imagine/images/groupbox-background@3x.9.png
new file mode 100644
index 00000000..41012873
--- /dev/null
+++ b/src/imports/controls/imagine/images/groupbox-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/groupbox-background@4x.9.png b/src/imports/controls/imagine/images/groupbox-background@4x.9.png
new file mode 100644
index 00000000..7da718de
--- /dev/null
+++ b/src/imports/controls/imagine/images/groupbox-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/groupbox-title.9.png b/src/imports/controls/imagine/images/groupbox-title.9.png
new file mode 100644
index 00000000..e7585354
--- /dev/null
+++ b/src/imports/controls/imagine/images/groupbox-title.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/groupbox-title@2x.9.png b/src/imports/controls/imagine/images/groupbox-title@2x.9.png
new file mode 100644
index 00000000..3b8e23e3
--- /dev/null
+++ b/src/imports/controls/imagine/images/groupbox-title@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/groupbox-title@3x.9.png b/src/imports/controls/imagine/images/groupbox-title@3x.9.png
new file mode 100644
index 00000000..7ed67b27
--- /dev/null
+++ b/src/imports/controls/imagine/images/groupbox-title@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/groupbox-title@4x.9.png b/src/imports/controls/imagine/images/groupbox-title@4x.9.png
new file mode 100644
index 00000000..478bf1de
--- /dev/null
+++ b/src/imports/controls/imagine/images/groupbox-title@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-disabled.9.png b/src/imports/controls/imagine/images/itemdelegate-background-disabled.9.png
new file mode 100644
index 00000000..4b56fe35
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-disabled@2x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-disabled@2x.9.png
new file mode 100644
index 00000000..34edef58
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-disabled@3x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-disabled@3x.9.png
new file mode 100644
index 00000000..dd2cc6ba
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-disabled@4x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-disabled@4x.9.png
new file mode 100644
index 00000000..b7890a3c
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-focused.9.png b/src/imports/controls/imagine/images/itemdelegate-background-focused.9.png
new file mode 100644
index 00000000..b31343dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-focused@2x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-focused@2x.9.png
new file mode 100644
index 00000000..c56c62da
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-focused@3x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-focused@3x.9.png
new file mode 100644
index 00000000..bfbc82f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-focused@4x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-focused@4x.9.png
new file mode 100644
index 00000000..e31ab63b
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-highlighted.9.png b/src/imports/controls/imagine/images/itemdelegate-background-highlighted.9.png
new file mode 100644
index 00000000..32847cfa
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-highlighted.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-highlighted@2x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-highlighted@2x.9.png
new file mode 100644
index 00000000..126fcb29
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-highlighted@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-highlighted@3x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-highlighted@3x.9.png
new file mode 100644
index 00000000..22b7c9f2
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-highlighted@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-highlighted@4x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-highlighted@4x.9.png
new file mode 100644
index 00000000..4e67f310
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-highlighted@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-hovered.9.png b/src/imports/controls/imagine/images/itemdelegate-background-hovered.9.png
new file mode 100644
index 00000000..a53f63cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-hovered@2x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-hovered@2x.9.png
new file mode 100644
index 00000000..07510b10
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-hovered@3x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-hovered@3x.9.png
new file mode 100644
index 00000000..db2a210a
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-hovered@4x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-hovered@4x.9.png
new file mode 100644
index 00000000..6427d7ab
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-pressed.9.png b/src/imports/controls/imagine/images/itemdelegate-background-pressed.9.png
new file mode 100644
index 00000000..b31343dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-pressed@2x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-pressed@2x.9.png
new file mode 100644
index 00000000..c56c62da
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-pressed@3x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-pressed@3x.9.png
new file mode 100644
index 00000000..bfbc82f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background-pressed@4x.9.png b/src/imports/controls/imagine/images/itemdelegate-background-pressed@4x.9.png
new file mode 100644
index 00000000..e31ab63b
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background.9.png b/src/imports/controls/imagine/images/itemdelegate-background.9.png
new file mode 100644
index 00000000..a53f63cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background@2x.9.png b/src/imports/controls/imagine/images/itemdelegate-background@2x.9.png
new file mode 100644
index 00000000..07510b10
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background@3x.9.png b/src/imports/controls/imagine/images/itemdelegate-background@3x.9.png
new file mode 100644
index 00000000..db2a210a
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/itemdelegate-background@4x.9.png b/src/imports/controls/imagine/images/itemdelegate-background@4x.9.png
new file mode 100644
index 00000000..6427d7ab
--- /dev/null
+++ b/src/imports/controls/imagine/images/itemdelegate-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menu-background.9.png b/src/imports/controls/imagine/images/menu-background.9.png
new file mode 100644
index 00000000..8253612c
--- /dev/null
+++ b/src/imports/controls/imagine/images/menu-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menu-background@2x.9.png b/src/imports/controls/imagine/images/menu-background@2x.9.png
new file mode 100644
index 00000000..55438bde
--- /dev/null
+++ b/src/imports/controls/imagine/images/menu-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menu-background@3x.9.png b/src/imports/controls/imagine/images/menu-background@3x.9.png
new file mode 100644
index 00000000..7be5da41
--- /dev/null
+++ b/src/imports/controls/imagine/images/menu-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menu-background@4x.9.png b/src/imports/controls/imagine/images/menu-background@4x.9.png
new file mode 100644
index 00000000..6e8588ff
--- /dev/null
+++ b/src/imports/controls/imagine/images/menu-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-arrow-disabled.png b/src/imports/controls/imagine/images/menuitem-arrow-disabled.png
new file mode 100644
index 00000000..4d681e2b
--- /dev/null
+++ 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
new file mode 100644
index 00000000..cddc7844
--- /dev/null
+++ 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
new file mode 100644
index 00000000..4546de35
--- /dev/null
+++ 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
new file mode 100644
index 00000000..cd403df0
--- /dev/null
+++ 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
new file mode 100644
index 00000000..ac94a9a8
--- /dev/null
+++ 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
new file mode 100644
index 00000000..5533cdc1
--- /dev/null
+++ 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
new file mode 100644
index 00000000..a3796957
--- /dev/null
+++ 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
new file mode 100644
index 00000000..47a6a0b9
--- /dev/null
+++ 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
new file mode 100644
index 00000000..95dbe3dd
--- /dev/null
+++ 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
new file mode 100644
index 00000000..53978404
--- /dev/null
+++ 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
new file mode 100644
index 00000000..f922f3c2
--- /dev/null
+++ 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
new file mode 100644
index 00000000..c2a7b8ad
--- /dev/null
+++ 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
new file mode 100644
index 00000000..eac2d6d2
--- /dev/null
+++ 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
new file mode 100644
index 00000000..008ca41a
--- /dev/null
+++ 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
new file mode 100644
index 00000000..83c8a27c
--- /dev/null
+++ 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
new file mode 100644
index 00000000..d838880e
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-arrow@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-background-highlighted.9.png b/src/imports/controls/imagine/images/menuitem-background-highlighted.9.png
new file mode 100644
index 00000000..4cc1f069
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-background-highlighted.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-background-highlighted@2x.9.png b/src/imports/controls/imagine/images/menuitem-background-highlighted@2x.9.png
new file mode 100644
index 00000000..b44793d6
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-background-highlighted@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-background-highlighted@3x.9.png b/src/imports/controls/imagine/images/menuitem-background-highlighted@3x.9.png
new file mode 100644
index 00000000..ae0acfb7
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-background-highlighted@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-background-highlighted@4x.9.png b/src/imports/controls/imagine/images/menuitem-background-highlighted@4x.9.png
new file mode 100644
index 00000000..dbb09c33
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-background-highlighted@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-background.9.png b/src/imports/controls/imagine/images/menuitem-background.9.png
new file mode 100644
index 00000000..1fd1f099
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-background@2x.9.png b/src/imports/controls/imagine/images/menuitem-background@2x.9.png
new file mode 100644
index 00000000..1b30ac3b
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-background@3x.9.png b/src/imports/controls/imagine/images/menuitem-background@3x.9.png
new file mode 100644
index 00000000..b0012628
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-background@4x.9.png b/src/imports/controls/imagine/images/menuitem-background@4x.9.png
new file mode 100644
index 00000000..1312abee
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-focused.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-focused.png
new file mode 100644
index 00000000..f22ebf09
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-focused@2x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-focused@2x.png
new file mode 100644
index 00000000..fd3080a1
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-focused@3x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-focused@3x.png
new file mode 100644
index 00000000..6393373f
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-focused@4x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-focused@4x.png
new file mode 100644
index 00000000..32dedb7f
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered.png
new file mode 100644
index 00000000..f22ebf09
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@2x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@2x.png
new file mode 100644
index 00000000..fd3080a1
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@3x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@3x.png
new file mode 100644
index 00000000..6393373f
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@4x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@4x.png
new file mode 100644
index 00000000..32dedb7f
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed.png
new file mode 100644
index 00000000..846416aa
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@2x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@2x.png
new file mode 100644
index 00000000..bc85bf94
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@3x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@3x.png
new file mode 100644
index 00000000..17ef9e58
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@4x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@4x.png
new file mode 100644
index 00000000..7e9dd750
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked.png b/src/imports/controls/imagine/images/menuitem-indicator-checked.png
new file mode 100644
index 00000000..f06cc5f6
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked@2x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked@2x.png
new file mode 100644
index 00000000..3db78a17
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked@3x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked@3x.png
new file mode 100644
index 00000000..eadb5968
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-checked@4x.png b/src/imports/controls/imagine/images/menuitem-indicator-checked@4x.png
new file mode 100644
index 00000000..9bdfac8a
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-disabled.png b/src/imports/controls/imagine/images/menuitem-indicator-disabled.png
new file mode 100644
index 00000000..a8305968
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-disabled@2x.png b/src/imports/controls/imagine/images/menuitem-indicator-disabled@2x.png
new file mode 100644
index 00000000..e8046c5e
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-disabled@3x.png b/src/imports/controls/imagine/images/menuitem-indicator-disabled@3x.png
new file mode 100644
index 00000000..d44111bb
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-disabled@4x.png b/src/imports/controls/imagine/images/menuitem-indicator-disabled@4x.png
new file mode 100644
index 00000000..24fa0c0d
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-focused.png b/src/imports/controls/imagine/images/menuitem-indicator-focused.png
new file mode 100644
index 00000000..1c598c1f
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-focused@2x.png b/src/imports/controls/imagine/images/menuitem-indicator-focused@2x.png
new file mode 100644
index 00000000..31ff320e
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-focused@3x.png b/src/imports/controls/imagine/images/menuitem-indicator-focused@3x.png
new file mode 100644
index 00000000..15a1b487
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-focused@4x.png b/src/imports/controls/imagine/images/menuitem-indicator-focused@4x.png
new file mode 100644
index 00000000..db11c0c1
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-hovered.png b/src/imports/controls/imagine/images/menuitem-indicator-hovered.png
new file mode 100644
index 00000000..1c598c1f
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-hovered@2x.png b/src/imports/controls/imagine/images/menuitem-indicator-hovered@2x.png
new file mode 100644
index 00000000..31ff320e
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-hovered@3x.png b/src/imports/controls/imagine/images/menuitem-indicator-hovered@3x.png
new file mode 100644
index 00000000..15a1b487
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-hovered@4x.png b/src/imports/controls/imagine/images/menuitem-indicator-hovered@4x.png
new file mode 100644
index 00000000..db11c0c1
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-pressed.png b/src/imports/controls/imagine/images/menuitem-indicator-pressed.png
new file mode 100644
index 00000000..e4f02db1
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-pressed@2x.png b/src/imports/controls/imagine/images/menuitem-indicator-pressed@2x.png
new file mode 100644
index 00000000..e2342547
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-pressed@3x.png b/src/imports/controls/imagine/images/menuitem-indicator-pressed@3x.png
new file mode 100644
index 00000000..8ae24d75
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator-pressed@4x.png b/src/imports/controls/imagine/images/menuitem-indicator-pressed@4x.png
new file mode 100644
index 00000000..04a32370
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator.png b/src/imports/controls/imagine/images/menuitem-indicator.png
new file mode 100644
index 00000000..d7b4c6d1
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator@2x.png b/src/imports/controls/imagine/images/menuitem-indicator@2x.png
new file mode 100644
index 00000000..0ae3fa8f
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator@3x.png b/src/imports/controls/imagine/images/menuitem-indicator@3x.png
new file mode 100644
index 00000000..f8de503c
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuitem-indicator@4x.png b/src/imports/controls/imagine/images/menuitem-indicator@4x.png
new file mode 100644
index 00000000..4f16042d
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuitem-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuseparator-separator.9.png b/src/imports/controls/imagine/images/menuseparator-separator.9.png
new file mode 100644
index 00000000..a40feb65
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuseparator-separator.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuseparator-separator@2x.9.png b/src/imports/controls/imagine/images/menuseparator-separator@2x.9.png
new file mode 100644
index 00000000..afb99248
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuseparator-separator@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuseparator-separator@3x.9.png b/src/imports/controls/imagine/images/menuseparator-separator@3x.9.png
new file mode 100644
index 00000000..197400e0
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuseparator-separator@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/menuseparator-separator@4x.9.png b/src/imports/controls/imagine/images/menuseparator-separator@4x.9.png
new file mode 100644
index 00000000..c4b4ca98
--- /dev/null
+++ b/src/imports/controls/imagine/images/menuseparator-separator@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/page-background.png b/src/imports/controls/imagine/images/page-background.png
new file mode 100644
index 00000000..01eb7c73
--- /dev/null
+++ b/src/imports/controls/imagine/images/page-background.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/page-background@2x.png b/src/imports/controls/imagine/images/page-background@2x.png
new file mode 100644
index 00000000..72be785c
--- /dev/null
+++ b/src/imports/controls/imagine/images/page-background@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/page-background@3x.png b/src/imports/controls/imagine/images/page-background@3x.png
new file mode 100644
index 00000000..a488f592
--- /dev/null
+++ b/src/imports/controls/imagine/images/page-background@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/page-background@4x.png b/src/imports/controls/imagine/images/page-background@4x.png
new file mode 100644
index 00000000..9343da95
--- /dev/null
+++ b/src/imports/controls/imagine/images/page-background@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-current.png b/src/imports/controls/imagine/images/pageindicator-delegate-current.png
new file mode 100644
index 00000000..002b76e9
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-current.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-current@2x.png b/src/imports/controls/imagine/images/pageindicator-delegate-current@2x.png
new file mode 100644
index 00000000..47fc8d5a
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-current@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-current@3x.png b/src/imports/controls/imagine/images/pageindicator-delegate-current@3x.png
new file mode 100644
index 00000000..e6bfd1e9
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-current@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-current@4x.png b/src/imports/controls/imagine/images/pageindicator-delegate-current@4x.png
new file mode 100644
index 00000000..f7c7248f
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-current@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current.png b/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current.png
new file mode 100644
index 00000000..8aae9d8b
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@2x.png b/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@2x.png
new file mode 100644
index 00000000..b5a65c9e
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@3x.png b/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@3x.png
new file mode 100644
index 00000000..8a3e10e1
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@4x.png b/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@4x.png
new file mode 100644
index 00000000..58c3d3b8
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-disabled-current@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-disabled.png b/src/imports/controls/imagine/images/pageindicator-delegate-disabled.png
new file mode 100644
index 00000000..8aae9d8b
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-disabled@2x.png b/src/imports/controls/imagine/images/pageindicator-delegate-disabled@2x.png
new file mode 100644
index 00000000..b5a65c9e
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-disabled@3x.png b/src/imports/controls/imagine/images/pageindicator-delegate-disabled@3x.png
new file mode 100644
index 00000000..8a3e10e1
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-disabled@4x.png b/src/imports/controls/imagine/images/pageindicator-delegate-disabled@4x.png
new file mode 100644
index 00000000..58c3d3b8
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-pressed.png b/src/imports/controls/imagine/images/pageindicator-delegate-pressed.png
new file mode 100644
index 00000000..002b76e9
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-pressed@2x.png b/src/imports/controls/imagine/images/pageindicator-delegate-pressed@2x.png
new file mode 100644
index 00000000..47fc8d5a
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-pressed@3x.png b/src/imports/controls/imagine/images/pageindicator-delegate-pressed@3x.png
new file mode 100644
index 00000000..e6bfd1e9
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate-pressed@4x.png b/src/imports/controls/imagine/images/pageindicator-delegate-pressed@4x.png
new file mode 100644
index 00000000..f7c7248f
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate.png b/src/imports/controls/imagine/images/pageindicator-delegate.png
new file mode 100644
index 00000000..9e13a5ac
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate@2x.png b/src/imports/controls/imagine/images/pageindicator-delegate@2x.png
new file mode 100644
index 00000000..806b7e22
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate@3x.png b/src/imports/controls/imagine/images/pageindicator-delegate@3x.png
new file mode 100644
index 00000000..05e8f362
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pageindicator-delegate@4x.png b/src/imports/controls/imagine/images/pageindicator-delegate@4x.png
new file mode 100644
index 00000000..1ac5ccda
--- /dev/null
+++ b/src/imports/controls/imagine/images/pageindicator-delegate@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pane-background.9.png b/src/imports/controls/imagine/images/pane-background.9.png
new file mode 100644
index 00000000..5024788e
--- /dev/null
+++ b/src/imports/controls/imagine/images/pane-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pane-background@2x.9.png b/src/imports/controls/imagine/images/pane-background@2x.9.png
new file mode 100644
index 00000000..1ed91fee
--- /dev/null
+++ b/src/imports/controls/imagine/images/pane-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pane-background@3x.9.png b/src/imports/controls/imagine/images/pane-background@3x.9.png
new file mode 100644
index 00000000..c85e09f2
--- /dev/null
+++ b/src/imports/controls/imagine/images/pane-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/pane-background@4x.9.png b/src/imports/controls/imagine/images/pane-background@4x.9.png
new file mode 100644
index 00000000..e117bed0
--- /dev/null
+++ b/src/imports/controls/imagine/images/pane-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-background.9.png b/src/imports/controls/imagine/images/popup-background.9.png
new file mode 100644
index 00000000..495d2f0d
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-background@2x.9.png b/src/imports/controls/imagine/images/popup-background@2x.9.png
new file mode 100644
index 00000000..ba0df866
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-background@3x.9.png b/src/imports/controls/imagine/images/popup-background@3x.9.png
new file mode 100644
index 00000000..e71856a5
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-background@4x.9.png b/src/imports/controls/imagine/images/popup-background@4x.9.png
new file mode 100644
index 00000000..d756cda5
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-overlay-modal.png b/src/imports/controls/imagine/images/popup-overlay-modal.png
new file mode 100644
index 00000000..296e914a
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-overlay-modal.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-overlay-modal@2x.png b/src/imports/controls/imagine/images/popup-overlay-modal@2x.png
new file mode 100644
index 00000000..10c89300
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-overlay-modal@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-overlay-modal@3x.png b/src/imports/controls/imagine/images/popup-overlay-modal@3x.png
new file mode 100644
index 00000000..f65996e9
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-overlay-modal@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-overlay-modal@4x.png b/src/imports/controls/imagine/images/popup-overlay-modal@4x.png
new file mode 100644
index 00000000..a586f381
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-overlay-modal@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-overlay.png b/src/imports/controls/imagine/images/popup-overlay.png
new file mode 100644
index 00000000..e7175b46
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-overlay.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-overlay@2x.png b/src/imports/controls/imagine/images/popup-overlay@2x.png
new file mode 100644
index 00000000..db6566e0
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-overlay@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-overlay@3x.png b/src/imports/controls/imagine/images/popup-overlay@3x.png
new file mode 100644
index 00000000..140e4692
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-overlay@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/popup-overlay@4x.png b/src/imports/controls/imagine/images/popup-overlay@4x.png
new file mode 100644
index 00000000..5115c28a
--- /dev/null
+++ b/src/imports/controls/imagine/images/popup-overlay@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-animation.webp b/src/imports/controls/imagine/images/progressbar-animation.webp
new file mode 100644
index 00000000..51c35c88
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-animation.webp
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-animation@2x.webp b/src/imports/controls/imagine/images/progressbar-animation@2x.webp
new file mode 100644
index 00000000..ee120630
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-animation@2x.webp
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-animation@3x.webp b/src/imports/controls/imagine/images/progressbar-animation@3x.webp
new file mode 100644
index 00000000..c2f94a74
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-animation@3x.webp
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-animation@4x.webp b/src/imports/controls/imagine/images/progressbar-animation@4x.webp
new file mode 100644
index 00000000..d49657e9
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-animation@4x.webp
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-background.9.png b/src/imports/controls/imagine/images/progressbar-background.9.png
new file mode 100644
index 00000000..5a8d5ad3
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-background@2x.9.png b/src/imports/controls/imagine/images/progressbar-background@2x.9.png
new file mode 100644
index 00000000..057f28ff
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-background@3x.9.png b/src/imports/controls/imagine/images/progressbar-background@3x.9.png
new file mode 100644
index 00000000..283f7f72
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-background@4x.9.png b/src/imports/controls/imagine/images/progressbar-background@4x.9.png
new file mode 100644
index 00000000..0eb1d884
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-mask.9.png b/src/imports/controls/imagine/images/progressbar-mask.9.png
new file mode 100644
index 00000000..23ddb24e
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-mask.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-mask@2x.9.png b/src/imports/controls/imagine/images/progressbar-mask@2x.9.png
new file mode 100644
index 00000000..30d53bdf
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-mask@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-mask@3x.9.png b/src/imports/controls/imagine/images/progressbar-mask@3x.9.png
new file mode 100644
index 00000000..0181c822
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-mask@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-mask@4x.9.png b/src/imports/controls/imagine/images/progressbar-mask@4x.9.png
new file mode 100644
index 00000000..f3914cdd
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-mask@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-progress.png b/src/imports/controls/imagine/images/progressbar-progress.png
new file mode 100644
index 00000000..9283df02
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-progress.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-progress@2x.png b/src/imports/controls/imagine/images/progressbar-progress@2x.png
new file mode 100644
index 00000000..efd58da5
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-progress@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-progress@3x.png b/src/imports/controls/imagine/images/progressbar-progress@3x.png
new file mode 100644
index 00000000..5372fc55
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-progress@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/progressbar-progress@4x.png b/src/imports/controls/imagine/images/progressbar-progress@4x.png
new file mode 100644
index 00000000..85925c61
--- /dev/null
+++ b/src/imports/controls/imagine/images/progressbar-progress@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused.png
new file mode 100644
index 00000000..8fb9da47
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@2x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@2x.png
new file mode 100644
index 00000000..86f8043e
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@3x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@3x.png
new file mode 100644
index 00000000..4350141e
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@4x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@4x.png
new file mode 100644
index 00000000..3573f597
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered.png
new file mode 100644
index 00000000..8fb9da47
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@2x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@2x.png
new file mode 100644
index 00000000..86f8043e
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@3x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@3x.png
new file mode 100644
index 00000000..4350141e
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@4x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@4x.png
new file mode 100644
index 00000000..3573f597
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed.png
new file mode 100644
index 00000000..e69d4ca0
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@2x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@2x.png
new file mode 100644
index 00000000..48f2ff88
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@3x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@3x.png
new file mode 100644
index 00000000..3eb80f03
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@4x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@4x.png
new file mode 100644
index 00000000..1f02e059
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked.png
new file mode 100644
index 00000000..dfa8106d
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked@2x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked@2x.png
new file mode 100644
index 00000000..f8696dca
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked@3x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked@3x.png
new file mode 100644
index 00000000..98113a6d
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-checked@4x.png b/src/imports/controls/imagine/images/radiobutton-indicator-checked@4x.png
new file mode 100644
index 00000000..ec9005e1
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-disabled.png b/src/imports/controls/imagine/images/radiobutton-indicator-disabled.png
new file mode 100644
index 00000000..4a32fe70
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-disabled@2x.png b/src/imports/controls/imagine/images/radiobutton-indicator-disabled@2x.png
new file mode 100644
index 00000000..4bd16861
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-disabled@3x.png b/src/imports/controls/imagine/images/radiobutton-indicator-disabled@3x.png
new file mode 100644
index 00000000..510e355e
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-disabled@4x.png b/src/imports/controls/imagine/images/radiobutton-indicator-disabled@4x.png
new file mode 100644
index 00000000..fba264de
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-focused.png b/src/imports/controls/imagine/images/radiobutton-indicator-focused.png
new file mode 100644
index 00000000..5c0ce213
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-focused@2x.png b/src/imports/controls/imagine/images/radiobutton-indicator-focused@2x.png
new file mode 100644
index 00000000..5219d908
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-focused@3x.png b/src/imports/controls/imagine/images/radiobutton-indicator-focused@3x.png
new file mode 100644
index 00000000..eecc21bf
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-focused@4x.png b/src/imports/controls/imagine/images/radiobutton-indicator-focused@4x.png
new file mode 100644
index 00000000..8e6bb9bd
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-hovered.png b/src/imports/controls/imagine/images/radiobutton-indicator-hovered.png
new file mode 100644
index 00000000..5c0ce213
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-hovered@2x.png b/src/imports/controls/imagine/images/radiobutton-indicator-hovered@2x.png
new file mode 100644
index 00000000..5219d908
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-hovered@3x.png b/src/imports/controls/imagine/images/radiobutton-indicator-hovered@3x.png
new file mode 100644
index 00000000..eecc21bf
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-hovered@4x.png b/src/imports/controls/imagine/images/radiobutton-indicator-hovered@4x.png
new file mode 100644
index 00000000..8e6bb9bd
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-pressed.png b/src/imports/controls/imagine/images/radiobutton-indicator-pressed.png
new file mode 100644
index 00000000..d9a1cd01
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-pressed@2x.png b/src/imports/controls/imagine/images/radiobutton-indicator-pressed@2x.png
new file mode 100644
index 00000000..e3cd65cb
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-pressed@3x.png b/src/imports/controls/imagine/images/radiobutton-indicator-pressed@3x.png
new file mode 100644
index 00000000..7857bff7
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator-pressed@4x.png b/src/imports/controls/imagine/images/radiobutton-indicator-pressed@4x.png
new file mode 100644
index 00000000..7f3b3548
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator.png b/src/imports/controls/imagine/images/radiobutton-indicator.png
new file mode 100644
index 00000000..7f7a88ad
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator@2x.png b/src/imports/controls/imagine/images/radiobutton-indicator@2x.png
new file mode 100644
index 00000000..250117b4
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator@3x.png b/src/imports/controls/imagine/images/radiobutton-indicator@3x.png
new file mode 100644
index 00000000..5011f4da
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiobutton-indicator@4x.png b/src/imports/controls/imagine/images/radiobutton-indicator@4x.png
new file mode 100644
index 00000000..538f11a1
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiobutton-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-disabled.9.png b/src/imports/controls/imagine/images/radiodelegate-background-disabled.9.png
new file mode 100644
index 00000000..4b56fe35
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-disabled@2x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-disabled@2x.9.png
new file mode 100644
index 00000000..34edef58
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-disabled@3x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-disabled@3x.9.png
new file mode 100644
index 00000000..dd2cc6ba
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-disabled@4x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-disabled@4x.9.png
new file mode 100644
index 00000000..b7890a3c
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-focused.9.png b/src/imports/controls/imagine/images/radiodelegate-background-focused.9.png
new file mode 100644
index 00000000..b31343dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-focused@2x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-focused@2x.9.png
new file mode 100644
index 00000000..c56c62da
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-focused@3x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-focused@3x.9.png
new file mode 100644
index 00000000..bfbc82f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-focused@4x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-focused@4x.9.png
new file mode 100644
index 00000000..e31ab63b
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-highlighted.9.png b/src/imports/controls/imagine/images/radiodelegate-background-highlighted.9.png
new file mode 100644
index 00000000..32847cfa
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-highlighted.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-highlighted@2x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-highlighted@2x.9.png
new file mode 100644
index 00000000..126fcb29
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-highlighted@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-highlighted@3x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-highlighted@3x.9.png
new file mode 100644
index 00000000..22b7c9f2
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-highlighted@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-highlighted@4x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-highlighted@4x.9.png
new file mode 100644
index 00000000..4e67f310
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-highlighted@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-hovered.9.png b/src/imports/controls/imagine/images/radiodelegate-background-hovered.9.png
new file mode 100644
index 00000000..a53f63cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-hovered@2x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-hovered@2x.9.png
new file mode 100644
index 00000000..07510b10
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-hovered@3x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-hovered@3x.9.png
new file mode 100644
index 00000000..db2a210a
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-hovered@4x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-hovered@4x.9.png
new file mode 100644
index 00000000..6427d7ab
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-pressed.9.png b/src/imports/controls/imagine/images/radiodelegate-background-pressed.9.png
new file mode 100644
index 00000000..b31343dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-pressed@2x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-pressed@2x.9.png
new file mode 100644
index 00000000..c56c62da
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-pressed@3x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-pressed@3x.9.png
new file mode 100644
index 00000000..bfbc82f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background-pressed@4x.9.png b/src/imports/controls/imagine/images/radiodelegate-background-pressed@4x.9.png
new file mode 100644
index 00000000..e31ab63b
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background.9.png b/src/imports/controls/imagine/images/radiodelegate-background.9.png
new file mode 100644
index 00000000..a53f63cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background@2x.9.png b/src/imports/controls/imagine/images/radiodelegate-background@2x.9.png
new file mode 100644
index 00000000..07510b10
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background@3x.9.png b/src/imports/controls/imagine/images/radiodelegate-background@3x.9.png
new file mode 100644
index 00000000..db2a210a
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-background@4x.9.png b/src/imports/controls/imagine/images/radiodelegate-background@4x.9.png
new file mode 100644
index 00000000..6427d7ab
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused.png
new file mode 100644
index 00000000..8fb9da47
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@2x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@2x.png
new file mode 100644
index 00000000..86f8043e
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@3x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@3x.png
new file mode 100644
index 00000000..4350141e
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@4x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@4x.png
new file mode 100644
index 00000000..3573f597
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered.png
new file mode 100644
index 00000000..8fb9da47
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@2x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@2x.png
new file mode 100644
index 00000000..86f8043e
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@3x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@3x.png
new file mode 100644
index 00000000..4350141e
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@4x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@4x.png
new file mode 100644
index 00000000..3573f597
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed.png
new file mode 100644
index 00000000..e69d4ca0
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@2x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@2x.png
new file mode 100644
index 00000000..48f2ff88
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@3x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@3x.png
new file mode 100644
index 00000000..3eb80f03
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@4x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@4x.png
new file mode 100644
index 00000000..1f02e059
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked.png
new file mode 100644
index 00000000..dfa8106d
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked@2x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked@2x.png
new file mode 100644
index 00000000..f8696dca
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked@3x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked@3x.png
new file mode 100644
index 00000000..98113a6d
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-checked@4x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-checked@4x.png
new file mode 100644
index 00000000..ec9005e1
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-disabled.png b/src/imports/controls/imagine/images/radiodelegate-indicator-disabled.png
new file mode 100644
index 00000000..4a32fe70
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-disabled@2x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-disabled@2x.png
new file mode 100644
index 00000000..4bd16861
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-disabled@3x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-disabled@3x.png
new file mode 100644
index 00000000..510e355e
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-disabled@4x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-disabled@4x.png
new file mode 100644
index 00000000..fba264de
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-focused.png b/src/imports/controls/imagine/images/radiodelegate-indicator-focused.png
new file mode 100644
index 00000000..5c0ce213
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-focused@2x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-focused@2x.png
new file mode 100644
index 00000000..5219d908
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-focused@3x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-focused@3x.png
new file mode 100644
index 00000000..eecc21bf
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-focused@4x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-focused@4x.png
new file mode 100644
index 00000000..8e6bb9bd
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-hovered.png b/src/imports/controls/imagine/images/radiodelegate-indicator-hovered.png
new file mode 100644
index 00000000..5c0ce213
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-hovered@2x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-hovered@2x.png
new file mode 100644
index 00000000..5219d908
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-hovered@3x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-hovered@3x.png
new file mode 100644
index 00000000..eecc21bf
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-hovered@4x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-hovered@4x.png
new file mode 100644
index 00000000..8e6bb9bd
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-pressed.png b/src/imports/controls/imagine/images/radiodelegate-indicator-pressed.png
new file mode 100644
index 00000000..d9a1cd01
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-pressed@2x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-pressed@2x.png
new file mode 100644
index 00000000..e3cd65cb
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-pressed@3x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-pressed@3x.png
new file mode 100644
index 00000000..7857bff7
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator-pressed@4x.png b/src/imports/controls/imagine/images/radiodelegate-indicator-pressed@4x.png
new file mode 100644
index 00000000..7f3b3548
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator.png b/src/imports/controls/imagine/images/radiodelegate-indicator.png
new file mode 100644
index 00000000..7f7a88ad
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator@2x.png b/src/imports/controls/imagine/images/radiodelegate-indicator@2x.png
new file mode 100644
index 00000000..250117b4
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator@3x.png b/src/imports/controls/imagine/images/radiodelegate-indicator@3x.png
new file mode 100644
index 00000000..5011f4da
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/radiodelegate-indicator@4x.png b/src/imports/controls/imagine/images/radiodelegate-indicator@4x.png
new file mode 100644
index 00000000..538f11a1
--- /dev/null
+++ b/src/imports/controls/imagine/images/radiodelegate-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-background-horizontal.9.png b/src/imports/controls/imagine/images/rangeslider-background-horizontal.9.png
new file mode 100644
index 00000000..1493d559
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-background-horizontal.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-background-horizontal@2x.9.png b/src/imports/controls/imagine/images/rangeslider-background-horizontal@2x.9.png
new file mode 100644
index 00000000..64c87e20
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-background-horizontal@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-background-horizontal@3x.9.png b/src/imports/controls/imagine/images/rangeslider-background-horizontal@3x.9.png
new file mode 100644
index 00000000..7ed7de73
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-background-horizontal@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-background-horizontal@4x.9.png b/src/imports/controls/imagine/images/rangeslider-background-horizontal@4x.9.png
new file mode 100644
index 00000000..7c45cc7d
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-background-horizontal@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-background-vertical.9.png b/src/imports/controls/imagine/images/rangeslider-background-vertical.9.png
new file mode 100644
index 00000000..5866879c
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-background-vertical.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-background-vertical@2x.9.png b/src/imports/controls/imagine/images/rangeslider-background-vertical@2x.9.png
new file mode 100644
index 00000000..f3928ec5
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-background-vertical@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-background-vertical@3x.9.png b/src/imports/controls/imagine/images/rangeslider-background-vertical@3x.9.png
new file mode 100644
index 00000000..f49dcb95
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-background-vertical@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-background-vertical@4x.9.png b/src/imports/controls/imagine/images/rangeslider-background-vertical@4x.9.png
new file mode 100644
index 00000000..e7203f99
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-background-vertical@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-disabled.png b/src/imports/controls/imagine/images/rangeslider-handle-disabled.png
new file mode 100644
index 00000000..88ea4699
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-disabled@2x.png b/src/imports/controls/imagine/images/rangeslider-handle-disabled@2x.png
new file mode 100644
index 00000000..3cad66e2
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-disabled@3x.png b/src/imports/controls/imagine/images/rangeslider-handle-disabled@3x.png
new file mode 100644
index 00000000..18b7482c
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-disabled@4x.png b/src/imports/controls/imagine/images/rangeslider-handle-disabled@4x.png
new file mode 100644
index 00000000..1d03b803
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered.png b/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered.png
new file mode 100644
index 00000000..5787bc8d
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@2x.png b/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@2x.png
new file mode 100644
index 00000000..0663628f
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@3x.png b/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@3x.png
new file mode 100644
index 00000000..cb6149d3
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@4x.png b/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@4x.png
new file mode 100644
index 00000000..21484332
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed.png b/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed.png
new file mode 100644
index 00000000..5787bc8d
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@2x.png b/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@2x.png
new file mode 100644
index 00000000..0663628f
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@3x.png b/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@3x.png
new file mode 100644
index 00000000..cb6149d3
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@4x.png b/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@4x.png
new file mode 100644
index 00000000..21484332
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused.png b/src/imports/controls/imagine/images/rangeslider-handle-focused.png
new file mode 100644
index 00000000..0a0ab739
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused@2x.png b/src/imports/controls/imagine/images/rangeslider-handle-focused@2x.png
new file mode 100644
index 00000000..8ced0916
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused@3x.png b/src/imports/controls/imagine/images/rangeslider-handle-focused@3x.png
new file mode 100644
index 00000000..a7bdc453
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-focused@4x.png b/src/imports/controls/imagine/images/rangeslider-handle-focused@4x.png
new file mode 100644
index 00000000..5827d534
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-hovered.png b/src/imports/controls/imagine/images/rangeslider-handle-hovered.png
new file mode 100644
index 00000000..88ea4699
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-hovered@2x.png b/src/imports/controls/imagine/images/rangeslider-handle-hovered@2x.png
new file mode 100644
index 00000000..3cad66e2
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-hovered@3x.png b/src/imports/controls/imagine/images/rangeslider-handle-hovered@3x.png
new file mode 100644
index 00000000..18b7482c
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-hovered@4x.png b/src/imports/controls/imagine/images/rangeslider-handle-hovered@4x.png
new file mode 100644
index 00000000..1d03b803
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-pressed.png b/src/imports/controls/imagine/images/rangeslider-handle-pressed.png
new file mode 100644
index 00000000..88ea4699
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-pressed@2x.png b/src/imports/controls/imagine/images/rangeslider-handle-pressed@2x.png
new file mode 100644
index 00000000..3cad66e2
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-pressed@3x.png b/src/imports/controls/imagine/images/rangeslider-handle-pressed@3x.png
new file mode 100644
index 00000000..18b7482c
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle-pressed@4x.png b/src/imports/controls/imagine/images/rangeslider-handle-pressed@4x.png
new file mode 100644
index 00000000..1d03b803
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle.png b/src/imports/controls/imagine/images/rangeslider-handle.png
new file mode 100644
index 00000000..370f5141
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle@2x.png b/src/imports/controls/imagine/images/rangeslider-handle@2x.png
new file mode 100644
index 00000000..d98f56d3
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle@3x.png b/src/imports/controls/imagine/images/rangeslider-handle@3x.png
new file mode 100644
index 00000000..a6e12b61
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-handle@4x.png b/src/imports/controls/imagine/images/rangeslider-handle@4x.png
new file mode 100644
index 00000000..194e3496
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-handle@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled.9.png b/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled.9.png
new file mode 100644
index 00000000..d3a87e37
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@2x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@2x.9.png
new file mode 100644
index 00000000..b87350eb
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@3x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@3x.9.png
new file mode 100644
index 00000000..a5b7b80c
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@4x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@4x.9.png
new file mode 100644
index 00000000..47975047
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-horizontal-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-horizontal.9.png b/src/imports/controls/imagine/images/rangeslider-progress-horizontal.9.png
new file mode 100644
index 00000000..49adc3ec
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-horizontal.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-horizontal@2x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-horizontal@2x.9.png
new file mode 100644
index 00000000..b71adeb3
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-horizontal@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-horizontal@3x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-horizontal@3x.9.png
new file mode 100644
index 00000000..c78c22b3
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-horizontal@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-horizontal@4x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-horizontal@4x.9.png
new file mode 100644
index 00000000..69142b4e
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-horizontal@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled.9.png b/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled.9.png
new file mode 100644
index 00000000..6ae0b6b6
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@2x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@2x.9.png
new file mode 100644
index 00000000..dacd2692
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@3x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@3x.9.png
new file mode 100644
index 00000000..23f5461e
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@4x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@4x.9.png
new file mode 100644
index 00000000..9ec4cefe
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-vertical-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-vertical.9.png b/src/imports/controls/imagine/images/rangeslider-progress-vertical.9.png
new file mode 100644
index 00000000..c2616422
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-vertical.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-vertical@2x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-vertical@2x.9.png
new file mode 100644
index 00000000..0339d4cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-vertical@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-vertical@3x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-vertical@3x.9.png
new file mode 100644
index 00000000..d1d22e60
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-vertical@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/rangeslider-progress-vertical@4x.9.png b/src/imports/controls/imagine/images/rangeslider-progress-vertical@4x.9.png
new file mode 100644
index 00000000..f9b96a3b
--- /dev/null
+++ b/src/imports/controls/imagine/images/rangeslider-progress-vertical@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked-focused.png b/src/imports/controls/imagine/images/roundbutton-background-checked-focused.png
new file mode 100644
index 00000000..543b2d7a
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked-focused@2x.png b/src/imports/controls/imagine/images/roundbutton-background-checked-focused@2x.png
new file mode 100644
index 00000000..75dceff8
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked-focused@3x.png b/src/imports/controls/imagine/images/roundbutton-background-checked-focused@3x.png
new file mode 100644
index 00000000..c504faaf
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked-focused@4x.png b/src/imports/controls/imagine/images/roundbutton-background-checked-focused@4x.png
new file mode 100644
index 00000000..65c5ecab
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked-hovered.png b/src/imports/controls/imagine/images/roundbutton-background-checked-hovered.png
new file mode 100644
index 00000000..543b2d7a
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked-hovered@2x.png b/src/imports/controls/imagine/images/roundbutton-background-checked-hovered@2x.png
new file mode 100644
index 00000000..75dceff8
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked-hovered@3x.png b/src/imports/controls/imagine/images/roundbutton-background-checked-hovered@3x.png
new file mode 100644
index 00000000..c504faaf
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked-hovered@4x.png b/src/imports/controls/imagine/images/roundbutton-background-checked-hovered@4x.png
new file mode 100644
index 00000000..65c5ecab
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked.png b/src/imports/controls/imagine/images/roundbutton-background-checked.png
new file mode 100644
index 00000000..e7c15402
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked@2x.png b/src/imports/controls/imagine/images/roundbutton-background-checked@2x.png
new file mode 100644
index 00000000..6412ae27
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked@3x.png b/src/imports/controls/imagine/images/roundbutton-background-checked@3x.png
new file mode 100644
index 00000000..7c1523cb
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-checked@4x.png b/src/imports/controls/imagine/images/roundbutton-background-checked@4x.png
new file mode 100644
index 00000000..887c7579
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-disabled-checked.png b/src/imports/controls/imagine/images/roundbutton-background-disabled-checked.png
new file mode 100644
index 00000000..4bd16861
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-disabled-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-disabled-checked@2x.png b/src/imports/controls/imagine/images/roundbutton-background-disabled-checked@2x.png
new file mode 100644
index 00000000..fba264de
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-disabled-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-disabled-checked@3x.png b/src/imports/controls/imagine/images/roundbutton-background-disabled-checked@3x.png
new file mode 100644
index 00000000..112ee781
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-disabled-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-disabled-checked@4x.png b/src/imports/controls/imagine/images/roundbutton-background-disabled-checked@4x.png
new file mode 100644
index 00000000..8ce10a01
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-disabled-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-disabled.png b/src/imports/controls/imagine/images/roundbutton-background-disabled.png
new file mode 100644
index 00000000..4bd16861
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-disabled@2x.png b/src/imports/controls/imagine/images/roundbutton-background-disabled@2x.png
new file mode 100644
index 00000000..fba264de
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-disabled@3x.png b/src/imports/controls/imagine/images/roundbutton-background-disabled@3x.png
new file mode 100644
index 00000000..112ee781
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-disabled@4x.png b/src/imports/controls/imagine/images/roundbutton-background-disabled@4x.png
new file mode 100644
index 00000000..8ce10a01
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-focused.png b/src/imports/controls/imagine/images/roundbutton-background-focused.png
new file mode 100644
index 00000000..abdada0d
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-focused@2x.png b/src/imports/controls/imagine/images/roundbutton-background-focused@2x.png
new file mode 100644
index 00000000..f90efda1
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-focused@3x.png b/src/imports/controls/imagine/images/roundbutton-background-focused@3x.png
new file mode 100644
index 00000000..b1977d97
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-focused@4x.png b/src/imports/controls/imagine/images/roundbutton-background-focused@4x.png
new file mode 100644
index 00000000..2efb3dcc
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused.png
new file mode 100644
index 00000000..64b69500
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@2x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@2x.png
new file mode 100644
index 00000000..60b211d5
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@3x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@3x.png
new file mode 100644
index 00000000..4d6e21eb
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@4x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@4x.png
new file mode 100644
index 00000000..03033c20
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered.png
new file mode 100644
index 00000000..64b69500
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@2x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@2x.png
new file mode 100644
index 00000000..60b211d5
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@3x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@3x.png
new file mode 100644
index 00000000..4d6e21eb
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@4x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@4x.png
new file mode 100644
index 00000000..03033c20
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed.png
new file mode 100644
index 00000000..7a2a06f1
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@2x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@2x.png
new file mode 100644
index 00000000..f2eb51e3
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@3x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@3x.png
new file mode 100644
index 00000000..df6eaf4e
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@4x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@4x.png
new file mode 100644
index 00000000..4465f9da
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted.png
new file mode 100644
index 00000000..f0be8431
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted@2x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted@2x.png
new file mode 100644
index 00000000..dc0ba620
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted@3x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted@3x.png
new file mode 100644
index 00000000..e178c293
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-highlighted@4x.png b/src/imports/controls/imagine/images/roundbutton-background-highlighted@4x.png
new file mode 100644
index 00000000..85f1fa52
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-highlighted@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-hovered.png b/src/imports/controls/imagine/images/roundbutton-background-hovered.png
new file mode 100644
index 00000000..abdada0d
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-hovered@2x.png b/src/imports/controls/imagine/images/roundbutton-background-hovered@2x.png
new file mode 100644
index 00000000..f90efda1
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-hovered@3x.png b/src/imports/controls/imagine/images/roundbutton-background-hovered@3x.png
new file mode 100644
index 00000000..b1977d97
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-hovered@4x.png b/src/imports/controls/imagine/images/roundbutton-background-hovered@4x.png
new file mode 100644
index 00000000..2efb3dcc
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-pressed.png b/src/imports/controls/imagine/images/roundbutton-background-pressed.png
new file mode 100644
index 00000000..e7c15402
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-pressed@2x.png b/src/imports/controls/imagine/images/roundbutton-background-pressed@2x.png
new file mode 100644
index 00000000..6412ae27
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-pressed@3x.png b/src/imports/controls/imagine/images/roundbutton-background-pressed@3x.png
new file mode 100644
index 00000000..7c1523cb
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background-pressed@4x.png b/src/imports/controls/imagine/images/roundbutton-background-pressed@4x.png
new file mode 100644
index 00000000..887c7579
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background.png b/src/imports/controls/imagine/images/roundbutton-background.png
new file mode 100644
index 00000000..e3cd65cb
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background@2x.png b/src/imports/controls/imagine/images/roundbutton-background@2x.png
new file mode 100644
index 00000000..7f3b3548
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background@3x.png b/src/imports/controls/imagine/images/roundbutton-background@3x.png
new file mode 100644
index 00000000..7988f337
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/roundbutton-background@4x.png b/src/imports/controls/imagine/images/roundbutton-background@4x.png
new file mode 100644
index 00000000..74dbebae
--- /dev/null
+++ b/src/imports/controls/imagine/images/roundbutton-background@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-disabled.png b/src/imports/controls/imagine/images/scrollbar-handle-disabled.png
new file mode 100644
index 00000000..d79dcf2a
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-disabled@2x.png b/src/imports/controls/imagine/images/scrollbar-handle-disabled@2x.png
new file mode 100644
index 00000000..0f751bb2
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-disabled@3x.png b/src/imports/controls/imagine/images/scrollbar-handle-disabled@3x.png
new file mode 100644
index 00000000..651c4c14
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-disabled@4x.png b/src/imports/controls/imagine/images/scrollbar-handle-disabled@4x.png
new file mode 100644
index 00000000..46bb4324
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled.png
new file mode 100644
index 00000000..0ec3de1a
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@2x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@2x.png
new file mode 100644
index 00000000..6ffaffee
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@3x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@3x.png
new file mode 100644
index 00000000..8445a158
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@4x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@4x.png
new file mode 100644
index 00000000..458ce4bf
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered.png
new file mode 100644
index 00000000..c8db3901
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@2x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@2x.png
new file mode 100644
index 00000000..719d31a0
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@3x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@3x.png
new file mode 100644
index 00000000..33884426
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@4x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@4x.png
new file mode 100644
index 00000000..045a6b76
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed.png
new file mode 100644
index 00000000..771c9e01
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@2x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@2x.png
new file mode 100644
index 00000000..80397488
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@3x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@3x.png
new file mode 100644
index 00000000..6b3fbca1
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@4x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@4x.png
new file mode 100644
index 00000000..b505c95d
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive.png
new file mode 100644
index 00000000..a9a67ca6
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive@2x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive@2x.png
new file mode 100644
index 00000000..60a174bb
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive@3x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive@3x.png
new file mode 100644
index 00000000..af70f46c
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle-interactive@4x.png b/src/imports/controls/imagine/images/scrollbar-handle-interactive@4x.png
new file mode 100644
index 00000000..1b91108c
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle-interactive@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle.png b/src/imports/controls/imagine/images/scrollbar-handle.png
new file mode 100644
index 00000000..c1d0a009
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle@2x.png b/src/imports/controls/imagine/images/scrollbar-handle@2x.png
new file mode 100644
index 00000000..72246c67
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle@3x.png b/src/imports/controls/imagine/images/scrollbar-handle@3x.png
new file mode 100644
index 00000000..c7caa2df
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollbar-handle@4x.png b/src/imports/controls/imagine/images/scrollbar-handle@4x.png
new file mode 100644
index 00000000..ad61f644
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollbar-handle@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollindicator-handle.png b/src/imports/controls/imagine/images/scrollindicator-handle.png
new file mode 100644
index 00000000..c1d0a009
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollindicator-handle.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollindicator-handle@2x.png b/src/imports/controls/imagine/images/scrollindicator-handle@2x.png
new file mode 100644
index 00000000..72246c67
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollindicator-handle@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollindicator-handle@3x.png b/src/imports/controls/imagine/images/scrollindicator-handle@3x.png
new file mode 100644
index 00000000..c7caa2df
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollindicator-handle@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/scrollindicator-handle@4x.png b/src/imports/controls/imagine/images/scrollindicator-handle@4x.png
new file mode 100644
index 00000000..ad61f644
--- /dev/null
+++ b/src/imports/controls/imagine/images/scrollindicator-handle@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-background-horizontal.9.png b/src/imports/controls/imagine/images/slider-background-horizontal.9.png
new file mode 100644
index 00000000..1493d559
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-background-horizontal.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-background-horizontal@2x.9.png b/src/imports/controls/imagine/images/slider-background-horizontal@2x.9.png
new file mode 100644
index 00000000..64c87e20
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-background-horizontal@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-background-horizontal@3x.9.png b/src/imports/controls/imagine/images/slider-background-horizontal@3x.9.png
new file mode 100644
index 00000000..7ed7de73
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-background-horizontal@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-background-horizontal@4x.9.png b/src/imports/controls/imagine/images/slider-background-horizontal@4x.9.png
new file mode 100644
index 00000000..7c45cc7d
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-background-horizontal@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-background-vertical.9.png b/src/imports/controls/imagine/images/slider-background-vertical.9.png
new file mode 100644
index 00000000..5866879c
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-background-vertical.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-background-vertical@2x.9.png b/src/imports/controls/imagine/images/slider-background-vertical@2x.9.png
new file mode 100644
index 00000000..f3928ec5
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-background-vertical@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-background-vertical@3x.9.png b/src/imports/controls/imagine/images/slider-background-vertical@3x.9.png
new file mode 100644
index 00000000..f49dcb95
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-background-vertical@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-background-vertical@4x.9.png b/src/imports/controls/imagine/images/slider-background-vertical@4x.9.png
new file mode 100644
index 00000000..e7203f99
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-background-vertical@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-disabled.png b/src/imports/controls/imagine/images/slider-handle-disabled.png
new file mode 100644
index 00000000..88ea4699
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-disabled@2x.png b/src/imports/controls/imagine/images/slider-handle-disabled@2x.png
new file mode 100644
index 00000000..3cad66e2
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-disabled@3x.png b/src/imports/controls/imagine/images/slider-handle-disabled@3x.png
new file mode 100644
index 00000000..18b7482c
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-disabled@4x.png b/src/imports/controls/imagine/images/slider-handle-disabled@4x.png
new file mode 100644
index 00000000..1d03b803
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused-hovered.png b/src/imports/controls/imagine/images/slider-handle-focused-hovered.png
new file mode 100644
index 00000000..5787bc8d
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused-hovered@2x.png b/src/imports/controls/imagine/images/slider-handle-focused-hovered@2x.png
new file mode 100644
index 00000000..0663628f
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused-hovered@3x.png b/src/imports/controls/imagine/images/slider-handle-focused-hovered@3x.png
new file mode 100644
index 00000000..cb6149d3
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused-hovered@4x.png b/src/imports/controls/imagine/images/slider-handle-focused-hovered@4x.png
new file mode 100644
index 00000000..21484332
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused-pressed.png b/src/imports/controls/imagine/images/slider-handle-focused-pressed.png
new file mode 100644
index 00000000..5787bc8d
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused-pressed@2x.png b/src/imports/controls/imagine/images/slider-handle-focused-pressed@2x.png
new file mode 100644
index 00000000..0663628f
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused-pressed@3x.png b/src/imports/controls/imagine/images/slider-handle-focused-pressed@3x.png
new file mode 100644
index 00000000..cb6149d3
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused-pressed@4x.png b/src/imports/controls/imagine/images/slider-handle-focused-pressed@4x.png
new file mode 100644
index 00000000..21484332
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused.png b/src/imports/controls/imagine/images/slider-handle-focused.png
new file mode 100644
index 00000000..0a0ab739
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused@2x.png b/src/imports/controls/imagine/images/slider-handle-focused@2x.png
new file mode 100644
index 00000000..8ced0916
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused@3x.png b/src/imports/controls/imagine/images/slider-handle-focused@3x.png
new file mode 100644
index 00000000..a7bdc453
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-focused@4x.png b/src/imports/controls/imagine/images/slider-handle-focused@4x.png
new file mode 100644
index 00000000..5827d534
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-hovered.png b/src/imports/controls/imagine/images/slider-handle-hovered.png
new file mode 100644
index 00000000..88ea4699
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-hovered@2x.png b/src/imports/controls/imagine/images/slider-handle-hovered@2x.png
new file mode 100644
index 00000000..3cad66e2
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-hovered@3x.png b/src/imports/controls/imagine/images/slider-handle-hovered@3x.png
new file mode 100644
index 00000000..18b7482c
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-hovered@4x.png b/src/imports/controls/imagine/images/slider-handle-hovered@4x.png
new file mode 100644
index 00000000..1d03b803
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-pressed.png b/src/imports/controls/imagine/images/slider-handle-pressed.png
new file mode 100644
index 00000000..88ea4699
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-pressed@2x.png b/src/imports/controls/imagine/images/slider-handle-pressed@2x.png
new file mode 100644
index 00000000..3cad66e2
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-pressed@3x.png b/src/imports/controls/imagine/images/slider-handle-pressed@3x.png
new file mode 100644
index 00000000..18b7482c
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle-pressed@4x.png b/src/imports/controls/imagine/images/slider-handle-pressed@4x.png
new file mode 100644
index 00000000..1d03b803
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle.png b/src/imports/controls/imagine/images/slider-handle.png
new file mode 100644
index 00000000..370f5141
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle@2x.png b/src/imports/controls/imagine/images/slider-handle@2x.png
new file mode 100644
index 00000000..d98f56d3
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle@3x.png b/src/imports/controls/imagine/images/slider-handle@3x.png
new file mode 100644
index 00000000..a6e12b61
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-handle@4x.png b/src/imports/controls/imagine/images/slider-handle@4x.png
new file mode 100644
index 00000000..194e3496
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-handle@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-horizontal-disabled.9.png b/src/imports/controls/imagine/images/slider-progress-horizontal-disabled.9.png
new file mode 100644
index 00000000..d3a87e37
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-horizontal-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-horizontal-disabled@2x.9.png b/src/imports/controls/imagine/images/slider-progress-horizontal-disabled@2x.9.png
new file mode 100644
index 00000000..b87350eb
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-horizontal-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-horizontal-disabled@3x.9.png b/src/imports/controls/imagine/images/slider-progress-horizontal-disabled@3x.9.png
new file mode 100644
index 00000000..a5b7b80c
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-horizontal-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-horizontal-disabled@4x.9.png b/src/imports/controls/imagine/images/slider-progress-horizontal-disabled@4x.9.png
new file mode 100644
index 00000000..47975047
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-horizontal-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-horizontal.9.png b/src/imports/controls/imagine/images/slider-progress-horizontal.9.png
new file mode 100644
index 00000000..49adc3ec
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-horizontal.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-horizontal@2x.9.png b/src/imports/controls/imagine/images/slider-progress-horizontal@2x.9.png
new file mode 100644
index 00000000..b71adeb3
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-horizontal@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-horizontal@3x.9.png b/src/imports/controls/imagine/images/slider-progress-horizontal@3x.9.png
new file mode 100644
index 00000000..c78c22b3
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-horizontal@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-horizontal@4x.9.png b/src/imports/controls/imagine/images/slider-progress-horizontal@4x.9.png
new file mode 100644
index 00000000..69142b4e
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-horizontal@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-vertical-disabled.9.png b/src/imports/controls/imagine/images/slider-progress-vertical-disabled.9.png
new file mode 100644
index 00000000..6ae0b6b6
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-vertical-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-vertical-disabled@2x.9.png b/src/imports/controls/imagine/images/slider-progress-vertical-disabled@2x.9.png
new file mode 100644
index 00000000..dacd2692
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-vertical-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-vertical-disabled@3x.9.png b/src/imports/controls/imagine/images/slider-progress-vertical-disabled@3x.9.png
new file mode 100644
index 00000000..23f5461e
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-vertical-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-vertical-disabled@4x.9.png b/src/imports/controls/imagine/images/slider-progress-vertical-disabled@4x.9.png
new file mode 100644
index 00000000..9ec4cefe
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-vertical-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-vertical.9.png b/src/imports/controls/imagine/images/slider-progress-vertical.9.png
new file mode 100644
index 00000000..c2616422
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-vertical.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-vertical@2x.9.png b/src/imports/controls/imagine/images/slider-progress-vertical@2x.9.png
new file mode 100644
index 00000000..0339d4cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-vertical@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-vertical@3x.9.png b/src/imports/controls/imagine/images/slider-progress-vertical@3x.9.png
new file mode 100644
index 00000000..d1d22e60
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-vertical@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/slider-progress-vertical@4x.9.png b/src/imports/controls/imagine/images/slider-progress-vertical@4x.9.png
new file mode 100644
index 00000000..f9b96a3b
--- /dev/null
+++ b/src/imports/controls/imagine/images/slider-progress-vertical@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-disabled.9.png b/src/imports/controls/imagine/images/spinbox-background-disabled.9.png
new file mode 100644
index 00000000..16df3677
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-disabled@2x.9.png b/src/imports/controls/imagine/images/spinbox-background-disabled@2x.9.png
new file mode 100644
index 00000000..be72ec16
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-disabled@3x.9.png b/src/imports/controls/imagine/images/spinbox-background-disabled@3x.9.png
new file mode 100644
index 00000000..ca2d3322
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-disabled@4x.9.png b/src/imports/controls/imagine/images/spinbox-background-disabled@4x.9.png
new file mode 100644
index 00000000..62040f69
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-editable.9.png b/src/imports/controls/imagine/images/spinbox-background-editable.9.png
new file mode 100644
index 00000000..0bd1f239
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-editable.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-editable@2x.9.png b/src/imports/controls/imagine/images/spinbox-background-editable@2x.9.png
new file mode 100644
index 00000000..c523826a
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-editable@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-editable@3x.9.png b/src/imports/controls/imagine/images/spinbox-background-editable@3x.9.png
new file mode 100644
index 00000000..f47a77f8
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-editable@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-editable@4x.9.png b/src/imports/controls/imagine/images/spinbox-background-editable@4x.9.png
new file mode 100644
index 00000000..37939aab
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-editable@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-focused.9.png b/src/imports/controls/imagine/images/spinbox-background-focused.9.png
new file mode 100644
index 00000000..5b1d97ca
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-focused@2x.9.png b/src/imports/controls/imagine/images/spinbox-background-focused@2x.9.png
new file mode 100644
index 00000000..3424bf2d
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-focused@3x.9.png b/src/imports/controls/imagine/images/spinbox-background-focused@3x.9.png
new file mode 100644
index 00000000..a53a76d7
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background-focused@4x.9.png b/src/imports/controls/imagine/images/spinbox-background-focused@4x.9.png
new file mode 100644
index 00000000..9ea30032
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background.9.png b/src/imports/controls/imagine/images/spinbox-background.9.png
new file mode 100644
index 00000000..16560593
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background@2x.9.png b/src/imports/controls/imagine/images/spinbox-background@2x.9.png
new file mode 100644
index 00000000..4b7dcd74
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background@3x.9.png b/src/imports/controls/imagine/images/spinbox-background@3x.9.png
new file mode 100644
index 00000000..af86d12c
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-background@4x.9.png b/src/imports/controls/imagine/images/spinbox-background@4x.9.png
new file mode 100644
index 00000000..bbcd8745
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-disabled.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-disabled.9.png
new file mode 100644
index 00000000..9ec6bf4a
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-disabled@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-disabled@2x.9.png
new file mode 100644
index 00000000..94219759
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-disabled@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-disabled@3x.9.png
new file mode 100644
index 00000000..38b73979
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-disabled@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-disabled@4x.9.png
new file mode 100644
index 00000000..2a5ab52d
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused.9.png
new file mode 100644
index 00000000..9ac0c8f7
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@2x.9.png
new file mode 100644
index 00000000..aa71e927
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@3x.9.png
new file mode 100644
index 00000000..c773e31e
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@4x.9.png
new file mode 100644
index 00000000..5e8e1a5c
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered.9.png
new file mode 100644
index 00000000..9ac0c8f7
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@2x.9.png
new file mode 100644
index 00000000..aa71e927
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@3x.9.png
new file mode 100644
index 00000000..c773e31e
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@4x.9.png
new file mode 100644
index 00000000..5e8e1a5c
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-hovered@4x.9.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..c77a6a04
--- /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..8e652dcc
--- /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..368f9b21
--- /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..02be2e5e
--- /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..c77a6a04
--- /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..8e652dcc
--- /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..368f9b21
--- /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..02be2e5e
--- /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-pressed.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-mirrored-pressed.9.png
new file mode 100644
index 00000000..1d81aef2
--- /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..8638c47e
--- /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..19e44058
--- /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..bf92d5a1
--- /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
new file mode 100644
index 00000000..5cb05b25
--- /dev/null
+++ 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
new file mode 100644
index 00000000..d09d180a
--- /dev/null
+++ 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
new file mode 100644
index 00000000..e33ff83d
--- /dev/null
+++ 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
new file mode 100644
index 00000000..c0062bfa
--- /dev/null
+++ 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-editable-pressed.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed.9.png
new file mode 100644
index 00000000..3b91414f
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@2x.9.png
new file mode 100644
index 00000000..6cf943f8
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@3x.9.png
new file mode 100644
index 00000000..3866a67d
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@4x.9.png
new file mode 100644
index 00000000..076a0b35
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable.9.png
new file mode 100644
index 00000000..60feb583
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable@2x.9.png
new file mode 100644
index 00000000..612f3996
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable@3x.9.png
new file mode 100644
index 00000000..f4b23374
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-editable@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-editable@4x.9.png
new file mode 100644
index 00000000..e69314c0
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-editable@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-focused.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-focused.9.png
new file mode 100644
index 00000000..cb406d57
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-focused@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-focused@2x.9.png
new file mode 100644
index 00000000..8004e824
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-focused@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-focused@3x.9.png
new file mode 100644
index 00000000..8003117d
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-focused@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-focused@4x.9.png
new file mode 100644
index 00000000..2ccf36ac
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-hovered.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-hovered.9.png
new file mode 100644
index 00000000..cb406d57
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-hovered@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-hovered@2x.9.png
new file mode 100644
index 00000000..8004e824
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-hovered@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-hovered@3x.9.png
new file mode 100644
index 00000000..8003117d
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-hovered@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-hovered@4x.9.png
new file mode 100644
index 00000000..2ccf36ac
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-hovered@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..ef6341e1
--- /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..b89d2da7
--- /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..cc2b2935
--- /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..86ef1436
--- /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..d4814abe
--- /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..501a2204
--- /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..06854614
--- /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..37610e71
--- /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..d4814abe
--- /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..501a2204
--- /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..06854614
--- /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..37610e71
--- /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..35fddf9a
--- /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..63050cf1
--- /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..7428a6dd
--- /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..d2849eeb
--- /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
new file mode 100644
index 00000000..603dbd38
--- /dev/null
+++ 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
new file mode 100644
index 00000000..fcd5a7e2
--- /dev/null
+++ 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
new file mode 100644
index 00000000..fdd6f575
--- /dev/null
+++ 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
new file mode 100644
index 00000000..02364a67
--- /dev/null
+++ 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-down-pressed.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-pressed.9.png
new file mode 100644
index 00000000..18abfb0b
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-pressed@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-pressed@2x.9.png
new file mode 100644
index 00000000..ac60f187
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-pressed@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-pressed@3x.9.png
new file mode 100644
index 00000000..507b4c6c
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down-pressed@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down-pressed@4x.9.png
new file mode 100644
index 00000000..58934f8a
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down.9.png
new file mode 100644
index 00000000..171ff635
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down@2x.9.png
new file mode 100644
index 00000000..e5fc7ffa
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down@3x.9.png
new file mode 100644
index 00000000..bc1c50db
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-down@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-down@4x.9.png
new file mode 100644
index 00000000..656c5a58
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-down@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-disabled.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-disabled.9.png
new file mode 100644
index 00000000..233ed958
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-disabled@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-disabled@2x.9.png
new file mode 100644
index 00000000..1f212179
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-disabled@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-disabled@3x.9.png
new file mode 100644
index 00000000..cdebd5b3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-disabled@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-disabled@4x.9.png
new file mode 100644
index 00000000..e05430e6
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused.9.png
new file mode 100644
index 00000000..71d9ab11
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@2x.9.png
new file mode 100644
index 00000000..d12e77fa
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@3x.9.png
new file mode 100644
index 00000000..22523122
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@4x.9.png
new file mode 100644
index 00000000..f1082d21
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered.9.png
new file mode 100644
index 00000000..71d9ab11
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@2x.9.png
new file mode 100644
index 00000000..d12e77fa
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@3x.9.png
new file mode 100644
index 00000000..22523122
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@4x.9.png
new file mode 100644
index 00000000..f1082d21
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-hovered@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..97c49ddc
--- /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..50ee8be8
--- /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..0ac31744
--- /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..b4e8cf5a
--- /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..97c49ddc
--- /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..50ee8be8
--- /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..0ac31744
--- /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..b4e8cf5a
--- /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-pressed.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-mirrored-pressed.9.png
new file mode 100644
index 00000000..10033ff3
--- /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..6ff2b151
--- /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..430a3456
--- /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..bc1606e7
--- /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
new file mode 100644
index 00000000..107bb699
--- /dev/null
+++ 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
new file mode 100644
index 00000000..e9e26e34
--- /dev/null
+++ 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
new file mode 100644
index 00000000..c060ee79
--- /dev/null
+++ 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
new file mode 100644
index 00000000..2f5012f9
--- /dev/null
+++ 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-editable-pressed.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed.9.png
new file mode 100644
index 00000000..3a864191
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@2x.9.png
new file mode 100644
index 00000000..8b2c8d98
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@3x.9.png
new file mode 100644
index 00000000..2d843abb
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@4x.9.png
new file mode 100644
index 00000000..f93e4ef2
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable.9.png
new file mode 100644
index 00000000..f27911f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable@2x.9.png
new file mode 100644
index 00000000..1873dd3b
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable@3x.9.png
new file mode 100644
index 00000000..003f3937
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-editable@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-editable@4x.9.png
new file mode 100644
index 00000000..5fcfffa6
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-editable@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-focused.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-focused.9.png
new file mode 100644
index 00000000..93b9c34c
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-focused@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-focused@2x.9.png
new file mode 100644
index 00000000..425c1725
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-focused@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-focused@3x.9.png
new file mode 100644
index 00000000..c6c728c3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-focused@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-focused@4x.9.png
new file mode 100644
index 00000000..e0772bf3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-hovered.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-hovered.9.png
new file mode 100644
index 00000000..93b9c34c
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-hovered@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-hovered@2x.9.png
new file mode 100644
index 00000000..425c1725
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-hovered@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-hovered@3x.9.png
new file mode 100644
index 00000000..c6c728c3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-hovered@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-hovered@4x.9.png
new file mode 100644
index 00000000..e0772bf3
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-hovered@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..059c46ed
--- /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..670280ea
--- /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..b5e30546
--- /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..f34c65e8
--- /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..8722a522
--- /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..3e0dfafa
--- /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..2337ccdc
--- /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..9dca0ec1
--- /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..8722a522
--- /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..3e0dfafa
--- /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..2337ccdc
--- /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..9dca0ec1
--- /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..3e9030d1
--- /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..5edc3dbe
--- /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..5f497719
--- /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..c376fb75
--- /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
new file mode 100644
index 00000000..32a0613c
--- /dev/null
+++ 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
new file mode 100644
index 00000000..8fdb30f8
--- /dev/null
+++ 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
new file mode 100644
index 00000000..6e9e0172
--- /dev/null
+++ 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
new file mode 100644
index 00000000..7e556e2c
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-mirrored@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-pressed.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-pressed.9.png
new file mode 100644
index 00000000..8f8ef7c4
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-pressed@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-pressed@2x.9.png
new file mode 100644
index 00000000..8760aef9
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-pressed@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-pressed@3x.9.png
new file mode 100644
index 00000000..03beb7b9
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up-pressed@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up-pressed@4x.9.png
new file mode 100644
index 00000000..876fd4af
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up.9.png
new file mode 100644
index 00000000..049d5806
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up@2x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up@2x.9.png
new file mode 100644
index 00000000..75ce9cc1
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up@3x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up@3x.9.png
new file mode 100644
index 00000000..42b5cdb5
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/spinbox-indicator-up@4x.9.png b/src/imports/controls/imagine/images/spinbox-indicator-up@4x.9.png
new file mode 100644
index 00000000..b59d4e77
--- /dev/null
+++ b/src/imports/controls/imagine/images/spinbox-indicator-up@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-disabled.9.png b/src/imports/controls/imagine/images/swipedelegate-background-disabled.9.png
new file mode 100644
index 00000000..4b56fe35
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-disabled@2x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-disabled@2x.9.png
new file mode 100644
index 00000000..34edef58
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-disabled@3x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-disabled@3x.9.png
new file mode 100644
index 00000000..dd2cc6ba
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-disabled@4x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-disabled@4x.9.png
new file mode 100644
index 00000000..b7890a3c
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-focused.9.png b/src/imports/controls/imagine/images/swipedelegate-background-focused.9.png
new file mode 100644
index 00000000..b31343dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-focused@2x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-focused@2x.9.png
new file mode 100644
index 00000000..c56c62da
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-focused@3x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-focused@3x.9.png
new file mode 100644
index 00000000..bfbc82f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-focused@4x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-focused@4x.9.png
new file mode 100644
index 00000000..e31ab63b
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-highlighted.9.png b/src/imports/controls/imagine/images/swipedelegate-background-highlighted.9.png
new file mode 100644
index 00000000..32847cfa
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-highlighted.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-highlighted@2x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-highlighted@2x.9.png
new file mode 100644
index 00000000..126fcb29
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-highlighted@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-highlighted@3x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-highlighted@3x.9.png
new file mode 100644
index 00000000..22b7c9f2
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-highlighted@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-highlighted@4x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-highlighted@4x.9.png
new file mode 100644
index 00000000..4e67f310
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-highlighted@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-hovered.9.png b/src/imports/controls/imagine/images/swipedelegate-background-hovered.9.png
new file mode 100644
index 00000000..a53f63cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-hovered@2x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-hovered@2x.9.png
new file mode 100644
index 00000000..07510b10
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-hovered@3x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-hovered@3x.9.png
new file mode 100644
index 00000000..db2a210a
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-hovered@4x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-hovered@4x.9.png
new file mode 100644
index 00000000..6427d7ab
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-pressed.9.png b/src/imports/controls/imagine/images/swipedelegate-background-pressed.9.png
new file mode 100644
index 00000000..b31343dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-pressed@2x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-pressed@2x.9.png
new file mode 100644
index 00000000..c56c62da
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-pressed@3x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-pressed@3x.9.png
new file mode 100644
index 00000000..bfbc82f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background-pressed@4x.9.png b/src/imports/controls/imagine/images/swipedelegate-background-pressed@4x.9.png
new file mode 100644
index 00000000..e31ab63b
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background.9.png b/src/imports/controls/imagine/images/swipedelegate-background.9.png
new file mode 100644
index 00000000..a53f63cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background@2x.9.png b/src/imports/controls/imagine/images/swipedelegate-background@2x.9.png
new file mode 100644
index 00000000..07510b10
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background@3x.9.png b/src/imports/controls/imagine/images/swipedelegate-background@3x.9.png
new file mode 100644
index 00000000..db2a210a
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/swipedelegate-background@4x.9.png b/src/imports/controls/imagine/images/swipedelegate-background@4x.9.png
new file mode 100644
index 00000000..6427d7ab
--- /dev/null
+++ b/src/imports/controls/imagine/images/swipedelegate-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle-disabled.png b/src/imports/controls/imagine/images/switch-handle-disabled.png
new file mode 100644
index 00000000..4108457f
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle-disabled@2x.png b/src/imports/controls/imagine/images/switch-handle-disabled@2x.png
new file mode 100644
index 00000000..c73b8b45
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle-disabled@3x.png b/src/imports/controls/imagine/images/switch-handle-disabled@3x.png
new file mode 100644
index 00000000..3a927393
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle-disabled@4x.png b/src/imports/controls/imagine/images/switch-handle-disabled@4x.png
new file mode 100644
index 00000000..2893b7a6
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle-pressed.png b/src/imports/controls/imagine/images/switch-handle-pressed.png
new file mode 100644
index 00000000..4108457f
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle-pressed@2x.png b/src/imports/controls/imagine/images/switch-handle-pressed@2x.png
new file mode 100644
index 00000000..c73b8b45
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle-pressed@3x.png b/src/imports/controls/imagine/images/switch-handle-pressed@3x.png
new file mode 100644
index 00000000..3a927393
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle-pressed@4x.png b/src/imports/controls/imagine/images/switch-handle-pressed@4x.png
new file mode 100644
index 00000000..2893b7a6
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle.png b/src/imports/controls/imagine/images/switch-handle.png
new file mode 100644
index 00000000..814cfe4f
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle@2x.png b/src/imports/controls/imagine/images/switch-handle@2x.png
new file mode 100644
index 00000000..df3e41c5
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle@3x.png b/src/imports/controls/imagine/images/switch-handle@3x.png
new file mode 100644
index 00000000..601c0d53
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-handle@4x.png b/src/imports/controls/imagine/images/switch-handle@4x.png
new file mode 100644
index 00000000..b03a1d31
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-handle@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-focused.png b/src/imports/controls/imagine/images/switch-indicator-checked-focused.png
new file mode 100644
index 00000000..06f09514
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-focused@2x.png b/src/imports/controls/imagine/images/switch-indicator-checked-focused@2x.png
new file mode 100644
index 00000000..90044add
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-focused@3x.png b/src/imports/controls/imagine/images/switch-indicator-checked-focused@3x.png
new file mode 100644
index 00000000..c987c7b5
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-focused@4x.png b/src/imports/controls/imagine/images/switch-indicator-checked-focused@4x.png
new file mode 100644
index 00000000..c2351de8
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-hovered.png b/src/imports/controls/imagine/images/switch-indicator-checked-hovered.png
new file mode 100644
index 00000000..06f09514
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-hovered@2x.png b/src/imports/controls/imagine/images/switch-indicator-checked-hovered@2x.png
new file mode 100644
index 00000000..90044add
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-hovered@3x.png b/src/imports/controls/imagine/images/switch-indicator-checked-hovered@3x.png
new file mode 100644
index 00000000..c987c7b5
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-hovered@4x.png b/src/imports/controls/imagine/images/switch-indicator-checked-hovered@4x.png
new file mode 100644
index 00000000..c2351de8
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-pressed.png b/src/imports/controls/imagine/images/switch-indicator-checked-pressed.png
new file mode 100644
index 00000000..fcf8a5f3
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-pressed@2x.png b/src/imports/controls/imagine/images/switch-indicator-checked-pressed@2x.png
new file mode 100644
index 00000000..b8747547
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-pressed@3x.png b/src/imports/controls/imagine/images/switch-indicator-checked-pressed@3x.png
new file mode 100644
index 00000000..1a254945
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked-pressed@4x.png b/src/imports/controls/imagine/images/switch-indicator-checked-pressed@4x.png
new file mode 100644
index 00000000..7af5cc05
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked.png b/src/imports/controls/imagine/images/switch-indicator-checked.png
new file mode 100644
index 00000000..00af5fd7
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked@2x.png b/src/imports/controls/imagine/images/switch-indicator-checked@2x.png
new file mode 100644
index 00000000..b9ae1ce2
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked@3x.png b/src/imports/controls/imagine/images/switch-indicator-checked@3x.png
new file mode 100644
index 00000000..fbcd46df
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-checked@4x.png b/src/imports/controls/imagine/images/switch-indicator-checked@4x.png
new file mode 100644
index 00000000..04807b20
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-disabled.png b/src/imports/controls/imagine/images/switch-indicator-disabled.png
new file mode 100644
index 00000000..47800da2
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-disabled@2x.png b/src/imports/controls/imagine/images/switch-indicator-disabled@2x.png
new file mode 100644
index 00000000..bc3cfbf4
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-disabled@3x.png b/src/imports/controls/imagine/images/switch-indicator-disabled@3x.png
new file mode 100644
index 00000000..b29d5756
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-disabled@4x.png b/src/imports/controls/imagine/images/switch-indicator-disabled@4x.png
new file mode 100644
index 00000000..22562fdf
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-focused.png b/src/imports/controls/imagine/images/switch-indicator-focused.png
new file mode 100644
index 00000000..570f6872
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-focused@2x.png b/src/imports/controls/imagine/images/switch-indicator-focused@2x.png
new file mode 100644
index 00000000..389c7f51
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-focused@3x.png b/src/imports/controls/imagine/images/switch-indicator-focused@3x.png
new file mode 100644
index 00000000..c2e2a155
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-focused@4x.png b/src/imports/controls/imagine/images/switch-indicator-focused@4x.png
new file mode 100644
index 00000000..3637139f
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-hovered.png b/src/imports/controls/imagine/images/switch-indicator-hovered.png
new file mode 100644
index 00000000..570f6872
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-hovered@2x.png b/src/imports/controls/imagine/images/switch-indicator-hovered@2x.png
new file mode 100644
index 00000000..389c7f51
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-hovered@3x.png b/src/imports/controls/imagine/images/switch-indicator-hovered@3x.png
new file mode 100644
index 00000000..c2e2a155
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-hovered@4x.png b/src/imports/controls/imagine/images/switch-indicator-hovered@4x.png
new file mode 100644
index 00000000..3637139f
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-pressed.png b/src/imports/controls/imagine/images/switch-indicator-pressed.png
new file mode 100644
index 00000000..6129c382
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-pressed@2x.png b/src/imports/controls/imagine/images/switch-indicator-pressed@2x.png
new file mode 100644
index 00000000..144eb013
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-pressed@3x.png b/src/imports/controls/imagine/images/switch-indicator-pressed@3x.png
new file mode 100644
index 00000000..f59d9051
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator-pressed@4x.png b/src/imports/controls/imagine/images/switch-indicator-pressed@4x.png
new file mode 100644
index 00000000..48d24f7c
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator.png b/src/imports/controls/imagine/images/switch-indicator.png
new file mode 100644
index 00000000..e0ec85e2
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator@2x.png b/src/imports/controls/imagine/images/switch-indicator@2x.png
new file mode 100644
index 00000000..d0026507
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator@3x.png b/src/imports/controls/imagine/images/switch-indicator@3x.png
new file mode 100644
index 00000000..1a59e3b0
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switch-indicator@4x.png b/src/imports/controls/imagine/images/switch-indicator@4x.png
new file mode 100644
index 00000000..1db31ec3
--- /dev/null
+++ b/src/imports/controls/imagine/images/switch-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-disabled.9.png b/src/imports/controls/imagine/images/switchdelegate-background-disabled.9.png
new file mode 100644
index 00000000..4b56fe35
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-disabled@2x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-disabled@2x.9.png
new file mode 100644
index 00000000..34edef58
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-disabled@3x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-disabled@3x.9.png
new file mode 100644
index 00000000..dd2cc6ba
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-disabled@4x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-disabled@4x.9.png
new file mode 100644
index 00000000..b7890a3c
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-focused.9.png b/src/imports/controls/imagine/images/switchdelegate-background-focused.9.png
new file mode 100644
index 00000000..b31343dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-focused@2x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-focused@2x.9.png
new file mode 100644
index 00000000..c56c62da
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-focused@3x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-focused@3x.9.png
new file mode 100644
index 00000000..bfbc82f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-focused@4x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-focused@4x.9.png
new file mode 100644
index 00000000..e31ab63b
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-hovered.9.png b/src/imports/controls/imagine/images/switchdelegate-background-hovered.9.png
new file mode 100644
index 00000000..a53f63cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-hovered@2x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-hovered@2x.9.png
new file mode 100644
index 00000000..07510b10
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-hovered@3x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-hovered@3x.9.png
new file mode 100644
index 00000000..db2a210a
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-hovered@4x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-hovered@4x.9.png
new file mode 100644
index 00000000..6427d7ab
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-pressed.9.png b/src/imports/controls/imagine/images/switchdelegate-background-pressed.9.png
new file mode 100644
index 00000000..b31343dd
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-pressed@2x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-pressed@2x.9.png
new file mode 100644
index 00000000..c56c62da
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-pressed@3x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-pressed@3x.9.png
new file mode 100644
index 00000000..bfbc82f9
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background-pressed@4x.9.png b/src/imports/controls/imagine/images/switchdelegate-background-pressed@4x.9.png
new file mode 100644
index 00000000..e31ab63b
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background.9.png b/src/imports/controls/imagine/images/switchdelegate-background.9.png
new file mode 100644
index 00000000..a53f63cd
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background@2x.9.png b/src/imports/controls/imagine/images/switchdelegate-background@2x.9.png
new file mode 100644
index 00000000..07510b10
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background@3x.9.png b/src/imports/controls/imagine/images/switchdelegate-background@3x.9.png
new file mode 100644
index 00000000..db2a210a
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-background@4x.9.png b/src/imports/controls/imagine/images/switchdelegate-background@4x.9.png
new file mode 100644
index 00000000..6427d7ab
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle-disabled.png b/src/imports/controls/imagine/images/switchdelegate-handle-disabled.png
new file mode 100644
index 00000000..4108457f
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle-disabled@2x.png b/src/imports/controls/imagine/images/switchdelegate-handle-disabled@2x.png
new file mode 100644
index 00000000..c73b8b45
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle-disabled@3x.png b/src/imports/controls/imagine/images/switchdelegate-handle-disabled@3x.png
new file mode 100644
index 00000000..3a927393
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle-disabled@4x.png b/src/imports/controls/imagine/images/switchdelegate-handle-disabled@4x.png
new file mode 100644
index 00000000..2893b7a6
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle-pressed.png b/src/imports/controls/imagine/images/switchdelegate-handle-pressed.png
new file mode 100644
index 00000000..4108457f
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle-pressed@2x.png b/src/imports/controls/imagine/images/switchdelegate-handle-pressed@2x.png
new file mode 100644
index 00000000..c73b8b45
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle-pressed@3x.png b/src/imports/controls/imagine/images/switchdelegate-handle-pressed@3x.png
new file mode 100644
index 00000000..3a927393
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle-pressed@4x.png b/src/imports/controls/imagine/images/switchdelegate-handle-pressed@4x.png
new file mode 100644
index 00000000..2893b7a6
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle.png b/src/imports/controls/imagine/images/switchdelegate-handle.png
new file mode 100644
index 00000000..814cfe4f
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle@2x.png b/src/imports/controls/imagine/images/switchdelegate-handle@2x.png
new file mode 100644
index 00000000..df3e41c5
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle@3x.png b/src/imports/controls/imagine/images/switchdelegate-handle@3x.png
new file mode 100644
index 00000000..601c0d53
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-handle@4x.png b/src/imports/controls/imagine/images/switchdelegate-handle@4x.png
new file mode 100644
index 00000000..b03a1d31
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-handle@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused.png
new file mode 100644
index 00000000..06f09514
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@2x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@2x.png
new file mode 100644
index 00000000..90044add
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@3x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@3x.png
new file mode 100644
index 00000000..c987c7b5
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@4x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@4x.png
new file mode 100644
index 00000000..c2351de8
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered.png
new file mode 100644
index 00000000..06f09514
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@2x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@2x.png
new file mode 100644
index 00000000..90044add
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@3x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@3x.png
new file mode 100644
index 00000000..c987c7b5
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@4x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@4x.png
new file mode 100644
index 00000000..c2351de8
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed.png
new file mode 100644
index 00000000..fcf8a5f3
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@2x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@2x.png
new file mode 100644
index 00000000..b8747547
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@3x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@3x.png
new file mode 100644
index 00000000..1a254945
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@4x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@4x.png
new file mode 100644
index 00000000..7af5cc05
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked.png
new file mode 100644
index 00000000..00af5fd7
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked@2x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked@2x.png
new file mode 100644
index 00000000..b9ae1ce2
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked@3x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked@3x.png
new file mode 100644
index 00000000..fbcd46df
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-checked@4x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-checked@4x.png
new file mode 100644
index 00000000..04807b20
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-checked@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-disabled.png b/src/imports/controls/imagine/images/switchdelegate-indicator-disabled.png
new file mode 100644
index 00000000..47800da2
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-disabled.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-disabled@2x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-disabled@2x.png
new file mode 100644
index 00000000..bc3cfbf4
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-disabled@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-disabled@3x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-disabled@3x.png
new file mode 100644
index 00000000..b29d5756
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-disabled@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-disabled@4x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-disabled@4x.png
new file mode 100644
index 00000000..22562fdf
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-disabled@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-focused.png b/src/imports/controls/imagine/images/switchdelegate-indicator-focused.png
new file mode 100644
index 00000000..570f6872
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-focused.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-focused@2x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-focused@2x.png
new file mode 100644
index 00000000..389c7f51
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-focused@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-focused@3x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-focused@3x.png
new file mode 100644
index 00000000..c2e2a155
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-focused@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-focused@4x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-focused@4x.png
new file mode 100644
index 00000000..3637139f
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-focused@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-hovered.png b/src/imports/controls/imagine/images/switchdelegate-indicator-hovered.png
new file mode 100644
index 00000000..570f6872
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-hovered.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-hovered@2x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-hovered@2x.png
new file mode 100644
index 00000000..389c7f51
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-hovered@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-hovered@3x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-hovered@3x.png
new file mode 100644
index 00000000..c2e2a155
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-hovered@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-hovered@4x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-hovered@4x.png
new file mode 100644
index 00000000..3637139f
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-hovered@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-pressed.png b/src/imports/controls/imagine/images/switchdelegate-indicator-pressed.png
new file mode 100644
index 00000000..6129c382
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-pressed.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-pressed@2x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-pressed@2x.png
new file mode 100644
index 00000000..144eb013
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-pressed@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-pressed@3x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-pressed@3x.png
new file mode 100644
index 00000000..f59d9051
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-pressed@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator-pressed@4x.png b/src/imports/controls/imagine/images/switchdelegate-indicator-pressed@4x.png
new file mode 100644
index 00000000..48d24f7c
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator-pressed@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator.png b/src/imports/controls/imagine/images/switchdelegate-indicator.png
new file mode 100644
index 00000000..e0ec85e2
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator@2x.png b/src/imports/controls/imagine/images/switchdelegate-indicator@2x.png
new file mode 100644
index 00000000..d0026507
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator@3x.png b/src/imports/controls/imagine/images/switchdelegate-indicator@3x.png
new file mode 100644
index 00000000..1a59e3b0
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/switchdelegate-indicator@4x.png b/src/imports/controls/imagine/images/switchdelegate-indicator@4x.png
new file mode 100644
index 00000000..1db31ec3
--- /dev/null
+++ b/src/imports/controls/imagine/images/switchdelegate-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbar-background.png b/src/imports/controls/imagine/images/tabbar-background.png
new file mode 100644
index 00000000..1d806c2d
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbar-background.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbar-background@2x.png b/src/imports/controls/imagine/images/tabbar-background@2x.png
new file mode 100644
index 00000000..943f11ba
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbar-background@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbar-background@3x.png b/src/imports/controls/imagine/images/tabbar-background@3x.png
new file mode 100644
index 00000000..4f0568a7
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbar-background@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbar-background@4x.png b/src/imports/controls/imagine/images/tabbar-background@4x.png
new file mode 100644
index 00000000..33a7918c
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbar-background@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-checked.9.png b/src/imports/controls/imagine/images/tabbutton-background-checked.9.png
new file mode 100644
index 00000000..7f2f6aa6
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-checked.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-checked@2x.9.png b/src/imports/controls/imagine/images/tabbutton-background-checked@2x.9.png
new file mode 100644
index 00000000..86dab9ac
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-checked@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-checked@3x.9.png b/src/imports/controls/imagine/images/tabbutton-background-checked@3x.9.png
new file mode 100644
index 00000000..f426f6a3
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-checked@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-checked@4x.9.png b/src/imports/controls/imagine/images/tabbutton-background-checked@4x.9.png
new file mode 100644
index 00000000..fa4859e5
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-checked@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-disabled-checked.9.png b/src/imports/controls/imagine/images/tabbutton-background-disabled-checked.9.png
new file mode 100644
index 00000000..0397108c
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-disabled-checked.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-disabled-checked@2x.9.png b/src/imports/controls/imagine/images/tabbutton-background-disabled-checked@2x.9.png
new file mode 100644
index 00000000..e80b3c78
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-disabled-checked@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-disabled-checked@3x.9.png b/src/imports/controls/imagine/images/tabbutton-background-disabled-checked@3x.9.png
new file mode 100644
index 00000000..97653e39
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-disabled-checked@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-disabled-checked@4x.9.png b/src/imports/controls/imagine/images/tabbutton-background-disabled-checked@4x.9.png
new file mode 100644
index 00000000..f32db8c9
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-disabled-checked@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-disabled.9.png b/src/imports/controls/imagine/images/tabbutton-background-disabled.9.png
new file mode 100644
index 00000000..0397108c
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-disabled@2x.9.png b/src/imports/controls/imagine/images/tabbutton-background-disabled@2x.9.png
new file mode 100644
index 00000000..e80b3c78
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-disabled@3x.9.png b/src/imports/controls/imagine/images/tabbutton-background-disabled@3x.9.png
new file mode 100644
index 00000000..97653e39
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-disabled@4x.9.png b/src/imports/controls/imagine/images/tabbutton-background-disabled@4x.9.png
new file mode 100644
index 00000000..f32db8c9
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-hovered.9.png b/src/imports/controls/imagine/images/tabbutton-background-hovered.9.png
new file mode 100644
index 00000000..0838287b
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-hovered@2x.9.png b/src/imports/controls/imagine/images/tabbutton-background-hovered@2x.9.png
new file mode 100644
index 00000000..71fde8ce
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-hovered@3x.9.png b/src/imports/controls/imagine/images/tabbutton-background-hovered@3x.9.png
new file mode 100644
index 00000000..a289bbd2
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-hovered@4x.9.png b/src/imports/controls/imagine/images/tabbutton-background-hovered@4x.9.png
new file mode 100644
index 00000000..20e16933
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-pressed.9.png b/src/imports/controls/imagine/images/tabbutton-background-pressed.9.png
new file mode 100644
index 00000000..92e078bb
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-pressed@2x.9.png b/src/imports/controls/imagine/images/tabbutton-background-pressed@2x.9.png
new file mode 100644
index 00000000..20f7e55e
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-pressed@3x.9.png b/src/imports/controls/imagine/images/tabbutton-background-pressed@3x.9.png
new file mode 100644
index 00000000..74e8ce65
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background-pressed@4x.9.png b/src/imports/controls/imagine/images/tabbutton-background-pressed@4x.9.png
new file mode 100644
index 00000000..20e52e48
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background.9.png b/src/imports/controls/imagine/images/tabbutton-background.9.png
new file mode 100644
index 00000000..60bddd70
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background@2x.9.png b/src/imports/controls/imagine/images/tabbutton-background@2x.9.png
new file mode 100644
index 00000000..5e92aa79
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background@3x.9.png b/src/imports/controls/imagine/images/tabbutton-background@3x.9.png
new file mode 100644
index 00000000..b60a9a57
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tabbutton-background@4x.9.png b/src/imports/controls/imagine/images/tabbutton-background@4x.9.png
new file mode 100644
index 00000000..5fa46bbd
--- /dev/null
+++ b/src/imports/controls/imagine/images/tabbutton-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background-disabled.9.png b/src/imports/controls/imagine/images/textarea-background-disabled.9.png
new file mode 100644
index 00000000..23291866
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background-disabled@2x.9.png b/src/imports/controls/imagine/images/textarea-background-disabled@2x.9.png
new file mode 100644
index 00000000..62b0697a
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background-disabled@3x.9.png b/src/imports/controls/imagine/images/textarea-background-disabled@3x.9.png
new file mode 100644
index 00000000..188f0adf
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background-disabled@4x.9.png b/src/imports/controls/imagine/images/textarea-background-disabled@4x.9.png
new file mode 100644
index 00000000..3040bc55
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background-focused.9.png b/src/imports/controls/imagine/images/textarea-background-focused.9.png
new file mode 100644
index 00000000..5098d8b3
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background-focused@2x.9.png b/src/imports/controls/imagine/images/textarea-background-focused@2x.9.png
new file mode 100644
index 00000000..41e3d319
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background-focused@3x.9.png b/src/imports/controls/imagine/images/textarea-background-focused@3x.9.png
new file mode 100644
index 00000000..86052b8d
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background-focused@4x.9.png b/src/imports/controls/imagine/images/textarea-background-focused@4x.9.png
new file mode 100644
index 00000000..8891d4b0
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background.9.png b/src/imports/controls/imagine/images/textarea-background.9.png
new file mode 100644
index 00000000..c7c34666
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background@2x.9.png b/src/imports/controls/imagine/images/textarea-background@2x.9.png
new file mode 100644
index 00000000..7196c109
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background@3x.9.png b/src/imports/controls/imagine/images/textarea-background@3x.9.png
new file mode 100644
index 00000000..8e23e0aa
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textarea-background@4x.9.png b/src/imports/controls/imagine/images/textarea-background@4x.9.png
new file mode 100644
index 00000000..b0bbb7ce
--- /dev/null
+++ b/src/imports/controls/imagine/images/textarea-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background-disabled.9.png b/src/imports/controls/imagine/images/textfield-background-disabled.9.png
new file mode 100644
index 00000000..b734333e
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background-disabled.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background-disabled@2x.9.png b/src/imports/controls/imagine/images/textfield-background-disabled@2x.9.png
new file mode 100644
index 00000000..a24df3b9
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background-disabled@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background-disabled@3x.9.png b/src/imports/controls/imagine/images/textfield-background-disabled@3x.9.png
new file mode 100644
index 00000000..094b8ab9
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background-disabled@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background-disabled@4x.9.png b/src/imports/controls/imagine/images/textfield-background-disabled@4x.9.png
new file mode 100644
index 00000000..3610c116
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background-disabled@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background-focused.9.png b/src/imports/controls/imagine/images/textfield-background-focused.9.png
new file mode 100644
index 00000000..b89c7a84
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background-focused@2x.9.png b/src/imports/controls/imagine/images/textfield-background-focused@2x.9.png
new file mode 100644
index 00000000..411ef62c
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background-focused@3x.9.png b/src/imports/controls/imagine/images/textfield-background-focused@3x.9.png
new file mode 100644
index 00000000..52dc65c2
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background-focused@4x.9.png b/src/imports/controls/imagine/images/textfield-background-focused@4x.9.png
new file mode 100644
index 00000000..be9f5420
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background.9.png b/src/imports/controls/imagine/images/textfield-background.9.png
new file mode 100644
index 00000000..c307aa00
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background@2x.9.png b/src/imports/controls/imagine/images/textfield-background@2x.9.png
new file mode 100644
index 00000000..f7df296f
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background@3x.9.png b/src/imports/controls/imagine/images/textfield-background@3x.9.png
new file mode 100644
index 00000000..81d73086
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/textfield-background@4x.9.png b/src/imports/controls/imagine/images/textfield-background@4x.9.png
new file mode 100644
index 00000000..d8a96fdd
--- /dev/null
+++ b/src/imports/controls/imagine/images/textfield-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbar-background.png b/src/imports/controls/imagine/images/toolbar-background.png
new file mode 100644
index 00000000..dcd0cb75
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbar-background.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbar-background@2x.png b/src/imports/controls/imagine/images/toolbar-background@2x.png
new file mode 100644
index 00000000..5a8518c7
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbar-background@2x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbar-background@3x.png b/src/imports/controls/imagine/images/toolbar-background@3x.png
new file mode 100644
index 00000000..0285b12c
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbar-background@3x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbar-background@4x.png b/src/imports/controls/imagine/images/toolbar-background@4x.png
new file mode 100644
index 00000000..e8d784ce
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbar-background@4x.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked-focused.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked-focused.9.png
new file mode 100644
index 00000000..8ce5b791
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked-focused@2x.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked-focused@2x.9.png
new file mode 100644
index 00000000..d99d1577
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked-focused@3x.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked-focused@3x.9.png
new file mode 100644
index 00000000..c47247fe
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked-focused@4x.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked-focused@4x.9.png
new file mode 100644
index 00000000..e1e519da
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked-hovered.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked-hovered.9.png
new file mode 100644
index 00000000..8ce5b791
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked-hovered@2x.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked-hovered@2x.9.png
new file mode 100644
index 00000000..d99d1577
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked-hovered@3x.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked-hovered@3x.9.png
new file mode 100644
index 00000000..c47247fe
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked-hovered@4x.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked-hovered@4x.9.png
new file mode 100644
index 00000000..e1e519da
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked.9.png
new file mode 100644
index 00000000..8ce5b791
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked@2x.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked@2x.9.png
new file mode 100644
index 00000000..d99d1577
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked@3x.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked@3x.9.png
new file mode 100644
index 00000000..c47247fe
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-checked@4x.9.png b/src/imports/controls/imagine/images/toolbutton-background-checked@4x.9.png
new file mode 100644
index 00000000..e1e519da
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-checked@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-disabled-checked.9.png b/src/imports/controls/imagine/images/toolbutton-background-disabled-checked.9.png
new file mode 100644
index 00000000..8ce5b791
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-disabled-checked.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-disabled-checked@2x.9.png b/src/imports/controls/imagine/images/toolbutton-background-disabled-checked@2x.9.png
new file mode 100644
index 00000000..d99d1577
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-disabled-checked@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-disabled-checked@3x.9.png b/src/imports/controls/imagine/images/toolbutton-background-disabled-checked@3x.9.png
new file mode 100644
index 00000000..c47247fe
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-disabled-checked@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-disabled-checked@4x.9.png b/src/imports/controls/imagine/images/toolbutton-background-disabled-checked@4x.9.png
new file mode 100644
index 00000000..e1e519da
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-disabled-checked@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-focused.9.png b/src/imports/controls/imagine/images/toolbutton-background-focused.9.png
new file mode 100644
index 00000000..8ce5b791
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-focused.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-focused@2x.9.png b/src/imports/controls/imagine/images/toolbutton-background-focused@2x.9.png
new file mode 100644
index 00000000..d99d1577
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-focused@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-focused@3x.9.png b/src/imports/controls/imagine/images/toolbutton-background-focused@3x.9.png
new file mode 100644
index 00000000..c47247fe
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-focused@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-focused@4x.9.png b/src/imports/controls/imagine/images/toolbutton-background-focused@4x.9.png
new file mode 100644
index 00000000..e1e519da
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-focused@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-hovered.9.png b/src/imports/controls/imagine/images/toolbutton-background-hovered.9.png
new file mode 100644
index 00000000..8ce5b791
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-hovered.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-hovered@2x.9.png b/src/imports/controls/imagine/images/toolbutton-background-hovered@2x.9.png
new file mode 100644
index 00000000..d99d1577
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-hovered@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-hovered@3x.9.png b/src/imports/controls/imagine/images/toolbutton-background-hovered@3x.9.png
new file mode 100644
index 00000000..c47247fe
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-hovered@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-hovered@4x.9.png b/src/imports/controls/imagine/images/toolbutton-background-hovered@4x.9.png
new file mode 100644
index 00000000..e1e519da
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-hovered@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-pressed.9.png b/src/imports/controls/imagine/images/toolbutton-background-pressed.9.png
new file mode 100644
index 00000000..8ce5b791
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-pressed.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-pressed@2x.9.png b/src/imports/controls/imagine/images/toolbutton-background-pressed@2x.9.png
new file mode 100644
index 00000000..d99d1577
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-pressed@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-pressed@3x.9.png b/src/imports/controls/imagine/images/toolbutton-background-pressed@3x.9.png
new file mode 100644
index 00000000..c47247fe
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-pressed@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background-pressed@4x.9.png b/src/imports/controls/imagine/images/toolbutton-background-pressed@4x.9.png
new file mode 100644
index 00000000..e1e519da
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background-pressed@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background.9.png b/src/imports/controls/imagine/images/toolbutton-background.9.png
new file mode 100644
index 00000000..2359b090
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background@2x.9.png b/src/imports/controls/imagine/images/toolbutton-background@2x.9.png
new file mode 100644
index 00000000..6c36bf22
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background@3x.9.png b/src/imports/controls/imagine/images/toolbutton-background@3x.9.png
new file mode 100644
index 00000000..f3cb6144
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolbutton-background@4x.9.png b/src/imports/controls/imagine/images/toolbutton-background@4x.9.png
new file mode 100644
index 00000000..1bf51a87
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolbutton-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolseparator-separator-horizontal.9.png b/src/imports/controls/imagine/images/toolseparator-separator-horizontal.9.png
new file mode 100644
index 00000000..45a22b6d
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolseparator-separator-horizontal.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolseparator-separator-horizontal@2x.9.png b/src/imports/controls/imagine/images/toolseparator-separator-horizontal@2x.9.png
new file mode 100644
index 00000000..a2dc5227
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolseparator-separator-horizontal@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolseparator-separator-horizontal@3x.9.png b/src/imports/controls/imagine/images/toolseparator-separator-horizontal@3x.9.png
new file mode 100644
index 00000000..471da912
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolseparator-separator-horizontal@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolseparator-separator-horizontal@4x.9.png b/src/imports/controls/imagine/images/toolseparator-separator-horizontal@4x.9.png
new file mode 100644
index 00000000..23a8b1d3
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolseparator-separator-horizontal@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolseparator-separator-vertical.9.png b/src/imports/controls/imagine/images/toolseparator-separator-vertical.9.png
new file mode 100644
index 00000000..31f24342
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolseparator-separator-vertical.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolseparator-separator-vertical@2x.9.png b/src/imports/controls/imagine/images/toolseparator-separator-vertical@2x.9.png
new file mode 100644
index 00000000..c1722962
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolseparator-separator-vertical@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolseparator-separator-vertical@3x.9.png b/src/imports/controls/imagine/images/toolseparator-separator-vertical@3x.9.png
new file mode 100644
index 00000000..c7de6ead
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolseparator-separator-vertical@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/toolseparator-separator-vertical@4x.9.png b/src/imports/controls/imagine/images/toolseparator-separator-vertical@4x.9.png
new file mode 100644
index 00000000..e17b5dbd
--- /dev/null
+++ b/src/imports/controls/imagine/images/toolseparator-separator-vertical@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tooltip-background.9.png b/src/imports/controls/imagine/images/tooltip-background.9.png
new file mode 100644
index 00000000..b7f04322
--- /dev/null
+++ b/src/imports/controls/imagine/images/tooltip-background.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tooltip-background@2x.9.png b/src/imports/controls/imagine/images/tooltip-background@2x.9.png
new file mode 100644
index 00000000..9825f59b
--- /dev/null
+++ b/src/imports/controls/imagine/images/tooltip-background@2x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tooltip-background@3x.9.png b/src/imports/controls/imagine/images/tooltip-background@3x.9.png
new file mode 100644
index 00000000..59dad6cc
--- /dev/null
+++ b/src/imports/controls/imagine/images/tooltip-background@3x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/images/tooltip-background@4x.9.png b/src/imports/controls/imagine/images/tooltip-background@4x.9.png
new file mode 100644
index 00000000..e14599cf
--- /dev/null
+++ b/src/imports/controls/imagine/images/tooltip-background@4x.9.png
Binary files differ
diff --git a/src/imports/controls/imagine/imagine.pri b/src/imports/controls/imagine/imagine.pri
new file mode 100644
index 00000000..cb6857a5
--- /dev/null
+++ b/src/imports/controls/imagine/imagine.pri
@@ -0,0 +1,58 @@
+QML_FILES += \
+ $$PWD/ApplicationWindow.qml \
+ $$PWD/BusyIndicator.qml \
+ $$PWD/Button.qml \
+ $$PWD/CheckBox.qml \
+ $$PWD/CheckDelegate.qml \
+ $$PWD/ComboBox.qml \
+ $$PWD/DelayButton.qml \
+ $$PWD/Dial.qml \
+ $$PWD/Dialog.qml \
+ $$PWD/DialogButtonBox.qml \
+ $$PWD/Drawer.qml \
+ $$PWD/Frame.qml \
+ $$PWD/GroupBox.qml \
+ $$PWD/ItemDelegate.qml \
+ $$PWD/Label.qml \
+ $$PWD/Menu.qml \
+ $$PWD/MenuItem.qml \
+ $$PWD/MenuSeparator.qml \
+ $$PWD/PageIndicator.qml \
+ $$PWD/Page.qml \
+ $$PWD/Pane.qml \
+ $$PWD/Popup.qml \
+ $$PWD/ProgressBar.qml \
+ $$PWD/RadioButton.qml \
+ $$PWD/RadioDelegate.qml \
+ $$PWD/RangeSlider.qml \
+ $$PWD/RoundButton.qml \
+ $$PWD/ScrollBar.qml \
+ $$PWD/ScrollIndicator.qml \
+ $$PWD/Slider.qml \
+ $$PWD/SpinBox.qml \
+ $$PWD/StackView.qml \
+ $$PWD/SwipeDelegate.qml \
+ $$PWD/SwipeView.qml \
+ $$PWD/Switch.qml \
+ $$PWD/SwitchDelegate.qml \
+ $$PWD/TextField.qml \
+ $$PWD/TextArea.qml \
+ $$PWD/TabBar.qml \
+ $$PWD/TabButton.qml \
+ $$PWD/ToolBar.qml \
+ $$PWD/ToolButton.qml \
+ $$PWD/ToolSeparator.qml \
+ $$PWD/ToolTip.qml \
+ $$PWD/Tumbler.qml
+
+HEADERS += \
+ $$PWD/qquickimageselector_p.h \
+ $$PWD/qquickimaginestyle_p.h \
+ $$PWD/qquickimaginetheme_p.h \
+ $$PWD/qquickninepatchimage_p.h
+
+SOURCES += \
+ $$PWD/qquickimageselector.cpp \
+ $$PWD/qquickimaginestyle.cpp \
+ $$PWD/qquickimaginetheme.cpp \
+ $$PWD/qquickninepatchimage.cpp
diff --git a/src/imports/controls/imagine/imagine.pro b/src/imports/controls/imagine/imagine.pro
new file mode 100644
index 00000000..19e86028
--- /dev/null
+++ b/src/imports/controls/imagine/imagine.pro
@@ -0,0 +1,27 @@
+TARGET = qtquickcontrols2imaginestyleplugin
+TARGETPATH = QtQuick/Controls.2/Imagine
+IMPORT_VERSION = 2.3
+
+QT += qml quick
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+
+OTHER_FILES += \
+ qmldir
+
+SOURCES += \
+ $$PWD/qtquickcontrols2imaginestyleplugin.cpp
+
+include(imagine.pri)
+
+qtquickcontrols2imaginestyle.prefix = qt-project.org/imports/QtQuick/Controls.2/Imagine
+qtquickcontrols2imaginestyle.files += \
+ $$files($$PWD/images/*.png) \
+ $$files($$PWD/images/*.webp)
+RESOURCES += qtquickcontrols2imaginestyle
+
+CONFIG += no_cxx_module
+load(qml_plugin)
+
+requires(qtConfig(quickcontrols2-imagine))
diff --git a/src/imports/controls/imagine/qmldir b/src/imports/controls/imagine/qmldir
new file mode 100644
index 00000000..05de7a77
--- /dev/null
+++ b/src/imports/controls/imagine/qmldir
@@ -0,0 +1,4 @@
+module QtQuick.Controls.Imagine
+plugin qtquickcontrols2imaginestyleplugin
+classname QtQuickControls2ImagineStylePlugin
+depends QtQuick.Controls 2.3
diff --git a/src/imports/controls/imagine/qquickimageselector.cpp b/src/imports/controls/imagine/qquickimageselector.cpp
new file mode 100644
index 00000000..1b3e80a9
--- /dev/null
+++ b/src/imports/controls/imagine/qquickimageselector.cpp
@@ -0,0 +1,340 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickimageselector_p.h"
+
+#include <QtCore/qdir.h>
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qcache.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qfileselector.h>
+#include <QtQml/qqmlfile.h>
+#include <QtQml/private/qqmlproperty_p.h>
+#include <algorithm>
+
+QT_BEGIN_NAMESPACE
+
+static const int DEFAULT_CACHE = 500;
+
+static inline int cacheSize()
+{
+ static bool ok = false;
+ static const int size = qEnvironmentVariableIntValue("QT_QUICK_CONTROLS_IMAGINE_CACHE", &ok);
+ return ok ? size : DEFAULT_CACHE;
+}
+
+Q_DECLARE_LOGGING_CATEGORY(lcQtQuickControlsImagine)
+
+// input: [focused, pressed]
+// => [[focused, pressed], [pressed, focused], [focused], [pressed]]
+static QList<QStringList> permutations(const QStringList &input, int count = -1)
+{
+ if (count == -1)
+ count = input.count();
+
+ QList<QStringList> output;
+ for (int i = 0; i < input.count(); ++i) {
+ QStringList sub = input.mid(i, count);
+
+ if (count > 1) {
+ if (i + count > input.count())
+ sub += input.mid(0, count - i + 1);
+
+ std::sort(sub.begin(), sub.end());
+ do {
+ if (!sub.isEmpty())
+ output += sub;
+ } while (std::next_permutation(sub.begin(), sub.end()));
+ } else {
+ output += sub;
+ }
+
+ if (count == input.count())
+ break;
+ }
+
+ if (count > 1)
+ output += permutations(input, --count);
+
+ return output;
+}
+
+static QString findFile(const QDir &dir, const QString &baseName, const QStringList &extensions)
+{
+ for (const QString &ext : extensions) {
+ QString filePath = dir.filePath(baseName + QLatin1Char('.') + ext);
+ if (QFile::exists(filePath))
+ return QFileSelector().select(filePath);
+ }
+ // return an empty string to indicate that the lookup has been done
+ // even if no matching asset was found
+ return QLatin1String("");
+}
+
+QQuickImageSelector::QQuickImageSelector(QObject *parent)
+ : QObject(parent),
+ m_cache(cacheSize() > 0),
+ m_complete(false),
+ m_separator(QLatin1String("-"))
+{
+}
+
+QUrl QQuickImageSelector::source() const
+{
+ return m_source;
+}
+
+void QQuickImageSelector::setSource(const QUrl &source)
+{
+ if (m_property.isValid())
+ QQmlPropertyPrivate::write(m_property, source, QQmlPropertyData::BypassInterceptor | QQmlPropertyData::DontRemoveBinding);
+ if (m_source == source)
+ return;
+
+ m_source = source;
+ emit sourceChanged();
+}
+
+QString QQuickImageSelector::name() const
+{
+ return m_name;
+}
+
+void QQuickImageSelector::setName(const QString &name)
+{
+ if (m_name == name)
+ return;
+
+ m_name = name;
+ if (m_complete)
+ updateSource();
+}
+
+QString QQuickImageSelector::path() const
+{
+ return m_path;
+}
+
+void QQuickImageSelector::setPath(const QString &path)
+{
+ if (m_path == path)
+ return;
+
+ m_path = path;
+ if (m_complete)
+ updateSource();
+}
+
+QVariantList QQuickImageSelector::states() const
+{
+ return m_allStates;
+}
+
+void QQuickImageSelector::setStates(const QVariantList &states)
+{
+ if (m_allStates == states)
+ return;
+
+ m_allStates = states;
+ if (updateActiveStates() && m_complete)
+ updateSource();
+}
+
+QString QQuickImageSelector::separator() const
+{
+ return m_separator;
+}
+
+void QQuickImageSelector::setSeparator(const QString &separator)
+{
+ if (m_separator == separator)
+ return;
+
+ m_separator = separator;
+ if (m_complete)
+ updateSource();
+}
+
+bool QQuickImageSelector::cache() const
+{
+ return m_cache;
+}
+
+void QQuickImageSelector::setCache(bool cache)
+{
+ m_cache = cache;
+}
+
+void QQuickImageSelector::write(const QVariant &value)
+{
+ setUrl(value.toUrl());
+}
+
+void QQuickImageSelector::setTarget(const QQmlProperty &property)
+{
+ m_property = property;
+}
+
+void QQuickImageSelector::classBegin()
+{
+}
+
+void QQuickImageSelector::componentComplete()
+{
+ setUrl(m_property.read().toUrl());
+ m_complete = true;
+ updateSource();
+}
+
+QStringList QQuickImageSelector::fileExtensions() const
+{
+ static const QStringList extensions = QStringList() << QStringLiteral("png");
+ return extensions;
+}
+
+QString QQuickImageSelector::cacheKey() const
+{
+ if (!m_cache)
+ return QString();
+
+ return m_path + m_name + m_activeStates.join(m_separator);
+}
+
+void QQuickImageSelector::updateSource()
+{
+ static QCache<QString, QString> cache(cacheSize());
+
+ const QString key = cacheKey();
+
+ QString bestFilePath;
+
+ if (m_cache) {
+ QString *cachedPath = cache.object(key);
+ if (cachedPath)
+ bestFilePath = *cachedPath;
+ }
+
+ // note: a cached file path may be empty
+ if (bestFilePath.isNull()) {
+ QDir dir(m_path);
+ int bestScore = -1;
+
+ const QStringList extensions = fileExtensions();
+
+ const QList<QStringList> statePerms = permutations(m_activeStates);
+ for (const QStringList &perm : statePerms) {
+ const QString filePath = findFile(dir, m_name + m_separator + perm.join(m_separator), extensions);
+ if (!filePath.isEmpty()) {
+ int score = calculateScore(perm);
+ if (score > bestScore) {
+ bestScore = score;
+ bestFilePath = filePath;
+ }
+ }
+ }
+
+ if (bestFilePath.isEmpty())
+ bestFilePath = findFile(dir, m_name, extensions);
+
+ if (m_cache)
+ cache.insert(key, new QString(bestFilePath));
+ }
+
+ qCDebug(lcQtQuickControlsImagine) << m_name << m_activeStates << "->" << bestFilePath;
+
+ if (bestFilePath.startsWith(QLatin1Char(':')))
+ setSource(QUrl(QLatin1String("qrc") + bestFilePath));
+ else
+ setSource(QUrl::fromLocalFile(bestFilePath));
+}
+
+void QQuickImageSelector::setUrl(const QUrl &url)
+{
+ QFileInfo fileInfo(QQmlFile::urlToLocalFileOrQrc(url));
+ setName(fileInfo.fileName());
+ setPath(fileInfo.path());
+}
+
+bool QQuickImageSelector::updateActiveStates()
+{
+ QStringList active;
+ for (const QVariant &v : qAsConst(m_allStates)) {
+ const QVariantMap state = v.toMap();
+ if (state.isEmpty())
+ continue;
+ auto it = state.begin();
+ if (it.value().toBool())
+ active += it.key();
+ }
+
+ if (m_activeStates == active)
+ return false;
+
+ m_activeStates = active;
+ return true;
+}
+
+int QQuickImageSelector::calculateScore(const QStringList &states) const
+{
+ int score = 0;
+ for (int i = 0; i < states.count(); ++i)
+ score += (m_activeStates.count() - m_activeStates.indexOf(states.at(i))) << 1;
+ return score;
+}
+
+QQuickNinePatchImageSelector::QQuickNinePatchImageSelector(QObject *parent)
+ : QQuickImageSelector(parent)
+{
+}
+
+QStringList QQuickNinePatchImageSelector::fileExtensions() const
+{
+ static const QStringList extensions = QStringList() << QStringLiteral("9.png") << QStringLiteral("png");
+ return extensions;
+}
+
+QQuickAnimatedImageSelector::QQuickAnimatedImageSelector(QObject *parent)
+ : QQuickImageSelector(parent)
+{
+}
+
+QStringList QQuickAnimatedImageSelector::fileExtensions() const
+{
+ static const QStringList extensions = QStringList() << QStringLiteral("webp") << QStringLiteral("gif");
+ return extensions;
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/imagine/qquickimageselector_p.h b/src/imports/controls/imagine/qquickimageselector_p.h
new file mode 100644
index 00000000..2bb4e526
--- /dev/null
+++ b/src/imports/controls/imagine/qquickimageselector_p.h
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKIMAGESELECTOR_P_H
+#define QQUICKIMAGESELECTOR_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qurl.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qvariant.h>
+#include <QtQml/qqmlproperty.h>
+#include <QtQml/qqmlparserstatus.h>
+#include <QtQml/private/qqmlpropertyvalueinterceptor_p.h>
+#include <QtQml/qqmlproperty.h>
+#include <QtQml/qqml.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickImageSelector : public QObject, public QQmlParserStatus, public QQmlPropertyValueInterceptor
+{
+ Q_OBJECT
+ Q_PROPERTY(QUrl source READ source NOTIFY sourceChanged FINAL)
+ Q_PROPERTY(QString name READ name WRITE setName FINAL)
+ Q_PROPERTY(QString path READ path WRITE setPath FINAL)
+ Q_PROPERTY(QVariantList states READ states WRITE setStates FINAL)
+ Q_PROPERTY(QString separator READ separator WRITE setSeparator FINAL)
+ Q_PROPERTY(bool cache READ cache WRITE setCache FINAL)
+ Q_INTERFACES(QQmlParserStatus QQmlPropertyValueInterceptor)
+
+public:
+ explicit QQuickImageSelector(QObject *parent = nullptr);
+
+ QUrl source() const;
+ void setSource(const QUrl &source);
+
+ QString name() const;
+ void setName(const QString &name);
+
+ QString path() const;
+ void setPath(const QString &path);
+
+ QVariantList states() const;
+ void setStates(const QVariantList &states);
+
+ QString separator() const;
+ void setSeparator(const QString &separator);
+
+ bool cache() const;
+ void setCache(bool cache);
+
+ void write(const QVariant &value) override;
+ void setTarget(const QQmlProperty &property) override;
+
+Q_SIGNALS:
+ void sourceChanged();
+
+protected:
+ void classBegin() override;
+ void componentComplete() override;
+
+ virtual QStringList fileExtensions() const;
+
+ QString cacheKey() const;
+ void updateSource();
+ void setUrl(const QUrl &url);
+ bool updateActiveStates();
+ int calculateScore(const QStringList &states) const;
+
+private:
+ bool m_cache;
+ bool m_complete;
+ QUrl m_source;
+ QString m_path;
+ QString m_name;
+ QString m_separator;
+ QVariantList m_allStates;
+ QStringList m_activeStates;
+ QQmlProperty m_property;
+};
+
+class QQuickNinePatchImageSelector : public QQuickImageSelector
+{
+ Q_OBJECT
+
+public:
+ explicit QQuickNinePatchImageSelector(QObject *parent = nullptr);
+
+protected:
+ QStringList fileExtensions() const override;
+};
+
+class QQuickAnimatedImageSelector : public QQuickImageSelector
+{
+ Q_OBJECT
+
+public:
+ explicit QQuickAnimatedImageSelector(QObject *parent = nullptr);
+
+protected:
+ QStringList fileExtensions() const override;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickImageSelector)
+QML_DECLARE_TYPE(QQuickAnimatedImageSelector)
+
+#endif // QQUICKIMAGESELECTOR_P_H
diff --git a/src/imports/controls/imagine/qquickimaginestyle.cpp b/src/imports/controls/imagine/qquickimaginestyle.cpp
new file mode 100644
index 00000000..7617fbf5
--- /dev/null
+++ b/src/imports/controls/imagine/qquickimaginestyle.cpp
@@ -0,0 +1,169 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickimaginestyle_p.h"
+
+#include <QtCore/qsettings.h>
+#include <QtQuickControls2/private/qquickstyle_p.h>
+
+QT_BEGIN_NAMESPACE
+
+Q_GLOBAL_STATIC_WITH_ARGS(QString, GlobalPath, (QLatin1String("qrc:/qt-project.org/imports/QtQuick/Controls.2/Imagine/images/")))
+
+static const QString ensureSlash(const QString &path)
+{
+ const QChar slash = QLatin1Char('/');
+ return path.endsWith(slash) ? path : path + slash;
+}
+
+QQuickImagineStyle::QQuickImagineStyle(QObject *parent)
+ : QQuickAttachedObject(parent),
+ m_explicitPath(false),
+ m_path(*GlobalPath())
+{
+ init();
+}
+
+QQuickImagineStyle *QQuickImagineStyle::qmlAttachedProperties(QObject *object)
+{
+ return new QQuickImagineStyle(object);
+}
+
+QString QQuickImagineStyle::path() const
+{
+ return m_path;
+}
+
+void QQuickImagineStyle::setPath(const QString &path)
+{
+ m_explicitPath = true;
+ if (m_path == path)
+ return;
+
+ m_path = path;
+ propagatePath();
+
+ emit pathChanged();
+}
+
+void QQuickImagineStyle::inheritPath(const QString &path)
+{
+ if (m_explicitPath || m_path == path)
+ return;
+
+ m_path = path;
+ propagatePath();
+ emit pathChanged();
+}
+
+void QQuickImagineStyle::propagatePath()
+{
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child : styles) {
+ QQuickImagineStyle *imagine = qobject_cast<QQuickImagineStyle *>(child);
+ if (imagine)
+ imagine->inheritPath(m_path);
+ }
+}
+
+void QQuickImagineStyle::resetPath()
+{
+ if (!m_explicitPath)
+ return;
+
+ m_explicitPath = false;
+ QQuickImagineStyle *imagine = qobject_cast<QQuickImagineStyle *>(attachedParent());
+ 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);
+ QQuickImagineStyle *imagine = qobject_cast<QQuickImagineStyle *>(newParent);
+ if (imagine)
+ inheritPath(imagine->path());
+}
+
+static QByteArray resolveSetting(const QByteArray &env, const QSharedPointer<QSettings> &settings, const QString &name)
+{
+ QByteArray value = qgetenv(env);
+#if QT_CONFIG(settings)
+ if (value.isNull() && !settings.isNull())
+ value = settings->value(name).toByteArray();
+#endif
+ return value;
+}
+
+void QQuickImagineStyle::init()
+{
+ static bool globalsInitialized = false;
+ if (!globalsInitialized) {
+ QSharedPointer<QSettings> settings = QQuickStylePrivate::settings(QStringLiteral("Imagine"));
+
+ QString path = QString::fromUtf8(resolveSetting("QT_QUICK_CONTROLS_IMAGINE_PATH", settings, QStringLiteral("Path")));
+ if (!path.isEmpty())
+ *GlobalPath() = m_path = ensureSlash(path);
+
+ globalsInitialized = true;
+ }
+
+ QQuickAttachedObject::init(); // TODO: lazy init?
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/imagine/qquickimaginestyle_p.h b/src/imports/controls/imagine/qquickimaginestyle_p.h
new file mode 100644
index 00000000..88b92c00
--- /dev/null
+++ b/src/imports/controls/imagine/qquickimaginestyle_p.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKIMAGINESTYLE_P_H
+#define QQUICKIMAGINESTYLE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuickControls2/private/qquickattachedobject_p.h>
+#include <QtCore/qvariant.h>
+#include <QtQml/qqml.h>
+
+QT_BEGIN_NAMESPACE
+
+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);
+
+ static QQuickImagineStyle *qmlAttachedProperties(QObject *object);
+
+ QString path() const;
+ void setPath(const QString &path);
+ void inheritPath(const QString &path);
+ void propagatePath();
+ void resetPath();
+
+ QUrl url() const;
+
+Q_SIGNALS:
+ void pathChanged();
+
+protected:
+ void attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent) override;
+
+private:
+ void init();
+
+ bool m_explicitPath;
+ QString m_path;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPEINFO(QQuickImagineStyle, QML_HAS_ATTACHED_PROPERTIES)
+
+#endif // QQUICKIMAGINESTYLE_P_H
diff --git a/src/imports/controls/imagine/qquickimaginetheme.cpp b/src/imports/controls/imagine/qquickimaginetheme.cpp
new file mode 100644
index 00000000..17fb920f
--- /dev/null
+++ b/src/imports/controls/imagine/qquickimaginetheme.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickimaginetheme_p.h"
+
+#include <QtGui/qfontinfo.h>
+
+QT_BEGIN_NAMESPACE
+
+QQuickImagineTheme::QQuickImagineTheme()
+ : QQuickTheme(QStringLiteral("Imagine"))
+{
+ QFont font;
+ font.setFamily(QLatin1String("Open Sans"));
+ const QString family = QFontInfo(font).family();
+ if (family == QLatin1String("Open Sans")) {
+ buttonFont.setFamily(family);
+ checkBoxFont.setFamily(family);
+ editorFont.setFamily(family);
+ groupBoxFont.setFamily(family);
+ labelFont.setFamily(family);
+ itemViewFont.setFamily(family);
+ menuItemFont.setFamily(family);
+ systemFont.setFamily(family);
+ toolTipFont.setFamily(family);
+ }
+
+ const QColor accentColor = QColor::fromRgb(0x4fc1e9);
+ const QColor windowTextColor = QColor::fromRgb(0x434a54);
+ const QColor disabledWindowTextColor = QColor::fromRgb(0xccd1d9);
+
+ systemPalette.setColor(QPalette::ButtonText, Qt::white);
+ systemPalette.setColor(QPalette::BrightText, Qt::white);
+ systemPalette.setColor(QPalette::Highlight, accentColor);
+ systemPalette.setColor(QPalette::HighlightedText, Qt::white);
+ systemPalette.setColor(QPalette::Text, windowTextColor);
+ systemPalette.setColor(QPalette::ToolTipText, Qt::white);
+ systemPalette.setColor(QPalette::WindowText, windowTextColor);
+ systemPalette.setColor(QPalette::Disabled, QPalette::Text, disabledWindowTextColor);
+ systemPalette.setColor(QPalette::Disabled, QPalette::WindowText, disabledWindowTextColor);
+ systemPalette = resolvePalette(systemPalette);
+}
+
+const QFont *QQuickImagineTheme::font(QPlatformTheme::Font type) const
+{
+ switch (type) {
+ case QPlatformTheme::TabButtonFont:
+ case QPlatformTheme::PushButtonFont:
+ case QPlatformTheme::ToolButtonFont:
+ return &buttonFont;
+ case QPlatformTheme::CheckBoxFont:
+ return &checkBoxFont;
+ case QPlatformTheme::GroupBoxTitleFont:
+ return &groupBoxFont;
+ case QPlatformTheme::LabelFont:
+ return &labelFont;
+ case QPlatformTheme::TipLabelFont:
+ return &toolTipFont;
+ case QPlatformTheme::ItemViewFont:
+ return &itemViewFont;
+ case QPlatformTheme::MenuItemFont:
+ case QPlatformTheme::ComboMenuItemFont:
+ return &menuItemFont;
+ case QPlatformTheme::EditorFont:
+ return &editorFont;
+ default:
+ return &systemFont;
+ }
+}
+
+const QPalette *QQuickImagineTheme::palette(QPlatformTheme::Palette type) const
+{
+ Q_UNUSED(type);
+ return &systemPalette;
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/imagine/qquickimaginetheme_p.h b/src/imports/controls/imagine/qquickimaginetheme_p.h
new file mode 100644
index 00000000..9006e6ef
--- /dev/null
+++ b/src/imports/controls/imagine/qquickimaginetheme_p.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKIMAGINETHEME_P_H
+#define QQUICKIMAGINETHEME_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuickControls2/private/qquicktheme_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickImagineTheme : public QQuickTheme
+{
+public:
+ explicit QQuickImagineTheme();
+
+ const QFont *font(Font type = SystemFont) const override;
+ const QPalette *palette(Palette type = SystemPalette) const override;
+
+private:
+ QFont buttonFont;
+ QFont checkBoxFont;
+ QFont editorFont;
+ QFont groupBoxFont;
+ QFont labelFont;
+ QFont itemViewFont;
+ QFont menuItemFont;
+ QFont systemFont;
+ QFont toolTipFont;
+
+ QPalette systemPalette;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKIMAGINETHEME_P_H
diff --git a/src/imports/controls/imagine/qquickninepatchimage.cpp b/src/imports/controls/imagine/qquickninepatchimage.cpp
new file mode 100644
index 00000000..9e1b82bf
--- /dev/null
+++ b/src/imports/controls/imagine/qquickninepatchimage.cpp
@@ -0,0 +1,455 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickninepatchimage_p.h"
+
+#include <QtCore/qfileinfo.h>
+#include <QtQuick/qsggeometry.h>
+#include <QtQuick/qsgtexturematerial.h>
+#include <QtQuick/private/qsgnode_p.h>
+#include <QtQuick/private/qquickimage_p_p.h>
+
+QT_BEGIN_NAMESPACE
+
+struct QQuickNinePatchData
+{
+ QVector<qreal> coordsForSize(qreal count) const;
+
+ inline bool isNull() const { return data.isEmpty(); }
+ inline int count() const { return data.size(); }
+ inline qreal at(int index) const { return data.at(index); }
+ inline qreal size() const { return data.last(); }
+
+ void fill(const QVector<qreal> &coords, qreal count);
+ void clear();
+
+private:
+ bool inverted = false;
+ QVector<qreal> data;
+};
+
+QVector<qreal> QQuickNinePatchData::coordsForSize(qreal size) const
+{
+ // n = number of stretchable sections
+ // We have to compensate when adding 0 and/or
+ // the source image width to the divs vector.
+ const int l = data.size();
+ const int n = (inverted ? l - 1 : l) / 2;
+ const qreal stretch = (size - data.last()) / n;
+
+ QVector<qreal> coords;
+ coords.reserve(l);
+ coords.append(0);
+
+ bool stretched = !inverted;
+ for (int i = 1; i < l; ++i) {
+ qreal advance = data[i] - data[i - 1];
+ if (stretched)
+ advance += stretch;
+ coords.append(coords.last() + advance);
+
+ stretched = !stretched;
+ }
+
+ return coords;
+}
+
+void QQuickNinePatchData::fill(const QVector<qreal> &coords, qreal size)
+{
+ data.clear();
+ inverted = coords.isEmpty() || coords.first() != 0;
+
+ // Reserve an extra item in case we need to add the image width/height
+ if (inverted) {
+ data.reserve(coords.size() + 2);
+ data.append(0);
+ } else {
+ data.reserve(coords.size() + 1);
+ }
+
+ data += coords;
+ data.append(size);
+}
+
+void QQuickNinePatchData::clear()
+{
+ data.clear();
+}
+
+class QQuickNinePatchNode : public QSGGeometryNode
+{
+public:
+ QQuickNinePatchNode();
+ ~QQuickNinePatchNode();
+
+ void initialize(QSGTexture *texture, const QSizeF &targetSize, const QSize &sourceSize,
+ const QQuickNinePatchData &xDivs, const QQuickNinePatchData &yDivs, qreal dpr);
+
+private:
+ QSGGeometry m_geometry;
+ QSGTextureMaterial m_material;
+};
+
+QQuickNinePatchNode::QQuickNinePatchNode()
+ : m_geometry(QSGGeometry::defaultAttributes_TexturedPoint2D(), 4)
+{
+ m_geometry.setDrawingMode(QSGGeometry::DrawTriangles);
+ setGeometry(&m_geometry);
+ setMaterial(&m_material);
+}
+
+QQuickNinePatchNode::~QQuickNinePatchNode()
+{
+ delete m_material.texture();
+}
+
+void QQuickNinePatchNode::initialize(QSGTexture *texture, const QSizeF &targetSize, const QSize &sourceSize,
+ const QQuickNinePatchData &xDivs, const QQuickNinePatchData &yDivs, qreal dpr)
+{
+ delete m_material.texture();
+ m_material.setTexture(texture);
+
+ const int xlen = xDivs.count();
+ const int ylen = yDivs.count();
+
+ if (xlen > 0 && ylen > 0) {
+ const int quads = (xlen - 1) * (ylen - 1);
+ static const int verticesPerQuad = 6;
+ m_geometry.allocate(xlen * ylen, verticesPerQuad * quads);
+
+ QSGGeometry::TexturedPoint2D *vertices = m_geometry.vertexDataAsTexturedPoint2D();
+ QVector<qreal> xCoords = xDivs.coordsForSize(targetSize.width());
+ QVector<qreal> yCoords = yDivs.coordsForSize(targetSize.height());
+
+ for (int y = 0; y < ylen; ++y) {
+ for (int x = 0; x < xlen; ++x, ++vertices)
+ vertices->set(xCoords[x] / dpr, yCoords[y] / dpr,
+ xDivs.at(x) / sourceSize.width(),
+ yDivs.at(y) / sourceSize.height());
+ }
+
+ quint16 *indices = m_geometry.indexDataAsUShort();
+ int n = quads;
+ for (int q = 0; n--; ++q) {
+ if ((q + 1) % xlen == 0) // next row
+ ++q;
+ // Bottom-left half quad triangle
+ indices[0] = q;
+ indices[1] = q + xlen;
+ indices[2] = q + xlen + 1;
+
+ // Top-right half quad triangle
+ indices[3] = q;
+ indices[4] = q + xlen + 1;
+ indices[5] = q + 1;
+
+ indices += verticesPerQuad;
+ }
+ }
+
+ markDirty(QSGNode::DirtyGeometry | QSGNode::DirtyMaterial);
+}
+
+class QQuickNinePatchImagePrivate : public QQuickImagePrivate
+{
+ Q_DECLARE_PUBLIC(QQuickNinePatchImage)
+
+public:
+ void updatePatches();
+ void updatePaddings(const QSizeF &size, const QVector<qreal> &horizontal, const QVector<qreal> &vertical);
+ void updateInsets(const QVector<qreal> &horizontal, const QVector<qreal> &vertical);
+
+ qreal getImplicitWidth() const override;
+ qreal getImplicitHeight() const override;
+
+ bool resetNode = false;
+ qreal topPadding = 0;
+ qreal leftPadding = 0;
+ qreal rightPadding = 0;
+ qreal bottomPadding = 0;
+ qreal topInset = 0;
+ qreal leftInset = 0;
+ qreal rightInset = 0;
+ qreal bottomInset = 0;
+
+ QImage ninePatch;
+ QQuickNinePatchData xDivs;
+ QQuickNinePatchData yDivs;
+};
+
+static QVector<qreal> readCoords(const QRgb *data, int from, int count, int offset, QRgb color)
+{
+ int p1 = -1;
+ QVector<qreal> coords;
+ for (int i = 0; i < count; ++i) {
+ int p2 = from + i * offset;
+ if (data[p2] == color) {
+ // colored pixel
+ if (p1 == -1)
+ p1 = i;
+ } else {
+ // empty pixel
+ if (p1 != -1) {
+ coords << p1 << i;
+ p1 = -1;
+ }
+ }
+ }
+ return coords;
+}
+
+void QQuickNinePatchImagePrivate::updatePatches()
+{
+ if (ninePatch.isNull())
+ return;
+
+ int w = ninePatch.width();
+ int h = ninePatch.height();
+ const QRgb *data = reinterpret_cast<const QRgb *>(ninePatch.constBits());
+
+ const QRgb black = qRgb(0,0,0);
+ const QRgb red = qRgb(255,0,0);
+
+ xDivs.fill(readCoords(data, 1, w - 1, 1, black), w - 2); // top left -> top right
+ yDivs.fill(readCoords(data, w, h - 1, w, black), h - 2); // top left -> bottom left
+
+ QVector<qreal> hInsets = readCoords(data, (h - 1) * w + 1, w - 1, 1, red); // bottom left -> bottom right
+ QVector<qreal> vInsets = readCoords(data, 2 * w - 1, h - 1, w, red); // top right -> bottom right
+ updateInsets(hInsets, vInsets);
+
+ const QSizeF sz(w - leftInset - rightInset, h - topInset - bottomInset);
+ QVector<qreal> hPaddings = readCoords(data, (h - 1) * w + leftInset + 1, sz.width() - 2, 1, black); // bottom left -> bottom right
+ QVector<qreal> vPaddings = readCoords(data, (2 + topInset) * w - 1, sz.height() - 2, w, black); // top right -> bottom right
+ updatePaddings(sz, hPaddings, vPaddings);
+}
+
+void QQuickNinePatchImagePrivate::updatePaddings(const QSizeF &size, const QVector<qreal> &horizontal, const QVector<qreal> &vertical)
+{
+ Q_Q(QQuickNinePatchImage);
+ qreal oldTopPadding = topPadding;
+ qreal oldLeftPadding = leftPadding;
+ qreal oldRightPadding = rightPadding;
+ qreal oldBottomPadding = bottomPadding;
+
+ if (horizontal.count() >= 2) {
+ leftPadding = horizontal.first();
+ rightPadding = size.width() - horizontal.last() - 2;
+ } else {
+ leftPadding = 0;
+ rightPadding = 0;
+ }
+
+ if (vertical.count() >= 2) {
+ topPadding = vertical.first();
+ bottomPadding = size.height() - vertical.last() - 2;
+ } else {
+ topPadding = 0;
+ bottomPadding = 0;
+ }
+
+ if (!qFuzzyCompare(oldTopPadding, topPadding))
+ emit q->topPaddingChanged();
+ if (!qFuzzyCompare(oldBottomPadding, bottomPadding))
+ emit q->bottomPaddingChanged();
+ if (!qFuzzyCompare(oldLeftPadding, leftPadding))
+ emit q->leftPaddingChanged();
+ if (!qFuzzyCompare(oldRightPadding, rightPadding))
+ emit q->rightPaddingChanged();
+}
+
+void QQuickNinePatchImagePrivate::updateInsets(const QVector<qreal> &horizontal, const QVector<qreal> &vertical)
+{
+ Q_Q(QQuickNinePatchImage);
+ qreal oldTopInset = topInset;
+ qreal oldLeftInset = leftInset;
+ qreal oldRightInset = rightInset;
+ qreal oldBottomInset = bottomInset;
+
+ if (horizontal.count() >= 2 && horizontal.first() == 0)
+ leftInset = horizontal.at(1);
+ else
+ leftInset = 0;
+
+ if (horizontal.count() == 2 && horizontal.first() > 0)
+ rightInset = horizontal.last() - horizontal.first();
+ else if (horizontal.count() == 4)
+ rightInset = horizontal.last() - horizontal.at(2);
+ else
+ rightInset = 0;
+
+ if (vertical.count() >= 2 && vertical.first() == 0)
+ topInset = vertical.at(1);
+ else
+ topInset = 0;
+
+ if (vertical.count() == 2 && vertical.first() > 0)
+ bottomInset = vertical.last() - vertical.first();
+ else if (vertical.count() == 4)
+ bottomInset = vertical.last() - vertical.at(2);
+ else
+ bottomInset = 0;
+
+ if (!qFuzzyCompare(oldTopInset, topInset))
+ emit q->topInsetChanged();
+ if (!qFuzzyCompare(oldBottomInset, bottomInset))
+ emit q->bottomInsetChanged();
+ if (!qFuzzyCompare(oldLeftInset, leftInset))
+ emit q->leftInsetChanged();
+ if (!qFuzzyCompare(oldRightInset, rightInset))
+ emit q->rightInsetChanged();
+}
+
+qreal QQuickNinePatchImagePrivate::getImplicitWidth() const
+{
+ Q_Q(const QQuickNinePatchImage);
+ return implicitWidth - q->leftInset() - q->rightInset();
+}
+
+qreal QQuickNinePatchImagePrivate::getImplicitHeight() const
+{
+ Q_Q(const QQuickNinePatchImage);
+ return implicitHeight - q->topInset() - q->bottomInset();
+}
+
+QQuickNinePatchImage::QQuickNinePatchImage(QQuickItem *parent)
+ : QQuickImage(*(new QQuickNinePatchImagePrivate), parent)
+{
+}
+
+qreal QQuickNinePatchImage::topPadding() const
+{
+ Q_D(const QQuickNinePatchImage);
+ return d->topPadding / d->devicePixelRatio;
+}
+
+qreal QQuickNinePatchImage::leftPadding() const
+{
+ Q_D(const QQuickNinePatchImage);
+ return d->leftPadding / d->devicePixelRatio;
+}
+
+qreal QQuickNinePatchImage::rightPadding() const
+{
+ Q_D(const QQuickNinePatchImage);
+ return d->rightPadding / d->devicePixelRatio;
+}
+
+qreal QQuickNinePatchImage::bottomPadding() const
+{
+ Q_D(const QQuickNinePatchImage);
+ return d->bottomPadding / d->devicePixelRatio;
+}
+
+qreal QQuickNinePatchImage::topInset() const
+{
+ Q_D(const QQuickNinePatchImage);
+ return d->topInset / d->devicePixelRatio;
+}
+
+qreal QQuickNinePatchImage::leftInset() const
+{
+ Q_D(const QQuickNinePatchImage);
+ return d->leftInset / d->devicePixelRatio;
+}
+
+qreal QQuickNinePatchImage::rightInset() const
+{
+ Q_D(const QQuickNinePatchImage);
+ return d->rightInset / d->devicePixelRatio;
+}
+
+qreal QQuickNinePatchImage::bottomInset() const
+{
+ Q_D(const QQuickNinePatchImage);
+ return d->bottomInset / d->devicePixelRatio;
+}
+
+void QQuickNinePatchImage::pixmapChange()
+{
+ Q_D(QQuickNinePatchImage);
+ if (QFileInfo(d->url.fileName()).completeSuffix().toLower() == QLatin1String("9.png")) {
+ d->resetNode = d->ninePatch.isNull();
+ d->ninePatch = d->pix.image();
+ if (d->ninePatch.depth() != 32)
+ d->ninePatch = d->ninePatch.convertToFormat(QImage::Format_ARGB32);
+
+ int w = d->ninePatch.width();
+ int h = d->ninePatch.height();
+ d->pix.setImage(QImage(d->ninePatch.constBits() + 4 * (w + 1), w - 2, h - 2, d->ninePatch.bytesPerLine(), d->ninePatch.format()));
+
+ d->updatePatches();
+ } else {
+ d->resetNode = !d->ninePatch.isNull();
+ d->ninePatch = QImage();
+ }
+ QQuickImage::pixmapChange();
+}
+
+QSGNode *QQuickNinePatchImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data)
+{
+ Q_D(QQuickNinePatchImage);
+ Q_UNUSED(data);
+
+ if (d->resetNode) {
+ delete oldNode;
+ oldNode = nullptr;
+ d->resetNode = false;
+ }
+
+ QSizeF sz = size();
+ QImage image = d->pix.image();
+ if (!sz.isValid() || image.isNull()) {
+ delete oldNode;
+ return nullptr;
+ }
+
+ if (d->ninePatch.isNull())
+ return QQuickImage::updatePaintNode(oldNode, data);
+
+ QQuickNinePatchNode *patchNode = static_cast<QQuickNinePatchNode *>(oldNode);
+ if (!patchNode)
+ patchNode = new QQuickNinePatchNode;
+
+#ifdef QSG_RUNTIME_DESCRIPTION
+ qsgnode_set_description(patchNode, QString::fromLatin1("QQuickNinePatchImage: '%1'").arg(d->url.toString()));
+#endif
+
+ QSGTexture *texture = window()->createTextureFromImage(image);
+ patchNode->initialize(texture, sz * d->devicePixelRatio, image.size(), d->xDivs, d->yDivs, d->devicePixelRatio);
+ return patchNode;
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/imagine/qquickninepatchimage_p.h b/src/imports/controls/imagine/qquickninepatchimage_p.h
new file mode 100644
index 00000000..2c29490a
--- /dev/null
+++ b/src/imports/controls/imagine/qquickninepatchimage_p.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKNINEPATCHIMAGE_P_H
+#define QQUICKNINEPATCHIMAGE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuick/private/qquickimage_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickNinePatchImagePrivate;
+
+class QQuickNinePatchImage : public QQuickImage
+{
+ Q_OBJECT
+ Q_PROPERTY(qreal topPadding READ topPadding NOTIFY topPaddingChanged FINAL)
+ Q_PROPERTY(qreal leftPadding READ leftPadding NOTIFY leftPaddingChanged FINAL)
+ Q_PROPERTY(qreal rightPadding READ rightPadding NOTIFY rightPaddingChanged FINAL)
+ Q_PROPERTY(qreal bottomPadding READ bottomPadding NOTIFY bottomPaddingChanged FINAL)
+ Q_PROPERTY(qreal topInset READ topInset NOTIFY topInsetChanged FINAL)
+ Q_PROPERTY(qreal leftInset READ leftInset NOTIFY leftInsetChanged FINAL)
+ Q_PROPERTY(qreal rightInset READ rightInset NOTIFY rightInsetChanged FINAL)
+ Q_PROPERTY(qreal bottomInset READ bottomInset NOTIFY bottomInsetChanged FINAL)
+
+public:
+ explicit QQuickNinePatchImage(QQuickItem *parent = nullptr);
+
+ qreal topPadding() const;
+ qreal leftPadding() const;
+ qreal rightPadding() const;
+ qreal bottomPadding() const;
+
+ qreal topInset() const;
+ qreal leftInset() const;
+ qreal rightInset() const;
+ qreal bottomInset() const;
+
+Q_SIGNALS:
+ void topPaddingChanged();
+ void leftPaddingChanged();
+ void rightPaddingChanged();
+ void bottomPaddingChanged();
+
+ void topInsetChanged();
+ void leftInsetChanged();
+ void rightInsetChanged();
+ void bottomInsetChanged();
+
+protected:
+ void pixmapChange() override;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override;
+
+private:
+ Q_DISABLE_COPY(QQuickNinePatchImage)
+ Q_DECLARE_PRIVATE(QQuickNinePatchImage)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickNinePatchImage)
+
+#endif // QQUICKNINEPATCHIMAGE_P_H
diff --git a/src/imports/controls/imagine/qtquickcontrols2imaginestyleplugin.cpp b/src/imports/controls/imagine/qtquickcontrols2imaginestyleplugin.cpp
new file mode 100644
index 00000000..7aa78075
--- /dev/null
+++ b/src/imports/controls/imagine/qtquickcontrols2imaginestyleplugin.cpp
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 <QtQuickControls2/private/qquickstyleplugin_p.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtQml/qqml.h>
+
+#include "qquickimageselector_p.h"
+#include "qquickimaginestyle_p.h"
+#include "qquickimaginetheme_p.h"
+#include "qquickninepatchimage_p.h"
+
+static inline void initResources()
+{
+ Q_INIT_RESOURCE(qmake_qtquickcontrols2imaginestyle);
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_QtQuick_Controls_2_Imagine);
+#endif
+}
+
+QT_BEGIN_NAMESPACE
+
+Q_LOGGING_CATEGORY(lcQtQuickControlsImagine, "qt.quick.controls.imagine")
+
+class QtQuickControls2ImagineStylePlugin: public QQuickStylePlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2ImagineStylePlugin(QObject *parent = nullptr);
+
+ void registerTypes(const char *uri) override;
+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
+
+ QString name() const override;
+ QQuickProxyTheme *createTheme() const override;
+};
+
+QtQuickControls2ImagineStylePlugin::QtQuickControls2ImagineStylePlugin(QObject *parent) : QQuickStylePlugin(parent)
+{
+ initResources();
+}
+
+void QtQuickControls2ImagineStylePlugin::registerTypes(const char *uri)
+{
+ qmlRegisterModule(uri, 2, QT_VERSION_MINOR - 7); // Qt 5.10 -> 2.3, 5.11 -> 2.4, ...
+ qmlRegisterUncreatableType<QQuickImagineStyle>(uri, 2, 3, "Imagine", tr("Imagine is an attached property"));
+}
+
+void QtQuickControls2ImagineStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri)
+{
+ QQuickStylePlugin::initializeEngine(engine, uri);
+
+ QByteArray import = QByteArray(uri) + ".impl";
+ qmlRegisterModule(import, 2, QT_VERSION_MINOR - 7); // Qt 5.10 -> 2.3, 5.11 -> 2.4, ...
+
+ qmlRegisterType<QQuickAnimatedImageSelector>(import, 2, 3, "AnimatedImageSelector");
+ qmlRegisterType<QQuickImageSelector>(import, 2, 3, "ImageSelector");
+ qmlRegisterType<QQuickNinePatchImage>(import, 2, 3, "NinePatchImage");
+ qmlRegisterType<QQuickNinePatchImageSelector>(import, 2, 3, "NinePatchImageSelector");
+}
+
+QString QtQuickControls2ImagineStylePlugin::name() const
+{
+ return QStringLiteral("imagine");
+}
+
+QQuickProxyTheme *QtQuickControls2ImagineStylePlugin::createTheme() const
+{
+ return new QQuickImagineTheme;
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2imaginestyleplugin.moc"
diff --git a/src/imports/controls/material/ApplicationWindow.qml b/src/imports/controls/material/ApplicationWindow.qml
index 0d56ed2c..603edc84 100644
--- a/src/imports/controls/material/ApplicationWindow.qml
+++ b/src/imports/controls/material/ApplicationWindow.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Window 2.3
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.ApplicationWindow {
id: window
diff --git a/src/imports/controls/material/BoxShadow.qml b/src/imports/controls/material/BoxShadow.qml
index aa9fd0fa..0930d7e8 100644
--- a/src/imports/controls/material/BoxShadow.qml
+++ b/src/imports/controls/material/BoxShadow.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
/*
A implementation of CSS's box-shadow, used by ElevationEffect for a Material Design
diff --git a/src/imports/controls/material/BusyIndicator.qml b/src/imports/controls/material/BusyIndicator.qml
index f1cf8eb5..d32b7299 100644
--- a/src/imports/controls/material/BusyIndicator.qml
+++ b/src/imports/controls/material/BusyIndicator.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.BusyIndicator {
id: control
diff --git a/src/imports/controls/material/Button.qml b/src/imports/controls/material/Button.qml
index e5821375..e3e795ee 100644
--- a/src/imports/controls/material/Button.qml
+++ b/src/imports/controls/material/Button.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.Button {
id: control
@@ -52,20 +54,29 @@ T.Button {
padding: 12
leftPadding: padding - 4
rightPadding: padding - 4
+ spacing: 6
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: !enabled ? Material.hintTextColor :
+ flat && highlighted ? Material.accentColor :
+ highlighted ? Material.primaryHighlightedTextColor : Material.foreground
Material.elevation: flat ? control.down || control.hovered ? 2 : 0
: control.down ? 8 : 2
Material.background: flat ? "transparent" : undefined
- contentItem: Text {
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
color: !control.enabled ? control.Material.hintTextColor :
control.flat && control.highlighted ? control.Material.accentColor :
control.highlighted ? control.Material.primaryHighlightedTextColor : control.Material.foreground
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- elide: Text.ElideRight
}
// TODO: Add a proper ripple/ink effect for mouse/touch input and focus state
diff --git a/src/imports/controls/material/CheckBox.qml b/src/imports/controls/material/CheckBox.qml
index e1c559da..64a89756 100644
--- a/src/imports/controls/material/CheckBox.qml
+++ b/src/imports/controls/material/CheckBox.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.CheckBox {
id: control
diff --git a/src/imports/controls/material/CheckDelegate.qml b/src/imports/controls/material/CheckDelegate.qml
index 545ca64a..9ae86d53 100644
--- a/src/imports/controls/material/CheckDelegate.qml
+++ b/src/imports/controls/material/CheckDelegate.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.CheckDelegate {
id: control
@@ -54,23 +56,29 @@ T.CheckDelegate {
bottomPadding: 14
spacing: 16
+ icon.width: 24
+ icon.height: 24
+ icon.color: enabled ? Material.foreground : Material.hintTextColor
+
indicator: CheckIndicator {
x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- contentItem: Text {
+ contentItem: IconLabel {
leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
diff --git a/src/imports/controls/material/CheckIndicator.qml b/src/imports/controls/material/CheckIndicator.qml
index 8fe860f0..662879b6 100644
--- a/src/imports/controls/material/CheckIndicator.qml
+++ b/src/imports/controls/material/CheckIndicator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
Rectangle {
id: indicatorItem
diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml
index da9fd73c..3ec46dbc 100644
--- a/src/imports/controls/material/ComboBox.qml
+++ b/src/imports/controls/material/ComboBox.qml
@@ -34,12 +34,13 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Window 2.3
-import QtQuick.Controls 2.2
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.ComboBox {
id: control
@@ -67,12 +68,11 @@ T.ComboBox {
hoverEnabled: control.hoverEnabled
}
- indicator: Image {
+ indicator: ColorImage {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
- source: "image://material/drop-indicator/" + (control.enabled ? control.Material.foreground : control.Material.hintTextColor)
- sourceSize.width: width
- sourceSize.height: height
+ color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/drop-indicator.png"
}
contentItem: T.TextField {
@@ -163,7 +163,6 @@ T.ComboBox {
implicitHeight: contentHeight
model: control.popup.visible ? control.delegateModel : null
currentIndex: control.highlightedIndex
- highlightRangeMode: ListView.ApplyRange
highlightMoveDuration: 0
T.ScrollIndicator.vertical: ScrollIndicator { }
diff --git a/src/imports/controls/material/CursorDelegate.qml b/src/imports/controls/material/CursorDelegate.qml
index 2af44017..02d82784 100644
--- a/src/imports/controls/material/CursorDelegate.qml
+++ b/src/imports/controls/material/CursorDelegate.qml
@@ -34,8 +34,8 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.10
+import QtQuick.Controls.Material 2.3
Rectangle {
id: cursor
diff --git a/src/imports/controls/material/DelayButton.qml b/src/imports/controls/material/DelayButton.qml
index 16f240a2..a9ca5ccb 100644
--- a/src/imports/controls/material/DelayButton.qml
+++ b/src/imports/controls/material/DelayButton.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.DelayButton {
id: control
diff --git a/src/imports/controls/material/Dial.qml b/src/imports/controls/material/Dial.qml
index e0632e62..9d6969cf 100644
--- a/src/imports/controls/material/Dial.qml
+++ b/src/imports/controls/material/Dial.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.Dial {
id: control
diff --git a/src/imports/controls/material/Dialog.qml b/src/imports/controls/material/Dialog.qml
index a97cb2fd..123e7987 100644
--- a/src/imports/controls/material/Dialog.qml
+++ b/src/imports/controls/material/Dialog.qml
@@ -34,11 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.Dialog {
id: control
@@ -102,4 +103,14 @@ T.Dialog {
footer: DialogButtonBox {
visible: count > 0
}
+
+ T.Overlay.modal: Rectangle {
+ color: control.Material.backgroundDimColor
+ Behavior on opacity { NumberAnimation { duration: 150 } }
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: control.Material.backgroundDimColor
+ Behavior on opacity { NumberAnimation { duration: 150 } }
+ }
}
diff --git a/src/imports/controls/material/DialogButtonBox.qml b/src/imports/controls/material/DialogButtonBox.qml
index c4b3e0ad..ad65becf 100644
--- a/src/imports/controls/material/DialogButtonBox.qml
+++ b/src/imports/controls/material/DialogButtonBox.qml
@@ -34,11 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.DialogButtonBox {
id: control
diff --git a/src/imports/controls/material/Drawer.qml b/src/imports/controls/material/Drawer.qml
index dc06c895..be16d3c5 100644
--- a/src/imports/controls/material/Drawer.qml
+++ b/src/imports/controls/material/Drawer.qml
@@ -34,15 +34,15 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.Drawer {
id: control
- parent: T.ApplicationWindow.overlay
+ parent: T.Overlay.overlay
implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
@@ -79,4 +79,14 @@ T.Drawer {
fullHeight: true
}
}
+
+ T.Overlay.modal: Rectangle {
+ color: control.Material.backgroundDimColor
+ Behavior on opacity { NumberAnimation { duration: 150 } }
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: control.Material.backgroundDimColor
+ Behavior on opacity { NumberAnimation { duration: 150 } }
+ }
}
diff --git a/src/imports/controls/material/ElevationEffect.qml b/src/imports/controls/material/ElevationEffect.qml
index 0d0c1992..8f66cd9a 100644
--- a/src/imports/controls/material/ElevationEffect.qml
+++ b/src/imports/controls/material/ElevationEffect.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
/*
An effect for standard Material Design elevation shadows. Useful for using as \c layer.effect.
diff --git a/src/imports/controls/material/Frame.qml b/src/imports/controls/material/Frame.qml
index 760fc6d2..145018e7 100644
--- a/src/imports/controls/material/Frame.qml
+++ b/src/imports/controls/material/Frame.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.Frame {
id: control
diff --git a/src/imports/controls/material/GroupBox.qml b/src/imports/controls/material/GroupBox.qml
index e7055404..55bcd71f 100644
--- a/src/imports/controls/material/GroupBox.qml
+++ b/src/imports/controls/material/GroupBox.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.GroupBox {
id: control
diff --git a/src/imports/controls/material/ItemDelegate.qml b/src/imports/controls/material/ItemDelegate.qml
index 59d51c36..b0705bbf 100644
--- a/src/imports/controls/material/ItemDelegate.qml
+++ b/src/imports/controls/material/ItemDelegate.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.ItemDelegate {
id: control
@@ -52,17 +54,20 @@ T.ItemDelegate {
padding: 16
spacing: 16
- contentItem: Text {
- leftPadding: control.checkable && !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
- rightPadding: control.checkable && control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ icon.width: 24
+ icon.height: 24
+ icon.color: enabled ? Material.foreground : Material.hintTextColor
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
diff --git a/src/imports/controls/material/Label.qml b/src/imports/controls/material/Label.qml
index 4433e248..7724658d 100644
--- a/src/imports/controls/material/Label.qml
+++ b/src/imports/controls/material/Label.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.Label {
id: control
diff --git a/src/imports/controls/material/Menu.qml b/src/imports/controls/material/Menu.qml
index 3e76c81d..4fa9bee4 100644
--- a/src/imports/controls/material/Menu.qml
+++ b/src/imports/controls/material/Menu.qml
@@ -34,11 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.Menu {
id: control
@@ -54,7 +54,9 @@ T.Menu {
topPadding: 8
bottomPadding: 8
- transformOrigin: Item.Top
+ transformOrigin: !cascade ? Item.Top : (mirrored ? Item.TopRight : Item.TopLeft)
+
+ delegate: MenuItem { }
enter: Transition {
// grow_fade_in
@@ -75,8 +77,7 @@ T.Menu {
// TODO: improve this?
interactive: ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false
clip: true
- keyNavigationWraps: false
- currentIndex: -1
+ currentIndex: control.currentIndex
ScrollIndicator.vertical: ScrollIndicator {}
}
@@ -93,4 +94,14 @@ T.Menu {
elevation: control.Material.elevation
}
}
+
+ T.Overlay.modal: Rectangle {
+ color: control.Material.backgroundDimColor
+ Behavior on opacity { NumberAnimation { duration: 150 } }
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: control.Material.backgroundDimColor
+ Behavior on opacity { NumberAnimation { duration: 150 } }
+ }
}
diff --git a/src/imports/controls/material/MenuBar.qml b/src/imports/controls/material/MenuBar.qml
new file mode 100644
index 00000000..c0a267ed
--- /dev/null
+++ b/src/imports/controls/material/MenuBar.qml
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
+
+T.MenuBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight + topPadding + bottomPadding)
+
+ delegate: MenuBarItem { }
+
+ contentItem: Row {
+ spacing: control.spacing
+ Repeater {
+ model: control.contentModel
+ }
+ }
+
+ background: Rectangle {
+ implicitHeight: 40
+ color: control.Material.dialogColor
+ }
+}
diff --git a/src/imports/controls/material/MenuBarItem.qml b/src/imports/controls/material/MenuBarItem.qml
new file mode 100644
index 00000000..d757bed1
--- /dev/null
+++ b/src/imports/controls/material/MenuBarItem.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
+
+T.MenuBarItem {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 16
+ topPadding: 12
+ bottomPadding: 12
+ spacing: 16
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: enabled ? Material.foreground : Material.hintTextColor
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
+ }
+
+ background: Rectangle {
+ implicitWidth: 40
+ implicitHeight: 40
+ color: control.highlighted ? control.Material.listHighlightColor : "transparent"
+
+ Ripple {
+ width: parent.width
+ height: parent.height
+
+ clip: visible
+ pressed: control.pressed
+ anchor: control
+ active: control.down || control.highlighted
+ color: control.Material.rippleColor
+ }
+ }
+}
diff --git a/src/imports/controls/material/MenuItem.qml b/src/imports/controls/material/MenuItem.qml
index 5a136231..cb0e8ff1 100644
--- a/src/imports/controls/material/MenuItem.qml
+++ b/src/imports/controls/material/MenuItem.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.MenuItem {
id: control
@@ -54,6 +56,10 @@ T.MenuItem {
bottomPadding: 12
spacing: 16
+ icon.width: 24
+ icon.height: 24
+ icon.color: enabled ? Material.foreground : Material.hintTextColor
+
indicator: CheckIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
@@ -61,17 +67,31 @@ T.MenuItem {
control: control
}
- contentItem: Text {
- leftPadding: control.checkable && !control.mirrored ? control.indicator.width + control.spacing : 0
- rightPadding: control.checkable && control.mirrored ? control.indicator.width + control.spacing : 0
+ arrow: ColorImage {
+ x: control.mirrored ? control.padding : control.width - width - control.padding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ visible: control.subMenu
+ mirror: control.mirrored
+ color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/arrow-indicator.png"
+ }
+
+ contentItem: IconLabel {
+ readonly property real arrowPadding: control.subMenu && control.arrow ? control.arrow.width + control.spacing : 0
+ readonly property real indicatorPadding: control.checkable && control.indicator ? control.indicator.width + control.spacing : 0
+ leftPadding: !control.mirrored ? indicatorPadding : arrowPadding
+ rightPadding: control.mirrored ? indicatorPadding : arrowPadding
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: Qt.AlignLeft
+ icon: control.icon
text: control.text
font: control.font
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
@@ -86,7 +106,7 @@ T.MenuItem {
clip: visible
pressed: control.pressed
anchor: control
- active: control.down || control.visualFocus || control.hovered
+ active: control.down || control.highlighted
color: control.Material.rippleColor
}
}
diff --git a/src/imports/controls/material/MenuSeparator.qml b/src/imports/controls/material/MenuSeparator.qml
index fd0febbe..4fabc98a 100644
--- a/src/imports/controls/material/MenuSeparator.qml
+++ b/src/imports/controls/material/MenuSeparator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.MenuSeparator {
id: control
diff --git a/src/imports/controls/material/Page.qml b/src/imports/controls/material/Page.qml
index 825b9f90..9c0b7474 100644
--- a/src/imports/controls/material/Page.qml
+++ b/src/imports/controls/material/Page.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.Page {
id: control
diff --git a/src/imports/controls/material/PageIndicator.qml b/src/imports/controls/material/PageIndicator.qml
index 15acae5e..107fe918 100644
--- a/src/imports/controls/material/PageIndicator.qml
+++ b/src/imports/controls/material/PageIndicator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.PageIndicator {
id: control
diff --git a/src/imports/controls/material/Pane.qml b/src/imports/controls/material/Pane.qml
index 925778fa..e88b3866 100644
--- a/src/imports/controls/material/Pane.qml
+++ b/src/imports/controls/material/Pane.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.Pane {
id: control
diff --git a/src/imports/controls/material/Popup.qml b/src/imports/controls/material/Popup.qml
index cfcf00cb..35147a2b 100644
--- a/src/imports/controls/material/Popup.qml
+++ b/src/imports/controls/material/Popup.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.Popup {
id: control
@@ -75,4 +75,14 @@ T.Popup {
elevation: control.Material.elevation
}
}
+
+ T.Overlay.modal: Rectangle {
+ color: control.Material.backgroundDimColor
+ Behavior on opacity { NumberAnimation { duration: 150 } }
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: control.Material.backgroundDimColor
+ Behavior on opacity { NumberAnimation { duration: 150 } }
+ }
}
diff --git a/src/imports/controls/material/ProgressBar.qml b/src/imports/controls/material/ProgressBar.qml
index 1bc03016..3a20bbee 100644
--- a/src/imports/controls/material/ProgressBar.qml
+++ b/src/imports/controls/material/ProgressBar.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.ProgressBar {
id: control
@@ -59,9 +59,7 @@ T.ProgressBar {
background: Rectangle {
implicitWidth: 200
implicitHeight: 4
- x: control.leftPadding
- y: control.topPadding + (control.availableHeight - height) / 2
- width: control.availableWidth
+ y: (control.height - height) / 2
height: 4
color: Qt.rgba(control.Material.accentColor.r, control.Material.accentColor.g, control.Material.accentColor.b, 0.25)
diff --git a/src/imports/controls/material/RadioButton.qml b/src/imports/controls/material/RadioButton.qml
index d178654f..b16c4d99 100644
--- a/src/imports/controls/material/RadioButton.qml
+++ b/src/imports/controls/material/RadioButton.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.RadioButton {
id: control
diff --git a/src/imports/controls/material/RadioDelegate.qml b/src/imports/controls/material/RadioDelegate.qml
index fb4f33dc..4f69d624 100644
--- a/src/imports/controls/material/RadioDelegate.qml
+++ b/src/imports/controls/material/RadioDelegate.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.RadioDelegate {
id: control
@@ -54,23 +56,29 @@ T.RadioDelegate {
bottomPadding: 8
spacing: 16
+ icon.width: 24
+ icon.height: 24
+ icon.color: enabled ? Material.foreground : Material.hintTextColor
+
indicator: RadioIndicator {
x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- contentItem: Text {
+ contentItem: IconLabel {
leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
diff --git a/src/imports/controls/material/RadioIndicator.qml b/src/imports/controls/material/RadioIndicator.qml
index 82b01ad3..97bd73eb 100644
--- a/src/imports/controls/material/RadioIndicator.qml
+++ b/src/imports/controls/material/RadioIndicator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
Rectangle {
implicitWidth: 20
diff --git a/src/imports/controls/material/RangeSlider.qml b/src/imports/controls/material/RangeSlider.qml
index 0b38ad6d..93f9adac 100644
--- a/src/imports/controls/material/RangeSlider.qml
+++ b/src/imports/controls/material/RangeSlider.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.RangeSlider {
id: control
@@ -52,8 +52,8 @@ T.RangeSlider {
padding: 6
first.handle: SliderHandle {
- x: control.leftPadding + (horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height))
+ 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))
value: first.value
handleHasFocus: activeFocus
handlePressed: first.pressed
@@ -61,8 +61,8 @@ T.RangeSlider {
}
second.handle: SliderHandle {
- x: control.leftPadding + (horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height))
+ 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))
value: second.value
handleHasFocus: activeFocus
handlePressed: second.pressed
@@ -70,22 +70,20 @@ T.RangeSlider {
}
background: Rectangle {
- x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
- implicitWidth: horizontal ? 200 : 48
- implicitHeight: horizontal ? 48 : 200
- width: horizontal ? control.availableWidth : 1
- height: horizontal ? 1 : control.availableHeight
+ x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
+ y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
+ implicitWidth: control.horizontal ? 200 : 48
+ implicitHeight: control.horizontal ? 48 : 200
+ width: control.horizontal ? control.availableWidth : 1
+ height: control.horizontal ? 1 : control.availableHeight
color: control.Material.foreground
- scale: horizontal && control.mirrored ? -1 : 1
-
- readonly property bool horizontal: control.orientation === Qt.Horizontal
+ scale:control.horizontal && control.mirrored ? -1 : 1
Rectangle {
- x: parent.horizontal ? control.first.position * parent.width : -1
- y: parent.horizontal ? -1 : control.second.visualPosition * parent.height + 3
- width: parent.horizontal ? control.second.position * parent.width - control.first.position * parent.width - 3 : 3
- height: parent.horizontal ? 3 : control.second.position * parent.height - control.first.position * parent.height - 3
+ x: control.horizontal ? control.first.position * parent.width : -1
+ y: control.horizontal ? -1 : control.second.visualPosition * parent.height + 3
+ width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width - 3 : 3
+ height: control.horizontal ? 3 : control.second.position * parent.height - control.first.position * parent.height - 3
color: control.Material.accentColor
}
diff --git a/src/imports/controls/material/RoundButton.qml b/src/imports/controls/material/RoundButton.qml
index 9660a1e4..17813e7f 100644
--- a/src/imports/controls/material/RoundButton.qml
+++ b/src/imports/controls/material/RoundButton.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.RoundButton {
id: control
@@ -50,20 +52,29 @@ T.RoundButton {
// external vertical padding is 6 (to increase touch area)
padding: 12
+ spacing: 6
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: !enabled ? Material.hintTextColor :
+ flat && highlighted ? Material.accentColor :
+ highlighted ? Material.primaryHighlightedTextColor : Material.foreground
Material.elevation: flat ? control.down || control.hovered ? 2 : 0
: control.down ? 12 : 6
Material.background: flat ? "transparent" : undefined
- contentItem: Text {
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
color: !control.enabled ? control.Material.hintTextColor :
control.flat && control.highlighted ? control.Material.accentColor :
control.highlighted ? control.Material.primaryHighlightedTextColor : control.Material.foreground
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- elide: Text.ElideRight
}
// TODO: Add a proper ripple/ink effect for mouse/touch input and focus state
diff --git a/src/imports/controls/material/ScrollBar.qml b/src/imports/controls/material/ScrollBar.qml
index 8374c0f9..c782e6f7 100644
--- a/src/imports/controls/material/ScrollBar.qml
+++ b/src/imports/controls/material/ScrollBar.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.ScrollBar {
id: control
diff --git a/src/imports/controls/material/ScrollIndicator.qml b/src/imports/controls/material/ScrollIndicator.qml
index effb18ad..7664500a 100644
--- a/src/imports/controls/material/ScrollIndicator.qml
+++ b/src/imports/controls/material/ScrollIndicator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.ScrollIndicator {
id: control
diff --git a/src/imports/controls/material/Slider.qml b/src/imports/controls/material/Slider.qml
index cb60dba6..b7468a19 100644
--- a/src/imports/controls/material/Slider.qml
+++ b/src/imports/controls/material/Slider.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.Slider {
id: control
@@ -50,8 +50,8 @@ T.Slider {
padding: 6
handle: SliderHandle {
- x: control.leftPadding + (horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))
+ 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))
value: control.value
handleHasFocus: control.visualFocus
handlePressed: control.pressed
@@ -59,22 +59,20 @@ T.Slider {
}
background: Rectangle {
- x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
- implicitWidth: horizontal ? 200 : 48
- implicitHeight: horizontal ? 48 : 200
- width: horizontal ? control.availableWidth : 1
- height: horizontal ? 1 : control.availableHeight
+ x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
+ y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
+ implicitWidth: control.horizontal ? 200 : 48
+ implicitHeight: control.horizontal ? 48 : 200
+ width: control.horizontal ? control.availableWidth : 1
+ height: control.horizontal ? 1 : control.availableHeight
color: control.Material.foreground
- scale: horizontal && control.mirrored ? -1 : 1
-
- readonly property bool horizontal: control.orientation === Qt.Horizontal
+ scale: control.horizontal && control.mirrored ? -1 : 1
Rectangle {
- x: parent.horizontal ? 0 : (parent.width - width) / 2
- y: parent.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height
- width: parent.horizontal ? control.position * parent.width : 3
- height: parent.horizontal ? 3 : control.position * parent.height
+ x: control.horizontal ? 0 : (parent.width - width) / 2
+ y: control.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height
+ width: control.horizontal ? control.position * parent.width : 3
+ height: control.horizontal ? 3 : control.position * parent.height
color: control.Material.accentColor
}
diff --git a/src/imports/controls/material/SliderHandle.qml b/src/imports/controls/material/SliderHandle.qml
index dd4de4a2..d9197543 100644
--- a/src/imports/controls/material/SliderHandle.qml
+++ b/src/imports/controls/material/SliderHandle.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
Item {
id: root
@@ -48,7 +48,6 @@ Item {
property bool handlePressed: false
property bool handleHovered: false
readonly property int initialSize: 13
- readonly property bool horizontal: control.orientation === Qt.Horizontal
readonly property var control: parent
Rectangle {
diff --git a/src/imports/controls/material/SpinBox.qml b/src/imports/controls/material/SpinBox.qml
index f0dfba08..00b26eb0 100644
--- a/src/imports/controls/material/SpinBox.qml
+++ b/src/imports/controls/material/SpinBox.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.SpinBox {
id: control
diff --git a/src/imports/controls/material/StackView.qml b/src/imports/controls/material/StackView.qml
index 03cd384d..0a56c244 100644
--- a/src/imports/controls/material/StackView.qml
+++ b/src/imports/controls/material/StackView.qml
@@ -34,8 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.StackView {
id: control
diff --git a/src/imports/controls/material/SwipeDelegate.qml b/src/imports/controls/material/SwipeDelegate.qml
index d9014fcd..eb87ece9 100644
--- a/src/imports/controls/material/SwipeDelegate.qml
+++ b/src/imports/controls/material/SwipeDelegate.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.SwipeDelegate {
id: control
@@ -54,19 +56,22 @@ T.SwipeDelegate {
bottomPadding: 8
spacing: 16
+ icon.width: 24
+ icon.height: 24
+ icon.color: enabled ? Material.foreground : Material.hintTextColor
+
swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
- contentItem: Text {
- leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width + control.spacing : 0) : 0
- rightPadding: control.mirrored ? (control.indicator ? control.indicator.width + control.spacing : 0) : 0
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+ icon: control.icon
text: control.text
font: control.font
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
diff --git a/src/imports/controls/material/SwipeView.qml b/src/imports/controls/material/SwipeView.qml
index 293cce46..78e25aab 100644
--- a/src/imports/controls/material/SwipeView.qml
+++ b/src/imports/controls/material/SwipeView.qml
@@ -34,8 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.SwipeView {
id: control
diff --git a/src/imports/controls/material/Switch.qml b/src/imports/controls/material/Switch.qml
index c4f279ee..d41c8579 100644
--- a/src/imports/controls/material/Switch.qml
+++ b/src/imports/controls/material/Switch.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
+import QtQuick.Templates 2.3 as T
T.Switch {
id: control
diff --git a/src/imports/controls/material/SwitchDelegate.qml b/src/imports/controls/material/SwitchDelegate.qml
index 717ee250..6dfb9bb0 100644
--- a/src/imports/controls/material/SwitchDelegate.qml
+++ b/src/imports/controls/material/SwitchDelegate.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.SwitchDelegate {
id: control
@@ -54,23 +56,29 @@ T.SwitchDelegate {
bottomPadding: 8
spacing: 16
+ icon.width: 24
+ icon.height: 24
+ icon.color: enabled ? Material.foreground : Material.hintTextColor
+
indicator: SwitchIndicator {
x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- contentItem: Text {
+ contentItem: IconLabel {
leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
diff --git a/src/imports/controls/material/SwitchIndicator.qml b/src/imports/controls/material/SwitchIndicator.qml
index 0ac7aee3..6d86d390 100644
--- a/src/imports/controls/material/SwitchIndicator.qml
+++ b/src/imports/controls/material/SwitchIndicator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
Item {
id: indicator
diff --git a/src/imports/controls/material/TabBar.qml b/src/imports/controls/material/TabBar.qml
index db076447..af81cd58 100644
--- a/src/imports/controls/material/TabBar.qml
+++ b/src/imports/controls/material/TabBar.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.TabBar {
id: control
@@ -48,7 +48,6 @@ T.TabBar {
contentHeight + topPadding + bottomPadding)
spacing: 1
- contentHeight: 48
contentItem: ListView {
model: control.contentModel
diff --git a/src/imports/controls/material/TabButton.qml b/src/imports/controls/material/TabButton.qml
index d83fc441..c378aa89 100644
--- a/src/imports/controls/material/TabButton.qml
+++ b/src/imports/controls/material/TabButton.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.TabButton {
id: control
@@ -49,14 +51,21 @@ T.TabButton {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 12
+ spacing: 6
- contentItem: Text {
+ icon.width: 24
+ icon.height: 24
+ icon.color: !enabled ? Material.hintTextColor : down || checked ? Material.accentColor : Material.foreground
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
color: !control.enabled ? control.Material.hintTextColor : control.down || control.checked ? control.Material.accentColor : control.Material.foreground
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
}
background: Ripple {
diff --git a/src/imports/controls/material/TextArea.qml b/src/imports/controls/material/TextArea.qml
index 34c633b6..199672ee 100644
--- a/src/imports/controls/material/TextArea.qml
+++ b/src/imports/controls/material/TextArea.qml
@@ -34,12 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.TextArea {
id: control
diff --git a/src/imports/controls/material/TextField.qml b/src/imports/controls/material/TextField.qml
index f5c77f86..e1ba6ed3 100644
--- a/src/imports/controls/material/TextField.qml
+++ b/src/imports/controls/material/TextField.qml
@@ -34,12 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.TextField {
id: control
@@ -77,9 +77,10 @@ T.TextField {
}
background: Rectangle {
- y: control.height - height - control.bottomPadding / 2
+ y: control.height - height - control.bottomPadding + 8
implicitWidth: 120
- height: control.activeFocus ? 2 : 1
- color: control.activeFocus ? control.Material.accentColor : control.Material.hintTextColor
+ height: control.activeFocus || control.hovered ? 2 : 1
+ color: control.activeFocus ? control.Material.accentColor
+ : (control.hovered ? control.Material.primaryTextColor : control.Material.hintTextColor)
}
}
diff --git a/src/imports/controls/material/ToolBar.qml b/src/imports/controls/material/ToolBar.qml
index 228a2692..1b60d814 100644
--- a/src/imports/controls/material/ToolBar.qml
+++ b/src/imports/controls/material/ToolBar.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.ToolBar {
id: control
diff --git a/src/imports/controls/material/ToolButton.qml b/src/imports/controls/material/ToolButton.qml
index eaff0b1c..c67523ae 100644
--- a/src/imports/controls/material/ToolButton.qml
+++ b/src/imports/controls/material/ToolButton.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
-import QtQuick.Controls.Material.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Material 2.3
+import QtQuick.Controls.Material.impl 2.3
T.ToolButton {
id: control
@@ -49,15 +51,22 @@ T.ToolButton {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
+ spacing: 6
- contentItem: Text {
+ icon.width: 24
+ icon.height: 24
+ icon.color: !enabled ? Material.hintTextColor : checked || highlighted ? Material.accent : Material.foreground
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
color: !control.enabled ? control.Material.hintTextColor :
control.checked || control.highlighted ? control.Material.accent : control.Material.foreground
- elide: Text.ElideRight
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
}
background: Ripple {
diff --git a/src/imports/controls/material/ToolSeparator.qml b/src/imports/controls/material/ToolSeparator.qml
index 808ddf4f..7402779c 100644
--- a/src/imports/controls/material/ToolSeparator.qml
+++ b/src/imports/controls/material/ToolSeparator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.ToolSeparator {
id: control
diff --git a/src/imports/controls/material/ToolTip.qml b/src/imports/controls/material/ToolTip.qml
index a1c2b0ef..08efd064 100644
--- a/src/imports/controls/material/ToolTip.qml
+++ b/src/imports/controls/material/ToolTip.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.ToolTip {
id: control
diff --git a/src/imports/controls/material/Tumbler.qml b/src/imports/controls/material/Tumbler.qml
index 9b1309ab..b331eae8 100644
--- a/src/imports/controls/material/Tumbler.qml
+++ b/src/imports/controls/material/Tumbler.qml
@@ -34,11 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Material 2.3
T.Tumbler {
id: control
diff --git a/src/imports/controls/material/images/arrow-indicator.png b/src/imports/controls/material/images/arrow-indicator.png
new file mode 100644
index 00000000..4a942849
--- /dev/null
+++ b/src/imports/controls/material/images/arrow-indicator.png
Binary files differ
diff --git a/src/imports/controls/material/images/arrow-indicator.svg b/src/imports/controls/material/images/arrow-indicator.svg
new file mode 100644
index 00000000..1e7217c8
--- /dev/null
+++ b/src/imports/controls/material/images/arrow-indicator.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="5"
+ height="10"
+ viewBox="0 0 5 10"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="arrow-indicator.svg">
+ <metadata
+ id="metadata10">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1571"
+ id="namedview6"
+ showgrid="false"
+ inkscape:zoom="27.812867"
+ inkscape:cx="13.137558"
+ inkscape:cy="12.83583"
+ inkscape:window-x="0"
+ inkscape:window-y="55"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <path
+ d="M 0,10 5,5 0,0 Z"
+ id="path4"
+ inkscape:connector-curvature="0"
+ style="fill:#757575" />
+</svg>
diff --git a/src/imports/controls/material/images/arrow-indicator@2x.png b/src/imports/controls/material/images/arrow-indicator@2x.png
new file mode 100644
index 00000000..b31b56c1
--- /dev/null
+++ b/src/imports/controls/material/images/arrow-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/material/images/arrow-indicator@3x.png b/src/imports/controls/material/images/arrow-indicator@3x.png
new file mode 100644
index 00000000..637e9674
--- /dev/null
+++ b/src/imports/controls/material/images/arrow-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/material/images/arrow-indicator@4x.png b/src/imports/controls/material/images/arrow-indicator@4x.png
new file mode 100644
index 00000000..15b9a902
--- /dev/null
+++ b/src/imports/controls/material/images/arrow-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/material/material.pri b/src/imports/controls/material/material.pri
index 64d91442..ab925aa2 100644
--- a/src/imports/controls/material/material.pri
+++ b/src/imports/controls/material/material.pri
@@ -33,6 +33,8 @@ QML_FILES += \
$$PWD/ItemDelegate.qml \
$$PWD/Label.qml \
$$PWD/Menu.qml \
+ $$PWD/MenuBar.qml \
+ $$PWD/MenuBarItem.qml \
$$PWD/MenuItem.qml \
$$PWD/MenuSeparator.qml \
$$PWD/Page.qml \
diff --git a/src/imports/controls/material/material.pro b/src/imports/controls/material/material.pro
index b7610cd9..5d036b61 100644
--- a/src/imports/controls/material/material.pro
+++ b/src/imports/controls/material/material.pro
@@ -1,6 +1,6 @@
TARGET = qtquickcontrols2materialstyleplugin
TARGETPATH = QtQuick/Controls.2/Material
-IMPORT_VERSION = 2.2
+IMPORT_VERSION = 2.3
QT += qml quick
QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
diff --git a/src/imports/controls/material/qmldir b/src/imports/controls/material/qmldir
index 839ca3af..a5bae170 100644
--- a/src/imports/controls/material/qmldir
+++ b/src/imports/controls/material/qmldir
@@ -1,4 +1,4 @@
module QtQuick.Controls.Material
plugin qtquickcontrols2materialstyleplugin
classname QtQuickControls2MaterialStylePlugin
-depends QtQuick.Controls 2.2
+depends QtQuick.Controls 2.3
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp
index eeadb5f3..08d88ec7 100644
--- a/src/imports/controls/material/qquickmaterialstyle.cpp
+++ b/src/imports/controls/material/qquickmaterialstyle.cpp
@@ -39,7 +39,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qsettings.h>
#include <QtQml/qqmlinfo.h>
-#include <QtQuickControls2/private/qquickstyleattached_p.h>
+#include <QtQuickControls2/private/qquickstyle_p.h>
QT_BEGIN_NAMESPACE
@@ -419,16 +419,14 @@ static const QRgb rippleColorDark = 0x20FFFFFF;
static const QRgb spinBoxDisabledIconColorLight = 0xFFCCCCCC;
static const QRgb spinBoxDisabledIconColorDark = 0xFF666666;
-extern bool qt_is_dark_system_theme();
-
static QQuickMaterialStyle::Theme effectiveTheme(QQuickMaterialStyle::Theme theme)
{
if (theme == QQuickMaterialStyle::System)
- theme = qt_is_dark_system_theme() ? QQuickMaterialStyle::Dark : QQuickMaterialStyle::Light;
+ theme = QQuickStylePrivate::isDarkSystemTheme() ? QQuickMaterialStyle::Dark : QQuickMaterialStyle::Light;
return theme;
}
-QQuickMaterialStyle::QQuickMaterialStyle(QObject *parent) : QQuickStyleAttached(parent),
+QQuickMaterialStyle::QQuickMaterialStyle(QObject *parent) : QQuickAttachedObject(parent),
m_explicitTheme(false),
m_explicitPrimary(false),
m_explicitAccent(false),
@@ -463,7 +461,7 @@ QQuickMaterialStyle::Theme QQuickMaterialStyle::theme() const
void QQuickMaterialStyle::setTheme(Theme theme)
{
if (theme == System)
- theme = qt_is_dark_system_theme() ? Dark : Light;
+ theme = QQuickStylePrivate::isDarkSystemTheme() ? Dark : Light;
m_explicitTheme = true;
if (m_theme == theme)
@@ -500,8 +498,8 @@ void QQuickMaterialStyle::inheritTheme(Theme theme)
void QQuickMaterialStyle::propagateTheme()
{
- const auto styles = childStyles();
- for (QQuickStyleAttached *child : styles) {
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child : styles) {
QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(child);
if (material)
material->inheritTheme(m_theme);
@@ -514,7 +512,7 @@ void QQuickMaterialStyle::resetTheme()
return;
m_explicitTheme = false;
- QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(attachedParent());
inheritTheme(material ? material->theme() : globalTheme);
}
@@ -555,8 +553,8 @@ void QQuickMaterialStyle::inheritPrimary(uint primary, bool custom)
void QQuickMaterialStyle::propagatePrimary()
{
- const auto styles = childStyles();
- for (QQuickStyleAttached *child : styles) {
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child : styles) {
QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(child);
if (material)
material->inheritPrimary(m_primary, m_customPrimary);
@@ -570,7 +568,7 @@ void QQuickMaterialStyle::resetPrimary()
m_customPrimary = false;
m_explicitPrimary = false;
- QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(attachedParent());
if (material)
inheritPrimary(material->m_primary, material->m_customPrimary);
else
@@ -614,8 +612,8 @@ void QQuickMaterialStyle::inheritAccent(uint accent, bool custom)
void QQuickMaterialStyle::propagateAccent()
{
- const auto styles = childStyles();
- for (QQuickStyleAttached *child : styles) {
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child : styles) {
QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(child);
if (material)
material->inheritAccent(m_accent, m_customAccent);
@@ -629,7 +627,7 @@ void QQuickMaterialStyle::resetAccent()
m_customAccent = false;
m_explicitAccent = false;
- QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(attachedParent());
if (material)
inheritAccent(material->m_accent, material->m_customAccent);
else
@@ -679,8 +677,8 @@ void QQuickMaterialStyle::inheritForeground(uint foreground, bool custom, bool h
void QQuickMaterialStyle::propagateForeground()
{
- const auto styles = childStyles();
- for (QQuickStyleAttached *child : styles) {
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child : styles) {
QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(child);
if (material)
material->inheritForeground(m_foreground, m_customForeground, m_hasForeground);
@@ -695,7 +693,7 @@ void QQuickMaterialStyle::resetForeground()
m_hasForeground = false;
m_customForeground = false;
m_explicitForeground = false;
- QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(attachedParent());
inheritForeground(material ? material->m_foreground : globalForeground, true, material ? material->m_hasForeground : false);
}
@@ -738,8 +736,8 @@ void QQuickMaterialStyle::inheritBackground(uint background, bool custom, bool h
void QQuickMaterialStyle::propagateBackground()
{
- const auto styles = childStyles();
- for (QQuickStyleAttached *child : styles) {
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child : styles) {
QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(child);
if (material)
material->inheritBackground(m_background, m_customBackground, m_hasBackground);
@@ -754,7 +752,7 @@ void QQuickMaterialStyle::resetBackground()
m_hasBackground = false;
m_customBackground = false;
m_explicitBackground = false;
- QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(attachedParent());
inheritBackground(material ? material->m_background : globalBackground, true, material ? material->m_hasBackground : false);
}
@@ -1137,7 +1135,7 @@ QColor QQuickMaterialStyle::shade(const QColor &color, Shade shade) const
}
}
-void QQuickMaterialStyle::parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent)
+void QQuickMaterialStyle::attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent)
{
Q_UNUSED(oldParent);
QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(newParent);
@@ -1171,7 +1169,7 @@ void QQuickMaterialStyle::init()
{
static bool globalsInitialized = false;
if (!globalsInitialized) {
- QSharedPointer<QSettings> settings = QQuickStyleAttached::settings(QStringLiteral("Material"));
+ QSharedPointer<QSettings> settings = QQuickStylePrivate::settings(QStringLiteral("Material"));
bool ok = false;
QByteArray themeValue = resolveSetting("QT_QUICK_CONTROLS_MATERIAL_THEME", settings, QStringLiteral("Theme"));
@@ -1248,7 +1246,7 @@ void QQuickMaterialStyle::init()
globalsInitialized = true;
}
- QQuickStyleAttached::init(); // TODO: lazy init?
+ QQuickAttachedObject::init(); // TODO: lazy init?
}
bool QQuickMaterialStyle::variantToRgba(const QVariant &var, const char *name, QRgb *rgba, bool *custom) const
diff --git a/src/imports/controls/material/qquickmaterialstyle_p.h b/src/imports/controls/material/qquickmaterialstyle_p.h
index bb494697..2374eefb 100644
--- a/src/imports/controls/material/qquickmaterialstyle_p.h
+++ b/src/imports/controls/material/qquickmaterialstyle_p.h
@@ -49,11 +49,11 @@
//
#include <QtGui/qcolor.h>
-#include <QtQuickControls2/private/qquickstyleattached_p.h>
+#include <QtQuickControls2/private/qquickattachedobject_p.h>
QT_BEGIN_NAMESPACE
-class QQuickMaterialStyle : public QQuickStyleAttached
+class QQuickMaterialStyle : public QQuickAttachedObject
{
Q_OBJECT
Q_PROPERTY(Theme theme READ theme WRITE setTheme RESET resetTheme NOTIFY themeChanged FINAL)
@@ -236,7 +236,7 @@ Q_SIGNALS:
void paletteChanged();
protected:
- void parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent) override;
+ void attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent) override;
private:
void init();
diff --git a/src/imports/controls/material/qquickmaterialtheme.cpp b/src/imports/controls/material/qquickmaterialtheme.cpp
index 3ea41779..c697b2a5 100644
--- a/src/imports/controls/material/qquickmaterialtheme.cpp
+++ b/src/imports/controls/material/qquickmaterialtheme.cpp
@@ -42,8 +42,8 @@
QT_BEGIN_NAMESPACE
-QQuickMaterialTheme::QQuickMaterialTheme(QPlatformTheme *theme)
- : QQuickProxyTheme(theme)
+QQuickMaterialTheme::QQuickMaterialTheme()
+ : QQuickTheme(QStringLiteral("Material"))
{
QFont font;
font.setFamily(QLatin1String("Roboto"));
@@ -65,22 +65,29 @@ QQuickMaterialTheme::QQuickMaterialTheme(QPlatformTheme *theme)
}
systemFont.setPixelSize(14);
+ systemFont = resolveFont(systemFont);
buttonFont.setPixelSize(14);
buttonFont.setCapitalization(QFont::AllUppercase);
buttonFont.setWeight(QFont::Medium);
+ buttonFont = resolveFont(buttonFont);
toolTipFont.setPixelSize(14);
toolTipFont.setWeight(QFont::Medium);
+ toolTipFont = resolveFont(toolTipFont);
itemViewFont.setPixelSize(14);
itemViewFont.setWeight(QFont::Medium);
+ itemViewFont = resolveFont(itemViewFont);
listViewFont.setPixelSize(16);
+ listViewFont = resolveFont(listViewFont);
menuItemFont.setPixelSize(16);
+ menuItemFont = resolveFont(menuItemFont);
editorFont.setPixelSize(16);
+ editorFont = resolveFont(editorFont);
}
const QFont *QQuickMaterialTheme::font(QPlatformTheme::Font type) const
@@ -96,6 +103,7 @@ const QFont *QQuickMaterialTheme::font(QPlatformTheme::Font type) const
return &itemViewFont;
case QPlatformTheme::ListViewFont:
return &listViewFont;
+ case QPlatformTheme::MenuBarFont:
case QPlatformTheme::MenuItemFont:
case QPlatformTheme::ComboMenuItemFont:
return &menuItemFont;
@@ -110,14 +118,7 @@ QVariant QQuickMaterialTheme::themeHint(ThemeHint hint) const
{
switch (hint) {
case QPlatformTheme::DialogButtonBoxLayout:
- // https://material.io/guidelines/components/dialogs.html#dialogs-specs
- // As per spec, affirmative actions are placed to the right, dismissive
- // actions are placed directly to the left of affirmative actions.
- // In the Android sources, there are additional type of actions -
- // neutral, which are placed to the left.
- // Rules for macOS seems to be the most suitable here and are also used
- // in the Android QPA plugin.
- return QVariant(QPlatformDialogHelper::MacLayout);
+ return QVariant(QPlatformDialogHelper::AndroidLayout);
default:
return QQuickProxyTheme::themeHint(hint);
}
diff --git a/src/imports/controls/material/qquickmaterialtheme_p.h b/src/imports/controls/material/qquickmaterialtheme_p.h
index d505d4ff..0e791386 100644
--- a/src/imports/controls/material/qquickmaterialtheme_p.h
+++ b/src/imports/controls/material/qquickmaterialtheme_p.h
@@ -50,14 +50,14 @@
#include <QtCore/qvariant.h>
#include <QtGui/qfont.h>
-#include <QtQuickControls2/private/qquickproxytheme_p.h>
+#include <QtQuickControls2/private/qquicktheme_p.h>
QT_BEGIN_NAMESPACE
-class QQuickMaterialTheme : public QQuickProxyTheme
+class QQuickMaterialTheme : public QQuickTheme
{
public:
- explicit QQuickMaterialTheme(QPlatformTheme *theme = nullptr);
+ explicit QQuickMaterialTheme();
const QFont *font(Font type = SystemFont) const override;
diff --git a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp
index 3f3a66b0..7eae0826 100644
--- a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp
+++ b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp
@@ -44,7 +44,6 @@
#include <QtQuickControls2/private/qquickstyleselector_p.h>
#include <QtQuickControls2/private/qquickpaddedrectangle_p.h>
-#include <QtQuickControls2/private/qquickcolorimageprovider_p.h>
static inline void initResources()
{
@@ -86,12 +85,9 @@ void QtQuickControls2MaterialStylePlugin::initializeEngine(QQmlEngine *engine, c
{
QQuickStylePlugin::initializeEngine(engine, uri);
- engine->addImageProvider(name(), new QQuickColorImageProvider(QStringLiteral(":/qt-project.org/imports/QtQuick/Controls.2/Material/images")));
-
QByteArray import = QByteArray(uri) + ".impl";
qmlRegisterModule(import, 2, QT_VERSION_MINOR - 7); // Qt 5.7->2.0, 5.8->2.1, 5.9->2.2...
- qmlRegisterType<QQuickPaddedRectangle>(import, 2, 0, "PaddedRectangle");
qmlRegisterType<QQuickMaterialBusyIndicator>(import, 2, 0, "BusyIndicatorImpl");
qmlRegisterType<QQuickMaterialProgressBar>(import, 2, 0, "ProgressBarImpl");
qmlRegisterType<QQuickMaterialRipple>(import, 2, 0, "Ripple");
diff --git a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc
index e2cc90fa..6e29aea4 100644
--- a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc
+++ b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc
@@ -1,5 +1,9 @@
<RCC>
<qresource prefix="/qt-project.org/imports/QtQuick/Controls.2/Material">
+ <file>images/arrow-indicator.png</file>
+ <file>images/arrow-indicator@2x.png</file>
+ <file>images/arrow-indicator@3x.png</file>
+ <file>images/arrow-indicator@4x.png</file>
<file>images/check.png</file>
<file>images/check@2x.png</file>
<file>images/check@3x.png</file>
diff --git a/src/imports/controls/plugins.qmltypes b/src/imports/controls/plugins.qmltypes
index a8bdb178..d5593246 100644
--- a/src/imports/controls/plugins.qmltypes
+++ b/src/imports/controls/plugins.qmltypes
@@ -4,20 +4,68 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtQuick.Controls 2.2 -merge ../templates/plugins.qmltypes -dependencies dependencies.json'
+// 'qmlplugindump -nonrelocatable QtQuick.Controls 2.3 -merge ../templates/plugins.qmltypes -dependencies dependencies.json'
Module {
dependencies: [
"QtQuick 2.9",
- "QtQuick.Templates 2.2",
+ "QtQuick.Templates 2.3",
"QtQuick.Window 2.2"
]
Component {
+ name: "QQuickCheckLabel"
+ defaultProperty: "data"
+ prototype: "QQuickText"
+ exports: ["QtQuick.Controls.impl/CheckLabel 2.3"]
+ exportMetaObjectRevisions: [0]
+ }
+ Component {
+ name: "QQuickColor"
+ prototype: "QObject"
+ exports: ["QtQuick.Controls.impl/Color 2.3"]
+ isCreatable: false
+ isSingleton: true
+ exportMetaObjectRevisions: [0]
+ Method {
+ name: "transparent"
+ type: "QColor"
+ Parameter { name: "color"; type: "QColor" }
+ Parameter { name: "opacity"; type: "double" }
+ }
+ Method {
+ name: "blend"
+ type: "QColor"
+ Parameter { name: "a"; type: "QColor" }
+ Parameter { name: "b"; type: "QColor" }
+ Parameter { name: "factor"; type: "double" }
+ }
+ }
+ Component {
+ name: "QQuickColorImage"
+ defaultProperty: "data"
+ prototype: "QQuickImage"
+ exports: ["QtQuick.Controls.impl/ColorImage 2.3"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "color"; type: "QColor" }
+ Property { name: "defaultColor"; type: "QColor" }
+ }
+ Component {
name: "QQuickDefaultBusyIndicator"
defaultProperty: "data"
prototype: "QQuickItem"
exports: ["QtQuick.Controls.impl/BusyIndicatorImpl 2.0"]
exportMetaObjectRevisions: [0]
+ Property { name: "pen"; type: "QColor" }
+ Property { name: "fill"; type: "QColor" }
+ }
+ Component {
+ name: "QQuickDefaultDial"
+ defaultProperty: "data"
+ prototype: "QQuickPaintedItem"
+ exports: ["QtQuick.Controls.impl/DialImpl 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "progress"; type: "double" }
+ Property { name: "color"; type: "QColor" }
}
Component {
name: "QQuickDefaultProgressBar"
@@ -27,6 +75,7 @@ Module {
exportMetaObjectRevisions: [0]
Property { name: "indeterminate"; type: "bool" }
Property { name: "progress"; type: "double" }
+ Property { name: "color"; type: "QColor" }
}
Component {
name: "QQuickDefaultStyle"
@@ -45,6 +94,7 @@ Module {
Property { name: "textSelectionColor"; type: "QColor"; isReadonly: true }
Property { name: "textDisabledColor"; type: "QColor"; isReadonly: true }
Property { name: "textDisabledLightColor"; type: "QColor"; isReadonly: true }
+ Property { name: "textPlaceholderColor"; type: "QColor"; isReadonly: true }
Property { name: "focusColor"; type: "QColor"; isReadonly: true }
Property { name: "focusLightColor"; type: "QColor"; isReadonly: true }
Property { name: "focusPressedColor"; type: "QColor"; isReadonly: true }
@@ -76,13 +126,62 @@ Module {
Property { name: "disabledLightColor"; type: "QColor"; isReadonly: true }
}
Component {
- name: "QQuickDialRing"
+ name: "QQuickIconImage"
defaultProperty: "data"
- prototype: "QQuickPaintedItem"
- exports: ["QtQuick.Controls.impl/DialRing 2.0"]
+ prototype: "QQuickImage"
+ exports: ["QtQuick.Controls.impl/IconImage 2.3"]
exportMetaObjectRevisions: [0]
- Property { name: "progress"; type: "double" }
+ Property { name: "name"; type: "string" }
+ Property { name: "color"; type: "QColor" }
+ }
+ Component {
+ name: "QQuickIconLabel"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ exports: ["QtQuick.Controls.impl/IconLabel 2.3"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Display"
+ values: {
+ "IconOnly": 0,
+ "TextOnly": 1,
+ "TextBesideIcon": 2,
+ "TextUnderIcon": 3
+ }
+ }
+ Property { name: "icon"; type: "QQuickIcon" }
+ Property { name: "text"; type: "string" }
+ Property { name: "font"; type: "QFont" }
Property { name: "color"; type: "QColor" }
+ Property { name: "display"; type: "Display" }
+ Property { name: "spacing"; type: "double" }
+ Property { name: "mirrored"; type: "bool" }
+ Property { name: "alignment"; type: "Qt::Alignment" }
+ Property { name: "topPadding"; type: "double" }
+ Property { name: "leftPadding"; type: "double" }
+ Property { name: "rightPadding"; type: "double" }
+ Property { name: "bottomPadding"; type: "double" }
+ }
+ Component {
+ name: "QQuickMnemonicLabel"
+ defaultProperty: "data"
+ prototype: "QQuickText"
+ exports: ["QtQuick.Controls.impl/MnemonicLabel 2.3"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "text"; type: "string" }
+ Property { name: "mnemonicVisible"; type: "bool" }
+ }
+ Component {
+ name: "QQuickPaddedRectangle"
+ defaultProperty: "data"
+ prototype: "QQuickRectangle"
+ exports: ["QtQuick.Controls.impl/PaddedRectangle 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "padding"; type: "double" }
+ Property { name: "topPadding"; type: "double" }
+ Property { name: "leftPadding"; type: "double" }
+ Property { name: "rightPadding"; type: "double" }
+ Property { name: "bottomPadding"; type: "double" }
}
Component {
name: "QQuickPlaceholderText"
@@ -110,6 +209,21 @@ Module {
defaultProperty: "data"
}
Component {
+ prototype: "QQuickAction"
+ name: "QtQuick.Controls/Action 2.3"
+ exports: ["QtQuick.Controls/Action 2.3"]
+ exportMetaObjectRevisions: [3]
+ isComposite: true
+ }
+ Component {
+ prototype: "QQuickActionGroup"
+ name: "QtQuick.Controls/ActionGroup 2.3"
+ exports: ["QtQuick.Controls/ActionGroup 2.3"]
+ exportMetaObjectRevisions: [3]
+ isComposite: true
+ defaultProperty: "actions"
+ }
+ Component {
prototype: "QQuickApplicationWindow"
name: "QtQuick.Controls/ApplicationWindow 2.0"
exports: ["QtQuick.Controls/ApplicationWindow 2.0"]
@@ -157,15 +271,6 @@ Module {
defaultProperty: "data"
}
Component {
- prototype: "QQuickRectangle"
- name: "QtQuick.Controls.impl/CheckIndicator 2.0"
- exports: ["QtQuick.Controls.impl/CheckIndicator 2.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- Property { name: "control"; type: "QQuickItem"; isPointer: true }
- }
- Component {
prototype: "QQuickComboBox"
name: "QtQuick.Controls/ComboBox 2.0"
exports: ["QtQuick.Controls/ComboBox 2.0"]
@@ -270,6 +375,22 @@ Module {
defaultProperty: "contentData"
}
Component {
+ prototype: "QQuickMenuBar"
+ name: "QtQuick.Controls/MenuBar 2.3"
+ exports: ["QtQuick.Controls/MenuBar 2.3"]
+ exportMetaObjectRevisions: [3]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickMenuBarItem"
+ name: "QtQuick.Controls/MenuBarItem 2.3"
+ exports: ["QtQuick.Controls/MenuBarItem 2.3"]
+ exportMetaObjectRevisions: [3]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
prototype: "QQuickMenuItem"
name: "QtQuick.Controls/MenuItem 2.0"
exports: ["QtQuick.Controls/MenuItem 2.0"]
@@ -342,15 +463,6 @@ Module {
defaultProperty: "data"
}
Component {
- prototype: "QQuickRectangle"
- name: "QtQuick.Controls.impl/RadioIndicator 2.0"
- exports: ["QtQuick.Controls.impl/RadioIndicator 2.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- Property { name: "control"; type: "QQuickItem"; isPointer: true }
- }
- Component {
prototype: "QQuickRangeSlider"
name: "QtQuick.Controls/RangeSlider 2.0"
exports: ["QtQuick.Controls/RangeSlider 2.0"]
@@ -447,15 +559,6 @@ Module {
defaultProperty: "data"
}
Component {
- prototype: "QQuickItem"
- name: "QtQuick.Controls.impl/SwitchIndicator 2.0"
- exports: ["QtQuick.Controls.impl/SwitchIndicator 2.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- Property { name: "control"; type: "QQuickItem"; isPointer: true }
- }
- Component {
prototype: "QQuickTabBar"
name: "QtQuick.Controls/TabBar 2.0"
exports: ["QtQuick.Controls/TabBar 2.0"]
@@ -534,9 +637,19 @@ Module {
prototype: "QQuickControl"
exports: [
"QtQuick.Templates/AbstractButton 2.0",
- "QtQuick.Templates/AbstractButton 2.2"
+ "QtQuick.Templates/AbstractButton 2.2",
+ "QtQuick.Templates/AbstractButton 2.3"
]
- exportMetaObjectRevisions: [0, 2]
+ exportMetaObjectRevisions: [0, 2, 3]
+ Enum {
+ name: "Display"
+ values: {
+ "IconOnly": 0,
+ "TextOnly": 1,
+ "TextBesideIcon": 2,
+ "TextUnderIcon": 3
+ }
+ }
Property { name: "text"; type: "string" }
Property { name: "down"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
@@ -544,21 +657,115 @@ Module {
Property { name: "checkable"; type: "bool" }
Property { name: "autoExclusive"; type: "bool" }
Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
+ Property { name: "icon"; revision: 3; type: "QQuickIcon" }
+ Property { name: "display"; revision: 3; type: "Display" }
+ Property { name: "action"; revision: 3; type: "QQuickAction"; isPointer: true }
Signal { name: "pressed" }
Signal { name: "released" }
Signal { name: "canceled" }
Signal { name: "clicked" }
- Signal { name: "toggled"; revision: 2 }
Signal { name: "pressAndHold" }
Signal { name: "doubleClicked" }
+ Signal { name: "toggled"; revision: 2 }
+ Signal { name: "iconChanged"; revision: 3 }
+ Signal { name: "displayChanged"; revision: 3 }
+ Signal { name: "actionChanged"; revision: 3 }
Method { name: "toggle" }
}
Component {
+ name: "QQuickAction"
+ prototype: "QObject"
+ exports: ["QtQuick.Templates/Action 2.3"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "text"; type: "string" }
+ Property { name: "icon"; type: "QQuickIcon" }
+ Property { name: "enabled"; type: "bool" }
+ Property { name: "checked"; type: "bool" }
+ Property { name: "checkable"; type: "bool" }
+ Property { name: "shortcut"; type: "QVariant" }
+ Signal {
+ name: "textChanged"
+ Parameter { name: "text"; type: "string" }
+ }
+ Signal {
+ name: "iconChanged"
+ Parameter { name: "icon"; type: "QQuickIcon" }
+ }
+ Signal {
+ name: "enabledChanged"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Signal {
+ name: "checkedChanged"
+ Parameter { name: "checked"; type: "bool" }
+ }
+ Signal {
+ name: "checkableChanged"
+ Parameter { name: "checkable"; type: "bool" }
+ }
+ Signal {
+ name: "shortcutChanged"
+ Parameter { name: "shortcut"; type: "QKeySequence" }
+ }
+ Signal {
+ name: "toggled"
+ Parameter { name: "source"; type: "QObject"; isPointer: true }
+ }
+ Signal { name: "toggled" }
+ Signal {
+ name: "triggered"
+ Parameter { name: "source"; type: "QObject"; isPointer: true }
+ }
+ Signal { name: "triggered" }
+ Method {
+ name: "toggle"
+ Parameter { name: "source"; type: "QObject"; isPointer: true }
+ }
+ Method { name: "toggle" }
+ Method {
+ name: "trigger"
+ Parameter { name: "source"; type: "QObject"; isPointer: true }
+ }
+ Method { name: "trigger" }
+ }
+ Component {
+ name: "QQuickActionGroup"
+ defaultProperty: "actions"
+ prototype: "QObject"
+ exports: ["QtQuick.Templates/ActionGroup 2.3"]
+ exportMetaObjectRevisions: [0]
+ attachedType: "QQuickActionGroupAttached"
+ Property { name: "checkedAction"; type: "QQuickAction"; isPointer: true }
+ Property { name: "actions"; type: "QQuickAction"; isList: true; isReadonly: true }
+ Property { name: "exclusive"; type: "bool" }
+ Property { name: "enabled"; type: "bool" }
+ Signal {
+ name: "triggered"
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
+ }
+ Method {
+ name: "addAction"
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
+ }
+ Method {
+ name: "removeAction"
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QQuickActionGroupAttached"
+ prototype: "QObject"
+ Property { name: "group"; type: "QQuickActionGroup"; isPointer: true }
+ }
+ Component {
name: "QQuickApplicationWindow"
defaultProperty: "contentData"
prototype: "QQuickWindowQmlImpl"
- exports: ["QtQuick.Templates/ApplicationWindow 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/ApplicationWindow 2.0",
+ "QtQuick.Templates/ApplicationWindow 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
attachedType: "QQuickApplicationWindowAttached"
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
@@ -569,6 +776,10 @@ Module {
Property { name: "overlay"; type: "QQuickOverlay"; isReadonly: true; isPointer: true }
Property { name: "font"; type: "QFont" }
Property { name: "locale"; type: "QLocale" }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
+ Property { name: "menuBar"; revision: 3; type: "QQuickItem"; isPointer: true }
+ Signal { name: "paletteChanged"; revision: 3 }
+ Signal { name: "menuBarChanged"; revision: 3 }
}
Component {
name: "QQuickApplicationWindowAttached"
@@ -579,6 +790,7 @@ Module {
Property { name: "header"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "overlay"; type: "QQuickOverlay"; isReadonly: true; isPointer: true }
+ Property { name: "menuBar"; type: "QQuickItem"; isReadonly: true; isPointer: true }
}
Component {
name: "QQuickBusyIndicator"
@@ -603,17 +815,20 @@ Module {
prototype: "QObject"
exports: [
"QtQuick.Templates/ButtonGroup 2.0",
- "QtQuick.Templates/ButtonGroup 2.1"
+ "QtQuick.Templates/ButtonGroup 2.1",
+ "QtQuick.Templates/ButtonGroup 2.3"
]
- exportMetaObjectRevisions: [0, 1]
+ exportMetaObjectRevisions: [0, 1, 3]
attachedType: "QQuickButtonGroupAttached"
Property { name: "checkedButton"; type: "QQuickAbstractButton"; isPointer: true }
Property { name: "buttons"; type: "QQuickAbstractButton"; isList: true; isReadonly: true }
+ Property { name: "exclusive"; revision: 3; type: "bool" }
Signal {
name: "clicked"
revision: 1
Parameter { name: "button"; type: "QQuickAbstractButton"; isPointer: true }
}
+ Signal { name: "exclusiveChanged"; revision: 3 }
Method {
name: "addButton"
Parameter { name: "button"; type: "QQuickAbstractButton"; isPointer: true }
@@ -659,31 +874,23 @@ Module {
Property { name: "count"; type: "int"; isReadonly: true }
Property { name: "model"; type: "QVariant" }
Property { name: "delegateModel"; type: "QQmlInstanceModel"; isReadonly: true; isPointer: true }
- Property { name: "editable"; revision: 2; type: "bool" }
- Property { name: "flat"; revision: 1; type: "bool" }
- Property { name: "down"; revision: 2; type: "bool" }
Property { name: "pressed"; type: "bool" }
Property { name: "highlightedIndex"; type: "int"; isReadonly: true }
Property { name: "currentIndex"; type: "int" }
Property { name: "currentText"; type: "string"; isReadonly: true }
Property { name: "displayText"; type: "string" }
- Property { name: "editText"; revision: 2; type: "string" }
Property { name: "textRole"; type: "string" }
Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
Property { name: "popup"; type: "QQuickPopup"; isPointer: true }
+ Property { name: "flat"; revision: 1; type: "bool" }
+ Property { name: "down"; revision: 2; type: "bool" }
+ Property { name: "editable"; revision: 2; type: "bool" }
+ Property { name: "editText"; revision: 2; type: "string" }
Property { name: "validator"; revision: 2; type: "QValidator"; isPointer: true }
Property { name: "inputMethodHints"; revision: 2; type: "Qt::InputMethodHints" }
Property { name: "inputMethodComposing"; revision: 2; type: "bool"; isReadonly: true }
Property { name: "acceptableInput"; revision: 2; type: "bool"; isReadonly: true }
- Signal { name: "editableChanged"; revision: 2 }
- Signal { name: "flatChanged"; revision: 1 }
- Signal { name: "downChanged"; revision: 2 }
- Signal { name: "editTextChanged"; revision: 2 }
- Signal { name: "validatorChanged"; revision: 2 }
- Signal { name: "inputMethodHintsChanged"; revision: 2 }
- Signal { name: "inputMethodComposingChanged"; revision: 2 }
- Signal { name: "acceptableInputChanged"; revision: 2 }
Signal {
name: "activated"
Parameter { name: "index"; type: "int" }
@@ -692,7 +899,15 @@ Module {
name: "highlighted"
Parameter { name: "index"; type: "int" }
}
+ Signal { name: "flatChanged"; revision: 1 }
Signal { name: "accepted"; revision: 2 }
+ Signal { name: "downChanged"; revision: 2 }
+ Signal { name: "editableChanged"; revision: 2 }
+ Signal { name: "editTextChanged"; revision: 2 }
+ Signal { name: "validatorChanged"; revision: 2 }
+ Signal { name: "inputMethodHintsChanged"; revision: 2 }
+ Signal { name: "inputMethodComposingChanged"; revision: 2 }
+ Signal { name: "acceptableInputChanged"; revision: 2 }
Method { name: "incrementCurrentIndex" }
Method { name: "decrementCurrentIndex" }
Method { name: "selectAll"; revision: 2 }
@@ -719,9 +934,10 @@ Module {
prototype: "QQuickControl"
exports: [
"QtQuick.Templates/Container 2.0",
- "QtQuick.Templates/Container 2.1"
+ "QtQuick.Templates/Container 2.1",
+ "QtQuick.Templates/Container 2.3"
]
- exportMetaObjectRevisions: [0, 1]
+ exportMetaObjectRevisions: [0, 1, 3]
Property { name: "count"; type: "int"; isReadonly: true }
Property { name: "contentModel"; type: "QVariant"; isReadonly: true }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
@@ -755,6 +971,12 @@ Module {
}
Method {
name: "removeItem"
+ Parameter { name: "item"; type: "QVariant" }
+ }
+ Method {
+ name: "takeItem"
+ revision: 3
+ type: "QQuickItem*"
Parameter { name: "index"; type: "int" }
}
}
@@ -762,8 +984,11 @@ Module {
name: "QQuickControl"
defaultProperty: "data"
prototype: "QQuickItem"
- exports: ["QtQuick.Templates/Control 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/Control 2.0",
+ "QtQuick.Templates/Control 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
Property { name: "font"; type: "QFont" }
Property { name: "availableWidth"; type: "double"; isReadonly: true }
Property { name: "availableHeight"; type: "double"; isReadonly: true }
@@ -783,6 +1008,8 @@ Module {
Property { name: "wheelEnabled"; type: "bool" }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
+ Signal { name: "paletteChanged"; revision: 3 }
}
Component {
name: "QQuickDelayButton"
@@ -818,10 +1045,10 @@ Module {
Property { name: "snapMode"; type: "SnapMode" }
Property { name: "wrap"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
- Property { name: "live"; revision: 2; type: "bool" }
Property { name: "handle"; type: "QQuickItem"; isPointer: true }
- Signal { name: "liveChanged"; revision: 2 }
+ Property { name: "live"; revision: 2; type: "bool" }
Signal { name: "moved"; revision: 2 }
+ Signal { name: "liveChanged"; revision: 2 }
Method { name: "increase" }
Method { name: "decrease" }
}
@@ -829,23 +1056,52 @@ Module {
name: "QQuickDialog"
defaultProperty: "contentData"
prototype: "QQuickPopup"
- exports: ["QtQuick.Templates/Dialog 2.1"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/Dialog 2.1",
+ "QtQuick.Templates/Dialog 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
+ Enum {
+ name: "StandardCode"
+ values: {
+ "Rejected": 0,
+ "Accepted": 1
+ }
+ }
Property { name: "title"; type: "string" }
Property { name: "header"; type: "QQuickItem"; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isPointer: true }
Property { name: "standardButtons"; type: "QPlatformDialogHelper::StandardButtons" }
+ Property { name: "result"; revision: 3; type: "int" }
Signal { name: "accepted" }
Signal { name: "rejected" }
+ Signal { name: "applied"; revision: 3 }
+ Signal { name: "reset"; revision: 3 }
+ Signal { name: "discarded"; revision: 3 }
+ Signal { name: "helpRequested"; revision: 3 }
+ Signal { name: "resultChanged"; revision: 3 }
Method { name: "accept" }
Method { name: "reject" }
+ Method {
+ name: "done"
+ Parameter { name: "result"; type: "int" }
+ }
+ Method {
+ name: "standardButton"
+ revision: 3
+ type: "QQuickAbstractButton*"
+ Parameter { name: "button"; type: "QPlatformDialogHelper::StandardButton" }
+ }
}
Component {
name: "QQuickDialogButtonBox"
defaultProperty: "contentData"
prototype: "QQuickContainer"
- exports: ["QtQuick.Templates/DialogButtonBox 2.1"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/DialogButtonBox 2.1",
+ "QtQuick.Templates/DialogButtonBox 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
attachedType: "QQuickDialogButtonBoxAttached"
Enum {
name: "Position"
@@ -861,6 +1117,9 @@ Module {
Signal { name: "accepted" }
Signal { name: "rejected" }
Signal { name: "helpRequested" }
+ Signal { name: "applied"; revision: 3 }
+ Signal { name: "reset"; revision: 3 }
+ Signal { name: "discarded"; revision: 3 }
Signal {
name: "clicked"
Parameter { name: "button"; type: "QQuickAbstractButton"; isPointer: true }
@@ -924,16 +1183,36 @@ Module {
exportMetaObjectRevisions: [0]
Property { name: "font"; type: "QFont" }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
+ Signal { name: "paletteChanged"; revision: 3 }
}
Component {
name: "QQuickMenu"
defaultProperty: "contentData"
prototype: "QQuickPopup"
- exports: ["QtQuick.Templates/Menu 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtQuick.Templates/Menu 2.0", "QtQuick.Templates/Menu 2.3"]
+ exportMetaObjectRevisions: [0, 3]
+ Property { name: "count"; revision: 3; type: "int"; isReadonly: true }
Property { name: "contentModel"; type: "QVariant"; isReadonly: true }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "title"; type: "string" }
+ Property { name: "cascade"; revision: 3; type: "bool" }
+ Property { name: "overlap"; revision: 3; type: "double" }
+ Property { name: "delegate"; revision: 3; type: "QQmlComponent"; isPointer: true }
+ Property { name: "currentIndex"; revision: 3; type: "int" }
+ Signal { name: "countChanged"; revision: 3 }
+ Signal {
+ name: "titleChanged"
+ Parameter { name: "title"; type: "string" }
+ }
+ Signal {
+ name: "cascadeChanged"
+ revision: 3
+ Parameter { name: "cascade"; type: "bool" }
+ }
+ Signal { name: "overlapChanged"; revision: 3 }
+ Signal { name: "delegateChanged"; revision: 3 }
+ Signal { name: "currentIndexChanged"; revision: 3 }
Method {
name: "itemAt"
type: "QQuickItem*"
@@ -955,17 +1234,140 @@ Module {
}
Method {
name: "removeItem"
+ Parameter { name: "item"; type: "QVariant" }
+ }
+ Method {
+ name: "takeItem"
+ revision: 3
+ type: "QQuickItem*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "menuAt"
+ revision: 3
+ type: "QQuickMenu*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "addMenu"
+ revision: 3
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "insertMenu"
+ revision: 3
Parameter { name: "index"; type: "int" }
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "removeMenu"
+ revision: 3
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "takeMenu"
+ revision: 3
+ type: "QQuickMenu*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "actionAt"
+ revision: 3
+ type: "QQuickAction*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "addAction"
+ revision: 3
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
}
+ Method {
+ name: "insertAction"
+ revision: 3
+ Parameter { name: "index"; type: "int" }
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
+ }
+ Method {
+ name: "removeAction"
+ revision: 3
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
+ }
+ Method {
+ name: "takeAction"
+ revision: 3
+ type: "QQuickAction*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "popup"
+ revision: 3
+ Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true }
+ }
+ Method { name: "dismiss"; revision: 3 }
}
Component {
- name: "QQuickMenuItem"
+ name: "QQuickMenuBar"
+ defaultProperty: "contentData"
+ prototype: "QQuickContainer"
+ exports: ["QtQuick.Templates/MenuBar 2.3"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "contentWidth"; type: "double" }
+ Property { name: "contentHeight"; type: "double" }
+ Property { name: "menus"; type: "QQuickMenu"; isList: true; isReadonly: true }
+ Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
+ Method {
+ name: "menuAt"
+ type: "QQuickMenu*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "addMenu"
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "insertMenu"
+ Parameter { name: "index"; type: "int" }
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "removeMenu"
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "takeMenu"
+ type: "QQuickMenu*"
+ Parameter { name: "index"; type: "int" }
+ }
+ }
+ Component {
+ name: "QQuickMenuBarItem"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
- exports: ["QtQuick.Templates/MenuItem 2.0"]
+ exports: ["QtQuick.Templates/MenuBarItem 2.3"]
exportMetaObjectRevisions: [0]
+ Property { name: "menuBar"; type: "QQuickMenuBar"; isReadonly: true; isPointer: true }
+ Property { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ Property { name: "highlighted"; type: "bool" }
+ Signal { name: "triggered" }
+ }
+ Component {
+ name: "QQuickMenuItem"
+ defaultProperty: "data"
+ prototype: "QQuickAbstractButton"
+ exports: [
+ "QtQuick.Templates/MenuItem 2.0",
+ "QtQuick.Templates/MenuItem 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
Property { name: "highlighted"; type: "bool" }
+ Property { name: "arrow"; revision: 3; type: "QQuickItem"; isPointer: true }
+ Property { name: "menu"; revision: 3; type: "QQuickMenu"; isReadonly: true; isPointer: true }
+ Property { name: "subMenu"; revision: 3; type: "QQuickMenu"; isReadonly: true; isPointer: true }
Signal { name: "triggered" }
+ Signal { name: "arrowChanged"; revision: 3 }
+ Signal { name: "menuChanged"; revision: 3 }
+ Signal { name: "subMenuChanged"; revision: 3 }
}
Component {
name: "QQuickMenuSeparator"
@@ -978,6 +1380,19 @@ Module {
name: "QQuickOverlay"
defaultProperty: "data"
prototype: "QQuickItem"
+ exports: ["QtQuick.Templates/Overlay 2.3"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ attachedType: "QQuickOverlayAttached"
+ Property { name: "modal"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "modeless"; type: "QQmlComponent"; isPointer: true }
+ Signal { name: "pressed" }
+ Signal { name: "released" }
+ }
+ Component {
+ name: "QQuickOverlayAttached"
+ prototype: "QObject"
+ Property { name: "overlay"; type: "QQuickOverlay"; isReadonly: true; isPointer: true }
Property { name: "modal"; type: "QQmlComponent"; isPointer: true }
Property { name: "modeless"; type: "QQmlComponent"; isPointer: true }
Signal { name: "pressed" }
@@ -992,10 +1407,10 @@ Module {
Property { name: "title"; type: "string" }
Property { name: "header"; type: "QQuickItem"; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isPointer: true }
- Property { name: "contentWidth"; revision: 1; type: "double" }
- Property { name: "contentHeight"; revision: 1; type: "double" }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "contentChildren"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Property { name: "contentWidth"; revision: 1; type: "double" }
+ Property { name: "contentHeight"; revision: 1; type: "double" }
Signal { name: "contentWidthChanged"; revision: 1 }
Signal { name: "contentHeightChanged"; revision: 1 }
}
@@ -1027,9 +1442,10 @@ Module {
prototype: "QObject"
exports: [
"QtQuick.Templates/Popup 2.0",
- "QtQuick.Templates/Popup 2.1"
+ "QtQuick.Templates/Popup 2.1",
+ "QtQuick.Templates/Popup 2.3"
]
- exportMetaObjectRevisions: [0, 1]
+ exportMetaObjectRevisions: [0, 1, 3]
Enum {
name: "ClosePolicy"
values: {
@@ -1066,7 +1482,6 @@ Module {
Property { name: "contentHeight"; type: "double" }
Property { name: "availableWidth"; type: "double"; isReadonly: true }
Property { name: "availableHeight"; type: "double"; isReadonly: true }
- Property { name: "spacing"; revision: 1; type: "double" }
Property { name: "margins"; type: "double" }
Property { name: "topMargin"; type: "double" }
Property { name: "leftMargin"; type: "double" }
@@ -1078,7 +1493,9 @@ Module {
Property { name: "rightPadding"; type: "double" }
Property { name: "bottomPadding"; type: "double" }
Property { name: "locale"; type: "QLocale" }
+ Property { name: "mirrored"; revision: 3; type: "bool"; isReadonly: true }
Property { name: "font"; type: "QFont" }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
Property { name: "parent"; type: "QQuickItem"; isPointer: true }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
@@ -1090,21 +1507,28 @@ Module {
Property { name: "modal"; type: "bool" }
Property { name: "dim"; type: "bool" }
Property { name: "visible"; type: "bool" }
+ Property { name: "enabled"; revision: 3; type: "bool" }
+ Property { name: "opened"; revision: 3; type: "bool"; isReadonly: true }
Property { name: "opacity"; type: "double" }
Property { name: "scale"; type: "double" }
Property { name: "closePolicy"; type: "ClosePolicy" }
Property { name: "transformOrigin"; type: "TransformOrigin" }
Property { name: "enter"; type: "QQuickTransition"; isPointer: true }
Property { name: "exit"; type: "QQuickTransition"; isPointer: true }
- Signal { name: "spacingChanged"; revision: 1 }
+ Property { name: "spacing"; revision: 1; type: "double" }
+ Signal { name: "opened" }
+ Signal { name: "closed" }
+ Signal { name: "aboutToShow" }
+ Signal { name: "aboutToHide" }
+ Signal { name: "mirroredChanged"; revision: 3 }
+ Signal { name: "paletteChanged"; revision: 3 }
+ Signal { name: "enabledChanged"; revision: 3 }
+ Signal { name: "openedChanged"; revision: 3 }
Signal {
name: "windowChanged"
Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
}
- Signal { name: "aboutToShow" }
- Signal { name: "aboutToHide" }
- Signal { name: "opened" }
- Signal { name: "closed" }
+ Signal { name: "spacingChanged"; revision: 1 }
Method { name: "open" }
Method { name: "close" }
Method {
@@ -1147,9 +1571,10 @@ Module {
exports: [
"QtQuick.Templates/RangeSlider 2.0",
"QtQuick.Templates/RangeSlider 2.1",
- "QtQuick.Templates/RangeSlider 2.2"
+ "QtQuick.Templates/RangeSlider 2.2",
+ "QtQuick.Templates/RangeSlider 2.3"
]
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Enum {
name: "SnapMode"
values: {
@@ -1166,6 +1591,8 @@ Module {
Property { name: "snapMode"; type: "SnapMode" }
Property { name: "orientation"; type: "Qt::Orientation" }
Property { name: "live"; revision: 2; type: "bool" }
+ Property { name: "horizontal"; revision: 3; type: "bool"; isReadonly: true }
+ Property { name: "vertical"; revision: 3; type: "bool"; isReadonly: true }
Signal { name: "liveChanged"; revision: 2 }
Method {
name: "setValues"
@@ -1200,9 +1627,10 @@ Module {
prototype: "QQuickControl"
exports: [
"QtQuick.Templates/ScrollBar 2.0",
- "QtQuick.Templates/ScrollBar 2.2"
+ "QtQuick.Templates/ScrollBar 2.2",
+ "QtQuick.Templates/ScrollBar 2.3"
]
- exportMetaObjectRevisions: [0, 2]
+ exportMetaObjectRevisions: [0, 2, 3]
attachedType: "QQuickScrollBarAttached"
Enum {
name: "SnapMode"
@@ -1229,6 +1657,8 @@ Module {
Property { name: "snapMode"; revision: 2; type: "SnapMode" }
Property { name: "interactive"; revision: 2; type: "bool" }
Property { name: "policy"; revision: 2; type: "Policy" }
+ Property { name: "horizontal"; revision: 3; type: "bool"; isReadonly: true }
+ Property { name: "vertical"; revision: 3; type: "bool"; isReadonly: true }
Signal { name: "snapModeChanged"; revision: 2 }
Signal { name: "interactiveChanged"; revision: 2 }
Signal { name: "policyChanged"; revision: 2 }
@@ -1253,13 +1683,18 @@ Module {
name: "QQuickScrollIndicator"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["QtQuick.Templates/ScrollIndicator 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/ScrollIndicator 2.0",
+ "QtQuick.Templates/ScrollIndicator 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
attachedType: "QQuickScrollIndicatorAttached"
Property { name: "size"; type: "double" }
Property { name: "position"; type: "double" }
Property { name: "active"; type: "bool" }
Property { name: "orientation"; type: "Qt::Orientation" }
+ Property { name: "horizontal"; revision: 3; type: "bool"; isReadonly: true }
+ Property { name: "vertical"; revision: 3; type: "bool"; isReadonly: true }
Method {
name: "setSize"
Parameter { name: "size"; type: "double" }
@@ -1293,9 +1728,10 @@ Module {
exports: [
"QtQuick.Templates/Slider 2.0",
"QtQuick.Templates/Slider 2.1",
- "QtQuick.Templates/Slider 2.2"
+ "QtQuick.Templates/Slider 2.2",
+ "QtQuick.Templates/Slider 2.3"
]
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Enum {
name: "SnapMode"
values: {
@@ -1311,12 +1747,14 @@ Module {
Property { name: "visualPosition"; type: "double"; isReadonly: true }
Property { name: "stepSize"; type: "double" }
Property { name: "snapMode"; type: "SnapMode" }
- Property { name: "live"; revision: 2; type: "bool" }
Property { name: "pressed"; type: "bool" }
+ Property { name: "horizontal"; revision: 3; type: "bool"; isReadonly: true }
+ Property { name: "vertical"; revision: 3; type: "bool"; isReadonly: true }
Property { name: "orientation"; type: "Qt::Orientation" }
Property { name: "handle"; type: "QQuickItem"; isPointer: true }
- Signal { name: "liveChanged"; revision: 2 }
+ Property { name: "live"; revision: 2; type: "bool" }
Signal { name: "moved"; revision: 2 }
+ Signal { name: "liveChanged"; revision: 2 }
Method { name: "increase" }
Method { name: "decrease" }
Method {
@@ -1333,9 +1771,10 @@ Module {
exports: [
"QtQuick.Templates/SpinBox 2.0",
"QtQuick.Templates/SpinBox 2.1",
- "QtQuick.Templates/SpinBox 2.2"
+ "QtQuick.Templates/SpinBox 2.2",
+ "QtQuick.Templates/SpinBox 2.3"
]
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Property { name: "from"; type: "int" }
Property { name: "to"; type: "int" }
Property { name: "value"; type: "int" }
@@ -1348,9 +1787,11 @@ Module {
Property { name: "down"; type: "QQuickSpinButton"; isReadonly: true; isPointer: true }
Property { name: "inputMethodHints"; revision: 2; type: "Qt::InputMethodHints" }
Property { name: "inputMethodComposing"; revision: 2; type: "bool"; isReadonly: true }
+ Property { name: "wrap"; revision: 3; type: "bool" }
Signal { name: "valueModified"; revision: 2 }
Signal { name: "inputMethodHintsChanged"; revision: 2 }
Signal { name: "inputMethodComposingChanged"; revision: 2 }
+ Signal { name: "wrapChanged"; revision: 3 }
Method { name: "increase" }
Method { name: "decrease" }
}
@@ -1358,8 +1799,8 @@ Module {
name: "QQuickSpinButton"
prototype: "QObject"
Property { name: "pressed"; type: "bool" }
- Property { name: "hovered"; revision: 1; type: "bool" }
Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
+ Property { name: "hovered"; revision: 1; type: "bool" }
Signal { name: "hoveredChanged"; revision: 1 }
}
Component {
@@ -1408,6 +1849,12 @@ Module {
Property { name: "pushExit"; type: "QQuickTransition"; isPointer: true }
Property { name: "replaceEnter"; type: "QQuickTransition"; isPointer: true }
Property { name: "replaceExit"; type: "QQuickTransition"; isPointer: true }
+ Property { name: "empty"; revision: 3; type: "bool"; isReadonly: true }
+ Signal { name: "emptyChanged"; revision: 3 }
+ Method {
+ name: "clear"
+ Parameter { name: "operation"; type: "Operation" }
+ }
Method { name: "clear" }
Method {
name: "get"
@@ -1462,23 +1909,23 @@ Module {
prototype: "QObject"
Property { name: "position"; type: "double" }
Property { name: "complete"; type: "bool"; isReadonly: true }
- Property { name: "enabled"; type: "bool" }
Property { name: "left"; type: "QQmlComponent"; isPointer: true }
Property { name: "behind"; type: "QQmlComponent"; isPointer: true }
Property { name: "right"; type: "QQmlComponent"; isPointer: true }
Property { name: "leftItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "behindItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "rightItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "enabled"; type: "bool" }
Property { name: "transition"; type: "QQuickTransition"; isPointer: true }
Signal { name: "completed" }
Signal { name: "opened" }
Signal { name: "closed" }
+ Method { name: "close"; revision: 1 }
Method {
name: "open"
revision: 2
Parameter { name: "side"; type: "QQuickSwipeDelegate::Side" }
}
- Method { name: "close"; revision: 1 }
}
Component {
name: "QQuickSwipeDelegate"
@@ -1519,6 +1966,8 @@ Module {
attachedType: "QQuickSwipeViewAttached"
Property { name: "interactive"; revision: 1; type: "bool" }
Property { name: "orientation"; revision: 2; type: "Qt::Orientation" }
+ Property { name: "horizontal"; revision: 3; type: "bool"; isReadonly: true }
+ Property { name: "vertical"; revision: 3; type: "bool"; isReadonly: true }
Signal { name: "interactiveChanged"; revision: 1 }
Signal { name: "orientationChanged"; revision: 2 }
}
@@ -1527,9 +1976,9 @@ Module {
prototype: "QObject"
Property { name: "index"; type: "int"; isReadonly: true }
Property { name: "isCurrentItem"; type: "bool"; isReadonly: true }
+ Property { name: "view"; type: "QQuickSwipeView"; isReadonly: true; isPointer: true }
Property { name: "isNextItem"; revision: 1; type: "bool"; isReadonly: true }
Property { name: "isPreviousItem"; revision: 1; type: "bool"; isReadonly: true }
- Property { name: "view"; type: "QQuickSwipeView"; isReadonly: true; isPointer: true }
}
Component {
name: "QQuickSwitch"
@@ -1558,6 +2007,7 @@ Module {
"QtQuick.Templates/TabBar 2.2"
]
exportMetaObjectRevisions: [0, 2]
+ attachedType: "QQuickTabBarAttached"
Enum {
name: "Position"
values: {
@@ -1572,6 +2022,13 @@ Module {
Signal { name: "contentHeightChanged"; revision: 2 }
}
Component {
+ name: "QQuickTabBarAttached"
+ prototype: "QObject"
+ Property { name: "index"; type: "int"; isReadonly: true }
+ Property { name: "tabBar"; type: "QQuickTabBar"; isReadonly: true; isPointer: true }
+ Property { name: "position"; type: "QQuickTabBar::Position"; isReadonly: true }
+ }
+ Component {
name: "QQuickTabButton"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
@@ -1596,10 +2053,9 @@ Module {
Property { name: "focusReason"; type: "Qt::FocusReason" }
Property { name: "hovered"; revision: 1; type: "bool"; isReadonly: true }
Property { name: "hoverEnabled"; revision: 1; type: "bool" }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
Signal { name: "implicitWidthChanged3" }
Signal { name: "implicitHeightChanged3" }
- Signal { name: "hoveredChanged"; revision: 1 }
- Signal { name: "hoverEnabledChanged"; revision: 1 }
Signal {
name: "pressAndHold"
Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
@@ -1614,6 +2070,9 @@ Module {
revision: 1
Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
}
+ Signal { name: "hoveredChanged"; revision: 1 }
+ Signal { name: "hoverEnabledChanged"; revision: 1 }
+ Signal { name: "paletteChanged"; revision: 3 }
}
Component {
name: "QQuickTextAreaAttached"
@@ -1637,10 +2096,9 @@ Module {
Property { name: "focusReason"; type: "Qt::FocusReason" }
Property { name: "hovered"; revision: 1; type: "bool"; isReadonly: true }
Property { name: "hoverEnabled"; revision: 1; type: "bool" }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
Signal { name: "implicitWidthChanged3" }
Signal { name: "implicitHeightChanged3" }
- Signal { name: "hoveredChanged"; revision: 1 }
- Signal { name: "hoverEnabledChanged"; revision: 1 }
Signal {
name: "pressAndHold"
Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
@@ -1655,6 +2113,9 @@ Module {
revision: 1
Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
}
+ Signal { name: "hoveredChanged"; revision: 1 }
+ Signal { name: "hoverEnabledChanged"; revision: 1 }
+ Signal { name: "paletteChanged"; revision: 3 }
}
Component {
name: "QQuickToolBar"
diff --git a/src/imports/controls/qmldir b/src/imports/controls/qmldir
index 32f0d20d..9930b8d8 100644
--- a/src/imports/controls/qmldir
+++ b/src/imports/controls/qmldir
@@ -1,5 +1,5 @@
module QtQuick.Controls
plugin qtquickcontrols2plugin
classname QtQuickControls2Plugin
-depends QtQuick.Templates 2.2
+depends QtQuick.Templates 2.3
designersupported
diff --git a/src/imports/controls/qquickdefaultbusyindicator.cpp b/src/imports/controls/qquickdefaultbusyindicator.cpp
index 315b2b8b..138e94e8 100644
--- a/src/imports/controls/qquickdefaultbusyindicator.cpp
+++ b/src/imports/controls/qquickdefaultbusyindicator.cpp
@@ -45,7 +45,6 @@ QT_BEGIN_NAMESPACE
static const int CircleCount = 10;
static const int TotalDuration = 100 * CircleCount * 2;
static const QRgb TransparentColor = 0x00000000;
-static const QRgb FillColor = 0xFF353637;
static QPointF moveCircle(const QPointF &pos, qreal rotation, qreal distance)
{
@@ -59,6 +58,10 @@ public:
void updateCurrentTime(int time) override;
void sync(QQuickItem *item) override;
+
+private:
+ QColor m_pen;
+ QColor m_fill;
};
QQuickDefaultBusyIndicatorNode::QQuickDefaultBusyIndicatorNode(QQuickDefaultBusyIndicator *item)
@@ -92,8 +95,9 @@ void QQuickDefaultBusyIndicatorNode::updateCurrentTime(int time)
Q_ASSERT(rectNode->type() == QSGNode::GeometryNodeType);
const bool fill = (firstPhaseProgress > qreal(i) / CircleCount) || (secondPhaseProgress > 0 && secondPhaseProgress < qreal(i) / CircleCount);
- rectNode->setColor(QColor::fromRgba(fill ? FillColor : TransparentColor));
- rectNode->setPenWidth(fill ? 0 : 1);
+ rectNode->setColor(fill ? m_fill : QColor::fromRgba(TransparentColor));
+ rectNode->setPenColor(m_pen);
+ rectNode->setPenWidth(1);
rectNode->update();
transformNode = static_cast<QSGTransformNode*>(transformNode->nextSibling());
@@ -109,6 +113,9 @@ void QQuickDefaultBusyIndicatorNode::sync(QQuickItem *item)
const qreal dy = (h - sz) / 2;
const int circleRadius = sz / 12;
+ m_pen = static_cast<QQuickDefaultBusyIndicator *>(item)->pen();
+ m_fill = static_cast<QQuickDefaultBusyIndicator *>(item)->fill();
+
QSGTransformNode *transformNode = static_cast<QSGTransformNode *>(firstChild());
for (int i = 0; i < CircleCount; ++i) {
Q_ASSERT(transformNode->type() == QSGNode::TransformNodeType);
@@ -136,6 +143,34 @@ QQuickDefaultBusyIndicator::QQuickDefaultBusyIndicator(QQuickItem *parent) :
setFlag(ItemHasContents);
}
+QColor QQuickDefaultBusyIndicator::pen() const
+{
+ return m_pen;
+}
+
+void QQuickDefaultBusyIndicator::setPen(const QColor &pen)
+{
+ if (pen == m_pen)
+ return;
+
+ m_pen = pen;
+ update();
+}
+
+QColor QQuickDefaultBusyIndicator::fill() const
+{
+ return m_fill;
+}
+
+void QQuickDefaultBusyIndicator::setFill(const QColor &fill)
+{
+ if (fill == m_fill)
+ return;
+
+ m_fill = fill;
+ update();
+}
+
int QQuickDefaultBusyIndicator::elapsed() const
{
return m_elapsed;
diff --git a/src/imports/controls/qquickdefaultbusyindicator_p.h b/src/imports/controls/qquickdefaultbusyindicator_p.h
index 7daeabd1..f327c8de 100644
--- a/src/imports/controls/qquickdefaultbusyindicator_p.h
+++ b/src/imports/controls/qquickdefaultbusyindicator_p.h
@@ -49,16 +49,25 @@
//
#include <QtQuick/qquickitem.h>
+#include <QtGui/qcolor.h>
QT_BEGIN_NAMESPACE
class QQuickDefaultBusyIndicator : public QQuickItem
{
Q_OBJECT
+ Q_PROPERTY(QColor pen READ pen WRITE setPen FINAL)
+ Q_PROPERTY(QColor fill READ fill WRITE setFill FINAL)
public:
explicit QQuickDefaultBusyIndicator(QQuickItem *parent = nullptr);
+ QColor pen() const;
+ void setPen(const QColor &pen);
+
+ QColor fill() const;
+ void setFill(const QColor &fill);
+
int elapsed() const;
protected:
@@ -67,6 +76,8 @@ protected:
private:
int m_elapsed;
+ QColor m_pen;
+ QColor m_fill;
};
QT_END_NAMESPACE
diff --git a/src/imports/controls/qquickdialring.cpp b/src/imports/controls/qquickdefaultdial.cpp
index 2c6e7921..845e634d 100644
--- a/src/imports/controls/qquickdialring.cpp
+++ b/src/imports/controls/qquickdefaultdial.cpp
@@ -34,7 +34,7 @@
**
****************************************************************************/
-#include "qquickdialring_p.h"
+#include "qquickdefaultdial_p.h"
#include <QtCore/qmath.h>
#include <QtGui/qpainter.h>
@@ -42,44 +42,42 @@
QT_BEGIN_NAMESPACE
-QQuickDialRing::QQuickDialRing(QQuickItem *parent) :
+QQuickDefaultDial::QQuickDefaultDial(QQuickItem *parent) :
QQuickPaintedItem(parent),
m_progress(0),
m_color(Qt::black)
{
}
-qreal QQuickDialRing::progress() const
+qreal QQuickDefaultDial::progress() const
{
return m_progress;
}
-void QQuickDialRing::setProgress(qreal progress)
+void QQuickDefaultDial::setProgress(qreal progress)
{
if (progress == m_progress)
return;
m_progress = progress;
update();
- emit progressChanged();
}
-QColor QQuickDialRing::color() const
+QColor QQuickDefaultDial::color() const
{
return m_color;
}
-void QQuickDialRing::setColor(const QColor &color)
+void QQuickDefaultDial::setColor(const QColor &color)
{
if (color == m_color)
return;
m_color = color;
update();
- emit colorChanged();
}
-void QQuickDialRing::paint(QPainter *painter)
+void QQuickDefaultDial::paint(QPainter *painter)
{
if (width() <= 0 || height() <= 0)
return;
diff --git a/src/imports/controls/qquickdialring_p.h b/src/imports/controls/qquickdefaultdial_p.h
index 5b2f49ba..10490610 100644
--- a/src/imports/controls/qquickdialring_p.h
+++ b/src/imports/controls/qquickdefaultdial_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKDIALRING_P_H
-#define QQUICKDIALRING_P_H
+#ifndef QQUICKDEFAULTDIAL_P_H
+#define QQUICKDEFAULTDIAL_P_H
//
// W A R N I N G
@@ -53,14 +53,14 @@
QT_BEGIN_NAMESPACE
-class QQuickDialRing : public QQuickPaintedItem
+class QQuickDefaultDial : public QQuickPaintedItem
{
Q_OBJECT
- Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged)
- Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+ Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL)
+ Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
public:
- QQuickDialRing(QQuickItem *parent = nullptr);
+ explicit QQuickDefaultDial(QQuickItem *parent = nullptr);
qreal progress() const;
void setProgress(qreal progress);
@@ -70,10 +70,6 @@ public:
void paint(QPainter *painter) override;
-Q_SIGNALS:
- void progressChanged();
- void colorChanged();
-
private:
qreal m_progress;
QColor m_color;
@@ -81,4 +77,4 @@ private:
QT_END_NAMESPACE
-#endif // QQUICKDIALRING_P_H
+#endif // QQUICKDEFAULTDIAL_P_H
diff --git a/src/imports/controls/qquickdefaultprogressbar.cpp b/src/imports/controls/qquickdefaultprogressbar.cpp
index a34b6a28..f5bd1db8 100644
--- a/src/imports/controls/qquickdefaultprogressbar.cpp
+++ b/src/imports/controls/qquickdefaultprogressbar.cpp
@@ -51,7 +51,6 @@ static const int BlockSpan = Blocks * (BlockWidth + BlockRestingSpacing) - Block
static const int TotalDuration = 4000;
static const int SecondPhaseStart = TotalDuration * 0.4;
static const int ThirdPhaseStart = TotalDuration * 0.6;
-static const QRgb FillColor = 0x353637;
static inline qreal blockStartX(int blockIndex)
{
@@ -178,7 +177,7 @@ void QQuickDefaultProgressBarNode::sync(QQuickItem *item)
QSGInternalRectangleNode *rectNode = static_cast<QSGInternalRectangleNode*>(transformNode->firstChild());
if (!rectNode) {
rectNode = d->sceneGraphContext()->createInternalRectangleNode();
- rectNode->setColor(FillColor);
+ rectNode->setColor(bar->color());
transformNode->appendChildNode(rectNode);
}
@@ -200,7 +199,7 @@ void QQuickDefaultProgressBarNode::sync(QQuickItem *item)
QSGInternalRectangleNode *rectNode = static_cast<QSGInternalRectangleNode *>(firstChild());
if (!rectNode) {
rectNode = d->sceneGraphContext()->createInternalRectangleNode();
- rectNode->setColor(FillColor);
+ rectNode->setColor(bar->color());
appendChildNode(rectNode);
}
@@ -229,7 +228,6 @@ void QQuickDefaultProgressBar::setProgress(qreal progress)
m_progress = progress;
update();
- emit progressChanged();
}
bool QQuickDefaultProgressBar::isIndeterminate() const
@@ -245,7 +243,20 @@ void QQuickDefaultProgressBar::setIndeterminate(bool indeterminate)
m_indeterminate = indeterminate;
setClip(m_indeterminate);
update();
- emit indeterminateChanged();
+}
+
+QColor QQuickDefaultProgressBar::color() const
+{
+ return m_color;
+}
+
+void QQuickDefaultProgressBar::setColor(const QColor &color)
+{
+ if (color == m_color)
+ return;
+
+ m_color = color;
+ update();
}
void QQuickDefaultProgressBar::itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data)
diff --git a/src/imports/controls/qquickdefaultprogressbar_p.h b/src/imports/controls/qquickdefaultprogressbar_p.h
index 4fb9ae0b..91f8056b 100644
--- a/src/imports/controls/qquickdefaultprogressbar_p.h
+++ b/src/imports/controls/qquickdefaultprogressbar_p.h
@@ -49,14 +49,16 @@
//
#include <QtQuick/qquickitem.h>
+#include <QtGui/qcolor.h>
QT_BEGIN_NAMESPACE
class QQuickDefaultProgressBar : public QQuickItem
{
Q_OBJECT
- Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate NOTIFY indeterminateChanged FINAL)
- Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged FINAL)
+ Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL)
+ Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL)
+ Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
public:
explicit QQuickDefaultProgressBar(QQuickItem *parent = nullptr);
@@ -67,9 +69,8 @@ public:
qreal progress() const;
void setProgress(qreal progress);
-Q_SIGNALS:
- void progressChanged();
- void indeterminateChanged();
+ QColor color() const;
+ void setColor(const QColor &color);
protected:
void itemChange(ItemChange change, const ItemChangeData &data) override;
@@ -78,6 +79,7 @@ protected:
private:
qreal m_progress;
bool m_indeterminate;
+ QColor m_color;
};
QT_END_NAMESPACE
diff --git a/src/imports/controls/qquickdefaulttheme.cpp b/src/imports/controls/qquickdefaulttheme.cpp
new file mode 100644
index 00000000..f4b6f5d7
--- /dev/null
+++ b/src/imports/controls/qquickdefaulttheme.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickdefaulttheme_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QQuickDefaultTheme::QQuickDefaultTheme()
+ : QQuickTheme(QStringLiteral("Default"))
+{
+ systemPalette.setColor(QPalette::Base, QColor::fromRgba(0xFFFFFFFF));
+ systemPalette.setColor(QPalette::Disabled, QPalette::Base, QColor::fromRgba(0xFFD6D6D6));
+
+ systemPalette.setColor(QPalette::Button, QColor::fromRgba(0xFFE0E0E0));
+
+ 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(0xFFF6F6F6));
+
+ systemPalette.setColor(QPalette::Link, QColor::fromRgba(0xFF45A7D7));
+
+ systemPalette.setColor(QPalette::Mid, QColor::fromRgba(0xFFBDBDBD));
+
+ systemPalette.setColor(QPalette::Midlight, QColor::fromRgba(0xFFE4E4E4));
+
+ systemPalette.setColor(QPalette::Text, QColor::fromRgba(0xFF353637));
+ systemPalette.setColor(QPalette::Disabled, QPalette::Text, QColor::fromRgba(0x7F353637));
+
+ systemPalette.setColor(QPalette::Shadow, QColor::fromRgba(0xFF28282A));
+
+ systemPalette.setColor(QPalette::ToolTipBase, QColor::fromRgba(0xFFFFFFFF));
+ systemPalette.setColor(QPalette::ToolTipText, QColor::fromRgba(0xFF000000));
+
+ systemPalette.setColor(QPalette::Window, QColor::fromRgba(0xFFFFFFFF));
+
+ 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
new file mode 100644
index 00000000..16e4d061
--- /dev/null
+++ b/src/imports/controls/qquickdefaulttheme_p.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKDEFAULTTHEME_P_H
+#define QQUICKDEFAULTTHEME_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuickControls2/private/qquicktheme_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickDefaultTheme : public QQuickTheme
+{
+public:
+ explicit QQuickDefaultTheme();
+
+ const QPalette *palette(Palette type) const override;
+
+private:
+ QPalette systemPalette;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKDEFAULTTHEME_P_H
diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp
index 32270be0..4ac5b7e0 100644
--- a/src/imports/controls/qtquickcontrols2plugin.cpp
+++ b/src/imports/controls/qtquickcontrols2plugin.cpp
@@ -36,19 +36,27 @@
#include <QtCore/private/qfileselector_p.h>
#include <QtQuickControls2/qquickstyle.h>
+#include <QtQuickControls2/private/qquickchecklabel_p.h>
+#include <QtQuickControls2/private/qquickcolor_p.h>
+#include <QtQuickControls2/private/qquickcolorimage_p.h>
+#include <QtQuickControls2/private/qquickiconimage_p.h>
+#include <QtQuickControls2/private/qquickmnemoniclabel_p.h>
+#include <QtQuickControls2/private/qquickpaddedrectangle_p.h>
#include <QtQuickControls2/private/qquickplaceholdertext_p.h>
+#include <QtQuickControls2/private/qquickiconlabel_p.h>
#include <QtQuickControls2/private/qquickstyle_p.h>
#include <QtQuickControls2/private/qquickstyleplugin_p.h>
#include <QtQuickControls2/private/qquickstyleselector_p.h>
-#include <QtQuickControls2/private/qquickcolorimageprovider_p.h>
#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview)
#include <QtQuickControls2/private/qquicktumblerview_p.h>
#endif
+#include <QtQuickTemplates2/private/qquickoverlay_p.h>
#include "qquickdefaultbusyindicator_p.h"
+#include "qquickdefaultdial_p.h"
#include "qquickdefaultprogressbar_p.h"
#include "qquickdefaultstyle_p.h"
-#include "qquickdialring_p.h"
+#include "qquickdefaulttheme_p.h"
static inline void initResources()
{
@@ -67,8 +75,11 @@ class QtQuickControls2Plugin: public QQuickStylePlugin
public:
QtQuickControls2Plugin(QObject *parent = nullptr);
- void registerTypes(const char *uri);
- void initializeEngine(QQmlEngine *engine, const char *uri);
+ void registerTypes(const char *uri) override;
+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
+
+ QString name() const override;
+ QQuickProxyTheme *createTheme() const override;
};
QtQuickControls2Plugin::QtQuickControls2Plugin(QObject *parent) : QQuickStylePlugin(parent)
@@ -145,6 +156,13 @@ void QtQuickControls2Plugin::registerTypes(const char *uri)
// QtQuick.Controls 2.2 (new types in Qt 5.9)
qmlRegisterType(selector.select(QStringLiteral("DelayButton.qml")), uri, 2, 2, "DelayButton");
qmlRegisterType(selector.select(QStringLiteral("ScrollView.qml")), uri, 2, 2, "ScrollView");
+
+ // QtQuick.Controls 2.3 (new types in Qt 5.10)
+ qmlRegisterType(selector.select(QStringLiteral("Action.qml")), uri, 2, 3, "Action");
+ qmlRegisterType(selector.select(QStringLiteral("ActionGroup.qml")), uri, 2, 3, "ActionGroup");
+ qmlRegisterType(selector.select(QStringLiteral("MenuBar.qml")), uri, 2, 3, "MenuBar");
+ qmlRegisterType(selector.select(QStringLiteral("MenuBarItem.qml")), uri, 2, 3, "MenuBarItem");
+ qmlRegisterUncreatableType<QQuickOverlay>(uri, 2, 3, "Overlay", QStringLiteral("Overlay is only available as an attached property."));
}
static QObject *styleSingleton(QQmlEngine *engine, QJSEngine *scriptEngine)
@@ -154,26 +172,47 @@ static QObject *styleSingleton(QQmlEngine *engine, QJSEngine *scriptEngine)
return new QQuickDefaultStyle;
}
-void QtQuickControls2Plugin::initializeEngine(QQmlEngine *engine, const char *uri)
+static QObject *colorSingleton(QQmlEngine *engine, QJSEngine *scriptEngine)
{
- Q_UNUSED(uri);
+ Q_UNUSED(engine);
+ Q_UNUSED(scriptEngine);
+ return new QQuickColor;
+}
- engine->addImageProvider(QStringLiteral("default"), new QQuickColorImageProvider(QStringLiteral(":/qt-project.org/imports/QtQuick/Controls.2/images")));
+void QtQuickControls2Plugin::initializeEngine(QQmlEngine *engine, const char *uri)
+{
+ QQuickStylePlugin::initializeEngine(engine, uri);
const QByteArray import = QByteArray(uri) + ".impl";
qmlRegisterModule(import, 2, QT_VERSION_MINOR - 7); // Qt 5.7->2.0, 5.8->2.1, 5.9->2.2...
qmlRegisterType<QQuickDefaultBusyIndicator>(import, 2, 0, "BusyIndicatorImpl");
+ qmlRegisterType<QQuickDefaultDial>(import, 2, 0, "DialImpl");
+ qmlRegisterType<QQuickPaddedRectangle>(import, 2, 0, "PaddedRectangle");
qmlRegisterType<QQuickDefaultProgressBar>(import, 2, 0, "ProgressBarImpl");
- qmlRegisterType<QQuickDialRing>(import, 2, 0, "DialRing");
qmlRegisterType<QQuickPlaceholderText>(import, 2, 2, "PlaceholderText");
#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview)
qmlRegisterType<QQuickTumblerView>(import, 2, 1, "TumblerView");
#endif
qmlRegisterSingletonType<QQuickDefaultStyle>(import, 2, 1, "Default", styleSingleton);
- qmlRegisterType(typeUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 0, "CheckIndicator");
- qmlRegisterType(typeUrl(QStringLiteral("RadioIndicator.qml")), import, 2, 0, "RadioIndicator");
- qmlRegisterType(typeUrl(QStringLiteral("SwitchIndicator.qml")), import, 2, 0, "SwitchIndicator");
+
+ qmlRegisterType<QQuickColorImage>(import, 2, 3, "ColorImage");
+ qmlRegisterType<QQuickIconImage>(import, 2, 3, "IconImage");
+ qmlRegisterSingletonType<QQuickColor>(import, 2, 3, "Color", colorSingleton);
+ qmlRegisterType<QQuickIconLabel>(import, 2, 3, "IconLabel");
+ qmlRegisterType<QQuickCheckLabel>(import, 2, 3, "CheckLabel");
+ qmlRegisterType<QQuickMnemonicLabel>(import, 2, 3, "MnemonicLabel");
+ qmlRegisterRevision<QQuickText, 6>(import, 2, 3);
+}
+
+QString QtQuickControls2Plugin::name() const
+{
+ return QStringLiteral("default");
+}
+
+QQuickProxyTheme *QtQuickControls2Plugin::createTheme() const
+{
+ return new QQuickDefaultTheme;
}
QT_END_NAMESPACE
diff --git a/src/imports/controls/qtquickcontrols2plugin.qrc b/src/imports/controls/qtquickcontrols2plugin.qrc
index 0948a529..c2dd9d39 100644
--- a/src/imports/controls/qtquickcontrols2plugin.qrc
+++ b/src/imports/controls/qtquickcontrols2plugin.qrc
@@ -1,5 +1,9 @@
<RCC>
<qresource prefix="/qt-project.org/imports/QtQuick/Controls.2">
+ <file>images/arrow-indicator.png</file>
+ <file>images/arrow-indicator@2x.png</file>
+ <file>images/arrow-indicator@3x.png</file>
+ <file>images/arrow-indicator@4x.png</file>
<file>images/check.png</file>
<file>images/check@2x.png</file>
<file>images/check@3x.png</file>
diff --git a/src/imports/controls/universal/ApplicationWindow.qml b/src/imports/controls/universal/ApplicationWindow.qml
index 3f3926de..4472e187 100644
--- a/src/imports/controls/universal/ApplicationWindow.qml
+++ b/src/imports/controls/universal/ApplicationWindow.qml
@@ -34,11 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Window 2.3
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
-import QtQuick.Controls.Universal.impl 2.2
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls.Universal.impl 2.3
T.ApplicationWindow {
id: window
diff --git a/src/imports/controls/universal/BusyIndicator.qml b/src/imports/controls/universal/BusyIndicator.qml
index 8f0574fe..f6d86823 100644
--- a/src/imports/controls/universal/BusyIndicator.qml
+++ b/src/imports/controls/universal/BusyIndicator.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
-import QtQuick.Controls.Universal.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls.Universal.impl 2.3
T.BusyIndicator {
id: control
diff --git a/src/imports/controls/universal/Button.qml b/src/imports/controls/universal/Button.qml
index 0bf3621b..0e84d1f8 100644
--- a/src/imports/controls/universal/Button.qml
+++ b/src/imports/controls/universal/Button.qml
@@ -34,9 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
T.Button {
id: control
@@ -50,18 +52,23 @@ T.Button {
padding: 8
topPadding: padding - 4
bottomPadding: padding - 4
+ spacing: 8
+
+ icon.width: 20
+ icon.height: 20
+ icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2)
property bool useSystemFocusVisuals: true
- contentItem: Text {
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
-
- opacity: enabled ? 1.0 : 0.2
- color: control.Universal.foreground
+ color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
}
background: Rectangle {
diff --git a/src/imports/controls/universal/CheckBox.qml b/src/imports/controls/universal/CheckBox.qml
index 8f4b248d..a0ed3da5 100644
--- a/src/imports/controls/universal/CheckBox.qml
+++ b/src/imports/controls/universal/CheckBox.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
-import QtQuick.Controls.Universal.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls.Universal.impl 2.3
T.CheckBox {
id: control
diff --git a/src/imports/controls/universal/CheckDelegate.qml b/src/imports/controls/universal/CheckDelegate.qml
index d3d8690e..27388987 100644
--- a/src/imports/controls/universal/CheckDelegate.qml
+++ b/src/imports/controls/universal/CheckDelegate.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
-import QtQuick.Controls.Universal.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls.Universal.impl 2.3
T.CheckDelegate {
id: control
@@ -55,25 +57,29 @@ T.CheckDelegate {
topPadding: padding - 1
bottomPadding: padding + 1
+ icon.width: 20
+ icon.height: 20
+ icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2)
+
indicator: CheckIndicator {
x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- contentItem: Text {
+ contentItem: IconLabel {
leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
-
- opacity: enabled ? 1.0 : 0.2
- color: control.Universal.foreground
+ color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
}
background: Rectangle {
diff --git a/src/imports/controls/universal/CheckIndicator.qml b/src/imports/controls/universal/CheckIndicator.qml
index eac150e2..669edc7f 100644
--- a/src/imports/controls/universal/CheckIndicator.qml
+++ b/src/imports/controls/universal/CheckIndicator.qml
@@ -34,9 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
Rectangle {
implicitWidth: 20
@@ -53,14 +55,13 @@ Rectangle {
property Item control
readonly property bool partiallyChecked: control.checkState === Qt.PartiallyChecked
- Image {
+ ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
visible: control.checkState === Qt.Checked
- source: "image://universal/checkmark/" + (!control.enabled ? control.Universal.baseLowColor : control.Universal.chromeWhiteColor)
- sourceSize.width: width
- sourceSize.height: height
+ color: !control.enabled ? control.Universal.baseLowColor : control.Universal.chromeWhiteColor
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/checkmark.png"
}
Rectangle {
diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml
index a2ba0236..7e64ff1a 100644
--- a/src/imports/controls/universal/ComboBox.qml
+++ b/src/imports/controls/universal/ComboBox.qml
@@ -34,11 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Window 2.3
-import QtQuick.Controls 2.2
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.ComboBox {
id: control
@@ -62,12 +63,11 @@ T.ComboBox {
hoverEnabled: control.hoverEnabled
}
- indicator: Image {
+ indicator: ColorImage {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
- source: "image://universal/downarrow/" + (!control.enabled ? control.Universal.baseLowColor : control.Universal.baseMediumHighColor)
- sourceSize.width: width
- sourceSize.height: height
+ color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseMediumHighColor
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/downarrow.png"
Rectangle {
z: -1
@@ -145,7 +145,6 @@ T.ComboBox {
implicitHeight: contentHeight
model: control.popup.visible ? control.delegateModel : null
currentIndex: control.highlightedIndex
- highlightRangeMode: ListView.ApplyRange
highlightMoveDuration: 0
T.ScrollIndicator.vertical: ScrollIndicator { }
diff --git a/src/imports/controls/universal/DelayButton.qml b/src/imports/controls/universal/DelayButton.qml
index 9d43be44..ae313a4c 100644
--- a/src/imports/controls/universal/DelayButton.qml
+++ b/src/imports/controls/universal/DelayButton.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.DelayButton {
id: control
diff --git a/src/imports/controls/universal/Dial.qml b/src/imports/controls/universal/Dial.qml
index 2ffb4167..8f5700aa 100644
--- a/src/imports/controls/universal/Dial.qml
+++ b/src/imports/controls/universal/Dial.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.Dial {
id: control
diff --git a/src/imports/controls/universal/Dialog.qml b/src/imports/controls/universal/Dialog.qml
index 07ae56a6..1188ef08 100644
--- a/src/imports/controls/universal/Dialog.qml
+++ b/src/imports/controls/universal/Dialog.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Universal 2.3
T.Dialog {
id: control
@@ -84,4 +84,12 @@ T.Dialog {
footer: DialogButtonBox {
visible: count > 0
}
+
+ T.Overlay.modal: Rectangle {
+ color: control.Universal.baseLowColor
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: control.Universal.baseLowColor
+ }
}
diff --git a/src/imports/controls/universal/DialogButtonBox.qml b/src/imports/controls/universal/DialogButtonBox.qml
index 4ce41ad6..b50658b0 100644
--- a/src/imports/controls/universal/DialogButtonBox.qml
+++ b/src/imports/controls/universal/DialogButtonBox.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Universal 2.3
T.DialogButtonBox {
id: control
diff --git a/src/imports/controls/universal/Drawer.qml b/src/imports/controls/universal/Drawer.qml
index 3543887e..faf4c15b 100644
--- a/src/imports/controls/universal/Drawer.qml
+++ b/src/imports/controls/universal/Drawer.qml
@@ -34,14 +34,14 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.Drawer {
id: control
- parent: T.ApplicationWindow.overlay
+ parent: T.Overlay.overlay
implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
@@ -68,4 +68,12 @@ T.Drawer {
y: control.edge === Qt.TopEdge ? parent.height - 1 : 0
}
}
+
+ T.Overlay.modal: Rectangle {
+ color: control.Universal.baseLowColor
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: control.Universal.baseLowColor
+ }
}
diff --git a/src/imports/controls/universal/Frame.qml b/src/imports/controls/universal/Frame.qml
index 7d7d55a7..ac6c1e4f 100644
--- a/src/imports/controls/universal/Frame.qml
+++ b/src/imports/controls/universal/Frame.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.Frame {
id: control
diff --git a/src/imports/controls/universal/GroupBox.qml b/src/imports/controls/universal/GroupBox.qml
index 420cf22d..75d6ba02 100644
--- a/src/imports/controls/universal/GroupBox.qml
+++ b/src/imports/controls/universal/GroupBox.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.GroupBox {
id: control
diff --git a/src/imports/controls/universal/ItemDelegate.qml b/src/imports/controls/universal/ItemDelegate.qml
index 69b2cd9d..a2d4cfb9 100644
--- a/src/imports/controls/universal/ItemDelegate.qml
+++ b/src/imports/controls/universal/ItemDelegate.qml
@@ -34,9 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
T.ItemDelegate {
id: control
@@ -54,19 +56,20 @@ T.ItemDelegate {
topPadding: padding - 1
bottomPadding: padding + 1
- contentItem: Text {
- leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
- rightPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ icon.width: 20
+ icon.height: 20
+ icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2)
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
-
- opacity: enabled ? 1.0 : 0.2
- color: control.Universal.foreground
+ color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
}
background: Rectangle {
diff --git a/src/imports/controls/universal/Label.qml b/src/imports/controls/universal/Label.qml
index 3cfa9317..2e116d97 100644
--- a/src/imports/controls/universal/Label.qml
+++ b/src/imports/controls/universal/Label.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.Label {
id: control
diff --git a/src/imports/controls/universal/Menu.qml b/src/imports/controls/universal/Menu.qml
index 0ca475f5..056053bb 100644
--- a/src/imports/controls/universal/Menu.qml
+++ b/src/imports/controls/universal/Menu.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.Menu {
id: control
@@ -48,6 +48,9 @@ T.Menu {
contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding
margins: 0
+ overlap: 1
+
+ delegate: MenuItem { }
contentItem: ListView {
implicitHeight: contentHeight
@@ -55,8 +58,7 @@ T.Menu {
// TODO: improve this?
interactive: ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false
clip: true
- keyNavigationWraps: false
- currentIndex: -1
+ currentIndex: control.currentIndex
ScrollIndicator.vertical: ScrollIndicator {}
}
@@ -68,4 +70,12 @@ T.Menu {
border.color: control.Universal.chromeHighColor
border.width: 1 // FlyoutBorderThemeThickness
}
+
+ T.Overlay.modal: Rectangle {
+ color: control.Universal.baseLowColor
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: control.Universal.baseLowColor
+ }
}
diff --git a/src/imports/controls/universal/MenuBar.qml b/src/imports/controls/universal/MenuBar.qml
new file mode 100644
index 00000000..72a0f504
--- /dev/null
+++ b/src/imports/controls/universal/MenuBar.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
+
+T.MenuBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight + topPadding + bottomPadding)
+
+ delegate: MenuBarItem { }
+
+ contentItem: Row {
+ spacing: control.spacing
+ Repeater {
+ model: control.contentModel
+ }
+ }
+
+ background: Rectangle {
+ implicitHeight: 40
+ color: control.Universal.chromeMediumColor
+ }
+}
diff --git a/src/imports/controls/universal/MenuBarItem.qml b/src/imports/controls/universal/MenuBarItem.qml
new file mode 100644
index 00000000..59064ca1
--- /dev/null
+++ b/src/imports/controls/universal/MenuBarItem.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
+
+T.MenuBarItem {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 12
+ topPadding: padding - 1
+ bottomPadding: padding + 1
+ spacing: 12
+
+ icon.width: 20
+ icon.height: 20
+ icon.color: !enabled ? Universal.baseLowColor : Universal.baseHighColor
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: Qt.AlignLeft
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
+ }
+
+ background: Rectangle {
+ implicitWidth: 40
+ implicitHeight: 40
+
+ color: !control.enabled ? control.Universal.baseLowColor :
+ control.down ? control.Universal.listMediumColor :
+ control.highlighted ? control.Universal.listLowColor : "transparent"
+
+ Rectangle {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+
+ visible: control.visualFocus
+ color: control.Universal.accent
+ opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
+ }
+ }
+}
diff --git a/src/imports/controls/universal/MenuItem.qml b/src/imports/controls/universal/MenuItem.qml
index 35e2f2ba..b2d6c36c 100644
--- a/src/imports/controls/universal/MenuItem.qml
+++ b/src/imports/controls/universal/MenuItem.qml
@@ -34,9 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
T.MenuItem {
id: control
@@ -53,27 +55,44 @@ T.MenuItem {
bottomPadding: padding + 1
spacing: 12
- contentItem: Text {
- leftPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
- rightPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ icon.width: 20
+ icon.height: 20
+ icon.color: !enabled ? Universal.baseLowColor : Universal.baseHighColor
+ contentItem: IconLabel {
+ readonly property real arrowPadding: control.subMenu && control.arrow ? control.arrow.width + control.spacing : 0
+ readonly property real indicatorPadding: control.checkable && control.indicator ? control.indicator.width + control.spacing : 0
+ leftPadding: !control.mirrored ? indicatorPadding : arrowPadding
+ rightPadding: control.mirrored ? indicatorPadding : arrowPadding
+
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
}
- indicator: Image {
+ arrow: ColorImage {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ visible: control.subMenu
+ mirror: control.mirrored
+ color: !enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/rightarrow.png"
+ }
+
+ indicator: ColorImage {
x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
visible: control.checked
- source: !control.checkable ? "" : "image://universal/checkmark/" + (!control.enabled ? control.Universal.baseLowColor : control.down ? control.Universal.baseHighColor : control.Universal.baseMediumHighColor)
- sourceSize.width: width
- sourceSize.height: height
+ color: !control.enabled ? control.Universal.baseLowColor : control.down ? control.Universal.baseHighColor : control.Universal.baseMediumHighColor
+ source: !control.checkable ? "" : "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/checkmark.png"
}
background: Rectangle {
@@ -82,7 +101,7 @@ T.MenuItem {
color: !control.enabled ? control.Universal.baseLowColor :
control.down ? control.Universal.listMediumColor :
- control.hovered ? control.Universal.listLowColor : control.Universal.altMediumLowColor
+ control.highlighted ? control.Universal.listLowColor : control.Universal.altMediumLowColor
Rectangle {
x: 1; y: 1
diff --git a/src/imports/controls/universal/MenuSeparator.qml b/src/imports/controls/universal/MenuSeparator.qml
index 18d12528..a99dfa66 100644
--- a/src/imports/controls/universal/MenuSeparator.qml
+++ b/src/imports/controls/universal/MenuSeparator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.MenuSeparator {
id: control
diff --git a/src/imports/controls/universal/Page.qml b/src/imports/controls/universal/Page.qml
index 1f006f16..d0dc73f3 100644
--- a/src/imports/controls/universal/Page.qml
+++ b/src/imports/controls/universal/Page.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.Page {
id: control
diff --git a/src/imports/controls/universal/PageIndicator.qml b/src/imports/controls/universal/PageIndicator.qml
index f6a6baa6..8acede74 100644
--- a/src/imports/controls/universal/PageIndicator.qml
+++ b/src/imports/controls/universal/PageIndicator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.PageIndicator {
id: control
diff --git a/src/imports/controls/universal/Pane.qml b/src/imports/controls/universal/Pane.qml
index 67a66c93..5f1f07e5 100644
--- a/src/imports/controls/universal/Pane.qml
+++ b/src/imports/controls/universal/Pane.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.Pane {
id: control
diff --git a/src/imports/controls/universal/Popup.qml b/src/imports/controls/universal/Popup.qml
index 0e42219c..1be238b7 100644
--- a/src/imports/controls/universal/Popup.qml
+++ b/src/imports/controls/universal/Popup.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.Popup {
id: control
@@ -56,4 +56,12 @@ T.Popup {
border.color: control.Universal.chromeHighColor
border.width: 1 // FlyoutBorderThemeThickness
}
+
+ T.Overlay.modal: Rectangle {
+ color: control.Universal.baseLowColor
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: control.Universal.baseLowColor
+ }
}
diff --git a/src/imports/controls/universal/ProgressBar.qml b/src/imports/controls/universal/ProgressBar.qml
index 58545d61..9b8be7d3 100644
--- a/src/imports/controls/universal/ProgressBar.qml
+++ b/src/imports/controls/universal/ProgressBar.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
-import QtQuick.Controls.Universal.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls.Universal.impl 2.3
T.ProgressBar {
id: control
@@ -59,10 +59,7 @@ T.ProgressBar {
background: Rectangle {
implicitWidth: 100
implicitHeight: 10
-
- x: control.leftPadding
- y: control.topPadding + (control.availableHeight - height) / 2
- width: control.availableWidth
+ y: (control.height - height) / 2
height: 10
visible: !control.indeterminate
diff --git a/src/imports/controls/universal/RadioButton.qml b/src/imports/controls/universal/RadioButton.qml
index 5d778660..18cb8e92 100644
--- a/src/imports/controls/universal/RadioButton.qml
+++ b/src/imports/controls/universal/RadioButton.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
-import QtQuick.Controls.Universal.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls.Universal.impl 2.3
T.RadioButton {
id: control
diff --git a/src/imports/controls/universal/RadioDelegate.qml b/src/imports/controls/universal/RadioDelegate.qml
index e8b0216c..0fd5aacf 100644
--- a/src/imports/controls/universal/RadioDelegate.qml
+++ b/src/imports/controls/universal/RadioDelegate.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
-import QtQuick.Controls.Universal.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls.Universal.impl 2.3
T.RadioDelegate {
id: control
@@ -55,25 +57,29 @@ T.RadioDelegate {
topPadding: padding - 1
bottomPadding: padding + 1
+ icon.width: 20
+ icon.height: 20
+ icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2)
+
indicator: RadioIndicator {
x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- contentItem: Text {
+ contentItem: IconLabel {
leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
-
- opacity: enabled ? 1.0 : 0.2
- color: control.Universal.foreground
+ color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
}
background: Rectangle {
diff --git a/src/imports/controls/universal/RadioIndicator.qml b/src/imports/controls/universal/RadioIndicator.qml
index 220983da..fcf80d4b 100644
--- a/src/imports/controls/universal/RadioIndicator.qml
+++ b/src/imports/controls/universal/RadioIndicator.qml
@@ -34,8 +34,8 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Controls.Universal 2.3
Rectangle {
implicitWidth: 20
diff --git a/src/imports/controls/universal/RangeSlider.qml b/src/imports/controls/universal/RangeSlider.qml
index d2cf7a65..da759b4a 100644
--- a/src/imports/controls/universal/RangeSlider.qml
+++ b/src/imports/controls/universal/RangeSlider.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.RangeSlider {
id: control
@@ -51,13 +51,11 @@ T.RangeSlider {
padding: 6
first.handle: Rectangle {
- implicitWidth: horizontal ? 8 : 24
- implicitHeight: horizontal ? 24 : 8
+ implicitWidth: control.horizontal ? 8 : 24
+ implicitHeight: control.horizontal ? 24 : 8
- readonly property bool horizontal: control.orientation === Qt.Horizontal
-
- x: control.leftPadding + (horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height))
+ 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))
radius: 4
color: control.first.pressed ? control.Universal.chromeHighColor :
@@ -66,13 +64,11 @@ T.RangeSlider {
}
second.handle: Rectangle {
- implicitWidth: horizontal ? 8 : 24
- implicitHeight: horizontal ? 24 : 8
-
- readonly property bool horizontal: control.orientation === Qt.Horizontal
+ implicitWidth: control.horizontal ? 8 : 24
+ implicitHeight: control.horizontal ? 24 : 8
- x: control.leftPadding + (horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height))
+ 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))
radius: 4
color: control.second.pressed ? control.Universal.chromeHighColor :
@@ -81,33 +77,31 @@ T.RangeSlider {
}
background: Item {
- implicitWidth: horizontal ? 200 : 18
- implicitHeight: horizontal ? 18 : 200
-
- readonly property bool horizontal: control.orientation === Qt.Horizontal
+ implicitWidth: control.horizontal ? 200 : 18
+ implicitHeight: control.horizontal ? 18 : 200
- x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
- width: horizontal ? control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.availableHeight
+ x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
+ y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
+ width: control.horizontal ? control.availableWidth : implicitWidth
+ height: control.horizontal ? implicitHeight : control.availableHeight
- scale: horizontal && control.mirrored ? -1 : 1
+ scale: control.horizontal && control.mirrored ? -1 : 1
Rectangle {
- x: parent.horizontal ? 0 : (parent.width - width) / 2
- y: parent.horizontal ? (parent.height - height) / 2 : 0
- width: parent.horizontal ? parent.width : 2 // SliderBackgroundThemeHeight
- height: !parent.horizontal ? parent.height : 2 // SliderBackgroundThemeHeight
+ x: control.horizontal ? 0 : (parent.width - width) / 2
+ y: control.horizontal ? (parent.height - height) / 2 : 0
+ width: control.horizontal ? parent.width : 2 // SliderBackgroundThemeHeight
+ height: control.vertical ? parent.height : 2 // SliderBackgroundThemeHeight
color: control.hovered && !control.pressed ? control.Universal.baseMediumColor :
control.enabled ? control.Universal.baseMediumLowColor : control.Universal.chromeDisabledHighColor
}
Rectangle {
- x: parent.horizontal ? control.first.position * parent.width : (parent.width - width) / 2
- y: parent.horizontal ? (parent.height - height) / 2 : control.second.visualPosition * parent.height
- width: parent.horizontal ? control.second.position * parent.width - control.first.position * parent.width : 2 // SliderBackgroundThemeHeight
- height: !parent.horizontal ? control.second.position * parent.height - control.first.position * parent.height : 2 // SliderBackgroundThemeHeight
+ x: control.horizontal ? control.first.position * parent.width : (parent.width - width) / 2
+ y: control.horizontal ? (parent.height - height) / 2 : control.second.visualPosition * parent.height
+ width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width : 2 // SliderBackgroundThemeHeight
+ height: control.vertical ? control.second.position * parent.height - control.first.position * parent.height : 2 // SliderBackgroundThemeHeight
color: control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
diff --git a/src/imports/controls/universal/RoundButton.qml b/src/imports/controls/universal/RoundButton.qml
index d70c4cda..0161552f 100644
--- a/src/imports/controls/universal/RoundButton.qml
+++ b/src/imports/controls/universal/RoundButton.qml
@@ -34,9 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
T.RoundButton {
id: control
@@ -48,18 +50,23 @@ T.RoundButton {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 8
+ spacing: 8
+
+ icon.width: 20
+ icon.height: 20
+ icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2)
property bool useSystemFocusVisuals: true
- contentItem: Text {
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
-
- opacity: enabled ? 1.0 : 0.2
- color: control.Universal.foreground
+ color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
}
background: Rectangle {
diff --git a/src/imports/controls/universal/ScrollBar.qml b/src/imports/controls/universal/ScrollBar.qml
index cbb81f1b..70df3bb1 100644
--- a/src/imports/controls/universal/ScrollBar.qml
+++ b/src/imports/controls/universal/ScrollBar.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.ScrollBar {
id: control
diff --git a/src/imports/controls/universal/ScrollIndicator.qml b/src/imports/controls/universal/ScrollIndicator.qml
index 2f30ebe5..3f0390f3 100644
--- a/src/imports/controls/universal/ScrollIndicator.qml
+++ b/src/imports/controls/universal/ScrollIndicator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.ScrollIndicator {
id: control
diff --git a/src/imports/controls/universal/Slider.qml b/src/imports/controls/universal/Slider.qml
index e02065e5..acfb06d3 100644
--- a/src/imports/controls/universal/Slider.qml
+++ b/src/imports/controls/universal/Slider.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.Slider {
id: control
@@ -51,13 +51,11 @@ T.Slider {
property bool useSystemFocusVisuals: true
handle: Rectangle {
- implicitWidth: horizontal ? 8 : 24
- implicitHeight: horizontal ? 24 : 8
+ implicitWidth: control.horizontal ? 8 : 24
+ implicitHeight: control.horizontal ? 24 : 8
- readonly property bool horizontal: control.orientation === Qt.Horizontal
-
- x: control.leftPadding + (horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))
+ 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))
radius: 4
color: control.pressed ? control.Universal.chromeHighColor :
@@ -66,33 +64,31 @@ T.Slider {
}
background: Item {
- implicitWidth: horizontal ? 200 : 18
- implicitHeight: horizontal ? 18 : 200
-
- readonly property bool horizontal: control.orientation === Qt.Horizontal
+ implicitWidth: control.horizontal ? 200 : 18
+ implicitHeight: control.horizontal ? 18 : 200
- x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
- y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
- width: horizontal ? control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.availableHeight
+ x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
+ y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
+ width: control.horizontal ? control.availableWidth : implicitWidth
+ height: control.horizontal ? implicitHeight : control.availableHeight
- scale: horizontal && control.mirrored ? -1 : 1
+ scale: control.horizontal && control.mirrored ? -1 : 1
Rectangle {
- x: parent.horizontal ? 0 : (parent.width - width) / 2
- y: parent.horizontal ? (parent.height - height) / 2 : 0
- width: parent.horizontal ? parent.width : 2 // SliderTrackThemeHeight
- height: !parent.horizontal ? parent.height : 2 // SliderTrackThemeHeight
+ x: control.horizontal ? 0 : (parent.width - width) / 2
+ y: control.horizontal ? (parent.height - height) / 2 : 0
+ width: control.horizontal ? parent.width : 2 // SliderTrackThemeHeight
+ height: !control.horizontal ? parent.height : 2 // SliderTrackThemeHeight
color: control.hovered && !control.pressed ? control.Universal.baseMediumColor :
control.enabled ? control.Universal.baseMediumLowColor : control.Universal.chromeDisabledHighColor
}
Rectangle {
- x: parent.horizontal ? 0 : (parent.width - width) / 2
- y: parent.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height
- width: parent.horizontal ? control.position * parent.width : 2 // SliderTrackThemeHeight
- height: !parent.horizontal ? control.position * parent.height : 2 // SliderTrackThemeHeight
+ x: control.horizontal ? 0 : (parent.width - width) / 2
+ y: control.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height
+ width: control.horizontal ? control.position * parent.width : 2 // SliderTrackThemeHeight
+ height: !control.horizontal ? control.position * parent.height : 2 // SliderTrackThemeHeight
color: control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
diff --git a/src/imports/controls/universal/SpinBox.qml b/src/imports/controls/universal/SpinBox.qml
index 0cbfdd16..918568d5 100644
--- a/src/imports/controls/universal/SpinBox.qml
+++ b/src/imports/controls/universal/SpinBox.qml
@@ -34,9 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
T.SpinBox {
id: control
@@ -99,14 +101,12 @@ T.SpinBox {
opacity: control.activeFocus && !control.up.pressed ? 0.4 : 1.0
}
- Image {
+ ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
- source: "image://universal/" + (control.mirrored ? "left" : "right") + "arrow/"
- + (!enabled ? control.Universal.chromeDisabledLowColor :
- control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor)
- sourceSize.width: width
- sourceSize.height: height
+ color: !enabled ? control.Universal.chromeDisabledLowColor :
+ control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/" + (control.mirrored ? "left" : "right") + "arrow.png"
}
}
@@ -127,14 +127,12 @@ T.SpinBox {
opacity: control.activeFocus && !control.down.pressed ? 0.4 : 1.0
}
- Image {
+ ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
- source: "image://universal/" + (control.mirrored ? "right" : "left") + "arrow/"
- + (!enabled ? control.Universal.chromeDisabledLowColor :
- control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor)
- sourceSize.width: width
- sourceSize.height: height
+ color: !enabled ? control.Universal.chromeDisabledLowColor :
+ control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/" + (control.mirrored ? "right" : "left") + "arrow.png"
}
}
diff --git a/src/imports/controls/universal/StackView.qml b/src/imports/controls/universal/StackView.qml
index 071e1737..737d10b0 100644
--- a/src/imports/controls/universal/StackView.qml
+++ b/src/imports/controls/universal/StackView.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.StackView {
id: control
diff --git a/src/imports/controls/universal/SwipeDelegate.qml b/src/imports/controls/universal/SwipeDelegate.qml
index cec5c132..fc4d6ecf 100644
--- a/src/imports/controls/universal/SwipeDelegate.qml
+++ b/src/imports/controls/universal/SwipeDelegate.qml
@@ -34,9 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
T.SwipeDelegate {
id: control
@@ -54,21 +56,22 @@ T.SwipeDelegate {
topPadding: padding - 1
bottomPadding: padding + 1
+ icon.width: 20
+ icon.height: 20
+ icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2)
+
swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
- contentItem: Text {
- leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
- rightPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
-
- opacity: enabled ? 1.0 : 0.2
- color: control.Universal.foreground
+ color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
}
background: Rectangle {
diff --git a/src/imports/controls/universal/Switch.qml b/src/imports/controls/universal/Switch.qml
index ad07d0df..3d97f60d 100644
--- a/src/imports/controls/universal/Switch.qml
+++ b/src/imports/controls/universal/Switch.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
-import QtQuick.Controls.Universal.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls.Universal.impl 2.3
T.Switch {
id: control
diff --git a/src/imports/controls/universal/SwitchDelegate.qml b/src/imports/controls/universal/SwitchDelegate.qml
index a4ba85db..8720a2f9 100644
--- a/src/imports/controls/universal/SwitchDelegate.qml
+++ b/src/imports/controls/universal/SwitchDelegate.qml
@@ -34,10 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
-import QtQuick.Controls.Universal.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls.Universal.impl 2.3
T.SwitchDelegate {
id: control
@@ -55,25 +57,29 @@ T.SwitchDelegate {
topPadding: padding - 1
bottomPadding: padding + 1
+ icon.width: 20
+ icon.height: 20
+ icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2)
+
indicator: SwitchIndicator {
x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- contentItem: Text {
+ contentItem: IconLabel {
leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
-
- opacity: enabled ? 1.0 : 0.2
- color: control.Universal.foreground
+ color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
}
background: Rectangle {
diff --git a/src/imports/controls/universal/SwitchIndicator.qml b/src/imports/controls/universal/SwitchIndicator.qml
index 1eb2f9b5..20b797ea 100644
--- a/src/imports/controls/universal/SwitchIndicator.qml
+++ b/src/imports/controls/universal/SwitchIndicator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
Item {
implicitWidth: 44
diff --git a/src/imports/controls/universal/TabBar.qml b/src/imports/controls/universal/TabBar.qml
index c0de7fb2..5447049d 100644
--- a/src/imports/controls/universal/TabBar.qml
+++ b/src/imports/controls/universal/TabBar.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.TabBar {
id: control
@@ -46,8 +46,6 @@ T.TabBar {
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentHeight + topPadding + bottomPadding)
- contentHeight: 48
-
contentItem: PathView {
model: control.contentModel
currentIndex: control.currentIndex
diff --git a/src/imports/controls/universal/TabButton.qml b/src/imports/controls/universal/TabButton.qml
index ef982c60..8a5e1f1e 100644
--- a/src/imports/controls/universal/TabButton.qml
+++ b/src/imports/controls/universal/TabButton.qml
@@ -34,9 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
T.TabButton {
id: control
@@ -48,15 +50,22 @@ T.TabButton {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 12 // PivotItemMargin
+ spacing: 8
- contentItem: Text {
+ icon.width: 20
+ icon.height: 20
+ icon.color: Color.transparent(control.hovered ? control.Universal.baseMediumHighColor : control.Universal.foreground,
+ control.checked || control.down || control.hovered ? 1.0 : 0.2)
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
-
- opacity: control.checked || control.down || control.hovered ? 1.0 : 0.2
- color: control.hovered ? control.Universal.baseMediumHighColor : control.Universal.foreground
+ color: Color.transparent(control.hovered ? control.Universal.baseMediumHighColor : control.Universal.foreground,
+ control.checked || control.down || control.hovered ? 1.0 : 0.2)
}
}
diff --git a/src/imports/controls/universal/TextArea.qml b/src/imports/controls/universal/TextArea.qml
index a173e676..d6838544 100644
--- a/src/imports/controls/universal/TextArea.qml
+++ b/src/imports/controls/universal/TextArea.qml
@@ -34,11 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
T.TextArea {
id: control
diff --git a/src/imports/controls/universal/TextField.qml b/src/imports/controls/universal/TextField.qml
index 476630fd..36407595 100644
--- a/src/imports/controls/universal/TextField.qml
+++ b/src/imports/controls/universal/TextField.qml
@@ -34,11 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
T.TextField {
id: control
diff --git a/src/imports/controls/universal/ToolBar.qml b/src/imports/controls/universal/ToolBar.qml
index f6bec475..32c11dd1 100644
--- a/src/imports/controls/universal/ToolBar.qml
+++ b/src/imports/controls/universal/ToolBar.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.ToolBar {
id: control
diff --git a/src/imports/controls/universal/ToolButton.qml b/src/imports/controls/universal/ToolButton.qml
index 9b07490f..15463ebb 100644
--- a/src/imports/controls/universal/ToolButton.qml
+++ b/src/imports/controls/universal/ToolButton.qml
@@ -34,9 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Universal 2.3
T.ToolButton {
id: control
@@ -48,18 +50,23 @@ T.ToolButton {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
+ spacing: 8
+
+ icon.width: 20
+ icon.height: 20
+ icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2)
property bool useSystemFocusVisuals: true
- contentItem: Text {
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
text: control.text
font: control.font
- elide: Text.ElideRight
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
-
- opacity: enabled ? 1.0 : 0.2
- color: control.Universal.foreground
+ color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
}
background: Rectangle {
diff --git a/src/imports/controls/universal/ToolSeparator.qml b/src/imports/controls/universal/ToolSeparator.qml
index 8d36d95b..3fc25d92 100644
--- a/src/imports/controls/universal/ToolSeparator.qml
+++ b/src/imports/controls/universal/ToolSeparator.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.ToolSeparator {
id: control
diff --git a/src/imports/controls/universal/ToolTip.qml b/src/imports/controls/universal/ToolTip.qml
index 6f8f27f4..db48aab9 100644
--- a/src/imports/controls/universal/ToolTip.qml
+++ b/src/imports/controls/universal/ToolTip.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
T.ToolTip {
id: control
diff --git a/src/imports/controls/universal/Tumbler.qml b/src/imports/controls/universal/Tumbler.qml
index 45bcb6c8..c4fc9ea3 100644
--- a/src/imports/controls/universal/Tumbler.qml
+++ b/src/imports/controls/universal/Tumbler.qml
@@ -34,11 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Templates 2.2 as T
-import QtQuick.Controls.Universal 2.2
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
+import QtQuick 2.10
+import QtQuick.Templates 2.3 as T
+import QtQuick.Controls.Universal 2.3
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
T.Tumbler {
id: control
diff --git a/src/imports/controls/universal/qmldir b/src/imports/controls/universal/qmldir
index da4a89d6..271eafa9 100644
--- a/src/imports/controls/universal/qmldir
+++ b/src/imports/controls/universal/qmldir
@@ -1,4 +1,4 @@
module QtQuick.Controls.Universal
plugin qtquickcontrols2universalstyleplugin
classname QtQuickControls2UniversalStylePlugin
-depends QtQuick.Controls 2.2
+depends QtQuick.Controls 2.3
diff --git a/src/imports/controls/universal/qquickuniversalstyle.cpp b/src/imports/controls/universal/qquickuniversalstyle.cpp
index c581a784..157d5ddb 100644
--- a/src/imports/controls/universal/qquickuniversalstyle.cpp
+++ b/src/imports/controls/universal/qquickuniversalstyle.cpp
@@ -39,7 +39,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qsettings.h>
#include <QtQml/qqmlinfo.h>
-#include <QtQuickControls2/private/qquickstyleattached_p.h>
+#include <QtQuickControls2/private/qquickstyle_p.h>
QT_BEGIN_NAMESPACE
@@ -132,12 +132,10 @@ static QRgb qquickuniversal_accent_color(QQuickUniversalStyle::Color accent)
return colors[accent];
}
-extern bool qt_is_dark_system_theme();
-
static QQuickUniversalStyle::Theme qquickuniversal_effective_theme(QQuickUniversalStyle::Theme theme)
{
if (theme == QQuickUniversalStyle::System)
- theme = qt_is_dark_system_theme() ? QQuickUniversalStyle::Dark : QQuickUniversalStyle::Light;
+ theme = QQuickStylePrivate::isDarkSystemTheme() ? QQuickUniversalStyle::Dark : QQuickUniversalStyle::Light;
return theme;
}
@@ -153,7 +151,7 @@ static QRgb GlobalBackground = qquickuniversal_light_color(QQuickUniversalStyle:
static bool HasGlobalForeground = false;
static bool HasGlobalBackground = false;
-QQuickUniversalStyle::QQuickUniversalStyle(QObject *parent) : QQuickStyleAttached(parent),
+QQuickUniversalStyle::QQuickUniversalStyle(QObject *parent) : QQuickAttachedObject(parent),
m_explicitTheme(false), m_explicitAccent(false), m_explicitForeground(false), m_explicitBackground(false),
m_hasForeground(HasGlobalForeground), m_hasBackground(HasGlobalBackground), m_theme(GlobalTheme),
m_accent(GlobalAccent), m_foreground(GlobalForeground), m_background(GlobalBackground)
@@ -201,8 +199,8 @@ void QQuickUniversalStyle::inheritTheme(Theme theme)
void QQuickUniversalStyle::propagateTheme()
{
- const auto styles = childStyles();
- for (QQuickStyleAttached *child : styles) {
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child : styles) {
QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(child);
if (universal)
universal->inheritTheme(m_theme);
@@ -215,7 +213,7 @@ void QQuickUniversalStyle::resetTheme()
return;
m_explicitTheme = false;
- QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(parentStyle());
+ QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(attachedParent());
inheritTheme(universal ? universal->theme() : GlobalTheme);
}
@@ -251,8 +249,8 @@ void QQuickUniversalStyle::inheritAccent(QRgb accent)
void QQuickUniversalStyle::propagateAccent()
{
- const auto styles = childStyles();
- for (QQuickStyleAttached *child : styles) {
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child : styles) {
QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(child);
if (universal)
universal->inheritAccent(m_accent);
@@ -265,7 +263,7 @@ void QQuickUniversalStyle::resetAccent()
return;
m_explicitAccent = false;
- QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(parentStyle());
+ QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(attachedParent());
inheritAccent(universal ? universal->m_accent : GlobalAccent);
}
@@ -305,8 +303,8 @@ void QQuickUniversalStyle::inheritForeground(QRgb foreground, bool has)
void QQuickUniversalStyle::propagateForeground()
{
- const auto styles = childStyles();
- for (QQuickStyleAttached *child : styles) {
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child : styles) {
QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(child);
if (universal)
universal->inheritForeground(m_foreground, m_hasForeground);
@@ -320,7 +318,7 @@ void QQuickUniversalStyle::resetForeground()
m_hasForeground = false;
m_explicitForeground = false;
- QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(parentStyle());
+ QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(attachedParent());
inheritForeground(universal ? universal->m_foreground : GlobalForeground, universal ? universal->m_hasForeground : false);
}
@@ -360,8 +358,8 @@ void QQuickUniversalStyle::inheritBackground(QRgb background, bool has)
void QQuickUniversalStyle::propagateBackground()
{
- const auto styles = childStyles();
- for (QQuickStyleAttached *child : styles) {
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child : styles) {
QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(child);
if (universal)
universal->inheritBackground(m_background, m_hasBackground);
@@ -375,7 +373,7 @@ void QQuickUniversalStyle::resetBackground()
m_hasBackground = false;
m_explicitBackground = false;
- QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(parentStyle());
+ QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(attachedParent());
inheritBackground(universal ? universal->m_background : GlobalBackground, universal ? universal->m_hasBackground : false);
}
@@ -509,7 +507,7 @@ QColor QQuickUniversalStyle::systemColor(SystemColor role) const
return QColor::fromRgba(m_theme == QQuickUniversalStyle::Dark ? qquickuniversal_dark_color(role) : qquickuniversal_light_color(role));
}
-void QQuickUniversalStyle::parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent)
+void QQuickUniversalStyle::attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent)
{
Q_UNUSED(oldParent);
QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(newParent);
@@ -542,7 +540,7 @@ void QQuickUniversalStyle::init()
{
static bool globalsInitialized = false;
if (!globalsInitialized) {
- QSharedPointer<QSettings> settings = QQuickStyleAttached::settings(QStringLiteral("Universal"));
+ QSharedPointer<QSettings> settings = QQuickStylePrivate::settings(QStringLiteral("Universal"));
bool ok = false;
QByteArray themeValue = resolveSetting("QT_QUICK_CONTROLS_UNIVERSAL_THEME", settings, QStringLiteral("Theme"));
@@ -597,7 +595,7 @@ void QQuickUniversalStyle::init()
globalsInitialized = true;
}
- QQuickStyleAttached::init(); // TODO: lazy init?
+ QQuickAttachedObject::init(); // TODO: lazy init?
}
bool QQuickUniversalStyle::variantToRgba(const QVariant &var, const char *name, QRgb *rgba) const
diff --git a/src/imports/controls/universal/qquickuniversalstyle_p.h b/src/imports/controls/universal/qquickuniversalstyle_p.h
index 508e8297..196048ef 100644
--- a/src/imports/controls/universal/qquickuniversalstyle_p.h
+++ b/src/imports/controls/universal/qquickuniversalstyle_p.h
@@ -49,13 +49,13 @@
//
#include <QtGui/qcolor.h>
-#include <QtQuickControls2/private/qquickstyleattached_p.h>
+#include <QtQuickControls2/private/qquickattachedobject_p.h>
QT_BEGIN_NAMESPACE
class QQuickUniversalStylePrivate;
-class QQuickUniversalStyle : public QQuickStyleAttached
+class QQuickUniversalStyle : public QQuickAttachedObject
{
Q_OBJECT
Q_PROPERTY(Theme theme READ theme WRITE setTheme RESET resetTheme NOTIFY themeChanged FINAL)
@@ -208,7 +208,7 @@ Q_SIGNALS:
void paletteChanged();
protected:
- void parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent) override;
+ void attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent) override;
private:
void init();
diff --git a/src/imports/controls/universal/qquickuniversaltheme.cpp b/src/imports/controls/universal/qquickuniversaltheme.cpp
index a7bcbb8c..549840b6 100644
--- a/src/imports/controls/universal/qquickuniversaltheme.cpp
+++ b/src/imports/controls/universal/qquickuniversaltheme.cpp
@@ -41,8 +41,8 @@
QT_BEGIN_NAMESPACE
-QQuickUniversalTheme::QQuickUniversalTheme(QPlatformTheme *theme)
- : QQuickProxyTheme(theme)
+QQuickUniversalTheme::QQuickUniversalTheme()
+ : QQuickTheme(QStringLiteral("Universal"))
{
const QFont font(QLatin1String("Segoe UI"));
if (QFontInfo(font).family() == QLatin1String("Segoe UI")) {
@@ -53,12 +53,15 @@ QQuickUniversalTheme::QQuickUniversalTheme(QPlatformTheme *theme)
}
systemFont.setPixelSize(15);
+ systemFont = resolveFont(systemFont);
groupBoxTitleFont.setPixelSize(15);
groupBoxTitleFont.setWeight(QFont::DemiBold);
+ groupBoxTitleFont = resolveFont(groupBoxTitleFont);
tabButtonFont.setPixelSize(24);
tabButtonFont.setWeight(QFont::Light);
+ tabButtonFont = resolveFont(tabButtonFont);
}
const QFont *QQuickUniversalTheme::font(QPlatformTheme::Font type) const
diff --git a/src/imports/controls/universal/qquickuniversaltheme_p.h b/src/imports/controls/universal/qquickuniversaltheme_p.h
index 3ac32598..f15dee3e 100644
--- a/src/imports/controls/universal/qquickuniversaltheme_p.h
+++ b/src/imports/controls/universal/qquickuniversaltheme_p.h
@@ -49,14 +49,14 @@
//
#include <QtGui/qfont.h>
-#include <QtQuickControls2/private/qquickproxytheme_p.h>
+#include <QtQuickControls2/private/qquicktheme_p.h>
QT_BEGIN_NAMESPACE
-class QQuickUniversalTheme : public QQuickProxyTheme
+class QQuickUniversalTheme : public QQuickTheme
{
public:
- explicit QQuickUniversalTheme(QPlatformTheme *theme = nullptr);
+ explicit QQuickUniversalTheme();
const QFont *font(Font type = SystemFont) const override;
diff --git a/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp b/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp
index 017a1aad..55255181 100644
--- a/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp
+++ b/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp
@@ -42,8 +42,6 @@
#include "qquickuniversalstyle_p.h"
#include "qquickuniversaltheme_p.h"
-#include <QtQuickControls2/private/qquickcolorimageprovider_p.h>
-
static inline void initResources()
{
Q_INIT_RESOURCE(qtquickcontrols2universalstyleplugin);
@@ -84,8 +82,6 @@ void QtQuickControls2UniversalStylePlugin::initializeEngine(QQmlEngine *engine,
{
QQuickStylePlugin::initializeEngine(engine, uri);
- engine->addImageProvider(name(), new QQuickColorImageProvider(QStringLiteral(":/qt-project.org/imports/QtQuick/Controls.2/Universal/images")));
-
QByteArray import = QByteArray(uri) + ".impl";
qmlRegisterModule(import, 2, QT_VERSION_MINOR - 7); // Qt 5.7->2.0, 5.8->2.1, 5.9->2.2...
diff --git a/src/imports/controls/universal/universal.pri b/src/imports/controls/universal/universal.pri
index c80a2dfc..33d0dcb0 100644
--- a/src/imports/controls/universal/universal.pri
+++ b/src/imports/controls/universal/universal.pri
@@ -16,6 +16,8 @@ QML_FILES += \
$$PWD/ItemDelegate.qml \
$$PWD/Label.qml \
$$PWD/Menu.qml \
+ $$PWD/MenuBar.qml \
+ $$PWD/MenuBarItem.qml \
$$PWD/MenuItem.qml \
$$PWD/MenuSeparator.qml \
$$PWD/Page.qml \
diff --git a/src/imports/controls/universal/universal.pro b/src/imports/controls/universal/universal.pro
index e1b61c04..016fa085 100644
--- a/src/imports/controls/universal/universal.pro
+++ b/src/imports/controls/universal/universal.pro
@@ -1,6 +1,6 @@
TARGET = qtquickcontrols2universalstyleplugin
TARGETPATH = QtQuick/Controls.2/Universal
-IMPORT_VERSION = 2.2
+IMPORT_VERSION = 2.3
QT += qml quick
QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
index e1da66c9..e32bded7 100644
--- a/src/imports/imports.pro
+++ b/src/imports/imports.pro
@@ -6,5 +6,7 @@ SUBDIRS += \
templates
SUBDIRS += \
+ controls/fusion/fusion.pro \
+ controls/imagine/imagine.pro \
controls/material/material.pro \
controls/universal/universal.pro
diff --git a/src/imports/platform/widgets/qwidgetplatformmenu.cpp b/src/imports/platform/widgets/qwidgetplatformmenu.cpp
index 1aacb0ff..e5fe734f 100644
--- a/src/imports/platform/widgets/qwidgetplatformmenu.cpp
+++ b/src/imports/platform/widgets/qwidgetplatformmenu.cpp
@@ -44,7 +44,7 @@
QT_BEGIN_NAMESPACE
QWidgetPlatformMenu::QWidgetPlatformMenu(QObject *parent)
- : m_tag(reinterpret_cast<quintptr>(this)), m_menu(new QMenu)
+ : m_menu(new QMenu)
{
setParent(parent);
@@ -95,16 +95,6 @@ void QWidgetPlatformMenu::syncSeparatorsCollapsible(bool enable)
m_menu->setSeparatorsCollapsible(enable);
}
-quintptr QWidgetPlatformMenu::tag() const
-{
- return m_tag;
-}
-
-void QWidgetPlatformMenu::setTag(quintptr tag)
-{
- m_tag = tag;
-}
-
void QWidgetPlatformMenu::setText(const QString &text)
{
m_menu->setTitle(text);
diff --git a/src/imports/platform/widgets/qwidgetplatformmenu_p.h b/src/imports/platform/widgets/qwidgetplatformmenu_p.h
index 1df9ef78..4d58f528 100644
--- a/src/imports/platform/widgets/qwidgetplatformmenu_p.h
+++ b/src/imports/platform/widgets/qwidgetplatformmenu_p.h
@@ -70,9 +70,6 @@ public:
void syncMenuItem(QPlatformMenuItem *item) override;
void syncSeparatorsCollapsible(bool enable) override;
- quintptr tag()const override;
- void setTag(quintptr tag) override;
-
void setText(const QString &text) override;
void setIcon(const QIcon &icon) override;
void setEnabled(bool enabled) override;
@@ -92,7 +89,6 @@ public:
QPlatformMenu *createSubMenu() const override;
private:
- quintptr m_tag;
QScopedPointer<QMenu> m_menu;
QVector<QWidgetPlatformMenuItem *> m_items;
};
diff --git a/src/imports/platform/widgets/qwidgetplatformmenuitem.cpp b/src/imports/platform/widgets/qwidgetplatformmenuitem.cpp
index 8519c899..9de899f2 100644
--- a/src/imports/platform/widgets/qwidgetplatformmenuitem.cpp
+++ b/src/imports/platform/widgets/qwidgetplatformmenuitem.cpp
@@ -43,7 +43,7 @@
QT_BEGIN_NAMESPACE
QWidgetPlatformMenuItem::QWidgetPlatformMenuItem(QObject *parent)
- : m_tag(reinterpret_cast<quintptr>(this)), m_action(new QAction)
+ : m_action(new QAction)
{
setParent(parent);
connect(m_action.data(), &QAction::hovered, this, &QPlatformMenuItem::hovered);
@@ -59,16 +59,6 @@ QAction *QWidgetPlatformMenuItem::action() const
return m_action.data();
}
-quintptr QWidgetPlatformMenuItem::tag() const
-{
- return m_tag;
-}
-
-void QWidgetPlatformMenuItem::setTag(quintptr tag)
-{
- m_tag = tag;
-}
-
void QWidgetPlatformMenuItem::setText(const QString &text)
{
m_action->setText(text);
diff --git a/src/imports/platform/widgets/qwidgetplatformmenuitem_p.h b/src/imports/platform/widgets/qwidgetplatformmenuitem_p.h
index 752f8a03..43b3fc17 100644
--- a/src/imports/platform/widgets/qwidgetplatformmenuitem_p.h
+++ b/src/imports/platform/widgets/qwidgetplatformmenuitem_p.h
@@ -64,9 +64,6 @@ public:
QAction *action() const;
- quintptr tag()const override;
- void setTag(quintptr tag) override;
-
void setText(const QString &text) override;
void setIcon(const QIcon &icon) override;
void setMenu(QPlatformMenu *menu) override;
@@ -83,7 +80,6 @@ public:
void setIconSize(int size) override;
private:
- quintptr m_tag;
QScopedPointer<QAction> m_action;
};
diff --git a/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc b/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc
index 19725fa4..52796425 100644
--- a/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc
+++ b/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule QtQuick.Templates 2.2
+ \qmlmodule QtQuick.Templates 2.3
\title Qt Quick Templates 2 QML Types
\ingroup qmlmodules
\brief Provides QML types for templates (Qt Quick Templates).
@@ -38,7 +38,7 @@
\c .qml file:
\badcode
- import QtQuick.Templates 2.2 as T
+ import QtQuick.Templates 2.3 as T
\endcode
For the sake of clarity, there is a one-to-one mapping between the types
diff --git a/src/imports/templates/plugins.qmltypes b/src/imports/templates/plugins.qmltypes
index 712cf3b6..b951182f 100644
--- a/src/imports/templates/plugins.qmltypes
+++ b/src/imports/templates/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Templates 2.2'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Templates 2.3'
Module {
dependencies: ["QtQuick 2.9", "QtQuick.Window 2.2"]
@@ -14,9 +14,19 @@ Module {
prototype: "QQuickControl"
exports: [
"QtQuick.Templates/AbstractButton 2.0",
- "QtQuick.Templates/AbstractButton 2.2"
+ "QtQuick.Templates/AbstractButton 2.2",
+ "QtQuick.Templates/AbstractButton 2.3"
]
- exportMetaObjectRevisions: [0, 2]
+ exportMetaObjectRevisions: [0, 2, 3]
+ Enum {
+ name: "Display"
+ values: {
+ "IconOnly": 0,
+ "TextOnly": 1,
+ "TextBesideIcon": 2,
+ "TextUnderIcon": 3
+ }
+ }
Property { name: "text"; type: "string" }
Property { name: "down"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
@@ -24,21 +34,115 @@ Module {
Property { name: "checkable"; type: "bool" }
Property { name: "autoExclusive"; type: "bool" }
Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
+ Property { name: "icon"; revision: 3; type: "QQuickIcon" }
+ Property { name: "display"; revision: 3; type: "Display" }
+ Property { name: "action"; revision: 3; type: "QQuickAction"; isPointer: true }
Signal { name: "pressed" }
Signal { name: "released" }
Signal { name: "canceled" }
Signal { name: "clicked" }
- Signal { name: "toggled"; revision: 2 }
Signal { name: "pressAndHold" }
Signal { name: "doubleClicked" }
+ Signal { name: "toggled"; revision: 2 }
+ Signal { name: "iconChanged"; revision: 3 }
+ Signal { name: "displayChanged"; revision: 3 }
+ Signal { name: "actionChanged"; revision: 3 }
Method { name: "toggle" }
}
Component {
+ name: "QQuickAction"
+ prototype: "QObject"
+ exports: ["QtQuick.Templates/Action 2.3"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "text"; type: "string" }
+ Property { name: "icon"; type: "QQuickIcon" }
+ Property { name: "enabled"; type: "bool" }
+ Property { name: "checked"; type: "bool" }
+ Property { name: "checkable"; type: "bool" }
+ Property { name: "shortcut"; type: "QVariant" }
+ Signal {
+ name: "textChanged"
+ Parameter { name: "text"; type: "string" }
+ }
+ Signal {
+ name: "iconChanged"
+ Parameter { name: "icon"; type: "QQuickIcon" }
+ }
+ Signal {
+ name: "enabledChanged"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Signal {
+ name: "checkedChanged"
+ Parameter { name: "checked"; type: "bool" }
+ }
+ Signal {
+ name: "checkableChanged"
+ Parameter { name: "checkable"; type: "bool" }
+ }
+ Signal {
+ name: "shortcutChanged"
+ Parameter { name: "shortcut"; type: "QKeySequence" }
+ }
+ Signal {
+ name: "toggled"
+ Parameter { name: "source"; type: "QObject"; isPointer: true }
+ }
+ Signal { name: "toggled" }
+ Signal {
+ name: "triggered"
+ Parameter { name: "source"; type: "QObject"; isPointer: true }
+ }
+ Signal { name: "triggered" }
+ Method {
+ name: "toggle"
+ Parameter { name: "source"; type: "QObject"; isPointer: true }
+ }
+ Method { name: "toggle" }
+ Method {
+ name: "trigger"
+ Parameter { name: "source"; type: "QObject"; isPointer: true }
+ }
+ Method { name: "trigger" }
+ }
+ Component {
+ name: "QQuickActionGroup"
+ defaultProperty: "actions"
+ prototype: "QObject"
+ exports: ["QtQuick.Templates/ActionGroup 2.3"]
+ exportMetaObjectRevisions: [0]
+ attachedType: "QQuickActionGroupAttached"
+ Property { name: "checkedAction"; type: "QQuickAction"; isPointer: true }
+ Property { name: "actions"; type: "QQuickAction"; isList: true; isReadonly: true }
+ Property { name: "exclusive"; type: "bool" }
+ Property { name: "enabled"; type: "bool" }
+ Signal {
+ name: "triggered"
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
+ }
+ Method {
+ name: "addAction"
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
+ }
+ Method {
+ name: "removeAction"
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QQuickActionGroupAttached"
+ prototype: "QObject"
+ Property { name: "group"; type: "QQuickActionGroup"; isPointer: true }
+ }
+ Component {
name: "QQuickApplicationWindow"
defaultProperty: "contentData"
prototype: "QQuickWindowQmlImpl"
- exports: ["QtQuick.Templates/ApplicationWindow 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/ApplicationWindow 2.0",
+ "QtQuick.Templates/ApplicationWindow 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
attachedType: "QQuickApplicationWindowAttached"
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
@@ -49,6 +153,10 @@ Module {
Property { name: "overlay"; type: "QQuickOverlay"; isReadonly: true; isPointer: true }
Property { name: "font"; type: "QFont" }
Property { name: "locale"; type: "QLocale" }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
+ Property { name: "menuBar"; revision: 3; type: "QQuickItem"; isPointer: true }
+ Signal { name: "paletteChanged"; revision: 3 }
+ Signal { name: "menuBarChanged"; revision: 3 }
}
Component {
name: "QQuickApplicationWindowAttached"
@@ -59,6 +167,7 @@ Module {
Property { name: "header"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "overlay"; type: "QQuickOverlay"; isReadonly: true; isPointer: true }
+ Property { name: "menuBar"; type: "QQuickItem"; isReadonly: true; isPointer: true }
}
Component {
name: "QQuickBusyIndicator"
@@ -83,17 +192,20 @@ Module {
prototype: "QObject"
exports: [
"QtQuick.Templates/ButtonGroup 2.0",
- "QtQuick.Templates/ButtonGroup 2.1"
+ "QtQuick.Templates/ButtonGroup 2.1",
+ "QtQuick.Templates/ButtonGroup 2.3"
]
- exportMetaObjectRevisions: [0, 1]
+ exportMetaObjectRevisions: [0, 1, 3]
attachedType: "QQuickButtonGroupAttached"
Property { name: "checkedButton"; type: "QQuickAbstractButton"; isPointer: true }
Property { name: "buttons"; type: "QQuickAbstractButton"; isList: true; isReadonly: true }
+ Property { name: "exclusive"; revision: 3; type: "bool" }
Signal {
name: "clicked"
revision: 1
Parameter { name: "button"; type: "QQuickAbstractButton"; isPointer: true }
}
+ Signal { name: "exclusiveChanged"; revision: 3 }
Method {
name: "addButton"
Parameter { name: "button"; type: "QQuickAbstractButton"; isPointer: true }
@@ -139,31 +251,23 @@ Module {
Property { name: "count"; type: "int"; isReadonly: true }
Property { name: "model"; type: "QVariant" }
Property { name: "delegateModel"; type: "QQmlInstanceModel"; isReadonly: true; isPointer: true }
- Property { name: "editable"; revision: 2; type: "bool" }
- Property { name: "flat"; revision: 1; type: "bool" }
- Property { name: "down"; revision: 2; type: "bool" }
Property { name: "pressed"; type: "bool" }
Property { name: "highlightedIndex"; type: "int"; isReadonly: true }
Property { name: "currentIndex"; type: "int" }
Property { name: "currentText"; type: "string"; isReadonly: true }
Property { name: "displayText"; type: "string" }
- Property { name: "editText"; revision: 2; type: "string" }
Property { name: "textRole"; type: "string" }
Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
Property { name: "popup"; type: "QQuickPopup"; isPointer: true }
+ Property { name: "flat"; revision: 1; type: "bool" }
+ Property { name: "down"; revision: 2; type: "bool" }
+ Property { name: "editable"; revision: 2; type: "bool" }
+ Property { name: "editText"; revision: 2; type: "string" }
Property { name: "validator"; revision: 2; type: "QValidator"; isPointer: true }
Property { name: "inputMethodHints"; revision: 2; type: "Qt::InputMethodHints" }
Property { name: "inputMethodComposing"; revision: 2; type: "bool"; isReadonly: true }
Property { name: "acceptableInput"; revision: 2; type: "bool"; isReadonly: true }
- Signal { name: "editableChanged"; revision: 2 }
- Signal { name: "flatChanged"; revision: 1 }
- Signal { name: "downChanged"; revision: 2 }
- Signal { name: "editTextChanged"; revision: 2 }
- Signal { name: "validatorChanged"; revision: 2 }
- Signal { name: "inputMethodHintsChanged"; revision: 2 }
- Signal { name: "inputMethodComposingChanged"; revision: 2 }
- Signal { name: "acceptableInputChanged"; revision: 2 }
Signal {
name: "activated"
Parameter { name: "index"; type: "int" }
@@ -172,7 +276,15 @@ Module {
name: "highlighted"
Parameter { name: "index"; type: "int" }
}
+ Signal { name: "flatChanged"; revision: 1 }
Signal { name: "accepted"; revision: 2 }
+ Signal { name: "downChanged"; revision: 2 }
+ Signal { name: "editableChanged"; revision: 2 }
+ Signal { name: "editTextChanged"; revision: 2 }
+ Signal { name: "validatorChanged"; revision: 2 }
+ Signal { name: "inputMethodHintsChanged"; revision: 2 }
+ Signal { name: "inputMethodComposingChanged"; revision: 2 }
+ Signal { name: "acceptableInputChanged"; revision: 2 }
Method { name: "incrementCurrentIndex" }
Method { name: "decrementCurrentIndex" }
Method { name: "selectAll"; revision: 2 }
@@ -199,9 +311,10 @@ Module {
prototype: "QQuickControl"
exports: [
"QtQuick.Templates/Container 2.0",
- "QtQuick.Templates/Container 2.1"
+ "QtQuick.Templates/Container 2.1",
+ "QtQuick.Templates/Container 2.3"
]
- exportMetaObjectRevisions: [0, 1]
+ exportMetaObjectRevisions: [0, 1, 3]
Property { name: "count"; type: "int"; isReadonly: true }
Property { name: "contentModel"; type: "QVariant"; isReadonly: true }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
@@ -235,6 +348,12 @@ Module {
}
Method {
name: "removeItem"
+ Parameter { name: "item"; type: "QVariant" }
+ }
+ Method {
+ name: "takeItem"
+ revision: 3
+ type: "QQuickItem*"
Parameter { name: "index"; type: "int" }
}
}
@@ -242,8 +361,11 @@ Module {
name: "QQuickControl"
defaultProperty: "data"
prototype: "QQuickItem"
- exports: ["QtQuick.Templates/Control 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/Control 2.0",
+ "QtQuick.Templates/Control 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
Property { name: "font"; type: "QFont" }
Property { name: "availableWidth"; type: "double"; isReadonly: true }
Property { name: "availableHeight"; type: "double"; isReadonly: true }
@@ -263,6 +385,8 @@ Module {
Property { name: "wheelEnabled"; type: "bool" }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
+ Signal { name: "paletteChanged"; revision: 3 }
}
Component {
name: "QQuickDelayButton"
@@ -298,10 +422,10 @@ Module {
Property { name: "snapMode"; type: "SnapMode" }
Property { name: "wrap"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
- Property { name: "live"; revision: 2; type: "bool" }
Property { name: "handle"; type: "QQuickItem"; isPointer: true }
- Signal { name: "liveChanged"; revision: 2 }
+ Property { name: "live"; revision: 2; type: "bool" }
Signal { name: "moved"; revision: 2 }
+ Signal { name: "liveChanged"; revision: 2 }
Method { name: "increase" }
Method { name: "decrease" }
}
@@ -309,23 +433,52 @@ Module {
name: "QQuickDialog"
defaultProperty: "contentData"
prototype: "QQuickPopup"
- exports: ["QtQuick.Templates/Dialog 2.1"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/Dialog 2.1",
+ "QtQuick.Templates/Dialog 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
+ Enum {
+ name: "StandardCode"
+ values: {
+ "Rejected": 0,
+ "Accepted": 1
+ }
+ }
Property { name: "title"; type: "string" }
Property { name: "header"; type: "QQuickItem"; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isPointer: true }
Property { name: "standardButtons"; type: "QPlatformDialogHelper::StandardButtons" }
+ Property { name: "result"; revision: 3; type: "int" }
Signal { name: "accepted" }
Signal { name: "rejected" }
+ Signal { name: "applied"; revision: 3 }
+ Signal { name: "reset"; revision: 3 }
+ Signal { name: "discarded"; revision: 3 }
+ Signal { name: "helpRequested"; revision: 3 }
+ Signal { name: "resultChanged"; revision: 3 }
Method { name: "accept" }
Method { name: "reject" }
+ Method {
+ name: "done"
+ Parameter { name: "result"; type: "int" }
+ }
+ Method {
+ name: "standardButton"
+ revision: 3
+ type: "QQuickAbstractButton*"
+ Parameter { name: "button"; type: "QPlatformDialogHelper::StandardButton" }
+ }
}
Component {
name: "QQuickDialogButtonBox"
defaultProperty: "contentData"
prototype: "QQuickContainer"
- exports: ["QtQuick.Templates/DialogButtonBox 2.1"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/DialogButtonBox 2.1",
+ "QtQuick.Templates/DialogButtonBox 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
attachedType: "QQuickDialogButtonBoxAttached"
Enum {
name: "Position"
@@ -341,6 +494,9 @@ Module {
Signal { name: "accepted" }
Signal { name: "rejected" }
Signal { name: "helpRequested" }
+ Signal { name: "applied"; revision: 3 }
+ Signal { name: "reset"; revision: 3 }
+ Signal { name: "discarded"; revision: 3 }
Signal {
name: "clicked"
Parameter { name: "button"; type: "QQuickAbstractButton"; isPointer: true }
@@ -404,16 +560,36 @@ Module {
exportMetaObjectRevisions: [0]
Property { name: "font"; type: "QFont" }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
+ Signal { name: "paletteChanged"; revision: 3 }
}
Component {
name: "QQuickMenu"
defaultProperty: "contentData"
prototype: "QQuickPopup"
- exports: ["QtQuick.Templates/Menu 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtQuick.Templates/Menu 2.0", "QtQuick.Templates/Menu 2.3"]
+ exportMetaObjectRevisions: [0, 3]
+ Property { name: "count"; revision: 3; type: "int"; isReadonly: true }
Property { name: "contentModel"; type: "QVariant"; isReadonly: true }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "title"; type: "string" }
+ Property { name: "cascade"; revision: 3; type: "bool" }
+ Property { name: "overlap"; revision: 3; type: "double" }
+ Property { name: "delegate"; revision: 3; type: "QQmlComponent"; isPointer: true }
+ Property { name: "currentIndex"; revision: 3; type: "int" }
+ Signal { name: "countChanged"; revision: 3 }
+ Signal {
+ name: "titleChanged"
+ Parameter { name: "title"; type: "string" }
+ }
+ Signal {
+ name: "cascadeChanged"
+ revision: 3
+ Parameter { name: "cascade"; type: "bool" }
+ }
+ Signal { name: "overlapChanged"; revision: 3 }
+ Signal { name: "delegateChanged"; revision: 3 }
+ Signal { name: "currentIndexChanged"; revision: 3 }
Method {
name: "itemAt"
type: "QQuickItem*"
@@ -435,17 +611,140 @@ Module {
}
Method {
name: "removeItem"
+ Parameter { name: "item"; type: "QVariant" }
+ }
+ Method {
+ name: "takeItem"
+ revision: 3
+ type: "QQuickItem*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "menuAt"
+ revision: 3
+ type: "QQuickMenu*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "addMenu"
+ revision: 3
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "insertMenu"
+ revision: 3
+ Parameter { name: "index"; type: "int" }
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "removeMenu"
+ revision: 3
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "takeMenu"
+ revision: 3
+ type: "QQuickMenu*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "actionAt"
+ revision: 3
+ type: "QQuickAction*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "addAction"
+ revision: 3
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
+ }
+ Method {
+ name: "insertAction"
+ revision: 3
Parameter { name: "index"; type: "int" }
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
}
+ Method {
+ name: "removeAction"
+ revision: 3
+ Parameter { name: "action"; type: "QQuickAction"; isPointer: true }
+ }
+ Method {
+ name: "takeAction"
+ revision: 3
+ type: "QQuickAction*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "popup"
+ revision: 3
+ Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true }
+ }
+ Method { name: "dismiss"; revision: 3 }
}
Component {
- name: "QQuickMenuItem"
+ name: "QQuickMenuBar"
+ defaultProperty: "contentData"
+ prototype: "QQuickContainer"
+ exports: ["QtQuick.Templates/MenuBar 2.3"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "contentWidth"; type: "double" }
+ Property { name: "contentHeight"; type: "double" }
+ Property { name: "menus"; type: "QQuickMenu"; isList: true; isReadonly: true }
+ Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
+ Method {
+ name: "menuAt"
+ type: "QQuickMenu*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "addMenu"
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "insertMenu"
+ Parameter { name: "index"; type: "int" }
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "removeMenu"
+ Parameter { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ }
+ Method {
+ name: "takeMenu"
+ type: "QQuickMenu*"
+ Parameter { name: "index"; type: "int" }
+ }
+ }
+ Component {
+ name: "QQuickMenuBarItem"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
- exports: ["QtQuick.Templates/MenuItem 2.0"]
+ exports: ["QtQuick.Templates/MenuBarItem 2.3"]
exportMetaObjectRevisions: [0]
+ Property { name: "menuBar"; type: "QQuickMenuBar"; isReadonly: true; isPointer: true }
+ Property { name: "menu"; type: "QQuickMenu"; isPointer: true }
+ Property { name: "highlighted"; type: "bool" }
+ Signal { name: "triggered" }
+ }
+ Component {
+ name: "QQuickMenuItem"
+ defaultProperty: "data"
+ prototype: "QQuickAbstractButton"
+ exports: [
+ "QtQuick.Templates/MenuItem 2.0",
+ "QtQuick.Templates/MenuItem 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
Property { name: "highlighted"; type: "bool" }
+ Property { name: "arrow"; revision: 3; type: "QQuickItem"; isPointer: true }
+ Property { name: "menu"; revision: 3; type: "QQuickMenu"; isReadonly: true; isPointer: true }
+ Property { name: "subMenu"; revision: 3; type: "QQuickMenu"; isReadonly: true; isPointer: true }
Signal { name: "triggered" }
+ Signal { name: "arrowChanged"; revision: 3 }
+ Signal { name: "menuChanged"; revision: 3 }
+ Signal { name: "subMenuChanged"; revision: 3 }
}
Component {
name: "QQuickMenuSeparator"
@@ -458,6 +757,19 @@ Module {
name: "QQuickOverlay"
defaultProperty: "data"
prototype: "QQuickItem"
+ exports: ["QtQuick.Templates/Overlay 2.3"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ attachedType: "QQuickOverlayAttached"
+ Property { name: "modal"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "modeless"; type: "QQmlComponent"; isPointer: true }
+ Signal { name: "pressed" }
+ Signal { name: "released" }
+ }
+ Component {
+ name: "QQuickOverlayAttached"
+ prototype: "QObject"
+ Property { name: "overlay"; type: "QQuickOverlay"; isReadonly: true; isPointer: true }
Property { name: "modal"; type: "QQmlComponent"; isPointer: true }
Property { name: "modeless"; type: "QQmlComponent"; isPointer: true }
Signal { name: "pressed" }
@@ -472,10 +784,10 @@ Module {
Property { name: "title"; type: "string" }
Property { name: "header"; type: "QQuickItem"; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isPointer: true }
- Property { name: "contentWidth"; revision: 1; type: "double" }
- Property { name: "contentHeight"; revision: 1; type: "double" }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "contentChildren"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Property { name: "contentWidth"; revision: 1; type: "double" }
+ Property { name: "contentHeight"; revision: 1; type: "double" }
Signal { name: "contentWidthChanged"; revision: 1 }
Signal { name: "contentHeightChanged"; revision: 1 }
}
@@ -507,9 +819,10 @@ Module {
prototype: "QObject"
exports: [
"QtQuick.Templates/Popup 2.0",
- "QtQuick.Templates/Popup 2.1"
+ "QtQuick.Templates/Popup 2.1",
+ "QtQuick.Templates/Popup 2.3"
]
- exportMetaObjectRevisions: [0, 1]
+ exportMetaObjectRevisions: [0, 1, 3]
Enum {
name: "ClosePolicy"
values: {
@@ -546,7 +859,6 @@ Module {
Property { name: "contentHeight"; type: "double" }
Property { name: "availableWidth"; type: "double"; isReadonly: true }
Property { name: "availableHeight"; type: "double"; isReadonly: true }
- Property { name: "spacing"; revision: 1; type: "double" }
Property { name: "margins"; type: "double" }
Property { name: "topMargin"; type: "double" }
Property { name: "leftMargin"; type: "double" }
@@ -558,7 +870,9 @@ Module {
Property { name: "rightPadding"; type: "double" }
Property { name: "bottomPadding"; type: "double" }
Property { name: "locale"; type: "QLocale" }
+ Property { name: "mirrored"; revision: 3; type: "bool"; isReadonly: true }
Property { name: "font"; type: "QFont" }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
Property { name: "parent"; type: "QQuickItem"; isPointer: true }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
@@ -570,21 +884,28 @@ Module {
Property { name: "modal"; type: "bool" }
Property { name: "dim"; type: "bool" }
Property { name: "visible"; type: "bool" }
+ Property { name: "enabled"; revision: 3; type: "bool" }
+ Property { name: "opened"; revision: 3; type: "bool"; isReadonly: true }
Property { name: "opacity"; type: "double" }
Property { name: "scale"; type: "double" }
Property { name: "closePolicy"; type: "ClosePolicy" }
Property { name: "transformOrigin"; type: "TransformOrigin" }
Property { name: "enter"; type: "QQuickTransition"; isPointer: true }
Property { name: "exit"; type: "QQuickTransition"; isPointer: true }
- Signal { name: "spacingChanged"; revision: 1 }
+ Property { name: "spacing"; revision: 1; type: "double" }
+ Signal { name: "opened" }
+ Signal { name: "closed" }
+ Signal { name: "aboutToShow" }
+ Signal { name: "aboutToHide" }
+ Signal { name: "mirroredChanged"; revision: 3 }
+ Signal { name: "paletteChanged"; revision: 3 }
+ Signal { name: "enabledChanged"; revision: 3 }
+ Signal { name: "openedChanged"; revision: 3 }
Signal {
name: "windowChanged"
Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
}
- Signal { name: "aboutToShow" }
- Signal { name: "aboutToHide" }
- Signal { name: "opened" }
- Signal { name: "closed" }
+ Signal { name: "spacingChanged"; revision: 1 }
Method { name: "open" }
Method { name: "close" }
Method {
@@ -627,9 +948,10 @@ Module {
exports: [
"QtQuick.Templates/RangeSlider 2.0",
"QtQuick.Templates/RangeSlider 2.1",
- "QtQuick.Templates/RangeSlider 2.2"
+ "QtQuick.Templates/RangeSlider 2.2",
+ "QtQuick.Templates/RangeSlider 2.3"
]
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Enum {
name: "SnapMode"
values: {
@@ -646,6 +968,8 @@ Module {
Property { name: "snapMode"; type: "SnapMode" }
Property { name: "orientation"; type: "Qt::Orientation" }
Property { name: "live"; revision: 2; type: "bool" }
+ Property { name: "horizontal"; revision: 3; type: "bool"; isReadonly: true }
+ Property { name: "vertical"; revision: 3; type: "bool"; isReadonly: true }
Signal { name: "liveChanged"; revision: 2 }
Method {
name: "setValues"
@@ -680,9 +1004,10 @@ Module {
prototype: "QQuickControl"
exports: [
"QtQuick.Templates/ScrollBar 2.0",
- "QtQuick.Templates/ScrollBar 2.2"
+ "QtQuick.Templates/ScrollBar 2.2",
+ "QtQuick.Templates/ScrollBar 2.3"
]
- exportMetaObjectRevisions: [0, 2]
+ exportMetaObjectRevisions: [0, 2, 3]
attachedType: "QQuickScrollBarAttached"
Enum {
name: "SnapMode"
@@ -709,6 +1034,8 @@ Module {
Property { name: "snapMode"; revision: 2; type: "SnapMode" }
Property { name: "interactive"; revision: 2; type: "bool" }
Property { name: "policy"; revision: 2; type: "Policy" }
+ Property { name: "horizontal"; revision: 3; type: "bool"; isReadonly: true }
+ Property { name: "vertical"; revision: 3; type: "bool"; isReadonly: true }
Signal { name: "snapModeChanged"; revision: 2 }
Signal { name: "interactiveChanged"; revision: 2 }
Signal { name: "policyChanged"; revision: 2 }
@@ -733,13 +1060,18 @@ Module {
name: "QQuickScrollIndicator"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["QtQuick.Templates/ScrollIndicator 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/ScrollIndicator 2.0",
+ "QtQuick.Templates/ScrollIndicator 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
attachedType: "QQuickScrollIndicatorAttached"
Property { name: "size"; type: "double" }
Property { name: "position"; type: "double" }
Property { name: "active"; type: "bool" }
Property { name: "orientation"; type: "Qt::Orientation" }
+ Property { name: "horizontal"; revision: 3; type: "bool"; isReadonly: true }
+ Property { name: "vertical"; revision: 3; type: "bool"; isReadonly: true }
Method {
name: "setSize"
Parameter { name: "size"; type: "double" }
@@ -773,9 +1105,10 @@ Module {
exports: [
"QtQuick.Templates/Slider 2.0",
"QtQuick.Templates/Slider 2.1",
- "QtQuick.Templates/Slider 2.2"
+ "QtQuick.Templates/Slider 2.2",
+ "QtQuick.Templates/Slider 2.3"
]
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Enum {
name: "SnapMode"
values: {
@@ -791,12 +1124,14 @@ Module {
Property { name: "visualPosition"; type: "double"; isReadonly: true }
Property { name: "stepSize"; type: "double" }
Property { name: "snapMode"; type: "SnapMode" }
- Property { name: "live"; revision: 2; type: "bool" }
Property { name: "pressed"; type: "bool" }
+ Property { name: "horizontal"; revision: 3; type: "bool"; isReadonly: true }
+ Property { name: "vertical"; revision: 3; type: "bool"; isReadonly: true }
Property { name: "orientation"; type: "Qt::Orientation" }
Property { name: "handle"; type: "QQuickItem"; isPointer: true }
- Signal { name: "liveChanged"; revision: 2 }
+ Property { name: "live"; revision: 2; type: "bool" }
Signal { name: "moved"; revision: 2 }
+ Signal { name: "liveChanged"; revision: 2 }
Method { name: "increase" }
Method { name: "decrease" }
Method {
@@ -813,9 +1148,10 @@ Module {
exports: [
"QtQuick.Templates/SpinBox 2.0",
"QtQuick.Templates/SpinBox 2.1",
- "QtQuick.Templates/SpinBox 2.2"
+ "QtQuick.Templates/SpinBox 2.2",
+ "QtQuick.Templates/SpinBox 2.3"
]
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Property { name: "from"; type: "int" }
Property { name: "to"; type: "int" }
Property { name: "value"; type: "int" }
@@ -828,9 +1164,11 @@ Module {
Property { name: "down"; type: "QQuickSpinButton"; isReadonly: true; isPointer: true }
Property { name: "inputMethodHints"; revision: 2; type: "Qt::InputMethodHints" }
Property { name: "inputMethodComposing"; revision: 2; type: "bool"; isReadonly: true }
+ Property { name: "wrap"; revision: 3; type: "bool" }
Signal { name: "valueModified"; revision: 2 }
Signal { name: "inputMethodHintsChanged"; revision: 2 }
Signal { name: "inputMethodComposingChanged"; revision: 2 }
+ Signal { name: "wrapChanged"; revision: 3 }
Method { name: "increase" }
Method { name: "decrease" }
}
@@ -838,8 +1176,8 @@ Module {
name: "QQuickSpinButton"
prototype: "QObject"
Property { name: "pressed"; type: "bool" }
- Property { name: "hovered"; revision: 1; type: "bool" }
Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
+ Property { name: "hovered"; revision: 1; type: "bool" }
Signal { name: "hoveredChanged"; revision: 1 }
}
Component {
@@ -888,6 +1226,12 @@ Module {
Property { name: "pushExit"; type: "QQuickTransition"; isPointer: true }
Property { name: "replaceEnter"; type: "QQuickTransition"; isPointer: true }
Property { name: "replaceExit"; type: "QQuickTransition"; isPointer: true }
+ Property { name: "empty"; revision: 3; type: "bool"; isReadonly: true }
+ Signal { name: "emptyChanged"; revision: 3 }
+ Method {
+ name: "clear"
+ Parameter { name: "operation"; type: "Operation" }
+ }
Method { name: "clear" }
Method {
name: "get"
@@ -942,23 +1286,23 @@ Module {
prototype: "QObject"
Property { name: "position"; type: "double" }
Property { name: "complete"; type: "bool"; isReadonly: true }
- Property { name: "enabled"; type: "bool" }
Property { name: "left"; type: "QQmlComponent"; isPointer: true }
Property { name: "behind"; type: "QQmlComponent"; isPointer: true }
Property { name: "right"; type: "QQmlComponent"; isPointer: true }
Property { name: "leftItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "behindItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "rightItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "enabled"; type: "bool" }
Property { name: "transition"; type: "QQuickTransition"; isPointer: true }
Signal { name: "completed" }
Signal { name: "opened" }
Signal { name: "closed" }
+ Method { name: "close"; revision: 1 }
Method {
name: "open"
revision: 2
Parameter { name: "side"; type: "QQuickSwipeDelegate::Side" }
}
- Method { name: "close"; revision: 1 }
}
Component {
name: "QQuickSwipeDelegate"
@@ -999,6 +1343,8 @@ Module {
attachedType: "QQuickSwipeViewAttached"
Property { name: "interactive"; revision: 1; type: "bool" }
Property { name: "orientation"; revision: 2; type: "Qt::Orientation" }
+ Property { name: "horizontal"; revision: 3; type: "bool"; isReadonly: true }
+ Property { name: "vertical"; revision: 3; type: "bool"; isReadonly: true }
Signal { name: "interactiveChanged"; revision: 1 }
Signal { name: "orientationChanged"; revision: 2 }
}
@@ -1007,9 +1353,9 @@ Module {
prototype: "QObject"
Property { name: "index"; type: "int"; isReadonly: true }
Property { name: "isCurrentItem"; type: "bool"; isReadonly: true }
+ Property { name: "view"; type: "QQuickSwipeView"; isReadonly: true; isPointer: true }
Property { name: "isNextItem"; revision: 1; type: "bool"; isReadonly: true }
Property { name: "isPreviousItem"; revision: 1; type: "bool"; isReadonly: true }
- Property { name: "view"; type: "QQuickSwipeView"; isReadonly: true; isPointer: true }
}
Component {
name: "QQuickSwitch"
@@ -1038,6 +1384,7 @@ Module {
"QtQuick.Templates/TabBar 2.2"
]
exportMetaObjectRevisions: [0, 2]
+ attachedType: "QQuickTabBarAttached"
Enum {
name: "Position"
values: {
@@ -1052,6 +1399,13 @@ Module {
Signal { name: "contentHeightChanged"; revision: 2 }
}
Component {
+ name: "QQuickTabBarAttached"
+ prototype: "QObject"
+ Property { name: "index"; type: "int"; isReadonly: true }
+ Property { name: "tabBar"; type: "QQuickTabBar"; isReadonly: true; isPointer: true }
+ Property { name: "position"; type: "QQuickTabBar::Position"; isReadonly: true }
+ }
+ Component {
name: "QQuickTabButton"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
@@ -1076,10 +1430,9 @@ Module {
Property { name: "focusReason"; type: "Qt::FocusReason" }
Property { name: "hovered"; revision: 1; type: "bool"; isReadonly: true }
Property { name: "hoverEnabled"; revision: 1; type: "bool" }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
Signal { name: "implicitWidthChanged3" }
Signal { name: "implicitHeightChanged3" }
- Signal { name: "hoveredChanged"; revision: 1 }
- Signal { name: "hoverEnabledChanged"; revision: 1 }
Signal {
name: "pressAndHold"
Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
@@ -1094,6 +1447,9 @@ Module {
revision: 1
Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
}
+ Signal { name: "hoveredChanged"; revision: 1 }
+ Signal { name: "hoverEnabledChanged"; revision: 1 }
+ Signal { name: "paletteChanged"; revision: 3 }
}
Component {
name: "QQuickTextAreaAttached"
@@ -1117,10 +1473,9 @@ Module {
Property { name: "focusReason"; type: "Qt::FocusReason" }
Property { name: "hovered"; revision: 1; type: "bool"; isReadonly: true }
Property { name: "hoverEnabled"; revision: 1; type: "bool" }
+ Property { name: "palette"; revision: 3; type: "QPalette" }
Signal { name: "implicitWidthChanged3" }
Signal { name: "implicitHeightChanged3" }
- Signal { name: "hoveredChanged"; revision: 1 }
- Signal { name: "hoverEnabledChanged"; revision: 1 }
Signal {
name: "pressAndHold"
Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
@@ -1135,6 +1490,9 @@ Module {
revision: 1
Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
}
+ Signal { name: "hoveredChanged"; revision: 1 }
+ Signal { name: "hoverEnabledChanged"; revision: 1 }
+ Signal { name: "paletteChanged"; revision: 3 }
}
Component {
name: "QQuickToolBar"
diff --git a/src/imports/templates/qquicktemplates2valuetypeprovider.cpp b/src/imports/templates/qquicktemplates2valuetypeprovider.cpp
new file mode 100644
index 00000000..6debdbc4
--- /dev/null
+++ b/src/imports/templates/qquicktemplates2valuetypeprovider.cpp
@@ -0,0 +1,159 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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 "qquicktemplates2valuetypeprovider_p.h"
+
+#include <QtQml/private/qqmlvaluetype_p.h>
+#include <QtQuickTemplates2/private/qquickpalette_p.h>
+
+QT_BEGIN_NAMESPACE
+
+#if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
+ #define ASSERT_VALID_SIZE(size, min) Q_UNUSED(size)
+#else
+ #define ASSERT_VALID_SIZE(size, min) Q_ASSERT(size >= min)
+#endif
+
+const QMetaObject *QQuickTemplates2ValueTypeProvider::getMetaObjectForMetaType(int type)
+{
+ switch (type) {
+ case QMetaType::QPalette:
+ return &QQuickPalette::staticMetaObject;
+ default:
+ break;
+ }
+
+ return nullptr;
+}
+
+bool QQuickTemplates2ValueTypeProvider::init(int type, QVariant& dst)
+{
+ switch (type) {
+ case QMetaType::QPalette:
+ dst.setValue<QPalette>(QPalette());
+ return true;
+ default: break;
+ }
+
+ return false;
+}
+
+template<typename T>
+bool typedEqual(const void *lhs, const QVariant& rhs)
+{
+ return (*(reinterpret_cast<const T *>(lhs)) == rhs.value<T>());
+}
+
+bool QQuickTemplates2ValueTypeProvider::equal(int type, const void *lhs, const QVariant &rhs)
+{
+ switch (type) {
+ case QMetaType::QPalette:
+ return typedEqual<QPalette>(lhs, rhs);
+ default: break;
+ }
+
+ return false;
+}
+
+template<typename T>
+bool typedStore(const void *src, void *dst, size_t dstSize)
+{
+ ASSERT_VALID_SIZE(dstSize, sizeof(T));
+ const T *srcT = reinterpret_cast<const T *>(src);
+ T *dstT = reinterpret_cast<T *>(dst);
+ new (dstT) T(*srcT);
+ return true;
+}
+
+bool QQuickTemplates2ValueTypeProvider::store(int type, const void *src, void *dst, size_t dstSize)
+{
+ switch (type) {
+ case QMetaType::QPalette:
+ return typedStore<QPalette>(src, dst, dstSize);
+ default: break;
+ }
+
+ return false;
+}
+
+template<typename T>
+bool typedRead(const QVariant& src, int dstType, void *dst)
+{
+ T *dstT = reinterpret_cast<T *>(dst);
+ if (src.type() == static_cast<uint>(dstType)) {
+ *dstT = src.value<T>();
+ } else {
+ *dstT = T();
+ }
+ return true;
+}
+
+bool QQuickTemplates2ValueTypeProvider::read(const QVariant &src, void *dst, int dstType)
+{
+ switch (dstType) {
+ case QMetaType::QPalette:
+ return typedRead<QPalette>(src, dstType, dst);
+ default: break;
+ }
+
+ return false;
+}
+
+template<typename T>
+bool typedWrite(const void *src, QVariant& dst)
+{
+ const T *srcT = reinterpret_cast<const T *>(src);
+ if (dst.value<T>() != *srcT) {
+ dst = *srcT;
+ return true;
+ }
+ return false;
+}
+
+bool QQuickTemplates2ValueTypeProvider::write(int type, const void *src, QVariant& dst)
+{
+ switch (type) {
+ case QMetaType::QPalette:
+ return typedWrite<QPalette>(src, dst);
+ default: break;
+ }
+
+ return false;
+}
+
+#undef ASSERT_VALID_SIZE
+
+QT_END_NAMESPACE
diff --git a/src/imports/templates/qquicktemplates2valuetypeprovider_p.h b/src/imports/templates/qquicktemplates2valuetypeprovider_p.h
new file mode 100644
index 00000000..6b072029
--- /dev/null
+++ b/src/imports/templates/qquicktemplates2valuetypeprovider_p.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKTEMPLATES2VALUETYPEPROVIDER_P_H
+#define QQUICKTEMPLATES2VALUETYPEPROVIDER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQml/private/qqmlglobal_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickTemplates2ValueTypeProvider : public QQmlValueTypeProvider
+{
+public:
+ const QMetaObject *getMetaObjectForMetaType(int type) override;
+ bool init(int type, QVariant& dst) override;
+ bool equal(int type, const void *lhs, const QVariant &rhs) override;
+ bool store(int type, const void *src, void *dst, size_t dstSize) override;
+ bool read(const QVariant &src, void *dst, int dstType) override;
+ bool write(int type, const void *src, QVariant& dst) override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKTEMPLATES2VALUETYPEPROVIDER_P_H
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp
index 263d7fde..ebd30bdc 100644
--- a/src/imports/templates/qtquicktemplates2plugin.cpp
+++ b/src/imports/templates/qtquicktemplates2plugin.cpp
@@ -35,8 +35,11 @@
****************************************************************************/
#include <QtQml/qqmlextensionplugin.h>
+#include <QtQml/private/qqmlglobal_p.h>
#include <QtQuickTemplates2/private/qquickabstractbutton_p.h>
+#include <QtQuickTemplates2/private/qquickaction_p.h>
+#include <QtQuickTemplates2/private/qquickactiongroup_p.h>
#include <QtQuickTemplates2/private/qquickapplicationwindow_p.h>
#include <QtQuickTemplates2/private/qquickbusyindicator_p.h>
#include <QtQuickTemplates2/private/qquickbutton_p.h>
@@ -53,9 +56,12 @@
#include <QtQuickTemplates2/private/qquickdrawer_p.h>
#include <QtQuickTemplates2/private/qquickframe_p.h>
#include <QtQuickTemplates2/private/qquickgroupbox_p.h>
+#include <QtQuickTemplates2/private/qquickicon_p.h>
#include <QtQuickTemplates2/private/qquickitemdelegate_p.h>
#include <QtQuickTemplates2/private/qquicklabel_p.h>
#include <QtQuickTemplates2/private/qquickmenu_p.h>
+#include <QtQuickTemplates2/private/qquickmenubar_p.h>
+#include <QtQuickTemplates2/private/qquickmenubaritem_p.h>
#include <QtQuickTemplates2/private/qquickmenuitem_p.h>
#include <QtQuickTemplates2/private/qquickmenuseparator_p.h>
#include <QtQuickTemplates2/private/qquickoverlay_p.h>
@@ -92,6 +98,8 @@
#include <QtQuickTemplates2/private/qquicktumbler_p.h>
#endif
+#include "qquicktemplates2valuetypeprovider_p.h"
+
static inline void initResources()
{
#ifdef QT_STATIC
@@ -108,6 +116,22 @@ extern void qt_quick_set_shortcut_context_matcher(ShortcutContextMatcher matcher
QT_BEGIN_NAMESPACE
+static QQmlValueTypeProvider *valueTypeProvider()
+{
+ static QQuickTemplates2ValueTypeProvider provider;
+ return &provider;
+}
+
+static void initProviders()
+{
+ QQml_addValueTypeProvider(valueTypeProvider());
+}
+
+static void cleanupProviders()
+{
+ QQml_removeValueTypeProvider(valueTypeProvider());
+}
+
class QtQuickTemplates2Plugin: public QQmlExtensionPlugin
{
Q_OBJECT
@@ -117,7 +141,7 @@ public:
QtQuickTemplates2Plugin(QObject *parent = nullptr);
~QtQuickTemplates2Plugin();
- void registerTypes(const char *uri);
+ void registerTypes(const char *uri) override;
private:
#if QT_CONFIG(shortcut)
@@ -128,6 +152,7 @@ private:
QtQuickTemplates2Plugin::QtQuickTemplates2Plugin(QObject *parent) : QQmlExtensionPlugin(parent)
{
initResources();
+ initProviders();
#if QT_CONFIG(shortcut)
originalContextMatcher = qt_quick_shortcut_context_matcher();
@@ -137,6 +162,8 @@ QtQuickTemplates2Plugin::QtQuickTemplates2Plugin(QObject *parent) : QQmlExtensio
QtQuickTemplates2Plugin::~QtQuickTemplates2Plugin()
{
+ cleanupProviders();
+
#if QT_CONFIG(shortcut)
qt_quick_set_shortcut_context_matcher(originalContextMatcher);
#endif
@@ -186,21 +213,21 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri)
qmlRegisterType<QQuickSpinButton>();
qmlRegisterType<QQuickStackView>(uri, 2, 0, "StackView");
qmlRegisterType<QQuickStackViewAttached>();
- qmlRegisterType<QQuickSwipeDelegate>(uri, 2, 0, "SwipeDelegate");
qmlRegisterType<QQuickSwipe>();
- qmlRegisterType<QQuickSwipeViewAttached>();
+ qmlRegisterType<QQuickSwipeDelegate>(uri, 2, 0, "SwipeDelegate");
qmlRegisterType<QQuickSwipeView>(uri, 2, 0, "SwipeView");
+ qmlRegisterType<QQuickSwipeViewAttached>();
qmlRegisterType<QQuickSwitch>(uri, 2, 0, "Switch");
qmlRegisterType<QQuickSwitchDelegate>(uri, 2, 0, "SwitchDelegate");
qmlRegisterType<QQuickTabBar>(uri, 2, 0, "TabBar");
qmlRegisterType<QQuickTabButton>(uri, 2, 0, "TabButton");
- qmlRegisterType<QQuickTextAreaAttached>();
qmlRegisterType<QQuickTextArea>(uri, 2, 0, "TextArea");
+ qmlRegisterType<QQuickTextAreaAttached>();
qmlRegisterType<QQuickTextField>(uri, 2, 0, "TextField");
qmlRegisterType<QQuickToolBar>(uri, 2, 0, "ToolBar");
qmlRegisterType<QQuickToolButton>(uri, 2, 0, "ToolButton");
- qmlRegisterType<QQuickToolTipAttached>();
qmlRegisterType<QQuickToolTip>(uri, 2, 0, "ToolTip");
+ qmlRegisterType<QQuickToolTipAttached>();
#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview)
qmlRegisterType<QQuickTumblerAttached>();
qmlRegisterType<QQuickTumbler>(uri, 2, 0, "Tumbler");
@@ -209,10 +236,10 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri)
// NOTE: register the latest revisions of all template/control base classes to
// make revisioned properties available to their subclasses (synced with Qt 5.7)
qmlRegisterRevision<QQuickItem, 7>(uri, 2, 0);
- qmlRegisterRevision<QQuickWindow, 2>(uri, 2, 0);
qmlRegisterRevision<QQuickText, 6>(uri, 2, 0);
qmlRegisterRevision<QQuickTextInput, 7>(uri, 2, 0);
qmlRegisterRevision<QQuickTextEdit, 7>(uri, 2, 0);
+ qmlRegisterRevision<QQuickWindow, 2>(uri, 2, 0);
qmlRegisterRevision<QWindow, 3>(uri, 2, 0);
// QtQuick.Templates 2.1 (new types and revisions in Qt 5.8)
@@ -262,6 +289,35 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri)
qmlRegisterRevision<QQuickText, 9>(uri, 2, 2);
qmlRegisterRevision<QQuickTextInput, 9>(uri, 2, 2);
qmlRegisterRevision<QQuickWindowQmlImpl, 2>(uri, 2, 2);
+
+ // QtQuick.Templates 2.3 (new types and revisions in Qt 5.10)
+ qmlRegisterType<QQuickAbstractButton, 3>(uri, 2, 3, "AbstractButton");
+ qmlRegisterType<QQuickAction>(uri, 2, 3, "Action");
+ qmlRegisterType<QQuickActionGroup>(uri, 2, 3, "ActionGroup");
+ qmlRegisterType<QQuickApplicationWindow, 3>(uri, 2, 3, "ApplicationWindow");
+ qmlRegisterType<QQuickButtonGroup, 3>(uri, 2, 3, "ButtonGroup");
+ qmlRegisterType<QQuickControl, 3>(uri, 2, 3, "Control");
+ qmlRegisterType<QQuickContainer, 3>(uri, 2, 3, "Container");
+ qmlRegisterType<QQuickDialog, 3>(uri, 2, 3, "Dialog");
+ qmlRegisterType<QQuickDialogButtonBox, 3>(uri, 2, 3, "DialogButtonBox");
+ qRegisterMetaType<QQuickIcon>();
+ qmlRegisterType<QQuickMenu, 3>(uri, 2, 3, "Menu");
+ qmlRegisterType<QQuickMenuBar>(uri, 2, 3, "MenuBar");
+ qmlRegisterType<QQuickMenuBarItem>(uri, 2, 3, "MenuBarItem");
+ qmlRegisterType<QQuickMenuItem, 3>(uri, 2, 3, "MenuItem");
+ qmlRegisterUncreatableType<QQuickOverlay>(uri, 2, 3, "Overlay", QStringLiteral("Overlay is only available as an attached property."));
+ qmlRegisterType<QQuickOverlayAttached>();
+ qmlRegisterType<QQuickPopup, 3>(uri, 2, 3, "Popup");
+ qmlRegisterType<QQuickRangeSlider, 3>(uri, 2, 3, "RangeSlider");
+ qmlRegisterType<QQuickScrollBar, 3>(uri, 2, 3, "ScrollBar");
+ qmlRegisterType<QQuickScrollIndicator, 3>(uri, 2, 3, "ScrollIndicator");
+ qmlRegisterType<QQuickSlider, 3>(uri, 2, 3, "Slider");
+ qmlRegisterType<QQuickSpinBox, 3>(uri, 2, 3, "SpinBox");
+
+ // NOTE: register the latest revisions of all template/control base classes to
+ // make revisioned properties available to their subclasses (synced with Qt 5.10)
+ qmlRegisterRevision<QQuickText, 10>(uri, 2, 3);
+ qmlRegisterRevision<QQuickTextEdit, 10>(uri, 2, 3);
}
QT_END_NAMESPACE
diff --git a/src/imports/templates/templates.pro b/src/imports/templates/templates.pro
index 28207807..4ff0a76e 100644
--- a/src/imports/templates/templates.pro
+++ b/src/imports/templates/templates.pro
@@ -1,6 +1,6 @@
TARGET = qtquicktemplates2plugin
TARGETPATH = QtQuick/Templates.2
-IMPORT_VERSION = 2.2
+IMPORT_VERSION = 2.3
QT += qml quick
QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private
@@ -10,7 +10,11 @@ DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
OTHER_FILES += \
qmldir
+HEADERS += \
+ $$PWD/qquicktemplates2valuetypeprovider_p.h
+
SOURCES += \
+ $$PWD/qquicktemplates2valuetypeprovider.cpp \
$$PWD/qtquicktemplates2plugin.cpp
CONFIG += no_cxx_module
diff --git a/src/quickcontrols2/configure.json b/src/quickcontrols2/configure.json
index 9384a52b..22a602d3 100644
--- a/src/quickcontrols2/configure.json
+++ b/src/quickcontrols2/configure.json
@@ -3,6 +3,8 @@
"commandline": {
"options": {
+ "style-fusion": { "type": "boolean", "name": "quickcontrols2-fusion" },
+ "style-imagine": { "type": "boolean", "name": "quickcontrols2-imagine" },
"style-material": { "type": "boolean", "name": "quickcontrols2-material" },
"style-universal": { "type": "boolean", "name": "quickcontrols2-universal" }
}
@@ -13,6 +15,20 @@
"label": "Default",
"output": [ "privateFeature" ]
},
+ "quickcontrols2-fusion": {
+ "label": "Fusion",
+ "purpose": "Provides the platform agnostic desktop-oriented Fusion style.",
+ "section": "Quick Controls 2",
+ "condition": "features.quickcontrols2-default",
+ "output": [ "privateFeature" ]
+ },
+ "quickcontrols2-imagine": {
+ "label": "Imagine",
+ "purpose": "Provides a style based on configurable image assets.",
+ "section": "Quick Controls 2",
+ "condition": "features.quickcontrols2-default",
+ "output": [ "privateFeature" ]
+ },
"quickcontrols2-material": {
"label": "Material",
"purpose": "Provides a style based on the Material Design guidelines.",
@@ -36,7 +52,7 @@
{
"message": "Styles",
"type": "featureList",
- "args": "quickcontrols2-default quickcontrols2-material quickcontrols2-universal"
+ "args": "quickcontrols2-default quickcontrols2-fusion quickcontrols2-imagine quickcontrols2-material quickcontrols2-universal"
}
]
}
diff --git a/src/quickcontrols2/qquickattachedobject.cpp b/src/quickcontrols2/qquickattachedobject.cpp
new file mode 100644
index 00000000..bada982e
--- /dev/null
+++ b/src/quickcontrols2/qquickattachedobject.cpp
@@ -0,0 +1,249 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickattachedobject_p.h"
+
+#include <QtQuick/qquickwindow.h>
+#include <QtQuick/private/qquickitem_p.h>
+#include <QtQuickTemplates2/private/qquickpopup_p.h>
+
+QT_BEGIN_NAMESPACE
+
+static QQuickAttachedObject *attachedObject(const QMetaObject *type, QObject *object, bool create = false)
+{
+ if (!object)
+ return nullptr;
+ int idx = -1;
+ return qobject_cast<QQuickAttachedObject *>(qmlAttachedPropertiesObject(&idx, object, type, create));
+}
+
+static QQuickAttachedObject *findAttachedParent(const QMetaObject *type, QObject *object)
+{
+ QQuickItem *item = qobject_cast<QQuickItem *>(object);
+ if (item) {
+ // lookup parent items and popups
+ QQuickItem *parent = item->parentItem();
+ while (parent) {
+ QQuickAttachedObject *attached = attachedObject(type, parent);
+ if (attached)
+ return attached;
+
+ QQuickPopup *popup = qobject_cast<QQuickPopup *>(parent->parent());
+ if (popup)
+ return attachedObject(type, popup);
+
+ parent = parent->parentItem();
+ }
+
+ // fallback to item's window
+ QQuickAttachedObject *attached = attachedObject(type, item->window());
+ if (attached)
+ return attached;
+ } else {
+ // lookup popup's window
+ QQuickPopup *popup = qobject_cast<QQuickPopup *>(object);
+ if (popup)
+ return attachedObject(type, popup->popupItem()->window());
+ }
+
+ // lookup parent window
+ QQuickWindow *window = qobject_cast<QQuickWindow *>(object);
+ if (window) {
+ QQuickWindow *parentWindow = qobject_cast<QQuickWindow *>(window->parent());
+ if (parentWindow) {
+ QQuickAttachedObject *attached = attachedObject(type, window);
+ if (attached)
+ return attached;
+ }
+ }
+
+ // fallback to engine (global)
+ if (object) {
+ QQmlEngine *engine = qmlEngine(object);
+ if (engine) {
+ QByteArray name = QByteArray("_q_") + type->className();
+ QQuickAttachedObject *attached = engine->property(name).value<QQuickAttachedObject *>();
+ if (!attached) {
+ attached = attachedObject(type, engine, true);
+ engine->setProperty(name, QVariant::fromValue(attached));
+ }
+ return attached;
+ }
+ }
+
+ return nullptr;
+}
+
+static QList<QQuickAttachedObject *> findAttachedChildren(const QMetaObject *type, QObject *object)
+{
+ QList<QQuickAttachedObject *> children;
+
+ QQuickItem *item = qobject_cast<QQuickItem *>(object);
+ if (!item) {
+ QQuickWindow *window = qobject_cast<QQuickWindow *>(object);
+ if (window) {
+ item = window->contentItem();
+
+ const auto windowChildren = window->children();
+ for (QObject *child : windowChildren) {
+ QQuickWindow *childWindow = qobject_cast<QQuickWindow *>(child);
+ if (childWindow) {
+ QQuickAttachedObject *attached = attachedObject(type, childWindow);
+ if (attached)
+ children += attached;
+ }
+ }
+ }
+ }
+
+ if (item) {
+ const auto childItems = item->childItems();
+ for (QQuickItem *child : childItems) {
+ QQuickAttachedObject *attached = attachedObject(type, child);
+ if (attached)
+ children += attached;
+ else
+ children += findAttachedChildren(type, child);
+ }
+ }
+
+ return children;
+}
+
+static QQuickItem *findAttachedItem(QObject *parent)
+{
+ QQuickItem *item = qobject_cast<QQuickItem *>(parent);
+ if (!item) {
+ QQuickPopup *popup = qobject_cast<QQuickPopup *>(parent);
+ if (popup)
+ item = popup->popupItem();
+ }
+ return item;
+}
+
+QQuickAttachedObject::QQuickAttachedObject(QObject *parent) : QObject(parent)
+{
+ attachTo(parent);
+}
+
+QQuickAttachedObject::QQuickAttachedObject(QObjectPrivate &dd, QObject *parent)
+ : QObject(dd, parent)
+{
+ attachTo(parent);
+}
+
+QQuickAttachedObject::~QQuickAttachedObject()
+{
+ detachFrom(parent());
+ setAttachedParent(nullptr);
+}
+
+QList<QQuickAttachedObject *> QQuickAttachedObject::attachedChildren() const
+{
+ return m_attachedChildren;
+}
+
+QQuickAttachedObject *QQuickAttachedObject::attachedParent() const
+{
+ return m_attachedParent;
+}
+
+void QQuickAttachedObject::setAttachedParent(QQuickAttachedObject *parent)
+{
+ if (m_attachedParent != parent) {
+ QQuickAttachedObject *oldParent = m_attachedParent;
+ if (m_attachedParent)
+ m_attachedParent->m_attachedChildren.removeOne(this);
+ m_attachedParent = parent;
+ if (parent)
+ parent->m_attachedChildren.append(this);
+ attachedParentChange(parent, oldParent);
+ }
+}
+
+void QQuickAttachedObject::init()
+{
+ QQuickAttachedObject *attachedParent = findAttachedParent(metaObject(), parent());
+ if (attachedParent)
+ setAttachedParent(attachedParent);
+
+ const QList<QQuickAttachedObject *> attachedChildren = findAttachedChildren(metaObject(), parent());
+ for (QQuickAttachedObject *child : attachedChildren)
+ child->setAttachedParent(this);
+}
+
+void QQuickAttachedObject::attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent)
+{
+ Q_UNUSED(newParent);
+ Q_UNUSED(oldParent);
+}
+
+void QQuickAttachedObject::itemWindowChanged(QQuickWindow *window)
+{
+ QQuickAttachedObject *attachedParent = nullptr;
+ QQuickItem *item = qobject_cast<QQuickItem *>(sender());
+ if (item)
+ attachedParent = findAttachedParent(metaObject(), item);
+ if (!attachedParent)
+ attachedParent = attachedObject(metaObject(), window);
+ setAttachedParent(attachedParent);
+}
+
+void QQuickAttachedObject::itemParentChanged(QQuickItem *item, QQuickItem *parent)
+{
+ Q_UNUSED(parent);
+ setAttachedParent(findAttachedParent(metaObject(), item));
+}
+
+void QQuickAttachedObject::attachTo(QObject *object)
+{
+ QQuickItem *item = findAttachedItem(object);
+ if (item) {
+ connect(item, &QQuickItem::windowChanged, this, &QQuickAttachedObject::itemWindowChanged);
+ QQuickItemPrivate::get(item)->addItemChangeListener(this, QQuickItemPrivate::Parent);
+ }
+}
+
+void QQuickAttachedObject::detachFrom(QObject *object)
+{
+ QQuickItem *item = findAttachedItem(object);
+ if (item) {
+ disconnect(item, &QQuickItem::windowChanged, this, &QQuickAttachedObject::itemWindowChanged);
+ QQuickItemPrivate::get(item)->removeItemChangeListener(this, QQuickItemPrivate::Parent);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/quickcontrols2/qquickstyleattached_p.h b/src/quickcontrols2/qquickattachedobject_p.h
index ed5a5417..5d4194ef 100644
--- a/src/quickcontrols2/qquickstyleattached_p.h
+++ b/src/quickcontrols2/qquickattachedobject_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKSTYLEATTACHED_P_H
-#define QQUICKSTYLEATTACHED_P_H
+#ifndef QQUICKATTACHEDOBJECT_P_H
+#define QQUICKATTACHEDOBJECT_P_H
//
// W A R N I N G
@@ -52,43 +52,44 @@
#include <QtCore/qlist.h>
#include <QtCore/qobject.h>
#include <QtCore/qpointer.h>
-#include <QtCore/qsharedpointer.h>
#include <QtQuick/private/qquickitemchangelistener_p.h>
#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
QT_BEGIN_NAMESPACE
-class QSettings;
class QQuickWindow;
-class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickStyleAttached : public QObject, public QQuickItemChangeListener
+class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickAttachedObject : public QObject, public QQuickItemChangeListener
{
Q_OBJECT
public:
- explicit QQuickStyleAttached(QObject *parent = nullptr);
- ~QQuickStyleAttached();
+ explicit QQuickAttachedObject(QObject *parent = nullptr);
+ ~QQuickAttachedObject();
- static QSharedPointer<QSettings> settings(const QString &group = QString());
+ QList<QQuickAttachedObject *> attachedChildren() const;
-protected:
- void init();
+ QQuickAttachedObject *attachedParent() const;
+ void setAttachedParent(QQuickAttachedObject *parent);
- QList<QQuickStyleAttached *> childStyles() const;
+protected:
+ QQuickAttachedObject(QObjectPrivate &dd, QObject *parent = nullptr);
- QQuickStyleAttached *parentStyle() const;
- void setParentStyle(QQuickStyleAttached *style);
+ void init();
- virtual void parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent);
+ virtual void attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent);
void itemWindowChanged(QQuickWindow *window);
void itemParentChanged(QQuickItem *item, QQuickItem *parent) override;
private:
- QList<QQuickStyleAttached *> m_childStyles;
- QPointer<QQuickStyleAttached> m_parentStyle;
+ void attachTo(QObject *object);
+ void detachFrom(QObject *object);
+
+ QList<QQuickAttachedObject *> m_attachedChildren;
+ QPointer<QQuickAttachedObject> m_attachedParent;
};
QT_END_NAMESPACE
-#endif // QQUICKSTYLEATTACHED_P_H
+#endif // QQUICKATTACHEDOBJECT_P_H
diff --git a/src/quickcontrols2/qquickchecklabel.cpp b/src/quickcontrols2/qquickchecklabel.cpp
new file mode 100644
index 00000000..dccbf77f
--- /dev/null
+++ b/src/quickcontrols2/qquickchecklabel.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickchecklabel_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QQuickCheckLabel::QQuickCheckLabel(QQuickItem *parent) :
+ QQuickText(parent)
+{
+ setHAlign(AlignLeft);
+ setVAlign(AlignVCenter);
+ setElideMode(ElideRight);
+}
+
+QT_END_NAMESPACE
diff --git a/src/quickcontrols2/qquickcolorimageprovider_p.h b/src/quickcontrols2/qquickchecklabel_p.h
index 4b7a34b9..100ef48f 100644
--- a/src/quickcontrols2/qquickcolorimageprovider_p.h
+++ b/src/quickcontrols2/qquickchecklabel_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKCOLORIMAGEPROVIDER_P_H
-#define QQUICKCOLORIMAGEPROVIDER_P_H
+#ifndef QQUICKCHECKLABEL_P_H
+#define QQUICKCHECKLABEL_P_H
//
// W A R N I N G
@@ -48,22 +48,21 @@
// We mean it.
//
-#include <QtQuick/qquickimageprovider.h>
+#include <QtQuick/private/qquicktext_p.h>
#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
QT_BEGIN_NAMESPACE
-class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickColorImageProvider : public QQuickImageProvider
+class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickCheckLabel : public QQuickText
{
-public:
- QQuickColorImageProvider(const QString &path);
-
- QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) override;
+ Q_OBJECT
-private:
- QString m_path;
+public:
+ explicit QQuickCheckLabel(QQuickItem *parent = nullptr);
};
QT_END_NAMESPACE
-#endif // QQUICKOCOLORIMAGEPROVIDER_P_H
+QML_DECLARE_TYPE(QQuickCheckLabel)
+
+#endif // QQUICKCHECKLABEL_P_H
diff --git a/src/quickcontrols2/qquickcolorimageprovider.cpp b/src/quickcontrols2/qquickcolor.cpp
index a6e941b3..66ef21b7 100644
--- a/src/quickcontrols2/qquickcolorimageprovider.cpp
+++ b/src/quickcontrols2/qquickcolor.cpp
@@ -34,47 +34,32 @@
**
****************************************************************************/
-#include "qquickcolorimageprovider_p.h"
-
-#include <QtCore/qdebug.h>
-#include <QtGui/qpainter.h>
-#include <QtGui/qguiapplication.h>
-#include <QtGui/qscreen.h>
-#include <QtGui/qicon.h>
+#include "qquickcolor_p.h"
QT_BEGIN_NAMESPACE
-QQuickColorImageProvider::QQuickColorImageProvider(const QString &path)
- : QQuickImageProvider(Image), m_path(path)
+QQuickColor::QQuickColor(QObject *parent) :
+ QObject(parent)
{
}
-QImage QQuickColorImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize)
+QColor QQuickColor::transparent(const QColor &color, qreal opacity) const
{
- Q_UNUSED(requestedSize);
-
- int sep = id.indexOf(QLatin1Char('/'));
- const QStringRef name = id.leftRef(sep);
- qreal dpr = qApp->primaryScreen()->devicePixelRatio();
- QString file = qt_findAtNxFile(m_path + QLatin1Char('/') + name + QLatin1String(".png"), dpr);
-
- QImage image(file);
- if (image.isNull()) {
- qWarning() << "QQuickColorImageProvider: unknown id:" << id;
- return QImage();
- }
-
- if (size)
- *size = image.size();
+ return QColor(color.red(), color.green(), color.blue(), qBound(0.0, opacity, 1.0) * 255);
+}
- const QString color = id.mid(sep + 1);
- if (!color.isEmpty()) {
- QPainter painter(&image);
- painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
- painter.fillRect(image.rect(), QColor(color));
- }
+QColor QQuickColor::blend(const QColor &a, const QColor &b, qreal factor) const
+{
+ if (factor <= 0.0)
+ return a;
+ if (factor >= 1.0)
+ return b;
- return image;
+ QColor color;
+ color.setRedF(a.redF() * (1.0 - factor) + b.redF() * factor);
+ color.setGreenF(a.greenF() * (1.0 - factor) + b.greenF() * factor);
+ color.setBlueF(a.blueF() * (1.0 - factor) + b.blueF() * factor);
+ return color;
}
QT_END_NAMESPACE
diff --git a/src/quickcontrols2/qquickcolor_p.h b/src/quickcontrols2/qquickcolor_p.h
new file mode 100644
index 00000000..657a9fa4
--- /dev/null
+++ b/src/quickcontrols2/qquickcolor_p.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKCOLOR_P_H
+#define QQUICKCOLOR_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qobject.h>
+#include <QtGui/qcolor.h>
+#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickColor : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit QQuickColor(QObject *parent = nullptr);
+
+ Q_INVOKABLE QColor transparent(const QColor &color, qreal opacity) const;
+ Q_INVOKABLE QColor blend(const QColor &a, const QColor &b, qreal factor) const;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKCOLOR_P_H
diff --git a/src/quickcontrols2/qquickcolorimage.cpp b/src/quickcontrols2/qquickcolorimage.cpp
new file mode 100644
index 00000000..9d24a156
--- /dev/null
+++ b/src/quickcontrols2/qquickcolorimage.cpp
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickcolorimage_p.h"
+
+#include <QtQuick/private/qquickimagebase_p_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QQuickColorImage::QQuickColorImage(QQuickItem *parent)
+ : QQuickImage(parent), m_color(Qt::transparent), m_defaultColor(Qt::transparent)
+{
+}
+
+QColor QQuickColorImage::color() const
+{
+ return m_color;
+}
+
+void QQuickColorImage::setColor(const QColor &color)
+{
+ if (m_color == color)
+ return;
+
+ m_color = color;
+ if (isComponentComplete())
+ load();
+ emit colorChanged();
+}
+
+void QQuickColorImage::resetColor()
+{
+ setColor(Qt::transparent);
+}
+
+QColor QQuickColorImage::defaultColor() const
+{
+ return m_defaultColor;
+}
+
+void QQuickColorImage::setDefaultColor(const QColor &color)
+{
+ if (m_defaultColor == color)
+ return;
+
+ m_defaultColor = color;
+ emit defaultColorChanged();
+}
+
+void QQuickColorImage::resetDefaultColor()
+{
+ setDefaultColor(Qt::transparent);
+}
+
+void QQuickColorImage::pixmapChange()
+{
+ QQuickImage::pixmapChange();
+ if (m_color.alpha() > 0 && m_color != m_defaultColor) {
+ QQuickImageBasePrivate *d = static_cast<QQuickImageBasePrivate *>(QQuickItemPrivate::get(this));
+ QImage image = d->pix.image();
+ if (!image.isNull()) {
+ QPainter painter(&image);
+ painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
+ painter.fillRect(image.rect(), m_color);
+ d->pix.setImage(image);
+ }
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/quickcontrols2/qquickcolorimage_p.h b/src/quickcontrols2/qquickcolorimage_p.h
new file mode 100644
index 00000000..873bc2db
--- /dev/null
+++ b/src/quickcontrols2/qquickcolorimage_p.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKCOLORIMAGE_P_H
+#define QQUICKCOLORIMAGE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtGui/qcolor.h>
+#include <QtQuick/private/qquickimage_p.h>
+#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickColorImage : public QQuickImage
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor color READ color WRITE setColor RESET resetColor NOTIFY colorChanged FINAL)
+ Q_PROPERTY(QColor defaultColor READ defaultColor WRITE setDefaultColor RESET resetDefaultColor NOTIFY defaultColorChanged FINAL)
+
+public:
+ explicit QQuickColorImage(QQuickItem *parent = nullptr);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+ void resetColor();
+
+ QColor defaultColor() const;
+ void setDefaultColor(const QColor &color);
+ void resetDefaultColor();
+
+Q_SIGNALS:
+ void colorChanged();
+ void defaultColorChanged();
+
+protected:
+ void pixmapChange() override;
+
+private:
+ QColor m_color;
+ QColor m_defaultColor;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKCOLORIMAGE_P_H
diff --git a/src/quickcontrols2/qquickiconimage.cpp b/src/quickcontrols2/qquickiconimage.cpp
new file mode 100644
index 00000000..885bc7f9
--- /dev/null
+++ b/src/quickcontrols2/qquickiconimage.cpp
@@ -0,0 +1,220 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickiconimage_p.h"
+#include "qquickiconimage_p_p.h"
+
+#include <QtCore/qmath.h>
+#include <QtQuick/private/qquickimagebase_p_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QQuickIconImagePrivate::QQuickIconImagePrivate()
+ : color(Qt::transparent),
+ updatingIcon(false),
+ isThemeIcon(false),
+ updatingFillMode(false)
+{
+}
+
+bool QQuickIconImagePrivate::updateDevicePixelRatio(qreal targetDevicePixelRatio)
+{
+ if (isThemeIcon) {
+ devicePixelRatio = calculateDevicePixelRatio();
+ return true;
+ }
+
+ return QQuickImagePrivate::updateDevicePixelRatio(targetDevicePixelRatio);
+}
+
+void QQuickIconImagePrivate::updateIcon()
+{
+ Q_Q(QQuickIconImage);
+ // Both geometryChanged() and QQuickImageBase::sourceSizeChanged()
+ // (which we connect to updateIcon() in the constructor) can be called as a result
+ // of updateIcon() changing the various sizes, so we must check that we're not recursing.
+ if (updatingIcon)
+ return;
+
+ updatingIcon = true;
+
+ QSize size = sourcesize;
+ // If no size is specified for theme icons, it will use the smallest available size.
+ if (size.width() <= 0)
+ size.setWidth(q->width());
+ if (size.height() <= 0)
+ size.setHeight(q->height());
+
+ const qreal dpr = calculateDevicePixelRatio();
+ const QIconLoaderEngineEntry *entry = QIconLoaderEngine::entryForSize(icon, size * dpr, qCeil(dpr));
+
+ if (entry) {
+ QQmlContext *context = qmlContext(q);
+ const QUrl entryUrl = QUrl::fromLocalFile(entry->filename);
+ url = context ? context->resolvedUrl(entryUrl) : entryUrl;
+ isThemeIcon = true;
+ } else {
+ url = source;
+ isThemeIcon = false;
+ }
+ q->load();
+
+ updatingIcon = false;
+}
+
+void QQuickIconImagePrivate::updateFillMode()
+{
+ Q_Q(QQuickIconImage);
+ // If we start with a sourceSize of 28x28 and then set sourceSize.width to 24, the fillMode
+ // will change to PreserveAspectFit (because pixmapSize.width() > width()), which causes the
+ // pixmap to be reloaded at its original size of 28x28, which causes the fillMode to change
+ // to Pad (because pixmapSize.width() <= width()), and so on.
+ if (updatingFillMode)
+ return;
+
+ updatingFillMode = true;
+
+ const QSize pixmapSize = QSize(pix.width(), pix.height()) / calculateDevicePixelRatio();
+ if (pixmapSize.width() > q->width() || pixmapSize.height() > q->height())
+ q->setFillMode(QQuickImage::PreserveAspectFit);
+ else
+ q->setFillMode(QQuickImage::Pad);
+
+ updatingFillMode = false;
+}
+
+qreal QQuickIconImagePrivate::calculateDevicePixelRatio() const
+{
+ Q_Q(const QQuickIconImage);
+ return q->window() ? q->window()->effectiveDevicePixelRatio() : qApp->devicePixelRatio();
+}
+
+QQuickIconImage::QQuickIconImage(QQuickItem *parent)
+ : QQuickImage(*(new QQuickIconImagePrivate), parent)
+{
+ setFillMode(Pad);
+}
+
+QString QQuickIconImage::name() const
+{
+ Q_D(const QQuickIconImage);
+ return d->icon.iconName;
+}
+
+void QQuickIconImage::setName(const QString &name)
+{
+ Q_D(QQuickIconImage);
+ if (d->icon.iconName == name)
+ return;
+
+ d->icon = QIconLoader::instance()->loadIcon(name);
+ if (isComponentComplete())
+ d->updateIcon();
+ emit nameChanged();
+}
+
+QColor QQuickIconImage::color() const
+{
+ Q_D(const QQuickIconImage);
+ return d->color;
+}
+
+void QQuickIconImage::setColor(const QColor &color)
+{
+ Q_D(QQuickIconImage);
+ if (d->color == color)
+ return;
+
+ d->color = color;
+ if (isComponentComplete())
+ d->updateIcon();
+ emit colorChanged();
+}
+
+void QQuickIconImage::setSource(const QUrl &source)
+{
+ Q_D(QQuickIconImage);
+ if (d->source == source)
+ return;
+
+ d->source = source;
+ if (isComponentComplete())
+ d->updateIcon();
+ emit sourceChanged(source);
+}
+
+void QQuickIconImage::componentComplete()
+{
+ Q_D(QQuickIconImage);
+ QQuickImage::componentComplete();
+ d->updateIcon();
+ QObjectPrivate::connect(this, &QQuickImageBase::sourceSizeChanged, d, &QQuickIconImagePrivate::updateIcon);
+}
+
+void QQuickIconImage::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
+{
+ Q_D(QQuickIconImage);
+ QQuickImage::geometryChanged(newGeometry, oldGeometry);
+ if (isComponentComplete() && newGeometry.size() != oldGeometry.size())
+ d->updateIcon();
+}
+
+void QQuickIconImage::itemChange(ItemChange change, const ItemChangeData &value)
+{
+ Q_D(QQuickIconImage);
+ if (change == ItemDevicePixelRatioHasChanged)
+ d->updateIcon();
+ QQuickImage::itemChange(change, value);
+}
+
+void QQuickIconImage::pixmapChange()
+{
+ Q_D(QQuickIconImage);
+ QQuickImage::pixmapChange();
+ d->updateFillMode();
+
+ if (d->color.alpha() > 0) {
+ QImage image = d->pix.image();
+ if (!image.isNull()) {
+ QPainter painter(&image);
+ painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
+ painter.fillRect(image.rect(), d->color);
+ d->pix.setImage(image);
+ }
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/quickcontrols2/qquickiconimage_p.h b/src/quickcontrols2/qquickiconimage_p.h
new file mode 100644
index 00000000..b1af767e
--- /dev/null
+++ b/src/quickcontrols2/qquickiconimage_p.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKICONIMAGE_P_H
+#define QQUICKICONIMAGE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuick/private/qquickimage_p.h>
+#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickIconImagePrivate;
+
+class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickIconImage : public QQuickImage
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged FINAL)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
+
+public:
+ explicit QQuickIconImage(QQuickItem *parent = nullptr);
+
+ QString name() const;
+ void setName(const QString &name);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+ void setSource(const QUrl &url) override;
+
+Q_SIGNALS:
+ void nameChanged();
+ void colorChanged();
+
+protected:
+ void componentComplete() override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
+ void pixmapChange() override;
+
+private:
+ Q_DISABLE_COPY(QQuickIconImage)
+ Q_DECLARE_PRIVATE(QQuickIconImage)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickIconImage)
+
+#endif // QQUICKICONIMAGE_P_H
diff --git a/src/quickcontrols2/qquickiconimage_p_p.h b/src/quickcontrols2/qquickiconimage_p_p.h
new file mode 100644
index 00000000..8e8012bf
--- /dev/null
+++ b/src/quickcontrols2/qquickiconimage_p_p.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKICONIMAGE_P_P_H
+#define QQUICKICONIMAGE_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuick/private/qquickimage_p_p.h>
+#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtGui/private/qiconloader_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickIconImagePrivate : public QQuickImagePrivate
+{
+ Q_DECLARE_PUBLIC(QQuickIconImage)
+
+public:
+ QQuickIconImagePrivate();
+
+ void updateIcon();
+ void updateFillMode();
+ qreal calculateDevicePixelRatio() const;
+ bool updateDevicePixelRatio(qreal targetDevicePixelRatio) override;
+
+ QUrl source;
+ QColor color;
+ QThemeIconInfo icon;
+ bool updatingIcon;
+ bool isThemeIcon;
+ bool updatingFillMode;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKICONIMAGE_P_P_H
diff --git a/src/quickcontrols2/qquickiconlabel.cpp b/src/quickcontrols2/qquickiconlabel.cpp
new file mode 100644
index 00000000..960d9905
--- /dev/null
+++ b/src/quickcontrols2/qquickiconlabel.cpp
@@ -0,0 +1,651 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickiconlabel_p.h"
+#include "qquickiconlabel_p_p.h"
+#include "qquickiconimage_p.h"
+#include "qquickmnemoniclabel_p.h"
+
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtQuick/private/qquickitem_p.h>
+#include <QtQuick/private/qquicktext_p.h>
+
+QT_BEGIN_NAMESPACE
+
+static void beginClass(QQuickItem *item)
+{
+ if (QQmlParserStatus *parserStatus = qobject_cast<QQmlParserStatus *>(item))
+ parserStatus->classBegin();
+}
+
+static void completeComponent(QQuickItem *item)
+{
+ if (QQmlParserStatus *parserStatus = qobject_cast<QQmlParserStatus *>(item))
+ parserStatus->componentComplete();
+}
+
+QQuickIconLabelPrivate::QQuickIconLabelPrivate()
+ : mirrored(false),
+ display(QQuickIconLabel::TextBesideIcon),
+ alignment(Qt::AlignCenter),
+ spacing(0),
+ topPadding(0),
+ leftPadding(0),
+ rightPadding(0),
+ bottomPadding(0),
+ image(nullptr),
+ label(nullptr)
+{
+}
+
+bool QQuickIconLabelPrivate::hasIcon() const
+{
+ return display != QQuickIconLabel::TextOnly && !icon.isEmpty();
+}
+
+bool QQuickIconLabelPrivate::hasText() const
+{
+ return display != QQuickIconLabel::IconOnly && !text.isEmpty();
+}
+
+bool QQuickIconLabelPrivate::createImage()
+{
+ Q_Q(QQuickIconLabel);
+ if (image)
+ return false;
+
+ image = new QQuickIconImage(q);
+ watchChanges(image);
+ beginClass(image);
+ image->setObjectName(QStringLiteral("image"));
+ image->setName(icon.name());
+ image->setSource(icon.source());
+ image->setSourceSize(QSize(icon.width(), icon.height()));
+ image->setColor(icon.color());
+ QQmlEngine::setContextForObject(image, qmlContext(q));
+ if (componentComplete)
+ completeComponent(image);
+ return true;
+}
+
+bool QQuickIconLabelPrivate::destroyImage()
+{
+ if (!image)
+ return false;
+
+ unwatchChanges(image);
+ delete image;
+ image = nullptr;
+ return true;
+}
+
+bool QQuickIconLabelPrivate::updateImage()
+{
+ if (!hasIcon())
+ return destroyImage();
+ return createImage();
+}
+
+void QQuickIconLabelPrivate::syncImage()
+{
+ if (!image || icon.isEmpty())
+ return;
+
+ image->setName(icon.name());
+ image->setSource(icon.source());
+ image->setSourceSize(QSize(icon.width(), icon.height()));
+ image->setColor(icon.color());
+ const int valign = alignment & Qt::AlignVertical_Mask;
+ image->setVerticalAlignment(static_cast<QQuickImage::VAlignment>(valign));
+ const int halign = alignment & Qt::AlignHorizontal_Mask;
+ image->setHorizontalAlignment(static_cast<QQuickImage::HAlignment>(halign));
+}
+
+void QQuickIconLabelPrivate::updateOrSyncImage()
+{
+ if (updateImage()) {
+ if (componentComplete) {
+ updateImplicitSize();
+ layout();
+ }
+ } else {
+ syncImage();
+ }
+}
+
+bool QQuickIconLabelPrivate::createLabel()
+{
+ Q_Q(QQuickIconLabel);
+ if (label)
+ return false;
+
+ label = new QQuickMnemonicLabel(q);
+ watchChanges(label);
+ beginClass(label);
+ label->setObjectName(QStringLiteral("label"));
+ label->setFont(font);
+ label->setColor(color);
+ label->setElideMode(QQuickText::ElideRight);
+ const int valign = alignment & Qt::AlignVertical_Mask;
+ label->setVAlign(static_cast<QQuickText::VAlignment>(valign));
+ const int halign = alignment & Qt::AlignHorizontal_Mask;
+ label->setHAlign(static_cast<QQuickText::HAlignment>(halign));
+ label->setText(text);
+ if (componentComplete)
+ completeComponent(label);
+ return true;
+}
+
+bool QQuickIconLabelPrivate::destroyLabel()
+{
+ if (!label)
+ return false;
+
+ unwatchChanges(label);
+ delete label;
+ label = nullptr;
+ return true;
+}
+
+bool QQuickIconLabelPrivate::updateLabel()
+{
+ if (!hasText())
+ return destroyLabel();
+ return createLabel();
+}
+
+void QQuickIconLabelPrivate::syncLabel()
+{
+ if (!label)
+ return;
+
+ label->setText(text);
+}
+
+void QQuickIconLabelPrivate::updateOrSyncLabel()
+{
+ if (updateLabel()) {
+ if (componentComplete) {
+ updateImplicitSize();
+ layout();
+ }
+ } else {
+ syncLabel();
+ }
+}
+
+void QQuickIconLabelPrivate::updateImplicitSize()
+{
+ Q_Q(QQuickIconLabel);
+ const bool showIcon = image && hasIcon();
+ const bool showText = label && hasText();
+ const qreal horizontalPadding = leftPadding + rightPadding;
+ const qreal verticalPadding = topPadding + bottomPadding;
+ const qreal iconImplicitWidth = showIcon ? image->implicitWidth() : 0;
+ const qreal iconImplicitHeight = showIcon ? image->implicitHeight() : 0;
+ const qreal textImplicitWidth = showText ? label->implicitWidth() : 0;
+ const qreal textImplicitHeight = showText ? label->implicitHeight() : 0;
+ const qreal effectiveSpacing = showText && showIcon && image->implicitWidth() > 0 ? spacing : 0;
+ const qreal implicitWidth = display == QQuickIconLabel::TextBesideIcon ? iconImplicitWidth + textImplicitWidth + effectiveSpacing
+ : qMax(iconImplicitWidth, textImplicitWidth);
+ const qreal implicitHeight = display == QQuickIconLabel::TextUnderIcon ? iconImplicitHeight + textImplicitHeight + effectiveSpacing
+ : qMax(iconImplicitHeight, textImplicitHeight);
+ q->setImplicitSize(implicitWidth + horizontalPadding, implicitHeight + verticalPadding);
+}
+
+// adapted from QStyle::alignedRect()
+static QRectF alignedRect(bool mirrored, Qt::Alignment alignment, const QSizeF &size, const QRectF &rectangle)
+{
+ alignment = QGuiApplicationPrivate::visualAlignment(mirrored ? Qt::RightToLeft : Qt::LeftToRight, alignment);
+ qreal x = rectangle.x();
+ qreal y = rectangle.y();
+ const qreal w = size.width();
+ const qreal h = size.height();
+ if ((alignment & Qt::AlignVCenter) == Qt::AlignVCenter)
+ y += rectangle.height() / 2 - h / 2;
+ else if ((alignment & Qt::AlignBottom) == Qt::AlignBottom)
+ y += rectangle.height() - h;
+ if ((alignment & Qt::AlignRight) == Qt::AlignRight)
+ x += rectangle.width() - w;
+ else if ((alignment & Qt::AlignHCenter) == Qt::AlignHCenter)
+ x += rectangle.width() / 2 - w / 2;
+ return QRectF(x, y, w, h);
+}
+
+void QQuickIconLabelPrivate::layout()
+{
+ if (!componentComplete)
+ return;
+
+ const qreal availableWidth = width - leftPadding - rightPadding;
+ const qreal availableHeight = height - topPadding - bottomPadding;
+
+ switch (display) {
+ case QQuickIconLabel::IconOnly:
+ if (image) {
+ const QRectF iconRect = alignedRect(mirrored, alignment,
+ QSizeF(qMin(image->implicitWidth(), availableWidth),
+ qMin(image->implicitHeight(), availableHeight)),
+ QRectF(leftPadding, topPadding, availableWidth, availableHeight));
+ image->setSize(iconRect.size());
+ image->setPosition(iconRect.topLeft());
+ }
+ break;
+ case QQuickIconLabel::TextOnly:
+ if (label) {
+ const QRectF textRect = alignedRect(mirrored, alignment,
+ QSizeF(qMin(label->implicitWidth(), availableWidth),
+ qMin(label->implicitHeight(), availableHeight)),
+ QRectF(leftPadding, topPadding, availableWidth, availableHeight));
+ label->setSize(textRect.size());
+ label->setPosition(textRect.topLeft());
+ }
+ break;
+
+ case QQuickIconLabel::TextUnderIcon: {
+ // Work out the sizes first, as the positions depend on them.
+ QSizeF iconSize;
+ QSizeF textSize;
+ if (image) {
+ iconSize.setWidth(qMin(image->implicitWidth(), availableWidth));
+ iconSize.setHeight(qMin(image->implicitHeight(), availableHeight));
+ }
+ qreal effectiveSpacing = 0;
+ if (label) {
+ if (!iconSize.isEmpty())
+ effectiveSpacing = spacing;
+ textSize.setWidth(qMin(label->implicitWidth(), availableWidth));
+ textSize.setHeight(qMin(label->implicitHeight(), availableHeight - iconSize.height() - effectiveSpacing));
+ }
+
+ QRectF combinedRect = alignedRect(mirrored, alignment,
+ QSizeF(qMax(iconSize.width(), textSize.width()),
+ iconSize.height() + effectiveSpacing + textSize.height()),
+ QRectF(leftPadding, topPadding, availableWidth, availableHeight));
+ if (image) {
+ QRectF iconRect = alignedRect(mirrored, Qt::AlignHCenter | Qt::AlignTop, iconSize, combinedRect);
+ image->setSize(iconRect.size());
+ image->setPosition(iconRect.topLeft());
+ }
+ if (label) {
+ QRectF textRect = alignedRect(mirrored, Qt::AlignHCenter | Qt::AlignBottom, textSize, combinedRect);
+ label->setSize(textRect.size());
+ label->setPosition(textRect.topLeft());
+ }
+ break;
+ }
+
+ case QQuickIconLabel::TextBesideIcon:
+ default:
+ // Work out the sizes first, as the positions depend on them.
+ QSizeF iconSize(0, 0);
+ QSizeF textSize(0, 0);
+ if (image) {
+ iconSize.setWidth(qMin(image->implicitWidth(), availableWidth));
+ iconSize.setHeight(qMin(image->implicitHeight(), availableHeight));
+ }
+ qreal effectiveSpacing = 0;
+ if (label) {
+ if (!iconSize.isEmpty())
+ effectiveSpacing = spacing;
+ textSize.setWidth(qMin(label->implicitWidth(), availableWidth - iconSize.width() - effectiveSpacing));
+ textSize.setHeight(qMin(label->implicitHeight(), availableHeight));
+ }
+
+ const QRectF combinedRect = alignedRect(mirrored, alignment,
+ QSizeF(iconSize.width() + effectiveSpacing + textSize.width(),
+ qMax(iconSize.height(), textSize.height())),
+ QRectF(leftPadding, topPadding, availableWidth, availableHeight));
+ if (image) {
+ const QRectF iconRect = alignedRect(mirrored, Qt::AlignLeft | Qt::AlignVCenter, iconSize, combinedRect);
+ image->setSize(iconRect.size());
+ image->setPosition(iconRect.topLeft());
+ }
+ if (label) {
+ const QRectF textRect = alignedRect(mirrored, Qt::AlignRight | Qt::AlignVCenter, textSize, combinedRect);
+ label->setSize(textRect.size());
+ label->setPosition(textRect.topLeft());
+ }
+ break;
+ }
+}
+
+static const QQuickItemPrivate::ChangeTypes itemChangeTypes =
+ QQuickItemPrivate::ImplicitWidth
+ | QQuickItemPrivate::ImplicitHeight
+ | QQuickItemPrivate::Destroyed;
+
+void QQuickIconLabelPrivate::watchChanges(QQuickItem *item)
+{
+ QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
+ itemPrivate->addItemChangeListener(this, itemChangeTypes);
+}
+
+void QQuickIconLabelPrivate::unwatchChanges(QQuickItem* item)
+{
+ QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
+ itemPrivate->removeItemChangeListener(this, itemChangeTypes);
+}
+
+void QQuickIconLabelPrivate::itemImplicitWidthChanged(QQuickItem *)
+{
+ updateImplicitSize();
+ layout();
+}
+
+void QQuickIconLabelPrivate::itemImplicitHeightChanged(QQuickItem *)
+{
+ updateImplicitSize();
+ layout();
+}
+
+void QQuickIconLabelPrivate::itemDestroyed(QQuickItem *item)
+{
+ unwatchChanges(item);
+ if (item == image)
+ image = nullptr;
+ else if (item == label)
+ label = nullptr;
+}
+
+QQuickIconLabel::QQuickIconLabel(QQuickItem *parent)
+ : QQuickItem(*(new QQuickIconLabelPrivate), parent)
+{
+}
+
+QQuickIconLabel::~QQuickIconLabel()
+{
+ Q_D(QQuickIconLabel);
+ if (d->image)
+ d->unwatchChanges(d->image);
+ if (d->label)
+ d->unwatchChanges(d->label);
+}
+
+QQuickIcon QQuickIconLabel::icon() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->icon;
+}
+
+void QQuickIconLabel::setIcon(const QQuickIcon &icon)
+{
+ Q_D(QQuickIconLabel);
+ if (d->icon == icon)
+ return;
+
+ d->icon = icon;
+ d->updateOrSyncImage();
+}
+
+QString QQuickIconLabel::text() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->text;
+}
+
+void QQuickIconLabel::setText(const QString text)
+{
+ Q_D(QQuickIconLabel);
+ if (d->text == text)
+ return;
+
+ d->text = text;
+ d->updateOrSyncLabel();
+}
+
+QFont QQuickIconLabel::font() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->font;
+}
+
+void QQuickIconLabel::setFont(const QFont &font)
+{
+ Q_D(QQuickIconLabel);
+ if (d->font == font)
+ return;
+
+ d->font = font;
+ if (d->label)
+ d->label->setFont(font);
+}
+
+QColor QQuickIconLabel::color() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->color;
+}
+
+void QQuickIconLabel::setColor(const QColor &color)
+{
+ Q_D(QQuickIconLabel);
+ if (d->color == color)
+ return;
+
+ d->color = color;
+ if (d->label)
+ d->label->setColor(color);
+}
+
+QQuickIconLabel::Display QQuickIconLabel::display() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->display;
+}
+
+void QQuickIconLabel::setDisplay(Display display)
+{
+ Q_D(QQuickIconLabel);
+ if (d->display == display)
+ return;
+
+ d->display = display;
+ d->updateImage();
+ d->updateLabel();
+ d->updateImplicitSize();
+ d->layout();
+}
+
+qreal QQuickIconLabel::spacing() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->spacing;
+}
+
+void QQuickIconLabel::setSpacing(qreal spacing)
+{
+ Q_D(QQuickIconLabel);
+ if (qFuzzyCompare(d->spacing, spacing))
+ return;
+
+ d->spacing = spacing;
+ if (d->image && d->label) {
+ d->updateImplicitSize();
+ d->layout();
+ }
+}
+
+bool QQuickIconLabel::isMirrored() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->mirrored;
+}
+
+void QQuickIconLabel::setMirrored(bool mirrored)
+{
+ Q_D(QQuickIconLabel);
+ if (d->mirrored == mirrored)
+ return;
+
+ d->mirrored = mirrored;
+ d->layout();
+}
+
+Qt::Alignment QQuickIconLabel::alignment() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->alignment;
+}
+
+void QQuickIconLabel::setAlignment(Qt::Alignment alignment)
+{
+ Q_D(QQuickIconLabel);
+ const int valign = alignment & Qt::AlignVertical_Mask;
+ const int halign = alignment & Qt::AlignHorizontal_Mask;
+ const uint align = (valign ? valign : Qt::AlignVCenter) | (halign ? halign : Qt::AlignHCenter);
+ if (d->alignment == align)
+ return;
+
+ d->alignment = static_cast<Qt::Alignment>(align);
+ if (d->label) {
+ d->label->setVAlign(static_cast<QQuickText::VAlignment>(valign));
+ d->label->setHAlign(static_cast<QQuickText::HAlignment>(halign));
+ }
+ if (d->image) {
+ d->image->setVerticalAlignment(static_cast<QQuickImage::VAlignment>(valign));
+ d->image->setHorizontalAlignment(static_cast<QQuickImage::HAlignment>(halign));
+ }
+ d->layout();
+}
+
+qreal QQuickIconLabel::topPadding() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->topPadding;
+}
+
+void QQuickIconLabel::setTopPadding(qreal padding)
+{
+ Q_D(QQuickIconLabel);
+ if (qFuzzyCompare(d->topPadding, padding))
+ return;
+
+ d->topPadding = padding;
+ d->updateImplicitSize();
+ d->layout();
+}
+
+void QQuickIconLabel::resetTopPadding()
+{
+ setTopPadding(0);
+}
+
+qreal QQuickIconLabel::leftPadding() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->leftPadding;
+}
+
+void QQuickIconLabel::setLeftPadding(qreal padding)
+{
+ Q_D(QQuickIconLabel);
+ if (qFuzzyCompare(d->leftPadding, padding))
+ return;
+
+ d->leftPadding = padding;
+ d->updateImplicitSize();
+ d->layout();
+}
+
+void QQuickIconLabel::resetLeftPadding()
+{
+ setLeftPadding(0);
+}
+
+qreal QQuickIconLabel::rightPadding() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->rightPadding;
+}
+
+void QQuickIconLabel::setRightPadding(qreal padding)
+{
+ Q_D(QQuickIconLabel);
+ if (qFuzzyCompare(d->rightPadding, padding))
+ return;
+
+ d->rightPadding = padding;
+ d->updateImplicitSize();
+ d->layout();
+}
+
+void QQuickIconLabel::resetRightPadding()
+{
+ setRightPadding(0);
+}
+
+qreal QQuickIconLabel::bottomPadding() const
+{
+ Q_D(const QQuickIconLabel);
+ return d->bottomPadding;
+}
+
+void QQuickIconLabel::setBottomPadding(qreal padding)
+{
+ Q_D(QQuickIconLabel);
+ if (qFuzzyCompare(d->bottomPadding, padding))
+ return;
+
+ d->bottomPadding = padding;
+ d->updateImplicitSize();
+ d->layout();
+}
+
+void QQuickIconLabel::resetBottomPadding()
+{
+ setBottomPadding(0);
+}
+
+void QQuickIconLabel::componentComplete()
+{
+ Q_D(QQuickIconLabel);
+ if (d->image)
+ completeComponent(d->image);
+ if (d->label)
+ completeComponent(d->label);
+ QQuickItem::componentComplete();
+ d->layout();
+}
+
+void QQuickIconLabel::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
+{
+ Q_D(QQuickIconLabel);
+ QQuickItem::geometryChanged(newGeometry, oldGeometry);
+ d->layout();
+}
+
+QT_END_NAMESPACE
diff --git a/src/quickcontrols2/qquickiconlabel_p.h b/src/quickcontrols2/qquickiconlabel_p.h
new file mode 100644
index 00000000..df79dbf2
--- /dev/null
+++ b/src/quickcontrols2/qquickiconlabel_p.h
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKICONLABEL_P_H
+#define QQUICKICONLABEL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuick/qquickitem.h>
+#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickTemplates2/private/qquickicon_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickIconLabelPrivate;
+
+class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickIconLabel : public QQuickItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon FINAL)
+ Q_PROPERTY(QString text READ text WRITE setText FINAL)
+ Q_PROPERTY(QFont font READ font WRITE setFont FINAL)
+ Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
+ Q_PROPERTY(Display display READ display WRITE setDisplay FINAL)
+ Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing FINAL)
+ Q_PROPERTY(bool mirrored READ isMirrored WRITE setMirrored FINAL)
+ Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment FINAL)
+ Q_PROPERTY(qreal topPadding READ topPadding WRITE setTopPadding RESET resetTopPadding FINAL)
+ Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding FINAL)
+ Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding FINAL)
+ Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding FINAL)
+
+public:
+ enum Display {
+ IconOnly,
+ TextOnly,
+ TextBesideIcon,
+ TextUnderIcon
+ };
+ Q_ENUM(Display)
+
+ explicit QQuickIconLabel(QQuickItem *parent = nullptr);
+ ~QQuickIconLabel();
+
+ QQuickIcon icon() const;
+ void setIcon(const QQuickIcon &icon);
+
+ QString text() const;
+ void setText(const QString text);
+
+ QFont font() const;
+ void setFont(const QFont &font);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+ Display display() const;
+ void setDisplay(Display display);
+
+ qreal spacing() const;
+ void setSpacing(qreal spacing);
+
+ bool isMirrored() const;
+ void setMirrored(bool mirrored);
+
+ Qt::Alignment alignment() const;
+ void setAlignment(Qt::Alignment alignment);
+
+ qreal topPadding() const;
+ void setTopPadding(qreal padding);
+ void resetTopPadding();
+
+ qreal leftPadding() const;
+ void setLeftPadding(qreal padding);
+ void resetLeftPadding();
+
+ qreal rightPadding() const;
+ void setRightPadding(qreal padding);
+ void resetRightPadding();
+
+ qreal bottomPadding() const;
+ void setBottomPadding(qreal padding);
+ void resetBottomPadding();
+
+protected:
+ void componentComplete() override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+
+private:
+ Q_DISABLE_COPY(QQuickIconLabel)
+ Q_DECLARE_PRIVATE(QQuickIconLabel)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickIconLabel)
+
+#endif // QQUICKICONLABEL_P_H
diff --git a/src/quickcontrols2/qquickiconlabel_p_p.h b/src/quickcontrols2/qquickiconlabel_p_p.h
new file mode 100644
index 00000000..f0f4df4c
--- /dev/null
+++ b/src/quickcontrols2/qquickiconlabel_p_p.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKICONLABEL_P_P_H
+#define QQUICKICONLABEL_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuick/private/qquickitem_p.h>
+#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2/private/qquickiconlabel_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickIconImage;
+class QQuickMnemonicLabel;
+
+class QQuickIconLabelPrivate : public QQuickItemPrivate, public QQuickItemChangeListener
+{
+ Q_DECLARE_PUBLIC(QQuickIconLabel)
+
+public:
+ explicit QQuickIconLabelPrivate();
+
+ bool hasIcon() const;
+ bool hasText() const;
+
+ bool createImage();
+ bool destroyImage();
+ bool updateImage();
+ void syncImage();
+ void updateOrSyncImage();
+
+ bool createLabel();
+ bool destroyLabel();
+ bool updateLabel();
+ void syncLabel();
+ void updateOrSyncLabel();
+
+ void updateImplicitSize();
+ void layout();
+
+ void watchChanges(QQuickItem *item);
+ void unwatchChanges(QQuickItem *item);
+ void setPositioningDirty();
+
+ bool isLeftToRight() const;
+
+ void itemImplicitWidthChanged(QQuickItem *) override;
+ void itemImplicitHeightChanged(QQuickItem *) override;
+ void itemDestroyed(QQuickItem *item) override;
+
+ bool mirrored;
+ QQuickIconLabel::Display display;
+ Qt::Alignment alignment;
+ qreal spacing;
+ qreal topPadding;
+ qreal leftPadding;
+ qreal rightPadding;
+ qreal bottomPadding;
+ QFont font;
+ QColor color;
+ QString text;
+ QQuickIcon icon;
+ QQuickIconImage *image;
+ QQuickMnemonicLabel *label;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKICONLABEL_P_P_H
diff --git a/src/quickcontrols2/qquickmnemoniclabel.cpp b/src/quickcontrols2/qquickmnemoniclabel.cpp
new file mode 100644
index 00000000..9c8e9ab1
--- /dev/null
+++ b/src/quickcontrols2/qquickmnemoniclabel.cpp
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquickmnemoniclabel_p.h"
+
+#include <QtQuick/private/qquicktext_p_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QQuickMnemonicLabel::QQuickMnemonicLabel(QQuickItem *parent)
+ : QQuickText(parent),
+ m_mnemonicVisible(true)
+{
+}
+
+QString QQuickMnemonicLabel::text() const
+{
+ return m_fullText;
+}
+
+void QQuickMnemonicLabel::setText(const QString &text)
+{
+ if (m_fullText == text)
+ return;
+
+ m_fullText = text;
+ updateMnemonic();
+}
+
+bool QQuickMnemonicLabel::isMnemonicVisible() const
+{
+ return m_mnemonicVisible;
+}
+
+void QQuickMnemonicLabel::setMnemonicVisible(bool visible)
+{
+ if (m_mnemonicVisible == visible)
+ return;
+
+ m_mnemonicVisible = visible;
+ updateMnemonic();
+
+ if (isComponentComplete())
+ forceLayout();
+}
+
+static QTextLayout::FormatRange underlineRange(int start, int length = 1)
+{
+ QTextLayout::FormatRange range;
+ range.start = start;
+ range.length = length;
+ range.format.setFontUnderline(true);
+ return range;
+}
+
+// based on QPlatformTheme::removeMnemonics()
+void QQuickMnemonicLabel::updateMnemonic()
+{
+ QString text(m_fullText.size(), 0);
+ int idx = 0;
+ int pos = 0;
+ int len = m_fullText.length();
+ QVector<QTextLayout::FormatRange> formats;
+ while (len) {
+ if (m_fullText.at(pos) == QLatin1Char('&') && (len == 1 || m_fullText.at(pos + 1) != QLatin1Char('&'))) {
+ if (m_mnemonicVisible && (pos == 0 || m_fullText.at(pos - 1) != QLatin1Char('&')))
+ formats += underlineRange(pos);
+ ++pos;
+ --len;
+ if (len == 0)
+ break;
+ } else if (m_fullText.at(pos) == QLatin1Char('(') && len >= 4 &&
+ m_fullText.at(pos + 1) == QLatin1Char('&') &&
+ m_fullText.at(pos + 2) != QLatin1Char('&') &&
+ m_fullText.at(pos + 3) == QLatin1Char(')')) {
+ // a mnemonic with format "\s*(&X)"
+ if (m_mnemonicVisible) {
+ formats += underlineRange(pos + 1);
+ } else {
+ int n = 0;
+ while (idx > n && text.at(idx - n - 1).isSpace())
+ ++n;
+ idx -= n;
+ pos += 4;
+ len -= 4;
+ continue;
+ }
+ }
+ text[idx] = m_fullText.at(pos);
+ ++pos;
+ ++idx;
+ --len;
+ }
+ text.truncate(idx);
+
+ QQuickTextPrivate::get(this)->layout.setFormats(formats);
+ QQuickText::setText(text);
+}
+
+QT_END_NAMESPACE
diff --git a/src/quickcontrols2/qquickmnemoniclabel_p.h b/src/quickcontrols2/qquickmnemoniclabel_p.h
new file mode 100644
index 00000000..33bc1e08
--- /dev/null
+++ b/src/quickcontrols2/qquickmnemoniclabel_p.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKMNEMONICLABEL_P_H
+#define QQUICKMNEMONICLABEL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuick/private/qquicktext_p.h>
+#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickMnemonicLabel : public QQuickText
+{
+ Q_OBJECT
+ Q_PROPERTY(QString text READ text WRITE setText FINAL)
+ Q_PROPERTY(bool mnemonicVisible READ isMnemonicVisible WRITE setMnemonicVisible FINAL)
+
+public:
+ explicit QQuickMnemonicLabel(QQuickItem *parent = nullptr);
+
+ QString text() const;
+ void setText(const QString &text);
+
+ bool isMnemonicVisible() const;
+ void setMnemonicVisible(bool visible);
+
+private:
+ void updateMnemonic();
+
+ bool m_mnemonicVisible;
+ QString m_fullText;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickMnemonicLabel)
+
+#endif // QQUICKMNEMONICLABEL_P_H
diff --git a/src/quickcontrols2/qquickpaddedrectangle.cpp b/src/quickcontrols2/qquickpaddedrectangle.cpp
index 3555d6d7..f7088d54 100644
--- a/src/quickcontrols2/qquickpaddedrectangle.cpp
+++ b/src/quickcontrols2/qquickpaddedrectangle.cpp
@@ -200,7 +200,10 @@ QSGNode *QQuickPaddedRectangle::updatePaintNode(QSGNode *node, UpdatePaintNodeDa
m.translate(left, top);
transformNode->setMatrix(m);
- rectNode->setRect(boundingRect().adjusted(0, 0, -left-right, -top-bottom));
+ qreal w = qMax<qreal>(0.0, width() -left-right);
+ qreal h = qMax<qreal>(0.0, height() -top-bottom);
+
+ rectNode->setRect(QRectF(0, 0, w, h));
rectNode->update();
}
}
diff --git a/src/quickcontrols2/qquickproxytheme_p.h b/src/quickcontrols2/qquickproxytheme_p.h
index 04f800f4..2d271e8c 100644
--- a/src/quickcontrols2/qquickproxytheme_p.h
+++ b/src/quickcontrols2/qquickproxytheme_p.h
@@ -53,7 +53,7 @@
QT_BEGIN_NAMESPACE
-class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickProxyTheme : public QPlatformTheme
+class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickProxyTheme : public QPlatformTheme
{
public:
explicit QQuickProxyTheme(QPlatformTheme *theme = nullptr);
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp
index 80ed5ea9..c4555ee7 100644
--- a/src/quickcontrols2/qquickstyle.cpp
+++ b/src/quickcontrols2/qquickstyle.cpp
@@ -36,13 +36,17 @@
#include "qquickstyle.h"
#include "qquickstyle_p.h"
-#include "qquickstyleattached_p.h"
#include <QtCore/qdir.h>
+#include <QtCore/qfile.h>
#include <QtCore/qdebug.h>
#include <QtCore/qsettings.h>
+#include <QtCore/qfileselector.h>
#include <QtCore/qlibraryinfo.h>
+#include <QtGui/qcolor.h>
+#include <QtGui/qpalette.h>
#include <QtGui/private/qguiapplication_p.h>
+#include <QtGui/qpa/qplatformtheme.h>
#include <QtQml/private/qqmlmetatype_p.h>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlfile.h>
@@ -176,7 +180,7 @@ struct QQuickStyleSpec
setFallbackStyle(QString::fromLatin1(qgetenv("QT_QUICK_CONTROLS_FALLBACK_STYLE")), "QT_QUICK_CONTROLS_FALLBACK_STYLE");
#if QT_CONFIG(settings)
if (style.isEmpty() || fallbackStyle.isEmpty()) {
- QSharedPointer<QSettings> settings = QQuickStyleAttached::settings(QStringLiteral("Controls"));
+ QSharedPointer<QSettings> settings = QQuickStylePrivate::settings(QStringLiteral("Controls"));
if (settings) {
if (style.isEmpty())
style = settings->value(QStringLiteral("Style")).toString();
@@ -235,7 +239,7 @@ struct QQuickStyleSpec
{
if (configFilePath.isEmpty()) {
configFilePath = QFile::decodeName(qgetenv("QT_QUICK_CONTROLS_CONF"));
- if (!QFile::exists(configFilePath)) {
+ if (configFilePath.isEmpty() || !QFile::exists(configFilePath)) {
if (!configFilePath.isEmpty())
qWarning("QT_QUICK_CONTROLS_CONF=%s: No such file", qPrintable(configFilePath));
@@ -313,6 +317,38 @@ QString QQuickStylePrivate::configFilePath()
return styleSpec()->resolveConfigFilePath();
}
+QSharedPointer<QSettings> QQuickStylePrivate::settings(const QString &group)
+{
+#ifndef QT_NO_SETTINGS
+ const QString filePath = QQuickStylePrivate::configFilePath();
+ if (QFile::exists(filePath)) {
+ QFileSelector selector;
+ QSettings *settings = new QSettings(selector.select(filePath), QSettings::IniFormat);
+ if (!group.isEmpty())
+ settings->beginGroup(group);
+ return QSharedPointer<QSettings>(settings);
+ }
+#endif // QT_NO_SETTINGS
+ return QSharedPointer<QSettings>();
+}
+
+static bool qt_is_dark_system_theme()
+{
+ if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) {
+ if (const QPalette *systemPalette = theme->palette(QPlatformTheme::SystemPalette)) {
+ const QColor textColor = systemPalette->color(QPalette::WindowText);
+ return textColor.red() > 128 && textColor.blue() > 128 && textColor.green() > 128;
+ }
+ }
+ return false;
+}
+
+bool QQuickStylePrivate::isDarkSystemTheme()
+{
+ static bool dark = qt_is_dark_system_theme();
+ return dark;
+}
+
/*!
Returns the name of the application style.
diff --git a/src/quickcontrols2/qquickstyle_p.h b/src/quickcontrols2/qquickstyle_p.h
index 316783c4..b92df3c2 100644
--- a/src/quickcontrols2/qquickstyle_p.h
+++ b/src/quickcontrols2/qquickstyle_p.h
@@ -49,10 +49,13 @@
//
#include <QtCore/qurl.h>
+#include <QtCore/qsharedpointer.h>
#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
QT_BEGIN_NAMESPACE
+class QSettings;
+
class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickStylePrivate
{
public:
@@ -62,6 +65,8 @@ public:
static void init(const QUrl &baseUrl);
static void reset();
static QString configFilePath();
+ static QSharedPointer<QSettings> settings(const QString &group = QString());
+ static bool isDarkSystemTheme();
};
QT_END_NAMESPACE
diff --git a/src/quickcontrols2/qquickstyleattached.cpp b/src/quickcontrols2/qquickstyleattached.cpp
deleted file mode 100644
index b9a66169..00000000
--- a/src/quickcontrols2/qquickstyleattached.cpp
+++ /dev/null
@@ -1,269 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Quick Controls 2 module 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 "qquickstyleattached_p.h"
-#include "qquickstyle_p.h"
-
-#include <QtCore/qfile.h>
-#include <QtCore/qsettings.h>
-#include <QtCore/qfileselector.h>
-#include <QtGui/qcolor.h>
-#include <QtGui/qpalette.h>
-#include <QtGui/private/qguiapplication_p.h>
-#include <QtGui/qpa/qplatformtheme.h>
-#include <QtQuick/qquickwindow.h>
-#include <QtQuick/private/qquickitem_p.h>
-#include <QtQuickTemplates2/private/qquickpopup_p.h>
-
-QT_BEGIN_NAMESPACE
-
-static bool isDarkSystemTheme()
-{
- if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) {
- if (const QPalette *systemPalette = theme->palette(QPlatformTheme::SystemPalette)) {
- const QColor textColor = systemPalette->color(QPalette::WindowText);
- return textColor.red() > 128 && textColor.blue() > 128 && textColor.green() > 128;
- }
- }
- return false;
-}
-
-Q_QUICKCONTROLS2_PRIVATE_EXPORT bool qt_is_dark_system_theme()
-{
- static bool dark = isDarkSystemTheme();
- return dark;
-}
-
-static QQuickStyleAttached *attachedStyle(const QMetaObject *type, QObject *object, bool create = false)
-{
- if (!object)
- return nullptr;
- int idx = -1;
- return qobject_cast<QQuickStyleAttached *>(qmlAttachedPropertiesObject(&idx, object, type, create));
-}
-
-static QQuickStyleAttached *findParentStyle(const QMetaObject *type, QObject *object)
-{
- QQuickItem *item = qobject_cast<QQuickItem *>(object);
- if (item) {
- // lookup parent items and popups
- QQuickItem *parent = item->parentItem();
- while (parent) {
- QQuickStyleAttached *style = attachedStyle(type, parent);
- if (style)
- return style;
-
- QQuickPopup *popup = qobject_cast<QQuickPopup *>(parent->parent());
- if (popup)
- return attachedStyle(type, popup);
-
- parent = parent->parentItem();
- }
-
- // fallback to item's window
- QQuickStyleAttached *style = attachedStyle(type, item->window());
- if (style)
- return style;
- } else {
- // lookup popup's window
- QQuickPopup *popup = qobject_cast<QQuickPopup *>(object);
- if (popup)
- return attachedStyle(type, popup->popupItem()->window());
- }
-
- // lookup parent window
- QQuickWindow *window = qobject_cast<QQuickWindow *>(object);
- if (window) {
- QQuickWindow *parentWindow = qobject_cast<QQuickWindow *>(window->parent());
- if (parentWindow) {
- QQuickStyleAttached *style = attachedStyle(type, window);
- if (style)
- return style;
- }
- }
-
- // fallback to engine (global)
- if (object) {
- QQmlEngine *engine = qmlEngine(object);
- if (engine) {
- QByteArray name = QByteArray("_q_") + type->className();
- QQuickStyleAttached *style = engine->property(name).value<QQuickStyleAttached*>();
- if (!style) {
- style = attachedStyle(type, engine, true);
- engine->setProperty(name, QVariant::fromValue(style));
- }
- return style;
- }
- }
-
- return nullptr;
-}
-
-static QList<QQuickStyleAttached *> findChildStyles(const QMetaObject *type, QObject *object)
-{
- QList<QQuickStyleAttached *> children;
-
- QQuickItem *item = qobject_cast<QQuickItem *>(object);
- if (!item) {
- QQuickWindow *window = qobject_cast<QQuickWindow *>(object);
- if (window) {
- item = window->contentItem();
-
- const auto windowChildren = window->children();
- for (QObject *child : windowChildren) {
- QQuickWindow *childWindow = qobject_cast<QQuickWindow *>(child);
- if (childWindow) {
- QQuickStyleAttached *style = attachedStyle(type, childWindow);
- if (style)
- children += style;
- }
- }
- }
- }
-
- if (item) {
- const auto childItems = item->childItems();
- for (QQuickItem *child : childItems) {
- QQuickStyleAttached *style = attachedStyle(type, child);
- if (style)
- children += style;
- else
- children += findChildStyles(type, child);
- }
- }
-
- return children;
-}
-
-QQuickStyleAttached::QQuickStyleAttached(QObject *parent) : QObject(parent)
-{
- QQuickItem *item = qobject_cast<QQuickItem *>(parent);
- if (!item) {
- QQuickPopup *popup = qobject_cast<QQuickPopup *>(parent);
- if (popup)
- item = popup->popupItem();
- }
-
- if (item) {
- connect(item, &QQuickItem::windowChanged, this, &QQuickStyleAttached::itemWindowChanged);
- QQuickItemPrivate::get(item)->addItemChangeListener(this, QQuickItemPrivate::Parent);
- }
-}
-
-QQuickStyleAttached::~QQuickStyleAttached()
-{
- QQuickItem *item = qobject_cast<QQuickItem *>(parent());
- if (item) {
- disconnect(item, &QQuickItem::windowChanged, this, &QQuickStyleAttached::itemWindowChanged);
- QQuickItemPrivate::get(item)->removeItemChangeListener(this, QQuickItemPrivate::Parent);
- }
-
- setParentStyle(nullptr);
-}
-
-QSharedPointer<QSettings> QQuickStyleAttached::settings(const QString &group)
-{
-#ifndef QT_NO_SETTINGS
- const QString filePath = QQuickStylePrivate::configFilePath();
- if (QFile::exists(filePath)) {
- QFileSelector selector;
- QSettings *settings = new QSettings(selector.select(filePath), QSettings::IniFormat);
- if (!group.isEmpty())
- settings->beginGroup(group);
- return QSharedPointer<QSettings>(settings);
- }
-#endif // QT_NO_SETTINGS
- return QSharedPointer<QSettings>();
-}
-
-QList<QQuickStyleAttached *> QQuickStyleAttached::childStyles() const
-{
- return m_childStyles;
-}
-
-QQuickStyleAttached *QQuickStyleAttached::parentStyle() const
-{
- return m_parentStyle;
-}
-
-void QQuickStyleAttached::setParentStyle(QQuickStyleAttached *style)
-{
- if (m_parentStyle != style) {
- QQuickStyleAttached *oldParent = m_parentStyle;
- if (m_parentStyle)
- m_parentStyle->m_childStyles.removeOne(this);
- m_parentStyle = style;
- if (style)
- style->m_childStyles.append(this);
- parentStyleChange(style, oldParent);
- }
-}
-
-void QQuickStyleAttached::init()
-{
- QQuickStyleAttached *parentStyle = findParentStyle(metaObject(), parent());
- if (parentStyle)
- setParentStyle(parentStyle);
-
- const QList<QQuickStyleAttached *> children = findChildStyles(metaObject(), parent());
- for (QQuickStyleAttached *child : children)
- child->setParentStyle(this);
-}
-
-void QQuickStyleAttached::parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent)
-{
- Q_UNUSED(newParent);
- Q_UNUSED(oldParent);
-}
-
-void QQuickStyleAttached::itemWindowChanged(QQuickWindow *window)
-{
- QQuickStyleAttached *parentStyle = nullptr;
- QQuickItem *item = qobject_cast<QQuickItem *>(sender());
- if (item)
- parentStyle = findParentStyle(metaObject(), item);
- if (!parentStyle)
- parentStyle = attachedStyle(metaObject(), window);
- setParentStyle(parentStyle);
-}
-
-void QQuickStyleAttached::itemParentChanged(QQuickItem *item, QQuickItem *parent)
-{
- Q_UNUSED(parent);
- setParentStyle(findParentStyle(metaObject(), item));
-}
-
-QT_END_NAMESPACE
diff --git a/src/quickcontrols2/qquickstyleplugin.cpp b/src/quickcontrols2/qquickstyleplugin.cpp
index 1f01da52..fa8e9785 100644
--- a/src/quickcontrols2/qquickstyleplugin.cpp
+++ b/src/quickcontrols2/qquickstyleplugin.cpp
@@ -65,14 +65,23 @@ void QQuickStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri)
if (!m_theme.isNull())
return;
- const QString style = name();
- if (!style.isEmpty() && style.compare(QQuickStyle::name(), Qt::CaseInsensitive) == 0) {
+ if (isCurrent()) {
m_theme.reset(createTheme());
if (m_theme)
QGuiApplicationPrivate::platform_theme = m_theme.data();
}
}
+bool QQuickStylePlugin::isCurrent() const
+{
+ QString style = QQuickStyle::name();
+ if (style.isEmpty())
+ style = QStringLiteral("Default");
+
+ const QString theme = name();
+ return theme.compare(style, Qt::CaseInsensitive) == 0;
+}
+
QString QQuickStylePlugin::name() const
{
return QString();
diff --git a/src/quickcontrols2/qquickstyleplugin_p.h b/src/quickcontrols2/qquickstyleplugin_p.h
index cd5a77b6..9457b472 100644
--- a/src/quickcontrols2/qquickstyleplugin_p.h
+++ b/src/quickcontrols2/qquickstyleplugin_p.h
@@ -67,6 +67,7 @@ public:
void registerTypes(const char *uri) override;
void initializeEngine(QQmlEngine *engine, const char *uri) override;
+ bool isCurrent() const;
virtual QString name() const;
virtual QQuickProxyTheme *createTheme() const;
diff --git a/src/quickcontrols2/qquickstyleselector.cpp b/src/quickcontrols2/qquickstyleselector.cpp
index 6d04c190..0e403dc1 100644
--- a/src/quickcontrols2/qquickstyleselector.cpp
+++ b/src/quickcontrols2/qquickstyleselector.cpp
@@ -65,13 +65,21 @@ static QString ensureSlash(const QString &path)
return path + QLatin1Char('/');
}
+static QStringList prefixedPlatformSelectors(const QChar &prefix)
+{
+ QStringList selectors = QFileSelectorPrivate::platformSelectors();
+ for (int i = 0; i < selectors.count(); ++i)
+ selectors[i].prepend(prefix);
+ return selectors;
+}
+
static QStringList allSelectors(const QString &style = QString())
{
- static const QStringList platformSelectors = QFileSelectorPrivate::platformSelectors();
+ static const QStringList platformSelectors = prefixedPlatformSelectors(QLatin1Char('+'));
QStringList selectors = platformSelectors;
const QString locale = QLocale().name();
if (!locale.isEmpty())
- selectors += locale;
+ selectors += QLatin1Char('+') + locale;
if (!style.isEmpty())
selectors.prepend(style);
return selectors;
diff --git a/src/quickcontrols2/qquicktheme.cpp b/src/quickcontrols2/qquicktheme.cpp
new file mode 100644
index 00000000..06a66bfd
--- /dev/null
+++ b/src/quickcontrols2/qquicktheme.cpp
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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 "qquicktheme_p.h"
+#include "qquickstyle_p.h"
+
+#include <QtCore/qmetaobject.h>
+#include <QtCore/qsettings.h>
+
+#include <functional>
+
+QT_BEGIN_NAMESPACE
+
+#if QT_CONFIG(settings)
+static void readValue(const QSharedPointer<QSettings> &settings, const QString &name, std::function<void(const QVariant &)> setValue)
+{
+ const QVariant var = settings->value(name);
+ if (var.isValid())
+ setValue(var);
+}
+
+template <typename Enum>
+static Enum toEnumValue(const QVariant &var)
+{
+ // ### TODO: expose QFont enums to the meta object system using Q_ENUM
+ //QMetaEnum enumeration = QMetaEnum::fromType<Enum>();
+ //bool ok = false;
+ //int value = enumeration.keyToValue(var.toByteArray(), &ok);
+ //if (!ok)
+ // value = var.toInt();
+ //return static_cast<Enum>(value);
+
+ return static_cast<Enum>(var.toInt());
+}
+
+QFont *readFont(const QSharedPointer<QSettings> &settings)
+{
+ const QVariant var = settings->value(QStringLiteral("Font"));
+ if (var.isValid())
+ return new QFont(var.value<QFont>());
+
+ QFont f;
+ settings->beginGroup(QStringLiteral("Font"));
+ readValue(settings, QStringLiteral("Family"), [&f](const QVariant &var) { f.setFamily(var.toString()); });
+ readValue(settings, QStringLiteral("PointSize"), [&f](const QVariant &var) { f.setPointSizeF(var.toReal()); });
+ readValue(settings, QStringLiteral("PixelSize"), [&f](const QVariant &var) { f.setPixelSize(var.toInt()); });
+ readValue(settings, QStringLiteral("StyleHint"), [&f](const QVariant &var) { f.setStyleHint(toEnumValue<QFont::StyleHint>(var.toInt())); });
+ readValue(settings, QStringLiteral("Weight"), [&f](const QVariant &var) { f.setWeight(toEnumValue<QFont::Weight>(var)); });
+ readValue(settings, QStringLiteral("Style"), [&f](const QVariant &var) { f.setStyle(toEnumValue<QFont::Style>(var.toInt())); });
+ settings->endGroup();
+ return new QFont(f);
+}
+
+static void readColorGroup(const QSharedPointer<QSettings> &settings, QPalette::ColorGroup group, QPalette *palette)
+{
+ const QStringList keys = settings->childKeys();
+ if (keys.isEmpty())
+ return;
+
+ static const int index = QPalette::staticMetaObject.indexOfEnumerator("ColorRole");
+ Q_ASSERT(index != -1);
+ QMetaEnum metaEnum = QPalette::staticMetaObject.enumerator(index);
+
+ for (const QString &key : keys) {
+ bool ok = false;
+ int role = metaEnum.keyToValue(key.toUtf8(), &ok);
+ if (ok)
+ palette->setColor(group, static_cast<QPalette::ColorRole>(role), settings->value(key).value<QColor>());
+ }
+}
+
+static QPalette *readPalette(const QSharedPointer<QSettings> &settings)
+{
+ QPalette p;
+ settings->beginGroup(QStringLiteral("Palette"));
+ readColorGroup(settings, QPalette::All, &p);
+
+ settings->beginGroup(QStringLiteral("Normal"));
+ readColorGroup(settings, QPalette::Normal, &p);
+ settings->endGroup();
+
+ settings->beginGroup(QStringLiteral("Disabled"));
+ readColorGroup(settings, QPalette::Disabled, &p);
+ settings->endGroup();
+ return new QPalette(p);
+}
+
+#endif // QT_CONFIG(settings)
+
+QQuickTheme::QQuickTheme(const QString &style)
+ : QQuickProxyTheme()
+{
+#if QT_CONFIG(settings)
+ QSharedPointer<QSettings> settings = QQuickStylePrivate::settings(style);
+ if (settings) {
+ m_styleFont.reset(readFont(settings));
+ m_stylePalette.reset(readPalette(settings));
+ }
+#endif
+}
+
+const QFont *QQuickTheme::font(Font type) const
+{
+ Q_UNUSED(type);
+ return m_styleFont.data();
+}
+
+const QPalette *QQuickTheme::palette(Palette type) const
+{
+ Q_UNUSED(type);
+ return m_stylePalette.data();
+}
+
+QFont QQuickTheme::resolveFont(const QFont &font) const
+{
+ if (!m_styleFont)
+ return font;
+
+ return m_styleFont->resolve(font);
+}
+
+QPalette QQuickTheme::resolvePalette(const QPalette &palette) const
+{
+ if (!m_stylePalette)
+ return palette;
+
+ return m_stylePalette->resolve(palette);
+}
+
+QT_END_NAMESPACE
diff --git a/src/quickcontrols2/qquicktheme_p.h b/src/quickcontrols2/qquicktheme_p.h
new file mode 100644
index 00000000..098ac7f1
--- /dev/null
+++ b/src/quickcontrols2/qquicktheme_p.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKTHEME_P_H
+#define QQUICKTHEME_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuickControls2/private/qquickproxytheme_p.h>
+#include <QtCore/qscopedpointer.h>
+#include <QtGui/qfont.h>
+#include <QtGui/qpalette.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickTheme : public QQuickProxyTheme
+{
+public:
+ QQuickTheme(const QString &name);
+
+ const QFont *font(Font type = SystemFont) const override;
+ const QPalette *palette(Palette type = SystemPalette) const override;
+
+protected:
+ QFont resolveFont(const QFont &font) const;
+ QPalette resolvePalette(const QPalette &palette) const;
+
+private:
+ QScopedPointer<QFont> m_styleFont;
+ QScopedPointer<QPalette> m_stylePalette;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKTHEME_P_H
diff --git a/src/quickcontrols2/quickcontrols2.pri b/src/quickcontrols2/quickcontrols2.pri
index a618989e..6537a599 100644
--- a/src/quickcontrols2/quickcontrols2.pri
+++ b/src/quickcontrols2/quickcontrols2.pri
@@ -1,26 +1,40 @@
HEADERS += \
$$PWD/qquickanimatednode_p.h \
- $$PWD/qquickcolorimageprovider_p.h \
+ $$PWD/qquickattachedobject_p.h \
+ $$PWD/qquickchecklabel_p.h \
+ $$PWD/qquickcolor_p.h \
+ $$PWD/qquickcolorimage_p.h \
+ $$PWD/qquickiconimage_p.h \
+ $$PWD/qquickiconimage_p_p.h \
+ $$PWD/qquickiconlabel_p.h \
+ $$PWD/qquickiconlabel_p_p.h \
+ $$PWD/qquickmnemoniclabel_p.h \
+ $$PWD/qquickpaddedrectangle_p.h \
$$PWD/qquickplaceholdertext_p.h \
$$PWD/qquickproxytheme_p.h \
$$PWD/qquickstyle.h \
$$PWD/qquickstyle_p.h \
- $$PWD/qquickstyleattached_p.h \
$$PWD/qquickstyleplugin_p.h \
$$PWD/qquickstyleselector_p.h \
$$PWD/qquickstyleselector_p_p.h \
- $$PWD/qquickpaddedrectangle_p.h
+ $$PWD/qquicktheme_p.h
SOURCES += \
$$PWD/qquickanimatednode.cpp \
- $$PWD/qquickcolorimageprovider.cpp \
+ $$PWD/qquickattachedobject.cpp \
+ $$PWD/qquickchecklabel.cpp \
+ $$PWD/qquickcolor.cpp \
+ $$PWD/qquickcolorimage.cpp \
+ $$PWD/qquickiconimage.cpp \
+ $$PWD/qquickiconlabel.cpp \
+ $$PWD/qquickmnemoniclabel.cpp \
+ $$PWD/qquickpaddedrectangle.cpp \
$$PWD/qquickplaceholdertext.cpp \
$$PWD/qquickproxytheme.cpp \
$$PWD/qquickstyle.cpp \
- $$PWD/qquickstyleattached.cpp \
$$PWD/qquickstyleplugin.cpp \
$$PWD/qquickstyleselector.cpp \
- $$PWD/qquickpaddedrectangle.cpp
+ $$PWD/qquicktheme.cpp
qtConfig(quick-listview):qtConfig(quick-pathview) {
HEADERS += \
diff --git a/src/quickcontrols2/quickcontrols2.pro b/src/quickcontrols2/quickcontrols2.pro
index bdad3095..8aec9953 100644
--- a/src/quickcontrols2/quickcontrols2.pro
+++ b/src/quickcontrols2/quickcontrols2.pro
@@ -7,7 +7,7 @@ QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
HEADERS += \
- $$PWD/qtquickcontrols2global.h
+ $$PWD/qtquickcontrols2global.h \
$$PWD/qtquickcontrols2global_p.h
include(quickcontrols2.pri)
diff --git a/src/quicktemplates2/qquickabstractbutton.cpp b/src/quicktemplates2/qquickabstractbutton.cpp
index efd06bd0..03f525f0 100644
--- a/src/quicktemplates2/qquickabstractbutton.cpp
+++ b/src/quicktemplates2/qquickabstractbutton.cpp
@@ -37,9 +37,14 @@
#include "qquickabstractbutton_p.h"
#include "qquickabstractbutton_p_p.h"
#include "qquickbuttongroup_p.h"
+#include "qquickaction_p.h"
+#include "qquickaction_p_p.h"
+#include "qquickshortcutcontext_p_p.h"
#include <QtGui/qstylehints.h>
#include <QtGui/qguiapplication.h>
+#include <QtGui/private/qshortcutmap_p.h>
+#include <QtGui/private/qguiapplication_p.h>
#include <QtQuick/private/qquickevents_p_p.h>
#include <QtQml/qqmllist.h>
@@ -124,9 +129,14 @@ QQuickAbstractButtonPrivate::QQuickAbstractButtonPrivate()
holdTimer(0),
delayTimer(0),
repeatTimer(0),
+#if QT_CONFIG(shortcut)
+ shortcutId(0),
+#endif
pressButtons(Qt::NoButton),
indicator(nullptr),
- group(nullptr)
+ group(nullptr),
+ display(QQuickAbstractButton::TextBesideIcon),
+ action(nullptr)
{
}
@@ -173,7 +183,7 @@ void QQuickAbstractButtonPrivate::handleRelease(const QPointF &point)
if (wasPressed) {
emit q->released();
if (!wasHeld)
- emit q->clicked();
+ trigger();
} else {
emit q->canceled();
}
@@ -249,6 +259,46 @@ void QQuickAbstractButtonPrivate::stopPressRepeat()
}
}
+#if QT_CONFIG(shortcut)
+void QQuickAbstractButtonPrivate::grabShortcut()
+{
+ Q_Q(QQuickAbstractButton);
+ if (shortcut.isEmpty())
+ return;
+
+ shortcutId = QGuiApplicationPrivate::instance()->shortcutMap.addShortcut(q, shortcut, Qt::WindowShortcut, QQuickShortcutContext::matcher);
+
+ if (!q->isEnabled())
+ QGuiApplicationPrivate::instance()->shortcutMap.setShortcutEnabled(false, shortcutId, q);
+}
+
+void QQuickAbstractButtonPrivate::ungrabShortcut()
+{
+ Q_Q(QQuickAbstractButton);
+ if (!shortcutId)
+ return;
+
+ QGuiApplicationPrivate::instance()->shortcutMap.removeShortcut(shortcutId, q);
+ shortcutId = 0;
+}
+#endif
+
+void QQuickAbstractButtonPrivate::click()
+{
+ Q_Q(QQuickAbstractButton);
+ if (effectiveEnable)
+ emit q->clicked();
+}
+
+void QQuickAbstractButtonPrivate::trigger()
+{
+ Q_Q(QQuickAbstractButton);
+ if (action && action->isEnabled())
+ action->trigger(q); // -> click()
+ else if (effectiveEnable)
+ emit q->clicked();
+}
+
void QQuickAbstractButtonPrivate::toggle(bool value)
{
Q_Q(QQuickAbstractButton);
@@ -330,6 +380,7 @@ QQuickAbstractButton::~QQuickAbstractButton()
Q_D(QQuickAbstractButton);
if (d->group)
d->group->removeButton(this);
+ d->ungrabShortcut();
}
/*!
@@ -340,7 +391,7 @@ QQuickAbstractButton::~QQuickAbstractButton()
\note The text is used for accessibility purposes, so it makes sense to
set a textual description even if the content item is an image.
- \sa {Control::contentItem}{contentItem}
+ \sa icon, display, {Control::contentItem}{contentItem}
*/
QString QQuickAbstractButton::text() const
{
@@ -354,8 +405,12 @@ void QQuickAbstractButton::setText(const QString &text)
if (d->text == text)
return;
+#if QT_CONFIG(shortcut)
+ setShortcut(QKeySequence::mnemonic(text));
+#endif
+
d->text = text;
- setAccessibleName(text);
+ setAccessibleName(d->text);
buttonChange(ButtonTextChange);
emit textChanged();
}
@@ -453,6 +508,8 @@ void QQuickAbstractButton::setChecked(bool checked)
setCheckable(true);
d->checked = checked;
+ if (d->action)
+ d->action->setChecked(checked);
setAccessibleProperty("checked", checked);
buttonChange(ButtonCheckedChange);
emit checkedChanged();
@@ -486,6 +543,8 @@ void QQuickAbstractButton::setCheckable(bool checkable)
return;
d->checkable = checkable;
+ if (d->action)
+ d->action->setCheckable(checkable);
setAccessibleProperty("checkable", checkable);
buttonChange(ButtonCheckableChange);
emit checkableChanged();
@@ -566,6 +625,162 @@ void QQuickAbstractButton::setIndicator(QQuickItem *indicator)
}
/*!
+ \qmlpropertygroup QtQuick.Controls::AbstractButton::icon
+ \qmlproperty string QtQuick.Controls::AbstractButton::icon.name
+ \qmlproperty url QtQuick.Controls::AbstractButton::icon.source
+ \qmlproperty int QtQuick.Controls::AbstractButton::icon.width
+ \qmlproperty int QtQuick.Controls::AbstractButton::icon.height
+ \qmlproperty color QtQuick.Controls::AbstractButton::icon.color
+
+ This property group was added in QtQuick.Controls 2.3.
+
+ \include qquickicon.qdocinc grouped-properties
+
+ \sa text, display, {Icons in Qt Quick Controls 2}
+*/
+
+QQuickIcon QQuickAbstractButton::icon() const
+{
+ Q_D(const QQuickAbstractButton);
+ return d->icon;
+}
+
+void QQuickAbstractButton::setIcon(const QQuickIcon &icon)
+{
+ Q_D(QQuickAbstractButton);
+ if (d->icon == icon)
+ return;
+
+ d->icon = icon;
+ emit iconChanged();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty enumeration QtQuick.Controls::AbstractButton::display
+
+ This property determines how the \l icon and \l text are displayed within
+ the button.
+
+ \table
+ \header \li Display \li Result
+ \row \li \c AbstractButton.IconOnly \li \image qtquickcontrols2-button-icononly.png
+ \row \li \c AbstractButton.TextOnly \li \image qtquickcontrols2-button-textonly.png
+ \row \li \c AbstractButton.TextBesideIcon \li \image qtquickcontrols2-button-textbesideicon.png
+ \endtable
+
+ \sa {Control::}{spacing}, {Control::}{padding}
+*/
+QQuickAbstractButton::Display QQuickAbstractButton::display() const
+{
+ Q_D(const QQuickAbstractButton);
+ return d->display;
+}
+
+void QQuickAbstractButton::setDisplay(Display display)
+{
+ Q_D(QQuickAbstractButton);
+ if (display == d->display)
+ return;
+
+ d->display = display;
+ emit displayChanged();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty Action QtQuick.Controls::AbstractButton::action
+
+ This property holds the button action.
+
+ \sa Action
+*/
+QQuickAction *QQuickAbstractButton::action() const
+{
+ Q_D(const QQuickAbstractButton);
+ return d->action;
+}
+
+void QQuickAbstractButton::setAction(QQuickAction *action)
+{
+ Q_D(QQuickAbstractButton);
+ if (d->action == action)
+ return;
+
+ if (QQuickAction *oldAction = d->action.data()) {
+ QQuickActionPrivate::get(oldAction)->unregisterItem(this);
+ QObjectPrivate::disconnect(oldAction, &QQuickAction::triggered, d, &QQuickAbstractButtonPrivate::click);
+
+ disconnect(oldAction, &QQuickAction::textChanged, this, &QQuickAbstractButton::setText);
+ disconnect(oldAction, &QQuickAction::iconChanged, this, &QQuickAbstractButton::setIcon);
+ disconnect(oldAction, &QQuickAction::checkedChanged, this, &QQuickAbstractButton::setChecked);
+ disconnect(oldAction, &QQuickAction::checkableChanged, this, &QQuickAbstractButton::setCheckable);
+ disconnect(oldAction, &QQuickAction::enabledChanged, this, &QQuickItem::setEnabled);
+ }
+
+ if (action) {
+ QQuickActionPrivate::get(action)->registerItem(this);
+ QObjectPrivate::connect(action, &QQuickAction::triggered, d, &QQuickAbstractButtonPrivate::click);
+
+ connect(action, &QQuickAction::textChanged, this, &QQuickAbstractButton::setText);
+ connect(action, &QQuickAction::iconChanged, this, &QQuickAbstractButton::setIcon);
+ connect(action, &QQuickAction::checkedChanged, this, &QQuickAbstractButton::setChecked);
+ connect(action, &QQuickAction::checkableChanged, this, &QQuickAbstractButton::setCheckable);
+ connect(action, &QQuickAction::enabledChanged, this, &QQuickItem::setEnabled);
+
+ QQuickIcon actionIcon = action->icon();
+
+ QString name = actionIcon.name();
+ if (!name.isEmpty())
+ d->icon.setName(name);
+
+ QUrl source = actionIcon.source();
+ if (!source.isEmpty())
+ d->icon.setSource(source);
+
+ int width = actionIcon.width();
+ if (width > 0)
+ d->icon.setWidth(width);
+
+ int height = actionIcon.height();
+ if (height)
+ d->icon.setHeight(height);
+
+ QColor color = actionIcon.color();
+ if (color != Qt::transparent)
+ d->icon.setColor(color);
+
+ setText(action->text());
+ setChecked(action->isChecked());
+ setCheckable(action->isCheckable());
+ setEnabled(action->isEnabled());
+ }
+
+ d->action = action;
+ emit actionChanged();
+}
+
+#if QT_CONFIG(shortcut)
+QKeySequence QQuickAbstractButton::shortcut() const
+{
+ Q_D(const QQuickAbstractButton);
+ return d->shortcut;
+}
+
+void QQuickAbstractButton::setShortcut(const QKeySequence &shortcut)
+{
+ Q_D(QQuickAbstractButton);
+ if (d->shortcut == shortcut)
+ return;
+
+ d->ungrabShortcut();
+ d->shortcut = shortcut;
+ if (isVisible())
+ d->grabShortcut();
+}
+#endif
+
+/*!
\qmlmethod void QtQuick.Controls::AbstractButton::toggle()
Toggles the checked state of the button.
@@ -576,6 +791,21 @@ void QQuickAbstractButton::toggle()
setChecked(!d->checked);
}
+bool QQuickAbstractButton::event(QEvent *event)
+{
+ Q_D(QQuickAbstractButton);
+#if QT_CONFIG(shortcut)
+ if (event->type() == QEvent::Shortcut) {
+ QShortcutEvent *se = static_cast<QShortcutEvent *>(event);
+ if (se->shortcutId() == d->shortcutId) {
+ d->trigger();
+ return true;
+ }
+ }
+#endif
+ return QQuickControl::event(event);
+}
+
void QQuickAbstractButton::focusOutEvent(QFocusEvent *event)
{
Q_D(QQuickAbstractButton);
@@ -609,7 +839,7 @@ void QQuickAbstractButton::keyReleaseEvent(QKeyEvent *event)
nextCheckState();
emit released();
- emit clicked();
+ d->trigger();
if (d->autoRepeat)
d->stopPressRepeat();
@@ -642,11 +872,25 @@ void QQuickAbstractButton::timerEvent(QTimerEvent *event)
d->startPressRepeat();
} else if (event->timerId() == d->repeatTimer) {
emit released();
- emit clicked();
+ d->trigger();
emit pressed();
}
}
+void QQuickAbstractButton::itemChange(ItemChange change, const ItemChangeData &value)
+{
+ Q_D(QQuickAbstractButton);
+ QQuickControl::itemChange(change, value);
+#if QT_CONFIG(shortcut)
+ if (change == ItemVisibleHasChanged) {
+ if (value.boolValue)
+ d->grabShortcut();
+ else
+ d->ungrabShortcut();
+ }
+#endif
+}
+
void QQuickAbstractButton::buttonChange(ButtonChange change)
{
Q_D(QQuickAbstractButton);
diff --git a/src/quicktemplates2/qquickabstractbutton_p.h b/src/quicktemplates2/qquickabstractbutton_p.h
index 71884bf6..ecce4299 100644
--- a/src/quicktemplates2/qquickabstractbutton_p.h
+++ b/src/quicktemplates2/qquickabstractbutton_p.h
@@ -49,9 +49,11 @@
//
#include <QtQuickTemplates2/private/qquickcontrol_p.h>
+#include <QtQuickTemplates2/private/qquickicon_p.h>
QT_BEGIN_NAMESPACE
+class QQuickAction;
class QQuickAbstractButtonPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickAbstractButton : public QQuickControl
@@ -64,6 +66,10 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickAbstractButton : public QQuickContr
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY checkableChanged FINAL)
Q_PROPERTY(bool autoExclusive READ autoExclusive WRITE setAutoExclusive NOTIFY autoExclusiveChanged FINAL)
Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION 3)
+ Q_PROPERTY(Display display READ display WRITE setDisplay NOTIFY displayChanged FINAL REVISION 3)
+ Q_PROPERTY(QQuickAction *action READ action WRITE setAction NOTIFY actionChanged FINAL REVISION 3)
public:
explicit QQuickAbstractButton(QQuickItem *parent = nullptr);
@@ -94,6 +100,29 @@ public:
QQuickItem *indicator() const;
void setIndicator(QQuickItem *indicator);
+ // 2.3 (Qt 5.10)
+ QQuickIcon icon() const;
+ void setIcon(const QQuickIcon &icon);
+
+ enum Display {
+ IconOnly,
+ TextOnly,
+ TextBesideIcon,
+ TextUnderIcon
+ };
+ Q_ENUM(Display)
+
+ Display display() const;
+ void setDisplay(Display display);
+
+ QQuickAction *action() const;
+ void setAction(QQuickAction *action);
+
+#if QT_CONFIG(shortcut)
+ QKeySequence shortcut() const;
+ void setShortcut(const QKeySequence &shortcut);
+#endif
+
public Q_SLOTS:
void toggle();
@@ -113,10 +142,15 @@ Q_SIGNALS:
void indicatorChanged();
// 2.2 (Qt 5.9)
Q_REVISION(2) void toggled();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void iconChanged();
+ Q_REVISION(3) void displayChanged();
+ Q_REVISION(3) void actionChanged();
protected:
QQuickAbstractButton(QQuickAbstractButtonPrivate &dd, QQuickItem *parent);
+ bool event(QEvent *event) override;
void focusOutEvent(QFocusEvent *event) override;
void keyPressEvent(QKeyEvent *event) override;
void keyReleaseEvent(QKeyEvent *event) override;
@@ -124,6 +158,8 @@ protected:
void mouseDoubleClickEvent(QMouseEvent *event) override;
void timerEvent(QTimerEvent *event) override;
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
+
enum ButtonChange {
ButtonAutoRepeatChange,
ButtonCheckedChange,
diff --git a/src/quicktemplates2/qquickabstractbutton_p_p.h b/src/quicktemplates2/qquickabstractbutton_p_p.h
index 39af6896..659846e5 100644
--- a/src/quicktemplates2/qquickabstractbutton_p_p.h
+++ b/src/quicktemplates2/qquickabstractbutton_p_p.h
@@ -50,9 +50,11 @@
#include <QtQuickTemplates2/private/qquickabstractbutton_p.h>
#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
+#include <QtGui/qkeysequence.h>
QT_BEGIN_NAMESPACE
+class QQuickAction;
class QQuickButtonGroup;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickAbstractButtonPrivate : public QQuickControlPrivate
@@ -80,9 +82,16 @@ public:
void startPressRepeat();
void stopPressRepeat();
+#if QT_CONFIG(shortcut)
+ void grabShortcut();
+ void ungrabShortcut();
+#endif
+
QQuickAbstractButton *findCheckedButton() const;
QList<QQuickAbstractButton *> findExclusiveButtons() const;
+ void click();
+ void trigger();
void toggle(bool value);
QString text;
@@ -98,10 +107,17 @@ public:
int holdTimer;
int delayTimer;
int repeatTimer;
+#if QT_CONFIG(shortcut)
+ int shortcutId;
+ QKeySequence shortcut;
+#endif
+ QQuickIcon icon;
QPointF pressPoint;
Qt::MouseButtons pressButtons;
QQuickItem *indicator;
QQuickButtonGroup *group;
+ QQuickAbstractButton::Display display;
+ QPointer<QQuickAction> action;
};
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickaction.cpp b/src/quicktemplates2/qquickaction.cpp
new file mode 100644
index 00000000..0e51daef
--- /dev/null
+++ b/src/quicktemplates2/qquickaction.cpp
@@ -0,0 +1,556 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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 "qquickaction_p.h"
+#include "qquickaction_p_p.h"
+#include "qquickactiongroup_p.h"
+#include "qquickshortcutcontext_p_p.h"
+
+#include <QtGui/qevent.h>
+#include <QtGui/private/qshortcutmap_p.h>
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtQuick/private/qquickitem_p.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmltype Action
+ \inherits QtObject
+ \instantiates QQuickAction
+ \inqmlmodule QtQuick.Controls
+ \since 5.10
+ \ingroup utilities
+ \brief Abstract user interface action.
+
+ Action represents an abstract user interface action that can have shortcuts
+ and can be assigned to menu items and toolbar buttons.
+
+ Actions may contain \l text, an \l icon, and a \l shortcut. Actions are normally
+ \l triggered by the user via menu items, toolbar buttons, or keyboard shortcuts.
+ A \l checkable Action toggles its \l checked state when triggered.
+
+ \snippet qtquickcontrols2-action.qml action
+
+ Action is commonly used to implement application commands that can be invoked
+ via menu items, toolbar buttons, and keyboard shortcuts. Since the user expects
+ the commands to be performed in the same way, regardless of the user interface
+ used, it is useful to represent the commands as shareable actions.
+
+ Action can be also used to separate the logic and the visual presentation. For
+ example, when declaring buttons and menu items in \c .ui.qml files, actions can
+ be declared elsewhere and assigned from the outside.
+
+ \snippet qtquickcontrols2-action.qml toolbutton
+
+ When an action is paired with buttons and menu items, the \c enabled, \c checkable,
+ and \c checked states are synced automatically. For example, in a word processor,
+ if the user clicks a "Bold" toolbar button, the "Bold" menu item will automatically
+ be checked. Buttons and menu items get their \c text and \c icon from the action by
+ default. An action-specific \c text or \c icon can be overridden for a specific
+ control by specifying \c text or \c icon directly on the control.
+
+ \snippet qtquickcontrols2-action.qml menuitem
+
+ Since Action presents a user interface action, it is intended to be assigned to
+ a \l MenuItem, \l ToolButton, or any other control that inherits \l AbstractButton.
+ For keyboard shortcuts, the simpler \l Shortcut type is more appropriate.
+
+ \sa MenuItem, ToolButton, Shortcut
+*/
+
+/*!
+ \qmlsignal QtQuick.Controls::Action::toggled(QtObject source)
+
+ This signal is emitted when the action is toggled. The \a source argument
+ identifies the object that toggled the action.
+
+ For example, if the action is assigned to a menu item and a toolbar button, the
+ action is toggled when the control is toggled, the shortcut is activated, or
+ when \l toggle() is called directly.
+*/
+
+/*!
+ \qmlsignal QtQuick.Controls::Action::triggered(QtObject source)
+
+ This signal is emitted when the action is triggered. The \a source argument
+ identifies the object that triggered the action.
+
+ For example, if the action is assigned to a menu item and a toolbar button, the
+ action is triggered when the control is clicked, the shortcut is activated, or
+ when \l trigger() is called directly.
+*/
+
+static QKeySequence variantToKeySequence(const QVariant &var)
+{
+ if (var.type() == QVariant::Int)
+ return QKeySequence(static_cast<QKeySequence::StandardKey>(var.toInt()));
+ return QKeySequence::fromString(var.toString());
+}
+
+QQuickActionPrivate::ShortcutEntry::ShortcutEntry(QObject *target)
+ : m_shortcutId(0),
+ m_target(target)
+{
+}
+
+QQuickActionPrivate::ShortcutEntry::~ShortcutEntry()
+{
+ ungrab();
+}
+
+QObject *QQuickActionPrivate::ShortcutEntry::target() const
+{
+ return m_target;
+}
+
+int QQuickActionPrivate::ShortcutEntry::shortcutId() const
+{
+ return m_shortcutId;
+}
+
+void QQuickActionPrivate::ShortcutEntry::grab(const QKeySequence &shortcut, bool enabled)
+{
+ if (shortcut.isEmpty())
+ return;
+
+ Qt::ShortcutContext context = Qt::WindowShortcut; // TODO
+ m_shortcutId = QGuiApplicationPrivate::instance()->shortcutMap.addShortcut(m_target, shortcut, context, QQuickShortcutContext::matcher);
+
+ if (!enabled)
+ QGuiApplicationPrivate::instance()->shortcutMap.setShortcutEnabled(false, m_shortcutId, m_target);
+}
+
+void QQuickActionPrivate::ShortcutEntry::ungrab()
+{
+ if (!m_shortcutId)
+ return;
+
+ QGuiApplicationPrivate::instance()->shortcutMap.removeShortcut(m_shortcutId, m_target);
+ m_shortcutId = 0;
+}
+
+void QQuickActionPrivate::ShortcutEntry::setEnabled(bool enabled)
+{
+ if (!m_shortcutId)
+ return;
+
+ QGuiApplicationPrivate::instance()->shortcutMap.setShortcutEnabled(enabled, m_shortcutId, m_target);
+}
+
+QQuickActionPrivate::QQuickActionPrivate()
+ : explicitEnabled(false),
+ enabled(true),
+ checked(false),
+ checkable(false),
+ defaultShortcutEntry(nullptr),
+ group(nullptr)
+{
+}
+
+QVariant QQuickActionPrivate::shortcut() const
+{
+ return vshortcut;
+}
+
+void QQuickActionPrivate::setShortcut(const QVariant &var)
+{
+ Q_Q(QQuickAction);
+ if (vshortcut == var)
+ return;
+
+ defaultShortcutEntry->ungrab();
+ for (QQuickActionPrivate::ShortcutEntry *entry : qAsConst(shortcutEntries))
+ entry->ungrab();
+
+ vshortcut = var.toString();
+ keySequence = variantToKeySequence(var);
+
+ defaultShortcutEntry->grab(keySequence, enabled);
+ for (QQuickActionPrivate::ShortcutEntry *entry : qAsConst(shortcutEntries))
+ entry->grab(keySequence, enabled);
+
+ emit q->shortcutChanged(keySequence);
+}
+
+void QQuickActionPrivate::setEnabled(bool enable)
+{
+ Q_Q(QQuickAction);
+ if (enabled == enable)
+ return;
+
+ enabled = enable;
+
+ defaultShortcutEntry->setEnabled(enable);
+ for (QQuickActionPrivate::ShortcutEntry *entry : qAsConst(shortcutEntries))
+ entry->setEnabled(enable);
+
+ emit q->enabledChanged(enable);
+}
+
+bool QQuickActionPrivate::watchItem(QQuickItem *item)
+{
+ Q_Q(QQuickAction);
+ if (!item)
+ return false;
+
+ item->installEventFilter(q);
+ QQuickItemPrivate::get(item)->addItemChangeListener(this, QQuickItemPrivate::Visibility | QQuickItemPrivate::Destroyed);
+ return true;
+}
+
+bool QQuickActionPrivate::unwatchItem(QQuickItem *item)
+{
+ Q_Q(QQuickAction);
+ if (!item)
+ return false;
+
+ item->removeEventFilter(q);
+ QQuickItemPrivate::get(item)->removeItemChangeListener(this, QQuickItemPrivate::Visibility | QQuickItemPrivate::Destroyed);
+ return true;
+}
+
+void QQuickActionPrivate::registerItem(QQuickItem *item)
+{
+ if (!watchItem(item))
+ return;
+
+ QQuickActionPrivate::ShortcutEntry *entry = new QQuickActionPrivate::ShortcutEntry(item);
+ if (item->isVisible())
+ entry->grab(keySequence, enabled);
+ shortcutEntries += entry;
+
+ updateDefaultShortcutEntry();
+}
+
+void QQuickActionPrivate::unregisterItem(QQuickItem *item)
+{
+ QQuickActionPrivate::ShortcutEntry *entry = findShortcutEntry(item);
+ if (!entry || !unwatchItem(item))
+ return;
+
+ shortcutEntries.removeOne(entry);
+ delete entry;
+
+ updateDefaultShortcutEntry();
+}
+
+void QQuickActionPrivate::itemVisibilityChanged(QQuickItem *item)
+{
+ QQuickActionPrivate::ShortcutEntry *entry = findShortcutEntry(item);
+ if (!entry)
+ return;
+
+ if (item->isVisible())
+ entry->grab(keySequence, enabled);
+ else
+ entry->ungrab();
+
+ updateDefaultShortcutEntry();
+}
+
+void QQuickActionPrivate::itemDestroyed(QQuickItem *item)
+{
+ unregisterItem(item);
+}
+
+bool QQuickActionPrivate::handleShortcutEvent(QObject *object, QShortcutEvent *event)
+{
+ Q_Q(QQuickAction);
+ if (event->key() != keySequence)
+ return false;
+
+ QQuickActionPrivate::ShortcutEntry *entry = findShortcutEntry(object);
+ if (!entry || event->shortcutId() != entry->shortcutId())
+ return false;
+
+ q->trigger(entry->target());
+ return true;
+}
+
+QQuickActionPrivate::ShortcutEntry *QQuickActionPrivate::findShortcutEntry(QObject *target) const
+{
+ Q_Q(const QQuickAction);
+ if (target == q)
+ return defaultShortcutEntry;
+ for (QQuickActionPrivate::ShortcutEntry *entry : shortcutEntries) {
+ if (entry->target() == target)
+ return entry;
+ }
+ return nullptr;
+}
+
+void QQuickActionPrivate::updateDefaultShortcutEntry()
+{
+ bool hasActiveShortcutEntries = false;
+ for (QQuickActionPrivate::ShortcutEntry *entry : qAsConst(shortcutEntries)) {
+ if (entry->shortcutId()) {
+ hasActiveShortcutEntries = true;
+ break;
+ }
+ }
+
+ if (hasActiveShortcutEntries)
+ defaultShortcutEntry->ungrab();
+ else if (!defaultShortcutEntry->shortcutId())
+ defaultShortcutEntry->grab(keySequence, enabled);
+}
+
+QQuickAction::QQuickAction(QObject *parent)
+ : QObject(*(new QQuickActionPrivate), parent)
+{
+ Q_D(QQuickAction);
+ d->defaultShortcutEntry = new QQuickActionPrivate::ShortcutEntry(this);
+}
+
+QQuickAction::~QQuickAction()
+{
+ Q_D(QQuickAction);
+ if (d->group)
+ d->group->removeAction(this);
+
+ for (QQuickActionPrivate::ShortcutEntry *entry : qAsConst(d->shortcutEntries))
+ d->unwatchItem(qobject_cast<QQuickItem *>(entry->target()));
+
+ qDeleteAll(d->shortcutEntries);
+ delete d->defaultShortcutEntry;
+}
+
+/*!
+ \qmlproperty string QtQuick.Controls::Action::text
+
+ This property holds a textual description of the action.
+*/
+QString QQuickAction::text() const
+{
+ Q_D(const QQuickAction);
+ return d->text;
+}
+
+void QQuickAction::setText(const QString &text)
+{
+ Q_D(QQuickAction);
+ if (d->text == text)
+ return;
+
+ d->text = text;
+ emit textChanged(text);
+}
+
+/*!
+ \qmlpropertygroup QtQuick.Controls::Action::icon
+ \qmlproperty string QtQuick.Controls::Action::icon.name
+ \qmlproperty url QtQuick.Controls::Action::icon.source
+ \qmlproperty int QtQuick.Controls::Action::icon.width
+ \qmlproperty int QtQuick.Controls::Action::icon.height
+ \qmlproperty color QtQuick.Controls::Action::icon.color
+
+ \include qquickicon.qdocinc grouped-properties
+*/
+QQuickIcon QQuickAction::icon() const
+{
+ Q_D(const QQuickAction);
+ return d->icon;
+}
+
+void QQuickAction::setIcon(const QQuickIcon &icon)
+{
+ Q_D(QQuickAction);
+ if (d->icon == icon)
+ return;
+
+ d->icon = icon;
+ emit iconChanged(icon);
+}
+
+/*!
+ \qmlproperty bool QtQuick.Controls::Action::enabled
+
+ This property holds whether the action is enabled. The default value is \c true.
+*/
+bool QQuickAction::isEnabled() const
+{
+ Q_D(const QQuickAction);
+ return d->enabled && (!d->group || d->group->isEnabled());
+}
+
+void QQuickAction::setEnabled(bool enabled)
+{
+ Q_D(QQuickAction);
+ d->explicitEnabled = true;
+ d->setEnabled(enabled);
+}
+
+void QQuickAction::resetEnabled()
+{
+ Q_D(QQuickAction);
+ if (!d->explicitEnabled)
+ return;
+
+ d->explicitEnabled = false;
+ d->setEnabled(true);
+}
+
+/*!
+ \qmlproperty bool QtQuick.Controls::Action::checked
+
+ This property holds whether the action is checked.
+
+ \sa checkable
+*/
+bool QQuickAction::isChecked() const
+{
+ Q_D(const QQuickAction);
+ return d->checked;
+}
+
+void QQuickAction::setChecked(bool checked)
+{
+ Q_D(QQuickAction);
+ if (d->checked == checked)
+ return;
+
+ d->checked = checked;
+ emit checkedChanged(checked);
+}
+
+/*!
+ \qmlproperty bool QtQuick.Controls::Action::checkable
+
+ This property holds whether the action is checkable. The default value is \c false.
+
+ A checkable action toggles between checked (on) and unchecked (off) when triggered.
+
+ \sa checked
+*/
+bool QQuickAction::isCheckable() const
+{
+ Q_D(const QQuickAction);
+ return d->checkable;
+}
+
+void QQuickAction::setCheckable(bool checkable)
+{
+ Q_D(QQuickAction);
+ if (d->checkable == checkable)
+ return;
+
+ d->checkable = checkable;
+ emit checkableChanged(checkable);
+}
+
+/*!
+ \qmlproperty keysequence QtQuick.Controls::Action::shortcut
+
+ This property holds the action's shortcut. The key sequence can be set
+ to one of the \l{QKeySequence::StandardKey}{standard keyboard shortcuts},
+ or it can be described with a string containing a sequence of up to four
+ key presses that are needed to trigger the shortcut.
+
+ \code
+ Action {
+ sequence: "Ctrl+E,Ctrl+W"
+ onTriggered: edit.wrapMode = TextEdit.Wrap
+ }
+ \endcode
+*/
+QKeySequence QQuickAction::shortcut() const
+{
+ Q_D(const QQuickAction);
+ return d->keySequence;
+}
+
+void QQuickAction::setShortcut(const QKeySequence &shortcut)
+{
+ Q_D(QQuickAction);
+ d->setShortcut(shortcut.toString());
+}
+
+/*!
+ \qmlmethod void QtQuick.Controls::Action::toggle(QtObject source = null)
+
+ Toggles the action and emits \l toggled() if enabled, with an optional \a source object defined.
+*/
+void QQuickAction::toggle(QObject *source)
+{
+ Q_D(QQuickAction);
+ if (!d->enabled)
+ return;
+
+ if (d->checkable)
+ setChecked(!d->checked);
+
+ emit toggled(source);
+}
+
+/*!
+ \qmlmethod void QtQuick.Controls::Action::trigger(QtObject source = null)
+
+ Triggers the action and emits \l triggered() if enabled, with an optional \a source object defined.
+*/
+void QQuickAction::trigger(QObject *source)
+{
+ Q_D(QQuickAction);
+ if (!d->enabled)
+ return;
+
+ QPointer<QObject> guard = this;
+ // the checked action of an exclusive group cannot be unchecked
+ if (d->checkable && (!d->checked || !d->group || !d->group->isExclusive() || d->group->checkedAction() != this))
+ toggle(source);
+
+ if (!guard.isNull())
+ emit triggered(source);
+}
+
+bool QQuickAction::event(QEvent *event)
+{
+ Q_D(QQuickAction);
+ if (event->type() != QEvent::Shortcut)
+ return QObject::event(event);
+ return d->handleShortcutEvent(this, static_cast<QShortcutEvent *>(event));
+}
+
+bool QQuickAction::eventFilter(QObject *object, QEvent *event)
+{
+ Q_D(QQuickAction);
+ if (event->type() != QEvent::Shortcut)
+ return false;
+ return d->handleShortcutEvent(object, static_cast<QShortcutEvent *>(event));
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qquickaction_p.cpp"
diff --git a/src/quicktemplates2/qquickaction_p.h b/src/quicktemplates2/qquickaction_p.h
new file mode 100644
index 00000000..ce989bed
--- /dev/null
+++ b/src/quicktemplates2/qquickaction_p.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKACTION_P_H
+#define QQUICKACTION_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
+#include <QtQuickTemplates2/private/qquickicon_p.h>
+#include <QtCore/qobject.h>
+#include <QtQml/qqml.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickIcon;
+class QQuickActionPrivate;
+
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickAction : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
+ Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL)
+ Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged RESET resetEnabled FINAL)
+ Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY checkedChanged FINAL)
+ Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY checkableChanged FINAL)
+ Q_PRIVATE_PROPERTY(QQuickAction::d_func(), QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged FINAL)
+
+public:
+ explicit QQuickAction(QObject *parent = nullptr);
+ ~QQuickAction();
+
+ QString text() const;
+ void setText(const QString &text);
+
+ QQuickIcon icon() const;
+ void setIcon(const QQuickIcon &icon);
+
+ bool isEnabled() const;
+ void setEnabled(bool enabled);
+ void resetEnabled();
+
+ bool isChecked() const;
+ void setChecked(bool checked);
+
+ bool isCheckable() const;
+ void setCheckable(bool checkable);
+
+ QKeySequence shortcut() const;
+ void setShortcut(const QKeySequence &shortcut);
+
+public Q_SLOTS:
+ void toggle(QObject *source = nullptr);
+ void trigger(QObject *source = nullptr);
+
+Q_SIGNALS:
+ void textChanged(const QString &text);
+ void iconChanged(const QQuickIcon &icon);
+ void enabledChanged(bool enabled);
+ void checkedChanged(bool checked);
+ void checkableChanged(bool checkable);
+ void shortcutChanged(const QKeySequence &shortcut);
+
+ void toggled(QObject *source = nullptr);
+ void triggered(QObject *source = nullptr);
+
+protected:
+ bool event(QEvent *event) override;
+ bool eventFilter(QObject *object, QEvent *event) override;
+
+private:
+ Q_DISABLE_COPY(QQuickAction)
+ Q_DECLARE_PRIVATE(QQuickAction)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickAction)
+
+#endif // QQUICKACTION_P_H
diff --git a/src/quicktemplates2/qquickaction_p_p.h b/src/quicktemplates2/qquickaction_p_p.h
new file mode 100644
index 00000000..08c442ed
--- /dev/null
+++ b/src/quicktemplates2/qquickaction_p_p.h
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKACTION_P_P_H
+#define QQUICKACTION_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/private/qobject_p.h>
+#include <QtCore/qvariant.h>
+#include <QtCore/qstring.h>
+#include <QtGui/qkeysequence.h>
+#include <QtQuick/private/qquickitemchangelistener_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QShortcutEvent;
+class QQuickActionGroup;
+
+class QQuickActionPrivate : public QObjectPrivate, public QQuickItemChangeListener
+{
+ Q_DECLARE_PUBLIC(QQuickAction)
+
+public:
+ QQuickActionPrivate();
+
+ static QQuickActionPrivate *get(QQuickAction *action)
+ {
+ return action->d_func();
+ }
+
+ QVariant shortcut() const;
+ void setShortcut(const QVariant &shortcut);
+
+ void setEnabled(bool enable);
+
+ bool watchItem(QQuickItem *item);
+ bool unwatchItem(QQuickItem *item);
+
+ void registerItem(QQuickItem *item);
+ void unregisterItem(QQuickItem *item);
+
+ void itemVisibilityChanged(QQuickItem *item) override;
+ void itemDestroyed(QQuickItem *item) override;
+
+ bool handleShortcutEvent(QObject *object, QShortcutEvent *event);
+
+ class ShortcutEntry
+ {
+ public:
+ explicit ShortcutEntry(QObject *target);
+ ~ShortcutEntry();
+
+ QObject *target() const;
+ int shortcutId() const;
+
+ void grab(const QKeySequence &vshortcut, bool enabled);
+ void ungrab();
+
+ void setEnabled(bool enabled);
+
+ private:
+ int m_shortcutId;
+ QObject *m_target;
+ };
+
+ ShortcutEntry *findShortcutEntry(QObject *target) const;
+ void updateDefaultShortcutEntry();
+
+ bool explicitEnabled;
+ bool enabled;
+ bool checked;
+ bool checkable;
+ QString text;
+ QQuickIcon icon;
+ QVariant vshortcut;
+ QKeySequence keySequence;
+ ShortcutEntry *defaultShortcutEntry;
+ QVector<ShortcutEntry *> shortcutEntries;
+ QQuickActionGroup *group;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKACTION_P_P_H
diff --git a/src/quicktemplates2/qquickactiongroup.cpp b/src/quicktemplates2/qquickactiongroup.cpp
new file mode 100644
index 00000000..64895689
--- /dev/null
+++ b/src/quicktemplates2/qquickactiongroup.cpp
@@ -0,0 +1,480 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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 "qquickactiongroup_p.h"
+
+#include <QtCore/private/qobject_p.h>
+#include <QtCore/qmetaobject.h>
+#include <QtCore/qvariant.h>
+#include <QtQml/qqmlinfo.h>
+
+#include "qquickaction_p.h"
+#include "qquickaction_p_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmltype ActionGroup
+ \inherits QtObject
+ \instantiates QQuickActionGroup
+ \inqmlmodule QtQuick.Controls
+ \since 5.10
+ \ingroup utilities
+ \brief Groups actions together.
+
+ ActionGroup is a non-visual group of actions. A mutually \l exclusive
+ action group is used with actions where only one of the options can be
+ selected at a time.
+
+ The most straight-forward way to use ActionGroup is to declare actions
+ as children of the group.
+
+ \code
+ ActionGroup {
+ id: alignmentGroup
+
+ Action {
+ checked: true
+ checkable: true
+ text: qsTr("Left")
+ }
+
+ Action {
+ checkable: true
+ text: qsTr("Center")
+ }
+
+ Action {
+ checkable: true
+ text: qsTr("Right")
+ }
+ }
+ \endcode
+
+ Alternatively, the \l group attached property allows declaring the actions
+ elsewhere and assigning them to a specific group.
+
+ \code
+ ActionGroup { id: alignmentGroup }
+
+ Action {
+ checked: true
+ checkable: true
+ text: qsTr("Left")
+ ActionGroup.group: alignmentGroup
+ }
+
+ Action {
+ checkable: true
+ text: qsTr("Center")
+ ActionGroup.group: alignmentGroup
+ }
+
+ Action {
+ checkable: true
+ text: qsTr("Right")
+ ActionGroup.group: alignmentGroup
+ }
+ \endcode
+
+ More advanced use cases can be handled using the \c addAction() and
+ \c removeAction() methods.
+
+ \sa Action, ButtonGroup
+*/
+
+/*!
+ \qmlsignal QtQuick.Controls::ActionGroup::triggered(Action action)
+
+ This signal is emitted when an \a action in the group has been triggered.
+
+ This signal is convenient for implementing a common signal handler for
+ all actions in the same group.
+
+ \code
+ ActionGroup {
+ onTriggered: console.log("triggered:", action.text)
+
+ Action { text: "First" }
+ Action { text: "Second" }
+ Action { text: "Third" }
+ }
+ \endcode
+
+ \sa Action::triggered()
+*/
+
+class QQuickActionGroupPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QQuickActionGroup)
+
+public:
+ QQuickActionGroupPrivate()
+ : enabled(true),
+ exclusive(true),
+ checkedAction(nullptr)
+ {
+ }
+
+ void clear();
+ void actionTriggered();
+ void _q_updateCurrent();
+
+ static bool changeEnabled(QQuickAction *action, bool enabled);
+
+ static void actions_append(QQmlListProperty<QQuickAction> *prop, QQuickAction *obj);
+ static int actions_count(QQmlListProperty<QQuickAction> *prop);
+ static QQuickAction *actions_at(QQmlListProperty<QQuickAction> *prop, int index);
+ static void actions_clear(QQmlListProperty<QQuickAction> *prop);
+
+ bool enabled;
+ bool exclusive;
+ QPointer<QQuickAction> checkedAction;
+ QVector<QQuickAction*> actions;
+};
+
+void QQuickActionGroupPrivate::clear()
+{
+ for (QQuickAction *action : qAsConst(actions)) {
+ QQuickActionPrivate::get(action)->group = nullptr;
+ QObjectPrivate::disconnect(action, &QQuickAction::triggered, this, &QQuickActionGroupPrivate::actionTriggered);
+ QObjectPrivate::disconnect(action, &QQuickAction::checkedChanged, this, &QQuickActionGroupPrivate::_q_updateCurrent);
+ }
+ actions.clear();
+}
+
+void QQuickActionGroupPrivate::actionTriggered()
+{
+ Q_Q(QQuickActionGroup);
+ QQuickAction *action = qobject_cast<QQuickAction*>(q->sender());
+ if (action)
+ emit q->triggered(action);
+}
+
+void QQuickActionGroupPrivate::_q_updateCurrent()
+{
+ Q_Q(QQuickActionGroup);
+ if (!exclusive)
+ return;
+ QQuickAction *action = qobject_cast<QQuickAction*>(q->sender());
+ if (action && action->isChecked())
+ q->setCheckedAction(action);
+ else if (!actions.contains(checkedAction))
+ q->setCheckedAction(nullptr);
+}
+
+bool QQuickActionGroupPrivate::changeEnabled(QQuickAction *action, bool enabled)
+{
+ return action->isEnabled() != enabled && (!enabled || !QQuickActionPrivate::get(action)->explicitEnabled);
+}
+
+void QQuickActionGroupPrivate::actions_append(QQmlListProperty<QQuickAction> *prop, QQuickAction *obj)
+{
+ QQuickActionGroup *q = static_cast<QQuickActionGroup *>(prop->object);
+ q->addAction(obj);
+}
+
+int QQuickActionGroupPrivate::actions_count(QQmlListProperty<QQuickAction> *prop)
+{
+ QQuickActionGroupPrivate *p = static_cast<QQuickActionGroupPrivate *>(prop->data);
+ return p->actions.count();
+}
+
+QQuickAction *QQuickActionGroupPrivate::actions_at(QQmlListProperty<QQuickAction> *prop, int index)
+{
+ QQuickActionGroupPrivate *p = static_cast<QQuickActionGroupPrivate *>(prop->data);
+ return p->actions.value(index);
+}
+
+void QQuickActionGroupPrivate::actions_clear(QQmlListProperty<QQuickAction> *prop)
+{
+ QQuickActionGroupPrivate *p = static_cast<QQuickActionGroupPrivate *>(prop->data);
+ if (!p->actions.isEmpty()) {
+ p->clear();
+ QQuickActionGroup *q = static_cast<QQuickActionGroup *>(prop->object);
+ // QTBUG-52358: don't clear the checked action immediately
+ QMetaObject::invokeMethod(q, "_q_updateCurrent", Qt::QueuedConnection);
+ emit q->actionsChanged();
+ }
+}
+
+QQuickActionGroup::QQuickActionGroup(QObject *parent)
+ : QObject(*(new QQuickActionGroupPrivate), parent)
+{
+}
+
+QQuickActionGroup::~QQuickActionGroup()
+{
+ Q_D(QQuickActionGroup);
+ d->clear();
+}
+
+QQuickActionGroupAttached *QQuickActionGroup::qmlAttachedProperties(QObject *object)
+{
+ return new QQuickActionGroupAttached(object);
+}
+
+/*!
+ \qmlproperty Action QtQuick.Controls::ActionGroup::checkedAction
+
+ This property holds the currently selected action in an exclusive group,
+ or \c null if there is none or the group is non-exclusive.
+
+ By default, it is the first checked action added to an exclusive action group.
+
+ \sa exclusive
+*/
+QQuickAction *QQuickActionGroup::checkedAction() const
+{
+ Q_D(const QQuickActionGroup);
+ return d->checkedAction;
+}
+
+void QQuickActionGroup::setCheckedAction(QQuickAction *checkedAction)
+{
+ Q_D(QQuickActionGroup);
+ if (d->checkedAction == checkedAction)
+ return;
+
+ if (d->checkedAction)
+ d->checkedAction->setChecked(false);
+ d->checkedAction = checkedAction;
+ if (checkedAction)
+ checkedAction->setChecked(true);
+ emit checkedActionChanged();
+}
+
+/*!
+ \qmlproperty list<Action> QtQuick.Controls::ActionGroup::actions
+ \default
+
+ This property holds the list of actions in the group.
+
+ \sa group
+*/
+QQmlListProperty<QQuickAction> QQuickActionGroup::actions()
+{
+ Q_D(QQuickActionGroup);
+ return QQmlListProperty<QQuickAction>(this, d,
+ QQuickActionGroupPrivate::actions_append,
+ QQuickActionGroupPrivate::actions_count,
+ QQuickActionGroupPrivate::actions_at,
+ QQuickActionGroupPrivate::actions_clear);
+}
+
+/*!
+ \qmlproperty bool QtQuick.Controls::ActionGroup::exclusive
+
+ This property holds whether the action group is exclusive. The default value is \c true.
+
+ If this property is \c true, then only one action in the group can be checked at any given time.
+ The user can trigger any action to check it, and that action will replace the existing one as
+ the checked action in the group.
+
+ In an exclusive group, the user cannot uncheck the currently checked action by triggering it;
+ instead, another action in the group must be triggered to set the new checked action for that
+ group.
+
+ In a non-exclusive group, checking and unchecking actions does not affect the other actions in
+ the group. Furthermore, the value of the \l checkedAction property is \c null.
+*/
+bool QQuickActionGroup::isExclusive() const
+{
+ Q_D(const QQuickActionGroup);
+ return d->exclusive;
+}
+
+void QQuickActionGroup::setExclusive(bool exclusive)
+{
+ Q_D(QQuickActionGroup);
+ if (d->exclusive == exclusive)
+ return;
+
+ d->exclusive = exclusive;
+ emit exclusiveChanged();
+}
+
+/*!
+ \qmlproperty bool QtQuick.Controls::ActionGroup::enabled
+
+ This property holds whether the action group is enabled. The default value is \c true.
+
+ If this property is \c false, then all actions in the group are disabled. If this property
+ is \c true, all actions in the group are enabled, unless explicitly disabled.
+*/
+bool QQuickActionGroup::isEnabled() const
+{
+ Q_D(const QQuickActionGroup);
+ return d->enabled;
+}
+
+void QQuickActionGroup::setEnabled(bool enabled)
+{
+ Q_D(QQuickActionGroup);
+ if (d->enabled == enabled)
+ return;
+
+ for (QQuickAction *action : qAsConst(d->actions)) {
+ if (d->changeEnabled(action, enabled))
+ emit action->enabledChanged(enabled);
+ }
+
+ d->enabled = enabled;
+ emit enabledChanged();
+}
+
+/*!
+ \qmlmethod void QtQuick.Controls::ActionGroup::addAction(Action action)
+
+ Adds an \a action to the action group.
+
+ \note Manually adding objects to a action group is typically unnecessary.
+ The \l actions property and the \l group attached property provide a
+ convenient and declarative syntax.
+
+ \sa actions, group
+*/
+void QQuickActionGroup::addAction(QQuickAction *action)
+{
+ Q_D(QQuickActionGroup);
+ if (!action || d->actions.contains(action))
+ return;
+
+ const bool enabledChange = d->changeEnabled(action, d->enabled);
+
+ QQuickActionPrivate::get(action)->group = this;
+ QObjectPrivate::connect(action, &QQuickAction::triggered, d, &QQuickActionGroupPrivate::actionTriggered);
+ QObjectPrivate::connect(action, &QQuickAction::checkedChanged, d, &QQuickActionGroupPrivate::_q_updateCurrent);
+
+ if (d->exclusive && action->isChecked())
+ setCheckedAction(action);
+ if (enabledChange)
+ emit action->enabledChanged(action->isEnabled());
+
+ d->actions.append(action);
+ emit actionsChanged();
+}
+
+/*!
+ \qmlmethod void QtQuick.Controls::ActionGroup::removeAction(Action action)
+
+ Removes an \a action from the action group.
+
+ \note Manually removing objects from a action group is typically unnecessary.
+ The \l actions property and the \l group attached property provide a
+ convenient and declarative syntax.
+
+ \sa actions, group
+*/
+void QQuickActionGroup::removeAction(QQuickAction *action)
+{
+ Q_D(QQuickActionGroup);
+ if (!action || !d->actions.contains(action))
+ return;
+
+ const bool enabledChange = d->changeEnabled(action, d->enabled);
+
+ QQuickActionPrivate::get(action)->group = nullptr;
+ QObjectPrivate::disconnect(action, &QQuickAction::triggered, d, &QQuickActionGroupPrivate::actionTriggered);
+ QObjectPrivate::disconnect(action, &QQuickAction::checkedChanged, d, &QQuickActionGroupPrivate::_q_updateCurrent);
+
+ if (d->checkedAction == action)
+ setCheckedAction(nullptr);
+ if (enabledChange)
+ emit action->enabledChanged(action->isEnabled());
+
+ d->actions.removeOne(action);
+ emit actionsChanged();
+}
+
+class QQuickActionGroupAttachedPrivate : public QObjectPrivate
+{
+public:
+ QQuickActionGroupAttachedPrivate() : group(nullptr) { }
+
+ QQuickActionGroup *group;
+};
+
+QQuickActionGroupAttached::QQuickActionGroupAttached(QObject *parent)
+ : QObject(*(new QQuickActionGroupAttachedPrivate), parent)
+{
+}
+
+/*!
+ \qmlattachedproperty ActionGroup QtQuick.Controls::ActionGroup::group
+
+ This property attaches an action to an action group.
+
+ \code
+ ActionGroup { id: group }
+
+ Action {
+ checked: true
+ text: qsTr("Option A")
+ ActionGroup.group: group
+ }
+
+ Action {
+ text: qsTr("Option B")
+ ActionGroup.group: group
+ }
+ \endcode
+
+ \sa actions
+*/
+QQuickActionGroup *QQuickActionGroupAttached::group() const
+{
+ Q_D(const QQuickActionGroupAttached);
+ return d->group;
+}
+
+void QQuickActionGroupAttached::setGroup(QQuickActionGroup *group)
+{
+ Q_D(QQuickActionGroupAttached);
+ if (d->group == group)
+ return;
+
+ if (d->group)
+ d->group->removeAction(qobject_cast<QQuickAction*>(parent()));
+ d->group = group;
+ if (group)
+ group->addAction(qobject_cast<QQuickAction*>(parent()));
+ emit groupChanged();
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qquickactiongroup_p.cpp"
diff --git a/src/quicktemplates2/qquickactiongroup_p.h b/src/quicktemplates2/qquickactiongroup_p.h
new file mode 100644
index 00000000..aa04d32e
--- /dev/null
+++ b/src/quicktemplates2/qquickactiongroup_p.h
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKACTIONGROUP_P_H
+#define QQUICKACTIONGROUP_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qobject.h>
+#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
+#include <QtQml/qqml.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickAction;
+class QQuickActionGroupPrivate;
+class QQuickActionGroupAttached;
+class QQuickActionGroupAttachedPrivate;
+
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickActionGroup : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QQuickAction *checkedAction READ checkedAction WRITE setCheckedAction NOTIFY checkedActionChanged FINAL)
+ Q_PROPERTY(QQmlListProperty<QQuickAction> actions READ actions NOTIFY actionsChanged FINAL)
+ Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL)
+ Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL)
+ Q_CLASSINFO("DefaultProperty", "actions")
+
+public:
+ explicit QQuickActionGroup(QObject *parent = nullptr);
+ ~QQuickActionGroup();
+
+ static QQuickActionGroupAttached *qmlAttachedProperties(QObject *object);
+
+ QQuickAction *checkedAction() const;
+ void setCheckedAction(QQuickAction *checkedAction);
+
+ QQmlListProperty<QQuickAction> actions();
+
+ bool isExclusive() const;
+ void setExclusive(bool exclusive);
+
+ bool isEnabled() const;
+ void setEnabled(bool enabled);
+
+public Q_SLOTS:
+ void addAction(QQuickAction *action);
+ void removeAction(QQuickAction *action);
+
+Q_SIGNALS:
+ void checkedActionChanged();
+ void actionsChanged();
+ void exclusiveChanged();
+ void enabledChanged();
+ void triggered(QQuickAction *action);
+
+private:
+ Q_DISABLE_COPY(QQuickActionGroup)
+ Q_DECLARE_PRIVATE(QQuickActionGroup)
+
+ Q_PRIVATE_SLOT(d_func(), void _q_updateCurrent())
+};
+
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickActionGroupAttached : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QQuickActionGroup *group READ group WRITE setGroup NOTIFY groupChanged FINAL)
+
+public:
+ explicit QQuickActionGroupAttached(QObject *parent = nullptr);
+
+ QQuickActionGroup *group() const;
+ void setGroup(QQuickActionGroup *group);
+
+Q_SIGNALS:
+ void groupChanged();
+
+private:
+ Q_DISABLE_COPY(QQuickActionGroupAttached)
+ Q_DECLARE_PRIVATE(QQuickActionGroupAttached)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickActionGroup)
+QML_DECLARE_TYPEINFO(QQuickActionGroup, QML_HAS_ATTACHED_PROPERTIES)
+
+#endif // QQUICKACTIONGROUP_P_H
diff --git a/src/quicktemplates2/qquickapplicationwindow.cpp b/src/quicktemplates2/qquickapplicationwindow.cpp
index e3f16d55..d579afb2 100644
--- a/src/quicktemplates2/qquickapplicationwindow.cpp
+++ b/src/quicktemplates2/qquickapplicationwindow.cpp
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
\brief Styled top-level window with support for a header and footer.
ApplicationWindow is a \l Window which makes it convenient to add
- a \l header and \l footer item to the window.
+ a \l {menuBar}{menu bar}, \l header and \l footer item to the window.
You can declare ApplicationWindow as the root item of your application,
and run it by using \l QQmlApplicationEngine. In this way you can control
@@ -69,11 +69,15 @@ QT_BEGIN_NAMESPACE
\image qtquickcontrols2-applicationwindow-wireframe.png
\qml
- import QtQuick.Controls 2.1
+ import QtQuick.Controls 2.3
ApplicationWindow {
visible: true
+ menuBar: MenuBar {
+ // ...
+ }
+
header: ToolBar {
// ...
}
@@ -88,11 +92,6 @@ QT_BEGIN_NAMESPACE
}
\endqml
- ApplicationWindow supports popups via its \l overlay property, which
- ensures that popups are displayed above other content and that the
- background is dimmed when a \l {Popup::}{modal} or \l {Popup::dim}
- {dimmed} popup is visible.
-
\note By default, an ApplicationWindow is not visible.
\section2 Attached ApplicationWindow Properties
@@ -107,31 +106,14 @@ QT_BEGIN_NAMESPACE
to access the window and its building blocks from places where no direct
access to the window is available, without creating a dependency to a
certain window \c id. A QML component that uses the ApplicationWindow
- attached properties works in any window regardless of its \c id. The
- following example uses the attached \c overlay property to position the
- popup to the center of the window, despite the position of the button
- that opens the popup.
-
- \code
- Button {
- onClicked: popup.open()
-
- Popup {
- id: popup
-
- parent: ApplicationWindow.overlay
-
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: 100
- height: 100
- }
- }
- \endcode
+ attached properties works in any window regardless of its \c id.
- \sa {Customizing ApplicationWindow}, Page, {Container Controls}
+ \sa {Customizing ApplicationWindow}, Overlay, Page, {Container Controls}
*/
+static const QQuickItemPrivate::ChangeTypes ItemChanges = QQuickItemPrivate::Visibility
+ | QQuickItemPrivate::Geometry | QQuickItemPrivate::ImplicitWidth | QQuickItemPrivate::ImplicitHeight;
+
class QQuickApplicationWindowPrivate : public QQuickItemChangeListener
{
Q_DECLARE_PUBLIC(QQuickApplicationWindow)
@@ -141,6 +123,7 @@ public:
: complete(true),
background(nullptr),
contentItem(nullptr),
+ menuBar(nullptr),
header(nullptr),
footer(nullptr),
overlay(nullptr),
@@ -168,6 +151,14 @@ public:
}
void resolveFont();
+ void updatePalette(const QPalette &p);
+ inline void setPalette_helper(const QPalette &p) {
+ if (palette.resolve() == p.resolve() && palette == p)
+ return;
+ updatePalette(p);
+ }
+ void resolvePalette();
+
void _q_updateActiveFocus();
void setActiveFocusControl(QQuickItem *item);
@@ -176,43 +167,48 @@ public:
bool complete;
QQuickItem *background;
QQuickItem *contentItem;
+ QQuickItem *menuBar;
QQuickItem *header;
QQuickItem *footer;
QQuickOverlay *overlay;
QFont font;
QLocale locale;
+ QPalette palette;
QQuickItem *activeFocusControl;
QQuickApplicationWindow *q_ptr;
};
+static void layoutItem(QQuickItem *item, qreal y, qreal width)
+{
+ if (!item)
+ return;
+
+ item->setY(y);
+ QQuickItemPrivate *p = QQuickItemPrivate::get(item);
+ if (!p->widthValid) {
+ item->setWidth(width);
+ p->widthValid = false;
+ }
+}
+
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;
+ qreal mbh = menuBar && menuBar->isVisible() ? menuBar->height() : 0;
- content->setY(hh);
+ content->setY(mbh + hh);
content->setWidth(q->width());
- content->setHeight(q->height() - hh - fh);
+ content->setHeight(q->height() - mbh - hh - fh);
- if (header) {
- header->setY(-hh);
- QQuickItemPrivate *p = QQuickItemPrivate::get(header);
- if (!p->widthValid) {
- header->setWidth(q->width());
- p->widthValid = false;
- }
- }
-
- if (footer) {
- footer->setY(content->height());
- QQuickItemPrivate *p = QQuickItemPrivate::get(footer);
- if (!p->widthValid) {
- footer->setWidth(q->width());
- p->widthValid = false;
- }
- }
+ layoutItem(menuBar, -mbh - hh, q->width());
+ layoutItem(header, -hh, q->width());
+ layoutItem(footer, content->height(), q->width());
if (background) {
QQuickItemPrivate *p = QQuickItemPrivate::get(background);
@@ -253,28 +249,65 @@ void QQuickApplicationWindowPrivate::itemImplicitHeightChanged(QQuickItem *item)
relayout();
}
-void QQuickApplicationWindowPrivate::_q_updateActiveFocus()
+void QQuickApplicationWindowPrivate::updateFont(const QFont &f)
+{
+ Q_Q(QQuickApplicationWindow);
+ const bool changed = font != f;
+ font = f;
+
+ QQuickControlPrivate::updateFontRecur(q->QQuickWindow::contentItem(), f);
+
+ const QList<QQuickPopup *> popups = q->findChildren<QQuickPopup *>();
+ for (QQuickPopup *popup : popups)
+ QQuickControlPrivate::get(static_cast<QQuickControl *>(popup->popupItem()))->inheritFont(f);
+
+ if (changed)
+ emit q->fontChanged();
+}
+
+void QQuickApplicationWindowPrivate::resolveFont()
+{
+ QFont resolvedFont = font.resolve(QQuickControlPrivate::themeFont(QPlatformTheme::SystemFont));
+ setFont_helper(resolvedFont);
+}
+
+void QQuickApplicationWindowPrivate::updatePalette(const QPalette &p)
{
Q_Q(QQuickApplicationWindow);
- QQuickItem *item = q->activeFocusItem();
+ const bool changed = palette != p;
+ palette = p;
+
+ QQuickControlPrivate::updatePaletteRecur(q->QQuickWindow::contentItem(), p);
+
+ const QList<QQuickPopup *> popups = q->findChildren<QQuickPopup *>();
+ for (QQuickPopup *popup : popups)
+ QQuickControlPrivate::get(static_cast<QQuickControl *>(popup->popupItem()))->inheritPalette(p);
+
+ if (changed)
+ emit q->paletteChanged();
+}
+
+void QQuickApplicationWindowPrivate::resolvePalette()
+{
+ QPalette resolvedPalette = palette.resolve(QQuickControlPrivate::themePalette(QPlatformTheme::SystemPalette));
+ setPalette_helper(resolvedPalette);
+}
+
+static QQuickItem *findActiveFocusControl(QQuickWindow *window)
+{
+ QQuickItem *item = window->activeFocusItem();
while (item) {
- QQuickControl *control = qobject_cast<QQuickControl *>(item);
- if (control) {
- setActiveFocusControl(control);
- break;
- }
- QQuickTextField *textField = qobject_cast<QQuickTextField *>(item);
- if (textField) {
- setActiveFocusControl(textField);
- break;
- }
- QQuickTextArea *textArea = qobject_cast<QQuickTextArea *>(item);
- if (textArea) {
- setActiveFocusControl(textArea);
- break;
- }
+ if (qobject_cast<QQuickControl *>(item) || qobject_cast<QQuickTextField *>(item) || qobject_cast<QQuickTextArea *>(item))
+ return item;
item = item->parentItem();
}
+ return item;
+}
+
+void QQuickApplicationWindowPrivate::_q_updateActiveFocus()
+{
+ Q_Q(QQuickApplicationWindow);
+ setActiveFocusControl(findActiveFocusControl(q));
}
void QQuickApplicationWindowPrivate::setActiveFocusControl(QQuickItem *control)
@@ -307,15 +340,20 @@ QQuickApplicationWindow::~QQuickApplicationWindow()
Q_D(QQuickApplicationWindow);
d->setActiveFocusControl(nullptr);
disconnect(this, SIGNAL(activeFocusItemChanged()), this, SLOT(_q_updateActiveFocus()));
+ if (d->menuBar)
+ QQuickItemPrivate::get(d->menuBar)->removeItemChangeListener(d, ItemChanges);
if (d->header)
- QQuickItemPrivate::get(d->header)->removeItemChangeListener(d, QQuickItemPrivate::Geometry | QQuickItemPrivate::Visibility |
- QQuickItemPrivate::ImplicitWidth | QQuickItemPrivate::ImplicitHeight);
+ QQuickItemPrivate::get(d->header)->removeItemChangeListener(d, ItemChanges);
if (d->footer)
- QQuickItemPrivate::get(d->footer)->removeItemChangeListener(d, QQuickItemPrivate::Geometry | QQuickItemPrivate::Visibility |
- QQuickItemPrivate::ImplicitWidth | QQuickItemPrivate::ImplicitHeight);
+ QQuickItemPrivate::get(d->footer)->removeItemChangeListener(d, ItemChanges);
d_ptr.reset(); // QTBUG-52731
}
+QQuickApplicationWindowAttached *QQuickApplicationWindow::qmlAttachedProperties(QObject *object)
+{
+ return new QQuickApplicationWindowAttached(object);
+}
+
/*!
\qmlproperty Item QtQuick.Controls::ApplicationWindow::background
@@ -332,7 +370,7 @@ QQuickApplicationWindow::~QQuickApplicationWindow()
follows the control's size. In most cases, there is no need to specify
width or height for a background item.
- \sa {Customizing ApplicationWindow}, contentItem, header, footer, overlay
+ \sa {Customizing ApplicationWindow}, contentItem, header, footer
*/
QQuickItem *QQuickApplicationWindow::background() const
{
@@ -361,8 +399,9 @@ void QQuickApplicationWindow::setBackground(QQuickItem *background)
/*!
\qmlproperty Item QtQuick.Controls::ApplicationWindow::header
- This property holds the window header item. The header item is positioned to
- the top, and resized to the width of the window. The default value is \c null.
+ This property holds the window header item. The header item is positioned at the
+ top of the window, below the menu bar, and resized to the width of the window.
+ The default value is \c null.
\code
ApplicationWindow {
@@ -376,7 +415,7 @@ void QQuickApplicationWindow::setBackground(QQuickItem *background)
automatically sets the respective \l ToolBar::position, \l TabBar::position,
or \l DialogButtonBox::position property to \c Header.
- \sa footer, Page::header
+ \sa menuBar, footer, Page::header
*/
QQuickItem *QQuickApplicationWindow::header() const
{
@@ -391,16 +430,14 @@ void QQuickApplicationWindow::setHeader(QQuickItem *header)
return;
if (d->header) {
- QQuickItemPrivate::get(d->header)->removeItemChangeListener(d, QQuickItemPrivate::Geometry | QQuickItemPrivate::Visibility |
- QQuickItemPrivate::ImplicitWidth | QQuickItemPrivate::ImplicitHeight);
+ QQuickItemPrivate::get(d->header)->removeItemChangeListener(d, ItemChanges);
d->header->setParentItem(nullptr);
}
d->header = header;
if (header) {
header->setParentItem(contentItem());
QQuickItemPrivate *p = QQuickItemPrivate::get(header);
- p->addItemChangeListener(d, QQuickItemPrivate::Geometry | QQuickItemPrivate::Visibility |
- QQuickItemPrivate::ImplicitWidth | QQuickItemPrivate::ImplicitHeight);
+ p->addItemChangeListener(d, ItemChanges);
if (qFuzzyIsNull(header->z()))
header->setZ(1);
if (QQuickToolBar *toolBar = qobject_cast<QQuickToolBar *>(header))
@@ -433,7 +470,7 @@ void QQuickApplicationWindow::setHeader(QQuickItem *header)
automatically sets the respective \l ToolBar::position, \l TabBar::position,
or \l DialogButtonBox::position property to \c Footer.
- \sa header, Page::footer
+ \sa menuBar, header, Page::footer
*/
QQuickItem *QQuickApplicationWindow::footer() const
{
@@ -448,16 +485,14 @@ void QQuickApplicationWindow::setFooter(QQuickItem *footer)
return;
if (d->footer) {
- QQuickItemPrivate::get(d->footer)->removeItemChangeListener(d, QQuickItemPrivate::Geometry | QQuickItemPrivate::Visibility |
- QQuickItemPrivate::ImplicitWidth | QQuickItemPrivate::ImplicitHeight);
+ QQuickItemPrivate::get(d->footer)->removeItemChangeListener(d, ItemChanges);
d->footer->setParentItem(nullptr);
}
d->footer = footer;
if (footer) {
footer->setParentItem(contentItem());
QQuickItemPrivate *p = QQuickItemPrivate::get(footer);
- p->addItemChangeListener(d, QQuickItemPrivate::Geometry | QQuickItemPrivate::Visibility |
- QQuickItemPrivate::ImplicitWidth | QQuickItemPrivate::ImplicitHeight);
+ p->addItemChangeListener(d, ItemChanges);
if (qFuzzyIsNull(footer->z()))
footer->setZ(1);
if (QQuickToolBar *toolBar = qobject_cast<QQuickToolBar *>(footer))
@@ -508,9 +543,9 @@ QQmlListProperty<QObject> QQuickApplicationWindow::contentData()
This property holds the window content item.
The content item is stacked above the \l background item, and under the
- \l header, \l footer, and \l overlay items.
+ \l menuBar, \l header, and \l footer items.
- \sa background, header, footer, overlay
+ \sa background, menuBar, header, footer
*/
QQuickItem *QQuickApplicationWindow::contentItem() const
{
@@ -545,11 +580,14 @@ QQuickItem *QQuickApplicationWindow::activeFocusControl() const
}
/*!
+ \deprecated
\qmlpropertygroup QtQuick.Controls::ApplicationWindow::overlay
\qmlproperty Item QtQuick.Controls::ApplicationWindow::overlay
\qmlproperty Component QtQuick.Controls::ApplicationWindow::overlay.modal
\qmlproperty Component QtQuick.Controls::ApplicationWindow::overlay.modeless
+ Use the \l Overlay attached properties and signals instead.
+
This property holds the window overlay item. Popups are automatically
reparented to the overlay.
@@ -629,28 +667,6 @@ void QQuickApplicationWindow::resetFont()
setFont(QFont());
}
-void QQuickApplicationWindowPrivate::resolveFont()
-{
- QFont resolvedFont = font.resolve(QQuickControlPrivate::themeFont(QPlatformTheme::SystemFont));
- setFont_helper(resolvedFont);
-}
-
-void QQuickApplicationWindowPrivate::updateFont(const QFont &f)
-{
- Q_Q(QQuickApplicationWindow);
- const bool changed = font != f;
- font = f;
-
- QQuickControlPrivate::updateFontRecur(q->QQuickWindow::contentItem(), f);
-
- const QList<QQuickPopup *> popups = q->findChildren<QQuickPopup *>();
- for (QQuickPopup *popup : popups)
- QQuickControlPrivate::get(static_cast<QQuickControl *>(popup->popupItem()))->inheritFont(f);
-
- if (changed)
- emit q->fontChanged();
-}
-
/*!
\qmlproperty Locale QtQuick.Controls::ApplicationWindow::locale
@@ -693,9 +709,88 @@ void QQuickApplicationWindow::resetLocale()
setLocale(QLocale());
}
-QQuickApplicationWindowAttached *QQuickApplicationWindow::qmlAttachedProperties(QObject *object)
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty palette QtQuick.Controls::ApplicationWindow::palette
+
+ This property holds the palette currently set for the window.
+
+ The default palette depends on the system environment. QGuiApplication maintains a system/theme
+ palette which serves as a default for all application windows. You can also set the default palette
+ for windows by passing a custom palette to QGuiApplication::setPalette(), before loading any QML.
+
+ ApplicationWindow propagates explicit palette properties to child controls. If you change a specific
+ property on the window's palette, that property propagates to all child controls in the window,
+ overriding any system defaults for that property.
+
+ \sa Control::palette, Popup::palette, {qtquickcontrols2-palette}{palette QML Basic Type}
+*/
+QPalette QQuickApplicationWindow::palette() const
{
- return new QQuickApplicationWindowAttached(object);
+ Q_D(const QQuickApplicationWindow);
+ return d->palette;
+}
+
+void QQuickApplicationWindow::setPalette(const QPalette &palette)
+{
+ Q_D(QQuickApplicationWindow);
+ if (d->palette.resolve() == palette.resolve() && d->palette == palette)
+ return;
+
+ QPalette resolvedPalette = palette.resolve(QQuickControlPrivate::themePalette(QPlatformTheme::SystemPalette));
+ d->setPalette_helper(resolvedPalette);
+}
+
+void QQuickApplicationWindow::resetPalette()
+{
+ setPalette(QPalette());
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty Item QtQuick.Controls::ApplicationWindow::menuBar
+
+ This property holds the window menu bar. The menu bar is positioned at the
+ top of the window, above the header, and resized to the width of the window.
+ The default value is \c null.
+
+ \code
+ ApplicationWindow {
+ menuBar: MenuBar {
+ // ...
+ }
+ }
+ \endcode
+
+ \sa header, footer, MenuBar
+*/
+QQuickItem *QQuickApplicationWindow::menuBar() const
+{
+ Q_D(const QQuickApplicationWindow);
+ return d->menuBar;
+}
+
+void QQuickApplicationWindow::setMenuBar(QQuickItem *menuBar)
+{
+ Q_D(QQuickApplicationWindow);
+ if (d->menuBar == menuBar)
+ return;
+
+ if (d->menuBar) {
+ QQuickItemPrivate::get(d->menuBar)->removeItemChangeListener(d, ItemChanges);
+ d->menuBar->setParentItem(nullptr);
+ }
+ d->menuBar = menuBar;
+ if (menuBar) {
+ menuBar->setParentItem(contentItem());
+ QQuickItemPrivate *p = QQuickItemPrivate::get(menuBar);
+ p->addItemChangeListener(d, ItemChanges);
+ if (qFuzzyIsNull(menuBar->z()))
+ menuBar->setZ(2);
+ }
+ if (isComponentComplete())
+ d->relayout();
+ emit menuBarChanged();
}
bool QQuickApplicationWindow::isComponentComplete() const
@@ -710,6 +805,7 @@ void QQuickApplicationWindow::classBegin()
d->complete = false;
QQuickWindowQmlImpl::classBegin();
d->resolveFont();
+ d->resolvePalette();
}
void QQuickApplicationWindow::componentComplete()
@@ -717,6 +813,7 @@ void QQuickApplicationWindow::componentComplete()
Q_D(QQuickApplicationWindow);
d->complete = true;
QQuickWindowQmlImpl::componentComplete();
+ d->relayout();
}
void QQuickApplicationWindow::resizeEvent(QResizeEvent *event)
@@ -731,11 +828,17 @@ class QQuickApplicationWindowAttachedPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QQuickApplicationWindowAttached)
public:
- QQuickApplicationWindowAttachedPrivate() : window(nullptr) { }
+ QQuickApplicationWindowAttachedPrivate()
+ : window(nullptr),
+ activeFocusControl(nullptr)
+ {
+ }
void windowChange(QQuickWindow *wnd);
+ void activeFocusChange();
QQuickWindow *window;
+ QQuickItem *activeFocusControl;
};
void QQuickApplicationWindowAttachedPrivate::windowChange(QQuickWindow *wnd)
@@ -749,22 +852,32 @@ void QQuickApplicationWindowAttachedPrivate::windowChange(QQuickWindow *wnd)
oldWindow = nullptr; // being deleted (QTBUG-52731)
if (oldWindow) {
- QObject::disconnect(oldWindow, &QQuickApplicationWindow::activeFocusControlChanged,
- q, &QQuickApplicationWindowAttached::activeFocusControlChanged);
+ disconnect(oldWindow, &QQuickApplicationWindow::activeFocusControlChanged,
+ this, &QQuickApplicationWindowAttachedPrivate::activeFocusChange);
+ QObject::disconnect(oldWindow, &QQuickApplicationWindow::menuBarChanged,
+ q, &QQuickApplicationWindowAttached::menuBarChanged);
QObject::disconnect(oldWindow, &QQuickApplicationWindow::headerChanged,
q, &QQuickApplicationWindowAttached::headerChanged);
QObject::disconnect(oldWindow, &QQuickApplicationWindow::footerChanged,
q, &QQuickApplicationWindowAttached::footerChanged);
+ } else if (window) {
+ disconnect(window, &QQuickWindow::activeFocusItemChanged,
+ this, &QQuickApplicationWindowAttachedPrivate::activeFocusChange);
}
QQuickApplicationWindow *newWindow = qobject_cast<QQuickApplicationWindow *>(wnd);
if (newWindow) {
- QObject::connect(newWindow, &QQuickApplicationWindow::activeFocusControlChanged,
- q, &QQuickApplicationWindowAttached::activeFocusControlChanged);
+ connect(newWindow, &QQuickApplicationWindow::activeFocusControlChanged,
+ this, &QQuickApplicationWindowAttachedPrivate::activeFocusChange);
+ QObject::connect(newWindow, &QQuickApplicationWindow::menuBarChanged,
+ q, &QQuickApplicationWindowAttached::menuBarChanged);
QObject::connect(newWindow, &QQuickApplicationWindow::headerChanged,
q, &QQuickApplicationWindowAttached::headerChanged);
QObject::connect(newWindow, &QQuickApplicationWindow::footerChanged,
q, &QQuickApplicationWindowAttached::footerChanged);
+ } else if (wnd) {
+ connect(wnd, &QQuickWindow::activeFocusItemChanged,
+ this, &QQuickApplicationWindowAttachedPrivate::activeFocusChange);
}
window = wnd;
@@ -772,14 +885,30 @@ void QQuickApplicationWindowAttachedPrivate::windowChange(QQuickWindow *wnd)
emit q->contentItemChanged();
emit q->overlayChanged();
- if ((oldWindow && oldWindow->activeFocusControl()) || (newWindow && newWindow->activeFocusControl()))
- emit q->activeFocusControlChanged();
+ activeFocusChange();
+ if ((oldWindow && oldWindow->menuBar()) || (newWindow && newWindow->menuBar()))
+ emit q->menuBarChanged();
if ((oldWindow && oldWindow->header()) || (newWindow && newWindow->header()))
emit q->headerChanged();
if ((oldWindow && oldWindow->footer()) || (newWindow && newWindow->footer()))
emit q->footerChanged();
}
+void QQuickApplicationWindowAttachedPrivate::activeFocusChange()
+{
+ Q_Q(QQuickApplicationWindowAttached);
+ QQuickItem *control = nullptr;
+ if (QQuickApplicationWindow *appWindow = qobject_cast<QQuickApplicationWindow *>(window))
+ control = appWindow->activeFocusControl();
+ else if (window)
+ control = findActiveFocusControl(window);
+ if (activeFocusControl == control)
+ return;
+
+ activeFocusControl = control;
+ emit q->activeFocusControlChanged();
+}
+
QQuickApplicationWindowAttached::QQuickApplicationWindowAttached(QObject *parent)
: QObject(*(new QQuickApplicationWindowAttachedPrivate), parent)
{
@@ -841,17 +970,14 @@ QQuickItem *QQuickApplicationWindowAttached::contentItem() const
This attached property holds the control that currently has active focus, or \c null
if there is no control with active focus. The property can be attached to any item.
- The value is \c null if the item is not in an ApplicationWindow, or the window has
- no active focus.
+ The value is \c null if the item is not in a window, or the window has no active focus.
\sa Window::activeFocusItem, {Attached ApplicationWindow Properties}
*/
QQuickItem *QQuickApplicationWindowAttached::activeFocusControl() const
{
Q_D(const QQuickApplicationWindowAttached);
- if (QQuickApplicationWindow *window = qobject_cast<QQuickApplicationWindow *>(d->window))
- return window->activeFocusControl();
- return nullptr;
+ return d->activeFocusControl;
}
/*!
@@ -891,9 +1017,12 @@ QQuickItem *QQuickApplicationWindowAttached::footer() const
}
/*!
+ \deprecated
\qmlattachedproperty Item QtQuick.Controls::ApplicationWindow::overlay
\readonly
+ Use the \l Overlay::overlay attached property instead.
+
This attached property holds the window overlay item. The property can be attached
to any item. The value is \c null if the item is not in an ApplicationWindow.
@@ -905,6 +1034,25 @@ QQuickOverlay *QQuickApplicationWindowAttached::overlay() const
return QQuickOverlay::overlay(d->window);
}
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlattachedproperty Item QtQuick.Controls::ApplicationWindow::menuBar
+ \readonly
+
+ This attached property holds the window menu bar. The property can be attached
+ to any item. The value is \c null if the item is not in an ApplicationWindow, or
+ the window has no menu bar.
+
+ \sa {Attached ApplicationWindow Properties}
+*/
+QQuickItem *QQuickApplicationWindowAttached::menuBar() const
+{
+ Q_D(const QQuickApplicationWindowAttached);
+ if (QQuickApplicationWindow *window = qobject_cast<QQuickApplicationWindow *>(d->window))
+ return window->menuBar();
+ return nullptr;
+}
+
QT_END_NAMESPACE
#include "moc_qquickapplicationwindow_p.cpp"
diff --git a/src/quicktemplates2/qquickapplicationwindow_p.h b/src/quicktemplates2/qquickapplicationwindow_p.h
index 07ddc67e..4e24009f 100644
--- a/src/quicktemplates2/qquickapplicationwindow_p.h
+++ b/src/quicktemplates2/qquickapplicationwindow_p.h
@@ -51,6 +51,7 @@
#include <QtQuick/private/qquickwindowmodule_p.h>
#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
#include <QtGui/qfont.h>
+#include <QtGui/qpalette.h>
#include <QtCore/qlocale.h>
QT_BEGIN_NAMESPACE
@@ -72,12 +73,17 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickApplicationWindow : public QQuickWi
Q_PROPERTY(QQuickOverlay *overlay READ overlay CONSTANT FINAL)
Q_PROPERTY(QFont font READ font WRITE setFont RESET resetFont NOTIFY fontChanged FINAL)
Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET resetLocale NOTIFY localeChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(QPalette palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged FINAL REVISION 3)
+ Q_PROPERTY(QQuickItem *menuBar READ menuBar WRITE setMenuBar NOTIFY menuBarChanged FINAL REVISION 3)
Q_CLASSINFO("DefaultProperty", "contentData")
public:
explicit QQuickApplicationWindow(QWindow *parent = nullptr);
~QQuickApplicationWindow();
+ static QQuickApplicationWindowAttached *qmlAttachedProperties(QObject *object);
+
QQuickItem *background() const;
void setBackground(QQuickItem *background);
@@ -102,7 +108,13 @@ public:
void setLocale(const QLocale &locale);
void resetLocale();
- static QQuickApplicationWindowAttached *qmlAttachedProperties(QObject *object);
+ // 2.3 (Qt 5.10)
+ QPalette palette() const;
+ void setPalette(const QPalette &palette);
+ void resetPalette();
+
+ QQuickItem *menuBar() const;
+ void setMenuBar(QQuickItem *menuBar);
Q_SIGNALS:
void backgroundChanged();
@@ -111,6 +123,8 @@ Q_SIGNALS:
void footerChanged();
void fontChanged();
void localeChanged();
+ Q_REVISION(3) void paletteChanged();
+ Q_REVISION(3) void menuBarChanged();
protected:
bool isComponentComplete() const;
@@ -134,6 +148,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickApplicationWindowAttached : public
Q_PROPERTY(QQuickItem *header READ header NOTIFY headerChanged FINAL)
Q_PROPERTY(QQuickItem *footer READ footer NOTIFY footerChanged FINAL)
Q_PROPERTY(QQuickOverlay *overlay READ overlay NOTIFY overlayChanged FINAL)
+ Q_PROPERTY(QQuickItem *menuBar READ menuBar NOTIFY menuBarChanged FINAL) // REVISION 3
public:
explicit QQuickApplicationWindowAttached(QObject *parent = nullptr);
@@ -144,6 +159,7 @@ public:
QQuickItem *header() const;
QQuickItem *footer() const;
QQuickOverlay *overlay() const;
+ QQuickItem *menuBar() const;
Q_SIGNALS:
void windowChanged();
@@ -152,6 +168,8 @@ Q_SIGNALS:
void headerChanged();
void footerChanged();
void overlayChanged();
+ // 2.3 (Qt 5.10)
+ /*Q_REVISION(3)*/ void menuBarChanged();
private:
Q_DISABLE_COPY(QQuickApplicationWindowAttached)
diff --git a/src/quicktemplates2/qquickbutton.cpp b/src/quicktemplates2/qquickbutton.cpp
index 1a614754..9cbf8b21 100644
--- a/src/quicktemplates2/qquickbutton.cpp
+++ b/src/quicktemplates2/qquickbutton.cpp
@@ -57,6 +57,10 @@ QT_BEGIN_NAMESPACE
a question. Typical buttons are \e OK, \e Apply, \e Cancel, \e Close,
\e Yes, \e No, and \e Help.
+ Button inherits its API from AbstractButton. For instance, you can set
+ \l {AbstractButton::text}{text}, display an \l {Icons in Qt Quick Controls 2}{icon},
+ and react to \l {AbstractButton::clicked}{clicks} using the AbstractButton API.
+
A button emits the signal \l {AbstractButton::}{clicked()} when it is activated by the user.
Connect to this signal to perform the button's action. Buttons also
provide the signals \l {AbstractButton::}{canceled()}, \l {AbstractButton::}{doubleClicked()}, \l {AbstractButton::}{pressed()},
@@ -119,6 +123,11 @@ QFont QQuickButton::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::PushButtonFont);
}
+QPalette QQuickButton::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::ButtonPalette);
+}
+
/*!
\qmlproperty bool QtQuick.Controls::Button::highlighted
diff --git a/src/quicktemplates2/qquickbutton_p.h b/src/quicktemplates2/qquickbutton_p.h
index 93fb3c14..f1a34b10 100644
--- a/src/quicktemplates2/qquickbutton_p.h
+++ b/src/quicktemplates2/qquickbutton_p.h
@@ -81,6 +81,7 @@ protected:
void buttonChange(ButtonChange change) override;
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
private:
Q_DISABLE_COPY(QQuickButton)
diff --git a/src/quicktemplates2/qquickbuttongroup.cpp b/src/quicktemplates2/qquickbuttongroup.cpp
index 355fcf6a..2a1e354c 100644
--- a/src/quicktemplates2/qquickbuttongroup.cpp
+++ b/src/quicktemplates2/qquickbuttongroup.cpp
@@ -154,6 +154,8 @@ class QQuickButtonGroupPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QQuickButtonGroup)
public:
+ QQuickButtonGroupPrivate() : exclusive(true) { }
+
void clear();
void buttonClicked();
void _q_updateCurrent();
@@ -163,6 +165,7 @@ public:
static QQuickAbstractButton *buttons_at(QQmlListProperty<QQuickAbstractButton> *prop, int index);
static void buttons_clear(QQmlListProperty<QQuickAbstractButton> *prop);
+ bool exclusive;
QPointer<QQuickAbstractButton> checkedButton;
QVector<QQuickAbstractButton*> buttons;
};
@@ -188,6 +191,8 @@ void QQuickButtonGroupPrivate::buttonClicked()
void QQuickButtonGroupPrivate::_q_updateCurrent()
{
Q_Q(QQuickButtonGroup);
+ if (!exclusive)
+ return;
QQuickAbstractButton *button = qobject_cast<QQuickAbstractButton*>(q->sender());
if (button && button->isChecked())
q->setCheckedButton(button);
@@ -244,9 +249,12 @@ QQuickButtonGroupAttached *QQuickButtonGroup::qmlAttachedProperties(QObject *obj
/*!
\qmlproperty AbstractButton QtQuick.Controls::ButtonGroup::checkedButton
- This property holds the currently selected button, or \c null if there is none.
+ This property holds the currently selected button in an exclusive group,
+ or \c null if there is none or the group is non-exclusive.
+
+ By default, it is the first checked button added to an exclusive button group.
- By default, it is the first checked button added to the button group.
+ \sa exclusive
*/
QQuickAbstractButton *QQuickButtonGroup::checkedButton() const
{
@@ -306,6 +314,38 @@ QQmlListProperty<QQuickAbstractButton> QQuickButtonGroup::buttons()
}
/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::ButtonGroup::exclusive
+
+ This property holds whether the button group is exclusive. The default value is \c true.
+
+ If this property is \c true, then only one button in the group can be checked at any given time.
+ The user can click on any button to check it, and that button will replace the existing one as
+ the checked button in the group.
+
+ In an exclusive group, the user cannot uncheck the currently checked button by clicking on it;
+ instead, another button in the group must be clicked to set the new checked button for that group.
+
+ In a non-exclusive group, checking and unchecking buttons does not affect the other buttons in
+ the group. Furthermore, the value of the \l checkedButton property is \c null.
+*/
+bool QQuickButtonGroup::isExclusive() const
+{
+ Q_D(const QQuickButtonGroup);
+ return d->exclusive;
+}
+
+void QQuickButtonGroup::setExclusive(bool exclusive)
+{
+ Q_D(QQuickButtonGroup);
+ if (d->exclusive == exclusive)
+ return;
+
+ d->exclusive = exclusive;
+ emit exclusiveChanged();
+}
+
+/*!
\qmlmethod void QtQuick.Controls::ButtonGroup::addButton(AbstractButton button)
Adds a \a button to the button group.
@@ -326,7 +366,7 @@ void QQuickButtonGroup::addButton(QQuickAbstractButton *button)
QObjectPrivate::connect(button, &QQuickAbstractButton::clicked, d, &QQuickButtonGroupPrivate::buttonClicked);
QObjectPrivate::connect(button, &QQuickAbstractButton::checkedChanged, d, &QQuickButtonGroupPrivate::_q_updateCurrent);
- if (button->isChecked())
+ if (d->exclusive && button->isChecked())
setCheckedButton(button);
d->buttons.append(button);
diff --git a/src/quicktemplates2/qquickbuttongroup_p.h b/src/quicktemplates2/qquickbuttongroup_p.h
index bb32ed5c..53f8be8c 100644
--- a/src/quicktemplates2/qquickbuttongroup_p.h
+++ b/src/quicktemplates2/qquickbuttongroup_p.h
@@ -62,8 +62,10 @@ class QQuickButtonGroupAttachedPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickButtonGroup : public QObject
{
Q_OBJECT
- Q_PROPERTY(QQuickAbstractButton *checkedButton READ checkedButton WRITE setCheckedButton NOTIFY checkedButtonChanged)
+ Q_PROPERTY(QQuickAbstractButton *checkedButton READ checkedButton WRITE setCheckedButton NOTIFY checkedButtonChanged FINAL)
Q_PROPERTY(QQmlListProperty<QQuickAbstractButton> buttons READ buttons NOTIFY buttonsChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL REVISION 3)
public:
explicit QQuickButtonGroup(QObject *parent = nullptr);
@@ -76,6 +78,9 @@ public:
QQmlListProperty<QQuickAbstractButton> buttons();
+ bool isExclusive() const;
+ void setExclusive(bool exclusive);
+
public Q_SLOTS:
void addButton(QQuickAbstractButton *button);
void removeButton(QQuickAbstractButton *button);
@@ -85,6 +90,8 @@ Q_SIGNALS:
void buttonsChanged();
// 2.1 (Qt 5.8)
Q_REVISION(1) void clicked(QQuickAbstractButton *button);
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void exclusiveChanged();
private:
Q_DISABLE_COPY(QQuickButtonGroup)
diff --git a/src/quicktemplates2/qquickcheckbox.cpp b/src/quicktemplates2/qquickcheckbox.cpp
index e0c7faf1..2e0c401a 100644
--- a/src/quicktemplates2/qquickcheckbox.cpp
+++ b/src/quicktemplates2/qquickcheckbox.cpp
@@ -174,6 +174,11 @@ QFont QQuickCheckBox::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::CheckBoxFont);
}
+QPalette QQuickCheckBox::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::CheckBoxPalette);
+}
+
void QQuickCheckBox::buttonChange(ButtonChange change)
{
if (change == ButtonCheckedChange)
diff --git a/src/quicktemplates2/qquickcheckbox_p.h b/src/quicktemplates2/qquickcheckbox_p.h
index dfd935d3..979f096b 100644
--- a/src/quicktemplates2/qquickcheckbox_p.h
+++ b/src/quicktemplates2/qquickcheckbox_p.h
@@ -75,6 +75,7 @@ Q_SIGNALS:
protected:
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
void buttonChange(ButtonChange change) override;
void nextCheckState() override;
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp
index d22e09d5..6b20e6a5 100644
--- a/src/quicktemplates2/qquickcombobox.cpp
+++ b/src/quicktemplates2/qquickcombobox.cpp
@@ -37,6 +37,7 @@
#include "qquickcombobox_p.h"
#include "qquickcontrol_p_p.h"
#include "qquickabstractbutton_p.h"
+#include "qquickabstractbutton_p_p.h"
#include "qquickpopup_p_p.h"
#include <QtCore/qregexp.h>
@@ -50,6 +51,7 @@
#include <QtQml/private/qqmldelegatemodel_p.h>
#include <QtQuick/private/qquickevents_p_p.h>
#include <QtQuick/private/qquicktextinput_p.h>
+#include <QtQuick/private/qquickitemview_p.h>
QT_BEGIN_NAMESPACE
@@ -225,6 +227,7 @@ public:
void popupVisibleChanged();
void itemClicked();
+ void itemHovered();
void createdItem(int index, QObject *object);
void modelUpdated();
@@ -257,6 +260,7 @@ public:
bool hasDown;
bool pressed;
bool ownModel;
+ bool keyNavigating;
bool hasDisplayText;
bool hasCurrentIndex;
int highlightedIndex;
@@ -295,6 +299,7 @@ QQuickComboBoxPrivate::QQuickComboBoxPrivate()
hasDown(false),
pressed(false),
ownModel(false),
+ keyNavigating(false),
hasDisplayText(false),
hasCurrentIndex(false),
highlightedIndex(-1),
@@ -345,7 +350,15 @@ void QQuickComboBoxPrivate::popupVisibleChanged()
if (isPopupVisible())
QGuiApplication::inputMethod()->reset();
+ QQuickItemView *itemView = popup->findChild<QQuickItemView *>();
+ if (itemView)
+ itemView->setHighlightRangeMode(QQuickItemView::NoHighlightRange);
+
updateHighlightedIndex();
+
+ if (itemView)
+ itemView->positionViewAtIndex(highlightedIndex, QQuickItemView::Beginning);
+
if (!hasDown) {
q->setDown(pressed || isPopupVisible());
hasDown = false;
@@ -362,6 +375,25 @@ void QQuickComboBoxPrivate::itemClicked()
}
}
+void QQuickComboBoxPrivate::itemHovered()
+{
+ Q_Q(QQuickComboBox);
+ if (keyNavigating)
+ return;
+
+ QQuickAbstractButton *button = qobject_cast<QQuickAbstractButton *>(q->sender());
+ if (!button || !button->isHovered() || QQuickAbstractButtonPrivate::get(button)->touchId != -1)
+ return;
+
+ int index = delegateModel->indexOf(button, nullptr);
+ if (index != -1) {
+ setHighlightedIndex(index, Highlight);
+
+ if (QQuickItemView *itemView = popup->findChild<QQuickItemView *>())
+ itemView->positionViewAtIndex(index, QQuickItemView::Contain);
+ }
+}
+
void QQuickComboBoxPrivate::createdItem(int index, QObject *object)
{
Q_Q(QQuickComboBox);
@@ -375,6 +407,7 @@ void QQuickComboBoxPrivate::createdItem(int index, QObject *object)
if (button) {
button->setFocusPolicy(Qt::NoFocus);
connect(button, &QQuickAbstractButton::clicked, this, &QQuickComboBoxPrivate::itemClicked);
+ connect(button, &QQuickAbstractButton::hoveredChanged, this, &QQuickComboBoxPrivate::itemHovered);
}
if (index == currentIndex && !q->isEditable())
@@ -1021,6 +1054,9 @@ void QQuickComboBox::setPopup(QQuickPopup *popup)
QQuickPopupPrivate::get(popup)->allowVerticalFlip = true;
popup->setClosePolicy(QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutsideParent);
QObjectPrivate::connect(popup, &QQuickPopup::visibleChanged, d, &QQuickComboBoxPrivate::popupVisibleChanged);
+
+ if (QQuickItemView *itemView = popup->findChild<QQuickItemView *>())
+ itemView->setHighlightRangeMode(QQuickItemView::NoHighlightRange);
}
d->popup = popup;
emit popupChanged();
@@ -1388,9 +1424,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:
@@ -1460,14 +1499,17 @@ void QQuickComboBox::keyPressEvent(QKeyEvent *event)
event->accept();
break;
case Qt::Key_Up:
+ d->keyNavigating = true;
d->decrementCurrentIndex();
event->accept();
break;
case Qt::Key_Down:
+ d->keyNavigating = true;
d->incrementCurrentIndex();
event->accept();
break;
case Qt::Key_Home:
+ d->keyNavigating = true;
if (d->isPopupVisible())
d->setHighlightedIndex(0, Highlight);
else
@@ -1475,6 +1517,7 @@ void QQuickComboBox::keyPressEvent(QKeyEvent *event)
event->accept();
break;
case Qt::Key_End:
+ d->keyNavigating = true;
if (d->isPopupVisible())
d->setHighlightedIndex(count() - 1, Highlight);
else
@@ -1494,6 +1537,8 @@ void QQuickComboBox::keyReleaseEvent(QKeyEvent *event)
{
Q_D(QQuickComboBox);
QQuickControl::keyReleaseEvent(event);
+
+ d->keyNavigating = false;
if (!d->popup || event->isAutoRepeat())
return;
@@ -1594,6 +1639,11 @@ QFont QQuickComboBox::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::ComboMenuItemFont);
}
+QPalette QQuickComboBox::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::ComboBoxPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickComboBox::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickcombobox_p.h b/src/quicktemplates2/qquickcombobox_p.h
index 030d068b..dd1e1d4f 100644
--- a/src/quicktemplates2/qquickcombobox_p.h
+++ b/src/quicktemplates2/qquickcombobox_p.h
@@ -197,6 +197,7 @@ protected:
void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override;
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
diff --git a/src/quicktemplates2/qquickcontainer.cpp b/src/quicktemplates2/qquickcontainer.cpp
index 7cf73841..07fe04d2 100644
--- a/src/quicktemplates2/qquickcontainer.cpp
+++ b/src/quicktemplates2/qquickcontainer.cpp
@@ -253,13 +253,17 @@ void QQuickContainerPrivate::insertItem(int index, QQuickItem *item)
q->itemAdded(index, item);
- if (contentModel->count() == 1 && currentIndex == -1)
+ int count = contentModel->count();
+ for (int i = index + 1; i < count; ++i)
+ q->itemMoved(i, itemAt(i));
+
+ if (count == 1 && currentIndex == -1)
q->setCurrentIndex(index);
updatingCurrent = false;
}
-void QQuickContainerPrivate::moveItem(int from, int to)
+void QQuickContainerPrivate::moveItem(int from, int to, QQuickItem *item)
{
Q_Q(QQuickContainer);
int oldCurrent = currentIndex;
@@ -267,6 +271,16 @@ void QQuickContainerPrivate::moveItem(int from, int to)
updatingCurrent = true;
+ q->itemMoved(to, item);
+
+ if (from < to) {
+ for (int i = from; i < to; ++i)
+ q->itemMoved(i, itemAt(i));
+ } else {
+ for (int i = from; i > to; --i)
+ q->itemMoved(i, itemAt(i));
+ }
+
if (from == oldCurrent)
q->setCurrentIndex(to);
else if (from < oldCurrent && to >= oldCurrent)
@@ -300,6 +314,10 @@ void QQuickContainerPrivate::removeItem(int index, QQuickItem *item)
q->itemRemoved(index, item);
+ int count = contentModel->count();
+ for (int i = index; i < count; ++i)
+ q->itemMoved(i, itemAt(i));
+
if (currentChanged)
emit q->currentIndexChanged();
@@ -363,8 +381,8 @@ void QQuickContainerPrivate::itemDestroyed(QQuickItem *item)
void QQuickContainerPrivate::contentData_append(QQmlListProperty<QObject> *prop, QObject *obj)
{
- QQuickContainerPrivate *p = static_cast<QQuickContainerPrivate *>(prop->data);
QQuickContainer *q = static_cast<QQuickContainer *>(prop->object);
+ QQuickContainerPrivate *p = QQuickContainerPrivate::get(q);
QQuickItem *item = qobject_cast<QQuickItem *>(obj);
if (item) {
if (QQuickItemPrivate::get(item)->isTransparentForPositioner())
@@ -378,20 +396,20 @@ void QQuickContainerPrivate::contentData_append(QQmlListProperty<QObject> *prop,
int QQuickContainerPrivate::contentData_count(QQmlListProperty<QObject> *prop)
{
- QQuickContainerPrivate *p = static_cast<QQuickContainerPrivate *>(prop->data);
- return p->contentData.count();
+ QQuickContainer *q = static_cast<QQuickContainer *>(prop->object);
+ return QQuickContainerPrivate::get(q)->contentData.count();
}
QObject *QQuickContainerPrivate::contentData_at(QQmlListProperty<QObject> *prop, int index)
{
- QQuickContainerPrivate *p = static_cast<QQuickContainerPrivate *>(prop->data);
- return p->contentData.value(index);
+ QQuickContainer *q = static_cast<QQuickContainer *>(prop->object);
+ return QQuickContainerPrivate::get(q)->contentData.value(index);
}
void QQuickContainerPrivate::contentData_clear(QQmlListProperty<QObject> *prop)
{
- QQuickContainerPrivate *p = static_cast<QQuickContainerPrivate *>(prop->data);
- p->contentData.clear();
+ QQuickContainer *q = static_cast<QQuickContainer *>(prop->object);
+ return QQuickContainerPrivate::get(q)->contentData.clear();
}
void QQuickContainerPrivate::contentChildren_append(QQmlListProperty<QQuickItem> *prop, QQuickItem *item)
@@ -402,8 +420,8 @@ void QQuickContainerPrivate::contentChildren_append(QQmlListProperty<QQuickItem>
int QQuickContainerPrivate::contentChildren_count(QQmlListProperty<QQuickItem> *prop)
{
- QQuickContainerPrivate *p = static_cast<QQuickContainerPrivate *>(prop->data);
- return p->contentModel->count();
+ QQuickContainer *q = static_cast<QQuickContainer *>(prop->object);
+ return QQuickContainerPrivate::get(q)->contentModel->count();
}
QQuickItem *QQuickContainerPrivate::contentChildren_at(QQmlListProperty<QQuickItem> *prop, int index)
@@ -414,8 +432,8 @@ QQuickItem *QQuickContainerPrivate::contentChildren_at(QQmlListProperty<QQuickIt
void QQuickContainerPrivate::contentChildren_clear(QQmlListProperty<QQuickItem> *prop)
{
- QQuickContainerPrivate *p = static_cast<QQuickContainerPrivate *>(prop->data);
- p->contentModel->clear();
+ QQuickContainer *q = static_cast<QQuickContainer *>(prop->object);
+ return QQuickContainerPrivate::get(q)->contentModel->clear();
}
QQuickContainer::QQuickContainer(QQuickItem *parent)
@@ -491,7 +509,7 @@ void QQuickContainer::insertItem(int index, QQuickItem *item)
if (oldIndex < index)
--index;
if (oldIndex != index)
- d->moveItem(oldIndex, index);
+ d->moveItem(oldIndex, index, item);
} else {
d->insertItem(index, item);
}
@@ -512,26 +530,65 @@ void QQuickContainer::moveItem(int from, int to)
to = count - 1;
if (from != to)
- d->moveItem(from, to);
+ d->moveItem(from, to, d->itemAt(from));
}
/*!
+ \deprecated
\qmlmethod void QtQuick.Controls::Container::removeItem(int index)
- Removes an item at \a index.
+ Use Container::removeItem(Item) or Container::takeItem(int) instead.
+*/
+void QQuickContainer::removeItem(const QVariant &var)
+{
+ if (var.userType() == QMetaType::Nullptr)
+ return;
+
+ if (QQuickItem *item = var.value<QQuickItem *>())
+ removeItem(item);
+ else
+ takeItem(var.toInt());
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Container::removeItem(Item item)
+
+ Removes and destroys the specified \a item.
+*/
+void QQuickContainer::removeItem(QQuickItem *item)
+{
+ Q_D(QQuickContainer);
+ if (!item)
+ return;
+
+ const int index = d->contentModel->indexOf(item, nullptr);
+ if (index == -1)
+ return;
+
+ d->removeItem(index, item);
+ item->deleteLater();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod Item QtQuick.Controls::Container::takeItem(int index)
+
+ Removes and returns the item at \a index.
\note The ownership of the item is transferred to the caller.
*/
-void QQuickContainer::removeItem(int index)
+QQuickItem *QQuickContainer::takeItem(int index)
{
Q_D(QQuickContainer);
const int count = d->contentModel->count();
if (index < 0 || index >= count)
- return;
+ return nullptr;
QQuickItem *item = itemAt(index);
if (item)
d->removeItem(index, item);
+ return item;
}
/*!
@@ -577,8 +634,7 @@ QVariant QQuickContainer::contentModel() const
*/
QQmlListProperty<QObject> QQuickContainer::contentData()
{
- Q_D(QQuickContainer);
- return QQmlListProperty<QObject>(this, d,
+ return QQmlListProperty<QObject>(this, nullptr,
QQuickContainerPrivate::contentData_append,
QQuickContainerPrivate::contentData_count,
QQuickContainerPrivate::contentData_at,
@@ -601,8 +657,7 @@ QQmlListProperty<QObject> QQuickContainer::contentData()
*/
QQmlListProperty<QQuickItem> QQuickContainer::contentChildren()
{
- Q_D(QQuickContainer);
- return QQmlListProperty<QQuickItem>(this, d,
+ return QQmlListProperty<QQuickItem>(this, nullptr,
QQuickContainerPrivate::contentChildren_append,
QQuickContainerPrivate::contentChildren_count,
QQuickContainerPrivate::contentChildren_at,
@@ -757,6 +812,12 @@ void QQuickContainer::itemAdded(int index, QQuickItem *item)
Q_UNUSED(item);
}
+void QQuickContainer::itemMoved(int index, QQuickItem *item)
+{
+ Q_UNUSED(index);
+ Q_UNUSED(item);
+}
+
void QQuickContainer::itemRemoved(int index, QQuickItem *item)
{
Q_UNUSED(index);
diff --git a/src/quicktemplates2/qquickcontainer_p.h b/src/quicktemplates2/qquickcontainer_p.h
index 3aa1f13e..030497cf 100644
--- a/src/quicktemplates2/qquickcontainer_p.h
+++ b/src/quicktemplates2/qquickcontainer_p.h
@@ -75,7 +75,10 @@ public:
Q_INVOKABLE void addItem(QQuickItem *item);
Q_INVOKABLE void insertItem(int index, QQuickItem *item);
Q_INVOKABLE void moveItem(int from, int to);
- Q_INVOKABLE void removeItem(int index);
+ Q_INVOKABLE void removeItem(const QVariant &item); // ### Qt 6: remove
+ void removeItem(QQuickItem *item); // ### Qt 6: Q_INVOKABLE
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) Q_INVOKABLE QQuickItem *takeItem(int index);
QVariant contentModel() const;
QQmlListProperty<QObject> contentData();
@@ -106,6 +109,7 @@ protected:
virtual bool isContent(QQuickItem *item) const;
virtual void itemAdded(int index, QQuickItem *item);
+ virtual void itemMoved(int index, QQuickItem *item);
virtual void itemRemoved(int index, QQuickItem *item);
private:
diff --git a/src/quicktemplates2/qquickcontainer_p_p.h b/src/quicktemplates2/qquickcontainer_p_p.h
index bc892c7d..7791b69c 100644
--- a/src/quicktemplates2/qquickcontainer_p_p.h
+++ b/src/quicktemplates2/qquickcontainer_p_p.h
@@ -48,6 +48,7 @@
// We mean it.
//
+#include <QtQuickTemplates2/private/qquickcontainer_p.h>
#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
#include <QtQuick/private/qquickitemchangelistener_p.h>
#include <QtQml/private/qqmlobjectmodel_p.h>
@@ -61,12 +62,17 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickContainerPrivate : public QQuickCon
public:
QQuickContainerPrivate();
+ static QQuickContainerPrivate *get(QQuickContainer *container)
+ {
+ return container->d_func();
+ }
+
void init();
void cleanup();
QQuickItem *itemAt(int index) const;
void insertItem(int index, QQuickItem *item);
- void moveItem(int from, int to);
+ void moveItem(int from, int to, QQuickItem *item);
void removeItem(int index, QQuickItem *item);
void reorderItems();
diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp
index 908c0f42..14b8e253 100644
--- a/src/quicktemplates2/qquickcontrol.cpp
+++ b/src/quicktemplates2/qquickcontrol.cpp
@@ -130,8 +130,7 @@ QQuickControlPrivate::QQuickControlPrivate()
focusPolicy(Qt::NoFocus),
focusReason(Qt::OtherFocusReason),
background(nullptr),
- contentItem(nullptr),
- accessibleAttached(nullptr)
+ contentItem(nullptr)
{
#if QT_CONFIG(accessibility)
QAccessible::installActivationObserver(this);
@@ -317,27 +316,11 @@ QAccessible::Role QQuickControlPrivate::accessibleRole() const
return q->accessibleRole();
}
-QAccessible::Role QQuickControl::accessibleRole() const
-{
- return QAccessible::NoRole;
-}
-
-void QQuickControl::accessibilityActiveChanged(bool active)
+QQuickAccessibleAttached *QQuickControlPrivate::accessibleAttached(const QObject *object)
{
- Q_D(QQuickControl);
- if (d->accessibleAttached || !active)
- return;
-
- d->accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(this, true));
-
- // QQuickControl relies on the existence of a QQuickAccessibleAttached object.
- // However, qmlAttachedPropertiesObject(create=true) creates an instance only
- // for items that have been created by a QML engine. Therefore we create the
- // object by hand for items created in C++ (QQuickPopupItem, for instance).
- if (!d->accessibleAttached)
- d->accessibleAttached = new QQuickAccessibleAttached(this);
-
- d->accessibleAttached->setRole(accessibleRole());
+ if (!QAccessible::isActive())
+ return nullptr;
+ return QQuickAccessibleAttached::attachedProperties(object);
}
#endif
@@ -397,11 +380,11 @@ void QQuickControlPrivate::resolveFont()
inheritFont(parentFont(q));
}
-void QQuickControlPrivate::inheritFont(const QFont &f)
+void QQuickControlPrivate::inheritFont(const QFont &font)
{
Q_Q(QQuickControl);
- QFont parentFont = extra.isAllocated() ? extra->font.resolve(f) : f;
- parentFont.resolve(extra.isAllocated() ? extra->font.resolve() | f.resolve() : f.resolve());
+ QFont parentFont = extra.isAllocated() ? extra->requestedFont.resolve(font) : font;
+ parentFont.resolve(extra.isAllocated() ? extra->requestedFont.resolve() | font.resolve() : font.resolve());
const QFont defaultFont = q->defaultFont();
const QFont resolvedFont = parentFont.resolve(defaultFont);
@@ -414,35 +397,192 @@ void QQuickControlPrivate::inheritFont(const QFont &f)
Assign \a font to this control, and propagate it to all children.
*/
-void QQuickControlPrivate::updateFont(const QFont &f)
+void QQuickControlPrivate::updateFont(const QFont &font)
{
Q_Q(QQuickControl);
- QFont old = resolvedFont;
- resolvedFont = f;
+ QFont oldFont = resolvedFont;
+ resolvedFont = font;
- if (old != f)
- q->fontChange(f, old);
+ if (oldFont != font)
+ q->fontChange(font, oldFont);
- QQuickControlPrivate::updateFontRecur(q, f);
+ QQuickControlPrivate::updateFontRecur(q, font);
- if (old != f)
+ if (oldFont != font)
emit q->fontChanged();
}
-void QQuickControlPrivate::updateFontRecur(QQuickItem *item, const QFont &f)
+void QQuickControlPrivate::updateFontRecur(QQuickItem *item, const QFont &font)
{
const auto childItems = item->childItems();
for (QQuickItem *child : childItems) {
if (QQuickControl *control = qobject_cast<QQuickControl *>(child))
- QQuickControlPrivate::get(control)->inheritFont(f);
+ QQuickControlPrivate::get(control)->inheritFont(font);
else if (QQuickLabel *label = qobject_cast<QQuickLabel *>(child))
- QQuickLabelPrivate::get(label)->inheritFont(f);
+ QQuickLabelPrivate::get(label)->inheritFont(font);
else if (QQuickTextArea *textArea = qobject_cast<QQuickTextArea *>(child))
- QQuickTextAreaPrivate::get(textArea)->inheritFont(f);
+ QQuickTextAreaPrivate::get(textArea)->inheritFont(font);
else if (QQuickTextField *textField = qobject_cast<QQuickTextField *>(child))
- QQuickTextFieldPrivate::get(textField)->inheritFont(f);
+ QQuickTextFieldPrivate::get(textField)->inheritFont(font);
else
- QQuickControlPrivate::updateFontRecur(child, f);
+ QQuickControlPrivate::updateFontRecur(child, font);
+ }
+}
+
+/*!
+ \internal
+
+ Returns the palette that the item inherits from its ancestors and
+ QGuiApplication::palette.
+*/
+QPalette QQuickControlPrivate::parentPalette(const QQuickItem *item)
+{
+ QQuickItem *p = item->parentItem();
+ while (p) {
+ if (QQuickControl *control = qobject_cast<QQuickControl *>(p))
+ return control->palette();
+ else if (QQuickLabel *label = qobject_cast<QQuickLabel *>(p))
+ return label->palette();
+ else if (QQuickTextField *textField = qobject_cast<QQuickTextField *>(p))
+ return textField->palette();
+ else if (QQuickTextArea *textArea = qobject_cast<QQuickTextArea *>(p))
+ return textArea->palette();
+
+ p = p->parentItem();
+ }
+
+ if (QQuickApplicationWindow *window = qobject_cast<QQuickApplicationWindow *>(item->window()))
+ return window->palette();
+
+ return themePalette(QPlatformTheme::SystemPalette);
+}
+
+QPalette QQuickControlPrivate::themePalette(QPlatformTheme::Palette type)
+{
+ if (QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) {
+ if (const QPalette *palette = theme->palette(type)) {
+ QPalette p = *palette;
+ if (type == QPlatformTheme::SystemPalette)
+ p.resolve(0);
+ return p;
+ }
+ }
+
+ return QPalette();
+}
+
+/*!
+ \internal
+
+ Determine which palette is implicitly imposed on this control by its ancestors
+ and QGuiApplication::palette, resolve this against its own palette (attributes from
+ the implicit palette are copied over). Then propagate this palette to this
+ control's children.
+*/
+void QQuickControlPrivate::resolvePalette()
+{
+ Q_Q(QQuickControl);
+ inheritPalette(parentPalette(q));
+}
+
+void QQuickControlPrivate::inheritPalette(const QPalette &palette)
+{
+ Q_Q(QQuickControl);
+ QPalette parentPalette = extra.isAllocated() ? extra->requestedPalette.resolve(palette) : palette;
+ parentPalette.resolve(extra.isAllocated() ? extra->requestedPalette.resolve() | palette.resolve() : palette.resolve());
+
+ const QPalette defaultPalette = q->defaultPalette();
+ const QPalette resolvedPalette = parentPalette.resolve(defaultPalette);
+
+ setPalette_helper(resolvedPalette);
+}
+
+/*!
+ \internal
+
+ Assign \a palette to this control, and propagate it to all children.
+*/
+void QQuickControlPrivate::updatePalette(const QPalette &palette)
+{
+ Q_Q(QQuickControl);
+ QPalette oldPalette = resolvedPalette;
+ resolvedPalette = palette;
+
+ if (oldPalette != palette)
+ q->paletteChange(palette, oldPalette);
+
+ QQuickControlPrivate::updatePaletteRecur(q, palette);
+
+ if (oldPalette != palette)
+ emit q->paletteChanged();
+}
+
+void QQuickControlPrivate::updatePaletteRecur(QQuickItem *item, const QPalette &palette)
+{
+ const auto childItems = item->childItems();
+ for (QQuickItem *child : childItems) {
+ if (QQuickControl *control = qobject_cast<QQuickControl *>(child))
+ QQuickControlPrivate::get(control)->inheritPalette(palette);
+ else if (QQuickLabel *label = qobject_cast<QQuickLabel *>(child))
+ QQuickLabelPrivate::get(label)->inheritPalette(palette);
+ else if (QQuickTextArea *textArea = qobject_cast<QQuickTextArea *>(child))
+ QQuickTextAreaPrivate::get(textArea)->inheritPalette(palette);
+ else if (QQuickTextField *textField = qobject_cast<QQuickTextField *>(child))
+ QQuickTextFieldPrivate::get(textField)->inheritPalette(palette);
+ else
+ QQuickControlPrivate::updatePaletteRecur(child, palette);
+ }
+}
+
+QLocale QQuickControlPrivate::calcLocale(const QQuickItem *item)
+{
+ const QQuickItem *p = item;
+ while (p) {
+ if (const QQuickControl *control = qobject_cast<const QQuickControl *>(p))
+ return control->locale();
+
+ QVariant v = p->property("locale");
+ if (v.isValid() && v.userType() == QMetaType::QLocale)
+ return v.toLocale();
+
+ p = p->parentItem();
+ }
+
+ if (item) {
+ if (QQuickApplicationWindow *window = qobject_cast<QQuickApplicationWindow *>(item->window()))
+ return window->locale();
+ }
+
+ return QLocale();
+}
+
+void QQuickControlPrivate::updateLocale(const QLocale &l, bool e)
+{
+ Q_Q(QQuickControl);
+ if (!e && hasLocale)
+ return;
+
+ QLocale old = q->locale();
+ hasLocale = e;
+ if (old != l) {
+ bool wasMirrored = q->isMirrored();
+ q->localeChange(l, old);
+ locale = l;
+ QQuickControlPrivate::updateLocaleRecur(q, l);
+ emit q->localeChanged();
+ if (wasMirrored != q->isMirrored())
+ q->mirrorChange();
+ }
+}
+
+void QQuickControlPrivate::updateLocaleRecur(QQuickItem *item, const QLocale &l)
+{
+ const auto childItems = item->childItems();
+ for (QQuickItem *child : childItems) {
+ if (QQuickControl *control = qobject_cast<QQuickControl *>(child))
+ QQuickControlPrivate::get(control)->updateLocale(l, false);
+ else
+ updateLocaleRecur(child, l);
}
}
@@ -504,48 +644,26 @@ bool QQuickControlPrivate::calcHoverEnabled(const QQuickItem *item)
}
#endif
-QString QQuickControl::accessibleName() const
-{
-#if QT_CONFIG(accessibility)
- Q_D(const QQuickControl);
- if (d->accessibleAttached)
- return d->accessibleAttached->name();
-#endif
- return QString();
-}
-
-void QQuickControl::setAccessibleName(const QString &name)
+/*
+ Cancels incubation recursively to avoid "Object destroyed during incubation" (QTBUG-50992)
+*/
+static void cancelIncubation(QObject *object, QQmlContext *context)
{
-#if QT_CONFIG(accessibility)
- Q_D(QQuickControl);
- if (d->accessibleAttached)
- d->accessibleAttached->setName(name);
-#else
- Q_UNUSED(name)
-#endif
+ const auto children = object->children();
+ for (QObject *child : children)
+ cancelIncubation(child, context);
+ QQmlIncubatorPrivate::cancel(object, context);
}
-QVariant QQuickControl::accessibleProperty(const char *propertyName)
+void QQuickControlPrivate::destroyDelegate(QObject *delegate, QObject *parent)
{
-#if QT_CONFIG(accessibility)
- Q_D(QQuickControl);
- if (d->accessibleAttached)
- return QQuickAccessibleAttached::property(this, propertyName);
-#endif
- Q_UNUSED(propertyName)
- return QVariant();
-}
+ if (!delegate)
+ return;
-bool QQuickControl::setAccessibleProperty(const char *propertyName, const QVariant &value)
-{
-#if QT_CONFIG(accessibility)
- Q_D(QQuickControl);
- if (d->accessibleAttached)
- return QQuickAccessibleAttached::setProperty(this, propertyName, value);
-#endif
- Q_UNUSED(propertyName)
- Q_UNUSED(value)
- return false;
+ QQmlContext *context = parent ? qmlContext(parent) : nullptr;
+ if (context)
+ cancelIncubation(delegate, context);
+ delete delegate;
}
QQuickControl::QQuickControl(QQuickItem *parent)
@@ -563,6 +681,9 @@ void QQuickControl::itemChange(QQuickItem::ItemChange change, const QQuickItem::
Q_D(QQuickControl);
QQuickItem::itemChange(change, value);
switch (change) {
+ case ItemEnabledHasChanged:
+ emit paletteChanged();
+ break;
case ItemVisibleHasChanged:
#if QT_CONFIG(quicktemplates2_hover)
if (!value.boolValue)
@@ -573,6 +694,7 @@ void QQuickControl::itemChange(QQuickItem::ItemChange change, const QQuickItem::
case ItemParentHasChanged:
if ((change == ItemParentHasChanged && value.item) || (change == ItemSceneChange && value.window)) {
d->resolveFont();
+ d->resolvePalette();
if (!d->hasLocale)
d->updateLocale(QQuickControlPrivate::calcLocale(d->parentItem), false); // explicit=false
#if QT_CONFIG(quicktemplates2_hover)
@@ -635,10 +757,10 @@ QFont QQuickControl::font() const
void QQuickControl::setFont(const QFont &font)
{
Q_D(QQuickControl);
- if (d->extra.value().font.resolve() == font.resolve() && d->extra.value().font == font)
+ if (d->extra.value().requestedFont.resolve() == font.resolve() && d->extra.value().requestedFont == font)
return;
- d->extra.value().font = font;
+ d->extra.value().requestedFont = font;
d->resolveFont();
}
@@ -911,80 +1033,6 @@ void QQuickControl::resetLocale()
d->updateLocale(QQuickControlPrivate::calcLocale(d->parentItem), false); // explicit=false
}
-QLocale QQuickControlPrivate::calcLocale(const QQuickItem *item)
-{
- const QQuickItem *p = item;
- while (p) {
- if (const QQuickControl *control = qobject_cast<const QQuickControl *>(p))
- return control->locale();
-
- QVariant v = p->property("locale");
- if (v.isValid() && v.userType() == QMetaType::QLocale)
- return v.toLocale();
-
- p = p->parentItem();
- }
-
- if (item) {
- if (QQuickApplicationWindow *window = qobject_cast<QQuickApplicationWindow *>(item->window()))
- return window->locale();
- }
-
- return QLocale();
-}
-
-/*
- Cancels incubation recursively to avoid "Object destroyed during incubation" (QTBUG-50992)
-*/
-static void cancelIncubation(QObject *object, QQmlContext *context)
-{
- const auto children = object->children();
- for (QObject *child : children)
- cancelIncubation(child, context);
- QQmlIncubatorPrivate::cancel(object, context);
-}
-
-void QQuickControlPrivate::destroyDelegate(QObject *delegate, QObject *parent)
-{
- if (!delegate)
- return;
-
- QQmlContext *context = parent ? qmlContext(parent) : nullptr;
- if (context)
- cancelIncubation(delegate, context);
- delete delegate;
-}
-
-void QQuickControlPrivate::updateLocale(const QLocale &l, bool e)
-{
- Q_Q(QQuickControl);
- if (!e && hasLocale)
- return;
-
- QLocale old = q->locale();
- hasLocale = e;
- if (old != l) {
- bool wasMirrored = q->isMirrored();
- q->localeChange(l, old);
- locale = l;
- QQuickControlPrivate::updateLocaleRecur(q, l);
- emit q->localeChanged();
- if (wasMirrored != q->isMirrored())
- q->mirrorChange();
- }
-}
-
-void QQuickControlPrivate::updateLocaleRecur(QQuickItem *item, const QLocale &l)
-{
- const auto childItems = item->childItems();
- for (QQuickItem *child : childItems) {
- if (QQuickControl *control = qobject_cast<QQuickControl *>(child))
- QQuickControlPrivate::get(control)->updateLocale(l, false);
- else
- updateLocaleRecur(child, l);
- }
-}
-
/*!
\qmlproperty bool QtQuick.Controls::Control::mirrored
\readonly
@@ -1278,11 +1326,74 @@ void QQuickControl::setContentItem(QQuickItem *item)
d->setContentItem_helper(item, true);
}
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty palette QtQuick.Controls::Control::palette
+
+ This property holds the palette currently set for the control.
+
+ This property describes the control's requested palette. The palette is used by the control's
+ style when rendering standard components, and is available as a means to ensure that custom
+ controls can maintain consistency with the native platform's native look and feel. It's common
+ that different platforms, or different styles, define different palettes for an application.
+
+ The default palette depends on the system environment. ApplicationWindow maintains a system/theme
+ palette which serves as a default for all controls. There may also be special palette defaults for
+ certain types of controls. You can also set the default palette for controls by passing a custom
+ palette to QGuiApplication::setPalette(), before loading any QML.
+
+ Control propagates explicit palette properties from parent to children. If you change a specific
+ property on a control's palette, that property propagates to all of the control's children,
+ overriding any system defaults for that property.
+
+ \code
+ Page {
+ palette.text: "red"
+
+ Column {
+ Label {
+ text: qsTr("This will use red color...")
+ }
+
+ Switch {
+ text: qsTr("... and so will this")
+ }
+ }
+ }
+ \endcode
+
+ \sa ApplicationWindow::palette, Popup::palette, {qtquickcontrols2-palette}{palette QML Basic Type}
+*/
+QPalette QQuickControl::palette() const
+{
+ Q_D(const QQuickControl);
+ QPalette palette = d->resolvedPalette;
+ if (!isEnabled())
+ palette.setCurrentColorGroup(QPalette::Disabled);
+ return palette;
+}
+
+void QQuickControl::setPalette(const QPalette &palette)
+{
+ Q_D(QQuickControl);
+ if (d->extra.value().requestedPalette.resolve() == palette.resolve() && d->extra.value().requestedPalette == palette)
+ return;
+
+ d->extra.value().requestedPalette = palette;
+ d->resolvePalette();
+}
+
+void QQuickControl::resetPalette()
+{
+ setPalette(QPalette());
+}
+
void QQuickControl::classBegin()
{
Q_D(QQuickControl);
QQuickItem::classBegin();
d->resolveFont();
+ d->resolvePalette();
}
void QQuickControl::componentComplete()
@@ -1297,7 +1408,7 @@ void QQuickControl::componentComplete()
setAcceptHoverEvents(QQuickControlPrivate::calcHoverEnabled(d->parentItem));
#endif
#if QT_CONFIG(accessibility)
- if (!d->accessibleAttached && QAccessible::isActive())
+ if (QAccessible::isActive())
accessibilityActiveChanged(true);
#endif
}
@@ -1307,6 +1418,11 @@ QFont QQuickControl::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::SystemFont);
}
+QPalette QQuickControl::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::SystemPalette);
+}
+
void QQuickControl::focusInEvent(QFocusEvent *event)
{
QQuickItem::focusInEvent(event);
@@ -1480,4 +1596,67 @@ void QQuickControl::localeChange(const QLocale &newLocale, const QLocale &oldLoc
Q_UNUSED(oldLocale);
}
+void QQuickControl::paletteChange(const QPalette &newPalette, const QPalette &oldPalette)
+{
+ Q_UNUSED(newPalette);
+ Q_UNUSED(oldPalette);
+}
+
+#if QT_CONFIG(accessibility)
+QAccessible::Role QQuickControl::accessibleRole() const
+{
+ return QAccessible::NoRole;
+}
+
+void QQuickControl::accessibilityActiveChanged(bool active)
+{
+ if (!active)
+ return;
+
+ QQuickAccessibleAttached *accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(this, true));
+ Q_ASSERT(accessibleAttached);
+ accessibleAttached->setRole(accessibleRole());
+}
+#endif
+
+QString QQuickControl::accessibleName() const
+{
+#if QT_CONFIG(accessibility)
+ if (QQuickAccessibleAttached *accessibleAttached = QQuickControlPrivate::accessibleAttached(this))
+ return accessibleAttached->name();
+#endif
+ return QString();
+}
+
+void QQuickControl::setAccessibleName(const QString &name)
+{
+#if QT_CONFIG(accessibility)
+ if (QQuickAccessibleAttached *accessibleAttached = QQuickControlPrivate::accessibleAttached(this))
+ accessibleAttached->setName(name);
+#else
+ Q_UNUSED(name)
+#endif
+}
+
+QVariant QQuickControl::accessibleProperty(const char *propertyName)
+{
+#if QT_CONFIG(accessibility)
+ if (QAccessible::isActive())
+ return QQuickAccessibleAttached::property(this, propertyName);
+#endif
+ Q_UNUSED(propertyName)
+ return QVariant();
+}
+
+bool QQuickControl::setAccessibleProperty(const char *propertyName, const QVariant &value)
+{
+#if QT_CONFIG(accessibility)
+ if (QAccessible::isActive())
+ return QQuickAccessibleAttached::setProperty(this, propertyName, value);
+#endif
+ Q_UNUSED(propertyName)
+ Q_UNUSED(value)
+ return false;
+}
+
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickcontrol_p.h b/src/quicktemplates2/qquickcontrol_p.h
index 8b52bd02..7dd1deb3 100644
--- a/src/quicktemplates2/qquickcontrol_p.h
+++ b/src/quicktemplates2/qquickcontrol_p.h
@@ -49,6 +49,7 @@
//
#include <QtCore/qlocale.h>
+#include <QtGui/qpalette.h>
#include <QtQuick/qquickitem.h>
#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
@@ -78,6 +79,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickControl : public QQuickItem
Q_PROPERTY(bool wheelEnabled READ isWheelEnabled WRITE setWheelEnabled NOTIFY wheelEnabledChanged FINAL)
Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
Q_PROPERTY(QQuickItem *contentItem READ contentItem WRITE setContentItem NOTIFY contentItemChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(QPalette palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged FINAL REVISION 3)
public:
explicit QQuickControl(QQuickItem *parent = nullptr);
@@ -143,6 +146,11 @@ public:
QQuickItem *contentItem() const;
void setContentItem(QQuickItem *item);
+ // 2.3 (Qt 5.10)
+ QPalette palette() const;
+ void setPalette(const QPalette &palette);
+ void resetPalette();
+
Q_SIGNALS:
void fontChanged();
void availableWidthChanged();
@@ -163,9 +171,12 @@ Q_SIGNALS:
void wheelEnabledChanged();
void backgroundChanged();
void contentItemChanged();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void paletteChanged();
protected:
virtual QFont defaultFont() const;
+ virtual QPalette defaultPalette() const;
QQuickControl(QQuickControlPrivate &dd, QQuickItem *parent);
@@ -204,10 +215,11 @@ protected:
virtual void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding);
virtual void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem);
virtual void localeChange(const QLocale &newLocale, const QLocale &oldLocale);
+ virtual void paletteChange(const QPalette &newPalette, const QPalette &oldPalette);
#if QT_CONFIG(accessibility)
- virtual void accessibilityActiveChanged(bool active);
virtual QAccessible::Role accessibleRole() const;
+ virtual void accessibilityActiveChanged(bool active);
#endif
// helper functions which avoid to check QT_CONFIG(accessibility)
diff --git a/src/quicktemplates2/qquickcontrol_p_p.h b/src/quicktemplates2/qquickcontrol_p_p.h
index 73e1b44c..e7e9d46f 100644
--- a/src/quicktemplates2/qquickcontrol_p_p.h
+++ b/src/quicktemplates2/qquickcontrol_p_p.h
@@ -48,7 +48,7 @@
// We mean it.
//
-#include "qquickcontrol_p.h"
+#include <QtQuickTemplates2/private/qquickcontrol_p.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQml/private/qlazilyallocated_p.h>
@@ -102,20 +102,33 @@ public:
#if QT_CONFIG(accessibility)
void accessibilityActiveChanged(bool active) override;
QAccessible::Role accessibleRole() const override;
+ static QQuickAccessibleAttached *accessibleAttached(const QObject *object);
#endif
- void updateFont(const QFont &f);
- static void updateFontRecur(QQuickItem *item, const QFont &f);
- inline void setFont_helper(const QFont &f) {
- if (resolvedFont.resolve() == f.resolve() && resolvedFont == f)
+ virtual void resolveFont();
+ void inheritFont(const QFont &font);
+ void updateFont(const QFont &font);
+ static void updateFontRecur(QQuickItem *item, const QFont &font);
+ inline void setFont_helper(const QFont &font) {
+ if (resolvedFont.resolve() == font.resolve() && resolvedFont == font)
return;
- updateFont(f);
+ updateFont(font);
}
- virtual void resolveFont();
- void inheritFont(const QFont &f);
static QFont parentFont(const QQuickItem *item);
static QFont themeFont(QPlatformTheme::Font type);
+ virtual void resolvePalette();
+ void inheritPalette(const QPalette &palette);
+ void updatePalette(const QPalette &palette);
+ static void updatePaletteRecur(QQuickItem *item, const QPalette &palette);
+ inline void setPalette_helper(const QPalette &palette) {
+ if (resolvedPalette.resolve() == palette.resolve() && resolvedPalette == palette)
+ return;
+ updatePalette(palette);
+ }
+ static QPalette parentPalette(const QQuickItem *item);
+ static QPalette themePalette(QPlatformTheme::Palette type);
+
void updateLocale(const QLocale &l, bool e);
static void updateLocaleRecur(QQuickItem *item, const QLocale &l);
static QLocale calcLocale(const QQuickItem *item);
@@ -130,11 +143,11 @@ public:
struct ExtraData {
ExtraData();
- QFont font;
+ QFont requestedFont;
+ QPalette requestedPalette;
};
QLazilyAllocated<ExtraData> extra;
- QFont resolvedFont;
bool hasTopPadding;
bool hasLeftPadding;
bool hasRightPadding;
@@ -153,11 +166,12 @@ public:
qreal bottomPadding;
qreal spacing;
QLocale locale;
+ QFont resolvedFont;
+ QPalette resolvedPalette;
Qt::FocusPolicy focusPolicy;
Qt::FocusReason focusReason;
QQuickItem *background;
QQuickItem *contentItem;
- QQuickAccessibleAttached *accessibleAttached;
};
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickdelaybutton.cpp b/src/quicktemplates2/qquickdelaybutton.cpp
index 842713e0..128f0c78 100644
--- a/src/quicktemplates2/qquickdelaybutton.cpp
+++ b/src/quicktemplates2/qquickdelaybutton.cpp
@@ -268,4 +268,9 @@ QFont QQuickDelayButton::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::PushButtonFont);
}
+QPalette QQuickDelayButton::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::ButtonPalette);
+}
+
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickdelaybutton_p.h b/src/quicktemplates2/qquickdelaybutton_p.h
index 5ac0885d..0927eb4a 100644
--- a/src/quicktemplates2/qquickdelaybutton_p.h
+++ b/src/quicktemplates2/qquickdelaybutton_p.h
@@ -85,6 +85,7 @@ protected:
void nextCheckState() override;
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
private:
Q_DISABLE_COPY(QQuickDelayButton)
diff --git a/src/quicktemplates2/qquickdialog.cpp b/src/quicktemplates2/qquickdialog.cpp
index 3ac99caa..cce1ae47 100644
--- a/src/quicktemplates2/qquickdialog.cpp
+++ b/src/quicktemplates2/qquickdialog.cpp
@@ -37,6 +37,7 @@
#include "qquickdialog_p.h"
#include "qquickdialog_p_p.h"
#include "qquickdialogbuttonbox_p.h"
+#include "qquickabstractbutton_p.h"
#include "qquickpopupitem_p_p.h"
QT_BEGIN_NAMESPACE
@@ -115,6 +116,69 @@ QT_BEGIN_NAMESPACE
\sa accepted()
*/
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlsignal QtQuick.Controls::Dialog::applied()
+
+ This signal is emitted when the \c Dialog.Apply standard button is clicked.
+
+ \sa discarded(), reset()
+*/
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlsignal QtQuick.Controls::Dialog::reset()
+
+ This signal is emitted when the \c Dialog.Reset standard button is clicked.
+
+ \sa discarded(), applied()
+*/
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlsignal QtQuick.Controls::Dialog::discarded()
+
+ This signal is emitted when the \c Dialog.Discard standard button is clicked.
+
+ \sa reset(), applied()
+*/
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlsignal QtQuick.Controls::Dialog::helpRequested()
+
+ This signal is emitted when the \c Dialog.Help standard button is clicked.
+
+ \sa accepted(), rejected()
+*/
+
+QPlatformDialogHelper::ButtonRole QQuickDialogPrivate::buttonRole(QQuickAbstractButton *button)
+{
+ const QQuickDialogButtonBoxAttached *attached = qobject_cast<QQuickDialogButtonBoxAttached *>(qmlAttachedPropertiesObject<QQuickDialogButtonBox>(button, false));
+ return attached ? attached->buttonRole() : QPlatformDialogHelper::InvalidRole;
+}
+
+void QQuickDialogPrivate::handleClick(QQuickAbstractButton *button)
+{
+ Q_Q(QQuickDialog);
+ switch (buttonRole(button)) {
+ case QPlatformDialogHelper::ApplyRole:
+ emit q->applied();
+ break;
+ case QPlatformDialogHelper::ResetRole:
+ emit q->reset();
+ break;
+ case QPlatformDialogHelper::DestructiveRole:
+ emit q->discarded();
+ break;
+ case QPlatformDialogHelper::HelpRole:
+ emit q->helpRequested();
+ break;
+ default:
+ break;
+ }
+}
+
QQuickDialog::QQuickDialog(QObject *parent)
: QQuickPopup(*(new QQuickDialogPrivate), parent)
{
@@ -188,12 +252,14 @@ void QQuickDialog::setHeader(QQuickItem *header)
if (QQuickDialogButtonBox *buttonBox = qobject_cast<QQuickDialogButtonBox *>(oldHeader)) {
disconnect(buttonBox, &QQuickDialogButtonBox::accepted, this, &QQuickDialog::accept);
disconnect(buttonBox, &QQuickDialogButtonBox::rejected, this, &QQuickDialog::reject);
+ QObjectPrivate::disconnect(buttonBox, &QQuickDialogButtonBox::clicked, d, &QQuickDialogPrivate::handleClick);
if (d->buttonBox == buttonBox)
d->buttonBox = nullptr;
}
if (QQuickDialogButtonBox *buttonBox = qobject_cast<QQuickDialogButtonBox *>(header)) {
connect(buttonBox, &QQuickDialogButtonBox::accepted, this, &QQuickDialog::accept);
connect(buttonBox, &QQuickDialogButtonBox::rejected, this, &QQuickDialog::reject);
+ QObjectPrivate::connect(buttonBox, &QQuickDialogButtonBox::clicked, d, &QQuickDialogPrivate::handleClick);
d->buttonBox = buttonBox;
buttonBox->setStandardButtons(d->standardButtons);
}
@@ -235,12 +301,14 @@ void QQuickDialog::setFooter(QQuickItem *footer)
if (QQuickDialogButtonBox *buttonBox = qobject_cast<QQuickDialogButtonBox *>(oldFooter)) {
disconnect(buttonBox, &QQuickDialogButtonBox::accepted, this, &QQuickDialog::accept);
disconnect(buttonBox, &QQuickDialogButtonBox::rejected, this, &QQuickDialog::reject);
+ QObjectPrivate::disconnect(buttonBox, &QQuickDialogButtonBox::clicked, d, &QQuickDialogPrivate::handleClick);
if (d->buttonBox == buttonBox)
d->buttonBox = nullptr;
}
if (QQuickDialogButtonBox *buttonBox = qobject_cast<QQuickDialogButtonBox *>(footer)) {
connect(buttonBox, &QQuickDialogButtonBox::accepted, this, &QQuickDialog::accept);
connect(buttonBox, &QQuickDialogButtonBox::rejected, this, &QQuickDialog::reject);
+ QObjectPrivate::connect(buttonBox, &QQuickDialogButtonBox::clicked, d, &QQuickDialogPrivate::handleClick);
d->buttonBox = buttonBox;
buttonBox->setStandardButtons(d->standardButtons);
}
@@ -301,16 +369,59 @@ void QQuickDialog::setStandardButtons(QPlatformDialogHelper::StandardButtons but
}
/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod AbstractButton QtQuick.Controls::Dialog::standardButton(StandardButton button)
+
+ Returns the specified standard \a button, or \c null if it does not exist.
+
+ \sa standardButtons
+*/
+QQuickAbstractButton *QQuickDialog::standardButton(QPlatformDialogHelper::StandardButton button) const
+{
+ Q_D(const QQuickDialog);
+ if (!d->buttonBox)
+ return nullptr;
+ return d->buttonBox->standardButton(button);
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty int QtQuick.Controls::Dialog::result
+
+ This property holds the result code.
+
+ Standard result codes:
+ \value Dialog.Accepted The dialog was accepted.
+ \value Dialog.Rejected The dialog was rejected.
+
+ \sa accept(), reject(), done()
+*/
+int QQuickDialog::result() const
+{
+ Q_D(const QQuickDialog);
+ return d->result;
+}
+
+void QQuickDialog::setResult(int result)
+{
+ Q_D(QQuickDialog);
+ if (d->result == result)
+ return;
+
+ d->result = result;
+ emit resultChanged();
+}
+
+/*!
\qmlmethod void QtQuick.Controls::Dialog::accept()
Closes the dialog and emits the \l accepted() signal.
- \sa reject()
+ \sa reject(), done()
*/
void QQuickDialog::accept()
{
- close();
- emit accepted();
+ done(Accepted);
}
/*!
@@ -318,12 +429,32 @@ void QQuickDialog::accept()
Closes the dialog and emits the \l rejected() signal.
- \sa accept()
+ \sa accept(), done()
*/
void QQuickDialog::reject()
{
+ done(Rejected);
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Dialog::done(int result)
+
+ Closes the dialog, sets the \a result, and emits \l accepted() or
+ \l rejected() depending on whether the result is \c Dialog.Accepted
+ or \c Dialog.Rejected, respectively.
+
+ \sa accept(), reject(), result
+*/
+void QQuickDialog::done(int result)
+{
close();
- emit rejected();
+ setResult(result);
+
+ if (result == Accepted)
+ emit accepted();
+ else if (result == Rejected)
+ emit rejected();
}
void QQuickDialog::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
diff --git a/src/quicktemplates2/qquickdialog_p.h b/src/quicktemplates2/qquickdialog_p.h
index 97c90a59..d22685b6 100644
--- a/src/quicktemplates2/qquickdialog_p.h
+++ b/src/quicktemplates2/qquickdialog_p.h
@@ -54,6 +54,7 @@
QT_BEGIN_NAMESPACE
class QQuickDialogPrivate;
+class QQuickAbstractButton;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDialog : public QQuickPopup
{
@@ -62,6 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDialog : public QQuickPopup
Q_PROPERTY(QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged FINAL)
Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL)
Q_PROPERTY(QPlatformDialogHelper::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(int result READ result WRITE setResult NOTIFY resultChanged FINAL REVISION 3)
Q_FLAGS(QPlatformDialogHelper::StandardButtons)
public:
@@ -78,19 +81,33 @@ public:
QPlatformDialogHelper::StandardButtons standardButtons() const;
void setStandardButtons(QPlatformDialogHelper::StandardButtons buttons);
+ Q_REVISION(3) Q_INVOKABLE QQuickAbstractButton *standardButton(QPlatformDialogHelper::StandardButton button) const;
+
+ // 2.3 (Qt 5.10)
+ enum StandardCode { Rejected, Accepted };
+ Q_ENUM(StandardCode)
+
+ int result() const;
+ void setResult(int result);
public Q_SLOTS:
- void accept();
- void reject();
+ virtual void accept();
+ virtual void reject();
+ virtual void done(int result);
Q_SIGNALS:
void accepted();
void rejected();
-
void titleChanged();
void headerChanged();
void footerChanged();
void standardButtonsChanged();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void applied();
+ Q_REVISION(3) void reset();
+ Q_REVISION(3) void discarded();
+ Q_REVISION(3) void helpRequested();
+ Q_REVISION(3) void resultChanged();
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
diff --git a/src/quicktemplates2/qquickdialog_p_p.h b/src/quicktemplates2/qquickdialog_p_p.h
index 13885ca9..e26182ac 100644
--- a/src/quicktemplates2/qquickdialog_p_p.h
+++ b/src/quicktemplates2/qquickdialog_p_p.h
@@ -48,11 +48,14 @@
// We mean it.
//
+#include <QtQuickTemplates2/private/qquickdialog_p.h>
#include <QtQuickTemplates2/private/qquickpopup_p_p.h>
#include <QtQuickTemplates2/private/qquickpagelayout_p_p.h>
+#include <QtGui/qpa/qplatformdialoghelper.h>
QT_BEGIN_NAMESPACE
+class QQuickAbstractButton;
class QQuickDialogButtonBox;
class QQuickDialogPrivate : public QQuickPopupPrivate
@@ -60,13 +63,18 @@ class QQuickDialogPrivate : public QQuickPopupPrivate
Q_DECLARE_PUBLIC(QQuickDialog)
public:
- QQuickDialogPrivate() : buttonBox(nullptr) { }
+ QQuickDialogPrivate() : result(0), buttonBox(nullptr) { }
static QQuickDialogPrivate *get(QQuickDialog *dialog)
{
return dialog->d_func();
}
+ static QPlatformDialogHelper::ButtonRole buttonRole(QQuickAbstractButton *button);
+
+ void handleClick(QQuickAbstractButton *button);
+
+ int result;
QString title;
QQuickDialogButtonBox *buttonBox;
QScopedPointer<QQuickPageLayout> layout;
diff --git a/src/quicktemplates2/qquickdialogbuttonbox.cpp b/src/quicktemplates2/qquickdialogbuttonbox.cpp
index 5f7f488e..cd971139 100644
--- a/src/quicktemplates2/qquickdialogbuttonbox.cpp
+++ b/src/quicktemplates2/qquickdialogbuttonbox.cpp
@@ -38,6 +38,7 @@
#include "qquickdialogbuttonbox_p_p.h"
#include "qquickabstractbutton_p.h"
#include "qquickbutton_p.h"
+#include "qquickdialog_p_p.h"
#include <QtCore/qpointer.h>
#include <QtGui/private/qguiapplication_p.h>
@@ -122,6 +123,36 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlsignal QtQuick.Controls::DialogButtonBox::applied()
+
+ This signal is emitted when a button defined with the \c ApplyRole is
+ clicked.
+
+ \sa discarded(), reset()
+*/
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlsignal QtQuick.Controls::DialogButtonBox::reset()
+
+ This signal is emitted when a button defined with the \c ResetRole is
+ clicked.
+
+ \sa discarded(), applied()
+*/
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlsignal QtQuick.Controls::DialogButtonBox::discarded()
+
+ This signal is emitted when a button defined with the \c DiscardRole is
+ clicked.
+
+ \sa reset(), applied()
+*/
+
+/*!
\qmlsignal QtQuick.Controls::DialogButtonBox::helpRequested()
This signal is emitted when a button defined with the \c HelpRole is clicked.
@@ -137,12 +168,6 @@ QT_BEGIN_NAMESPACE
\sa accepted(), rejected(), helpRequested()
*/
-static QPlatformDialogHelper::ButtonRole buttonRole(QQuickAbstractButton *button)
-{
- const QQuickDialogButtonBoxAttached *attached = qobject_cast<QQuickDialogButtonBoxAttached *>(qmlAttachedPropertiesObject<QQuickDialogButtonBox>(button, false));
- return attached ? attached->buttonRole() : QPlatformDialogHelper::InvalidRole;
-}
-
QQuickDialogButtonBoxPrivate::QQuickDialogButtonBoxPrivate()
: alignment(0),
position(QQuickDialogButtonBox::Footer),
@@ -235,8 +260,8 @@ void QQuickDialogButtonBoxPrivate::updateLayout()
struct ButtonLayout {
bool operator()(QQuickAbstractButton *first, QQuickAbstractButton *second)
{
- const QPlatformDialogHelper::ButtonRole firstRole = buttonRole(first);
- const QPlatformDialogHelper::ButtonRole secondRole = buttonRole(second);
+ const QPlatformDialogHelper::ButtonRole firstRole = QQuickDialogPrivate::buttonRole(first);
+ const QPlatformDialogHelper::ButtonRole secondRole = QQuickDialogPrivate::buttonRole(second);
if (firstRole != secondRole && firstRole != QPlatformDialogHelper::InvalidRole && secondRole != QPlatformDialogHelper::InvalidRole) {
const int *l = m_layout;
@@ -280,7 +305,7 @@ void QQuickDialogButtonBoxPrivate::handleClick()
// or change its role. Now changing the role is not possible yet, but arguably
// both clicked and accepted/rejected/etc. should be emitted "atomically"
// depending on whatever role the button had at the time of the click.
- const QPlatformDialogHelper::ButtonRole role = buttonRole(button);
+ const QPlatformDialogHelper::ButtonRole role = QQuickDialogPrivate::buttonRole(button);
QPointer<QQuickDialogButtonBox> guard(q);
emit q->clicked(button);
@@ -297,6 +322,15 @@ void QQuickDialogButtonBoxPrivate::handleClick()
case QPlatformDialogHelper::NoRole:
emit q->rejected();
break;
+ case QPlatformDialogHelper::ApplyRole:
+ emit q->applied();
+ break;
+ case QPlatformDialogHelper::ResetRole:
+ emit q->reset();
+ break;
+ case QPlatformDialogHelper::DestructiveRole:
+ emit q->discarded();
+ break;
case QPlatformDialogHelper::HelpRole:
emit q->helpRequested();
break;
diff --git a/src/quicktemplates2/qquickdialogbuttonbox_p.h b/src/quicktemplates2/qquickdialogbuttonbox_p.h
index 9bd92c79..1e3cdeef 100644
--- a/src/quicktemplates2/qquickdialogbuttonbox_p.h
+++ b/src/quicktemplates2/qquickdialogbuttonbox_p.h
@@ -99,11 +99,14 @@ Q_SIGNALS:
void rejected();
void helpRequested();
void clicked(QQuickAbstractButton *button);
-
void positionChanged();
void alignmentChanged();
void standardButtonsChanged();
void delegateChanged();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void applied();
+ Q_REVISION(3) void reset();
+ Q_REVISION(3) void discarded();
protected:
void updatePolish() override;
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp
index f5df8015..022c9dbf 100644
--- a/src/quicktemplates2/qquickdrawer.cpp
+++ b/src/quicktemplates2/qquickdrawer.cpp
@@ -232,6 +232,16 @@ void QQuickDrawerPrivate::reposition()
QQuickPopupPrivate::reposition();
}
+void QQuickDrawerPrivate::showOverlay()
+{
+ // managed in setPosition()
+}
+
+void QQuickDrawerPrivate::hideOverlay()
+{
+ // managed in setPosition()
+}
+
void QQuickDrawerPrivate::resizeOverlay()
{
if (!dimmer || !window)
diff --git a/src/quicktemplates2/qquickdrawer_p_p.h b/src/quicktemplates2/qquickdrawer_p_p.h
index aff6e81e..0ceaf2e7 100644
--- a/src/quicktemplates2/qquickdrawer_p_p.h
+++ b/src/quicktemplates2/qquickdrawer_p_p.h
@@ -48,9 +48,9 @@
// We mean it.
//
-#include "qquickdrawer_p.h"
-#include "qquickpopup_p_p.h"
-#include "qquickvelocitycalculator_p_p.h"
+#include <QtQuickTemplates2/private/qquickdrawer_p.h>
+#include <QtQuickTemplates2/private/qquickpopup_p_p.h>
+#include <QtQuickTemplates2/private/qquickvelocitycalculator_p_p.h>
QT_BEGIN_NAMESPACE
@@ -70,6 +70,8 @@ public:
qreal positionAt(const QPointF &point) const;
void reposition() override;
+ void showOverlay() override;
+ void hideOverlay() override;
void resizeOverlay() override;
bool startDrag(QEvent *event);
diff --git a/src/quicktemplates2/qquickgroupbox.cpp b/src/quicktemplates2/qquickgroupbox.cpp
index 09bd49f6..c227afdc 100644
--- a/src/quicktemplates2/qquickgroupbox.cpp
+++ b/src/quicktemplates2/qquickgroupbox.cpp
@@ -153,6 +153,11 @@ QFont QQuickGroupBox::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::GroupBoxTitleFont);
}
+QPalette QQuickGroupBox::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::GroupBoxPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickGroupBox::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickgroupbox_p.h b/src/quicktemplates2/qquickgroupbox_p.h
index e35db1fc..b74389e4 100644
--- a/src/quicktemplates2/qquickgroupbox_p.h
+++ b/src/quicktemplates2/qquickgroupbox_p.h
@@ -75,6 +75,7 @@ Q_SIGNALS:
protected:
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
diff --git a/src/quicktemplates2/qquickicon.cpp b/src/quicktemplates2/qquickicon.cpp
new file mode 100644
index 00000000..0b0127d3
--- /dev/null
+++ b/src/quicktemplates2/qquickicon.cpp
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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 "qquickicon_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QQuickIconPrivate : public QSharedData
+{
+public:
+ QQuickIconPrivate()
+ : width(0),
+ height(0),
+ color(Qt::transparent)
+ {
+ }
+
+ QString name;
+ QUrl source;
+ int width;
+ int height;
+ QColor color;
+};
+
+QQuickIcon::QQuickIcon()
+ : d(new QQuickIconPrivate)
+{
+}
+
+QQuickIcon::QQuickIcon(const QQuickIcon &other)
+ : d(other.d)
+{
+}
+
+QQuickIcon::~QQuickIcon()
+{
+}
+
+QQuickIcon &QQuickIcon::operator=(const QQuickIcon &other)
+{
+ d = other.d;
+ return *this;
+}
+
+bool QQuickIcon::operator==(const QQuickIcon &other) const
+{
+ return d == other.d || (d->name == other.d->name
+ && d->source == other.d->source
+ && d->width == other.d->width
+ && d->height == other.d->height
+ && d->color == other.d->color);
+}
+
+bool QQuickIcon::operator!=(const QQuickIcon &other) const
+{
+ return !(*this == other);
+}
+
+bool QQuickIcon::isEmpty() const
+{
+ return d->name.isEmpty() && d->source.isEmpty();
+}
+
+QString QQuickIcon::name() const
+{
+ return d->name;
+}
+
+void QQuickIcon::setName(const QString &name)
+{
+ d->name = name;
+}
+
+QUrl QQuickIcon::source() const
+{
+ return d->source;
+}
+
+void QQuickIcon::setSource(const QUrl &source)
+{
+ d->source = source;
+}
+
+int QQuickIcon::width() const
+{
+ return d->width;
+}
+
+void QQuickIcon::setWidth(int width)
+{
+ d->width = width;
+}
+
+int QQuickIcon::height() const
+{
+ return d->height;
+}
+
+void QQuickIcon::setHeight(int height)
+{
+ d->height = height;
+}
+
+QColor QQuickIcon::color() const
+{
+ return d->color;
+}
+
+void QQuickIcon::setColor(const QColor &color)
+{
+ d->color = color;
+}
+
+void QQuickIcon::resetColor()
+{
+ d->color = Qt::transparent;
+}
+
+QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickicon_p.h b/src/quicktemplates2/qquickicon_p.h
new file mode 100644
index 00000000..6e28f2a9
--- /dev/null
+++ b/src/quicktemplates2/qquickicon_p.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKICON_P_H
+#define QQUICKICON_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qurl.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qobjectdefs.h>
+#include <QtCore/qshareddata.h>
+#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
+#include <QtGui/qcolor.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickIconPrivate;
+
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickIcon
+{
+ Q_GADGET
+ Q_PROPERTY(QString name READ name WRITE setName FINAL)
+ Q_PROPERTY(QUrl source READ source WRITE setSource FINAL)
+ Q_PROPERTY(int width READ width WRITE setWidth FINAL)
+ Q_PROPERTY(int height READ height WRITE setHeight FINAL)
+ Q_PROPERTY(QColor color READ color WRITE setColor RESET resetColor FINAL)
+
+public:
+ QQuickIcon();
+ QQuickIcon(const QQuickIcon &other);
+ ~QQuickIcon();
+
+ QQuickIcon& operator=(const QQuickIcon &other);
+ bool operator==(const QQuickIcon &other) const;
+ bool operator!=(const QQuickIcon &other) const;
+
+ bool isEmpty() const;
+
+ QString name() const;
+ void setName(const QString &name);
+
+ QUrl source() const;
+ void setSource(const QUrl &source);
+
+ int width() const;
+ void setWidth(int width);
+
+ int height() const;
+ void setHeight(int height);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+ void resetColor();
+
+private:
+ QSharedDataPointer<QQuickIconPrivate> d;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKICON_P_H
diff --git a/src/quicktemplates2/qquickitemdelegate.cpp b/src/quicktemplates2/qquickitemdelegate.cpp
index 1b93c145..044141f2 100644
--- a/src/quicktemplates2/qquickitemdelegate.cpp
+++ b/src/quicktemplates2/qquickitemdelegate.cpp
@@ -56,8 +56,8 @@ QT_BEGIN_NAMESPACE
in various views and controls, such as \l ListView and \l ComboBox.
ItemDelegate inherits its API from AbstractButton. For instance, you can set
- \l {AbstractButton::text}{text}, and react to \l {AbstractButton::clicked}{clicks}
- using the AbstractButton API.
+ \l {AbstractButton::text}{text}, display an \l {Icons in Qt Quick Controls 2}{icon},
+ and react to \l {AbstractButton::clicked}{clicks} using the AbstractButton API.
\snippet qtquickcontrols2-itemdelegate.qml 1
@@ -125,6 +125,11 @@ QFont QQuickItemDelegate::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::ItemViewFont);
}
+QPalette QQuickItemDelegate::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::ItemViewPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickItemDelegate::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickitemdelegate_p.h b/src/quicktemplates2/qquickitemdelegate_p.h
index a162ddee..5d52f764 100644
--- a/src/quicktemplates2/qquickitemdelegate_p.h
+++ b/src/quicktemplates2/qquickitemdelegate_p.h
@@ -70,6 +70,7 @@ Q_SIGNALS:
protected:
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
diff --git a/src/quicktemplates2/qquicklabel.cpp b/src/quicktemplates2/qquicklabel.cpp
index d1ddfbd6..724fd086 100644
--- a/src/quicktemplates2/qquicklabel.cpp
+++ b/src/quicktemplates2/qquicklabel.cpp
@@ -79,8 +79,7 @@ QT_BEGIN_NAMESPACE
*/
QQuickLabelPrivate::QQuickLabelPrivate()
- : background(nullptr),
- accessibleAttached(nullptr)
+ : background(nullptr)
{
#if QT_CONFIG(accessibility)
QAccessible::installActivationObserver(this);
@@ -108,25 +107,76 @@ void QQuickLabelPrivate::resolveFont()
inheritFont(QQuickControlPrivate::parentFont(q));
}
-void QQuickLabelPrivate::inheritFont(const QFont &f)
+void QQuickLabelPrivate::inheritFont(const QFont &font)
{
- Q_Q(QQuickLabel);
- QFont parentFont = font.resolve(f);
- parentFont.resolve(font.resolve() | f.resolve());
+ QFont parentFont = extra.isAllocated() ? extra->requestedFont.resolve(font) : font;
+ parentFont.resolve(extra.isAllocated() ? extra->requestedFont.resolve() | font.resolve() : font.resolve());
const QFont defaultFont = QQuickControlPrivate::themeFont(QPlatformTheme::LabelFont);
const QFont resolvedFont = parentFont.resolve(defaultFont);
- const bool changed = resolvedFont != sourceFont;
- q->QQuickText::setFont(resolvedFont);
- if (changed)
+ setFont_helper(resolvedFont);
+}
+
+/*!
+ \internal
+
+ Assign \a font to this control, and propagate it to all children.
+*/
+void QQuickLabelPrivate::updateFont(const QFont &font)
+{
+ Q_Q(QQuickLabel);
+ QFont oldFont = sourceFont;
+ q->QQuickText::setFont(font);
+
+ QQuickControlPrivate::updateFontRecur(q, font);
+
+ if (oldFont != font)
emit q->fontChanged();
}
+/*!
+ \internal
+
+ Determine which palette is implicitly imposed on this control by its ancestors
+ and QGuiApplication::palette, resolve this against its own palette (attributes from
+ the implicit palette are copied over). Then propagate this palette to this
+ control's children.
+*/
+void QQuickLabelPrivate::resolvePalette()
+{
+ Q_Q(QQuickLabel);
+ inheritPalette(QQuickControlPrivate::parentPalette(q));
+}
+
+void QQuickLabelPrivate::inheritPalette(const QPalette &palette)
+{
+ QPalette parentPalette = extra.isAllocated() ? extra->requestedPalette.resolve(palette) : palette;
+ parentPalette.resolve(extra.isAllocated() ? extra->requestedPalette.resolve() | palette.resolve() : palette.resolve());
+
+ const QPalette defaultPalette = QQuickControlPrivate::themePalette(QPlatformTheme::LabelPalette);
+ const QPalette resolvedPalette = parentPalette.resolve(defaultPalette);
+
+ setPalette_helper(resolvedPalette);
+}
+
+void QQuickLabelPrivate::updatePalette(const QPalette &palette)
+{
+ Q_Q(QQuickLabel);
+ QPalette oldPalette = resolvedPalette;
+ resolvedPalette = palette;
+
+ QQuickControlPrivate::updatePaletteRecur(q, palette);
+
+ if (oldPalette != palette)
+ emit q->paletteChanged();
+}
+
void QQuickLabelPrivate::textChanged(const QString &text)
{
#if QT_CONFIG(accessibility)
- if (accessibleAttached)
+ Q_Q(QQuickLabel);
+ if (QQuickAccessibleAttached *accessibleAttached = QQuickControlPrivate::accessibleAttached(q))
accessibleAttached->setName(text);
#else
Q_UNUSED(text)
@@ -136,17 +186,14 @@ void QQuickLabelPrivate::textChanged(const QString &text)
#if QT_CONFIG(accessibility)
void QQuickLabelPrivate::accessibilityActiveChanged(bool active)
{
- if (accessibleAttached || !active)
+ if (!active)
return;
Q_Q(QQuickLabel);
- accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(q, true));
- if (accessibleAttached) {
- accessibleAttached->setRole(accessibleRole());
- accessibleAttached->setName(text);
- } else {
- qWarning() << "QQuickLabel: " << q << " QQuickAccessibleAttached object creation failed!";
- }
+ QQuickAccessibleAttached *accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(q, true));
+ Q_ASSERT(accessibleAttached);
+ accessibleAttached->setRole(accessibleRole());
+ accessibleAttached->setName(text);
}
QAccessible::Role QQuickLabelPrivate::accessibleRole() const
@@ -170,10 +217,10 @@ QFont QQuickLabel::font() const
void QQuickLabel::setFont(const QFont &font)
{
Q_D(QQuickLabel);
- if (d->font.resolve() == font.resolve() && d->font == font)
+ if (d->extra.value().requestedFont.resolve() == font.resolve() && d->extra.value().requestedFont == font)
return;
- d->font = font;
+ d->extra.value().requestedFont = font;
d->resolveFont();
}
@@ -210,11 +257,44 @@ void QQuickLabel::setBackground(QQuickItem *background)
emit backgroundChanged();
}
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty palette QtQuick.Controls::Label::palette
+
+ This property holds the palette currently set for the label.
+
+ \sa Control::palette
+*/
+QPalette QQuickLabel::palette() const
+{
+ Q_D(const QQuickLabel);
+ QPalette palette = d->resolvedPalette;
+ if (!isEnabled())
+ palette.setCurrentColorGroup(QPalette::Disabled);
+ return palette;
+}
+
+void QQuickLabel::setPalette(const QPalette &palette)
+{
+ Q_D(QQuickLabel);
+ if (d->extra.value().requestedPalette.resolve() == palette.resolve() && d->extra.value().requestedPalette == palette)
+ return;
+
+ d->extra.value().requestedPalette = palette;
+ d->resolvePalette();
+}
+
+void QQuickLabel::resetPalette()
+{
+ setPalette(QPalette());
+}
+
void QQuickLabel::classBegin()
{
Q_D(QQuickLabel);
QQuickText::classBegin();
d->resolveFont();
+ d->resolvePalette();
}
void QQuickLabel::componentComplete()
@@ -222,7 +302,7 @@ void QQuickLabel::componentComplete()
Q_D(QQuickLabel);
QQuickText::componentComplete();
#if QT_CONFIG(accessibility)
- if (!d->accessibleAttached && QAccessible::isActive())
+ if (QAccessible::isActive())
d->accessibilityActiveChanged(true);
#endif
}
@@ -231,8 +311,20 @@ void QQuickLabel::itemChange(QQuickItem::ItemChange change, const QQuickItem::It
{
Q_D(QQuickLabel);
QQuickText::itemChange(change, value);
- if ((change == ItemParentHasChanged && value.item) || (change == ItemSceneChange && value.window))
- d->resolveFont();
+ switch (change) {
+ case ItemEnabledHasChanged:
+ emit paletteChanged();
+ break;
+ case ItemSceneChange:
+ case ItemParentHasChanged:
+ if ((change == ItemParentHasChanged && value.item) || (change == ItemSceneChange && value.window)) {
+ d->resolveFont();
+ d->resolvePalette();
+ }
+ break;
+ default:
+ break;
+ }
}
void QQuickLabel::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
diff --git a/src/quicktemplates2/qquicklabel_p.h b/src/quicktemplates2/qquicklabel_p.h
index 04172900..937c57eb 100644
--- a/src/quicktemplates2/qquicklabel_p.h
+++ b/src/quicktemplates2/qquicklabel_p.h
@@ -48,6 +48,7 @@
// We mean it.
//
+#include <QtGui/qpalette.h>
#include <QtQuick/private/qquicktext_p.h>
#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
@@ -60,6 +61,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickLabel : public QQuickText
Q_OBJECT
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) // override
Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(QPalette palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged FINAL REVISION 3)
public:
explicit QQuickLabel(QQuickItem *parent = nullptr);
@@ -70,9 +73,16 @@ public:
QQuickItem *background() const;
void setBackground(QQuickItem *background);
+ // 2.3 (Qt 5.10)
+ QPalette palette() const;
+ void setPalette(const QPalette &palette);
+ void resetPalette();
+
Q_SIGNALS:
void fontChanged();
void backgroundChanged();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void paletteChanged();
protected:
void classBegin() override;
diff --git a/src/quicktemplates2/qquicklabel_p_p.h b/src/quicktemplates2/qquicklabel_p_p.h
index c24c855b..a8214d77 100644
--- a/src/quicktemplates2/qquicklabel_p_p.h
+++ b/src/quicktemplates2/qquicklabel_p_p.h
@@ -48,6 +48,7 @@
// We mean it.
//
+#include <QtQml/private/qlazilyallocated_p.h>
#include <QtQuick/private/qquicktext_p_p.h>
#if QT_CONFIG(accessibility)
@@ -56,8 +57,6 @@
QT_BEGIN_NAMESPACE
-class QQuickAccessibleAttached;
-
class QQuickLabelPrivate : public QQuickTextPrivate
#if QT_CONFIG(accessibility)
, public QAccessible::ActivationObserver
@@ -75,7 +74,22 @@ public:
}
void resolveFont();
- void inheritFont(const QFont &f);
+ void inheritFont(const QFont &font);
+ void updateFont(const QFont &font);
+ inline void setFont_helper(const QFont &font) {
+ if (sourceFont.resolve() == font.resolve() && sourceFont == font)
+ return;
+ updateFont(font);
+ }
+
+ void resolvePalette();
+ void inheritPalette(const QPalette &palette);
+ void updatePalette(const QPalette &palette);
+ inline void setPalette_helper(const QPalette &palette) {
+ if (resolvedPalette.resolve() == palette.resolve() && resolvedPalette == palette)
+ return;
+ updatePalette(palette);
+ }
void textChanged(const QString &text);
@@ -84,9 +98,14 @@ public:
QAccessible::Role accessibleRole() const override;
#endif
- QFont font;
+ struct ExtraData {
+ QFont requestedFont;
+ QPalette requestedPalette;
+ };
+ QLazilyAllocated<ExtraData> extra;
+
+ QPalette resolvedPalette;
QQuickItem *background;
- QQuickAccessibleAttached *accessibleAttached;
};
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickmenu.cpp b/src/quicktemplates2/qquickmenu.cpp
index 52c048a6..7ebeb344 100644
--- a/src/quicktemplates2/qquickmenu.cpp
+++ b/src/quicktemplates2/qquickmenu.cpp
@@ -36,10 +36,22 @@
#include "qquickmenu_p.h"
#include "qquickmenu_p_p.h"
-#include "qquickmenuitem_p.h"
-#include "qquickcontrol_p_p.h"
+#include "qquickmenuitem_p_p.h"
+#include "qquickmenubaritem_p.h"
+#include "qquickmenubar_p.h"
+#include "qquickpopupitem_p_p.h"
+#include "qquickaction_p.h"
#include <QtGui/qevent.h>
+#include <QtGui/qcursor.h>
+#include <QtGui/qpa/qplatformintegration.h>
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtQml/qqmlcontext.h>
+#include <QtQml/qqmlcomponent.h>
+#include <QtQml/private/qqmlengine_p.h>
+#include <QtQml/private/qv4scopedvalue_p.h>
+#include <QtQml/private/qv4variantobject_p.h>
+#include <QtQml/private/qv4qobjectwrapper_p.h>
#include <QtQml/private/qqmlobjectmodel_p.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qquickitemchangelistener_p.h>
@@ -49,6 +61,9 @@
QT_BEGIN_NAMESPACE
+// copied from qfusionstyle.cpp
+static const int SUBMENU_DELAY = 225;
+
/*!
\qmltype Menu
\inherits Popup
@@ -67,6 +82,37 @@ QT_BEGIN_NAMESPACE
\li Popup menus; for example, a menu that is shown after clicking a button
\endlist
+ When used as a context menu, the recommended way of opening the menu is to call
+ \l popup(). Unless a position is explicitly specified, the menu is positioned at
+ the mouse cursor on desktop platforms that have a mouse cursor available, and
+ otherwise centered over its parent item.
+
+ \code
+ MouseArea {
+ anchors.fill: parent
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ onClicked: {
+ if (mouse.button === Qt.RightButton)
+ contextMenu.popup()
+ }
+ onPressAndHold: {
+ if (mouse.source === Qt.MouseEventNotSynthesized)
+ contextMenu.popup()
+ }
+
+ Menu {
+ id: contextMenu
+ MenuItem { text: "Cut" }
+ MenuItem { text: "Copy" }
+ MenuItem { text: "Paste" }
+ }
+ }
+ \endcode
+
+ When used as a popup menu, it is easiest to specify the position by specifying
+ the desired \l {Popup::}{x} and \l {Popup::}{y} coordinates using the respective
+ properties, and call \l {Popup::}{open()} to open the menu.
+
\code
Button {
id: fileButton
@@ -90,6 +136,30 @@ QT_BEGIN_NAMESPACE
}
\endcode
+ Since QtQuick.Controls 2.3 (Qt 5.10), it is also possible to create sub-menus
+ and declare Action objects inside Menu:
+
+ \code
+ Menu {
+ Action { text: "Cut" }
+ Action { text: "Copy" }
+ Action { text: "Paste" }
+
+ MenuSeparator { }
+
+ Menu {
+ title: "Find/Replace"
+ Action { text: "Find Next" }
+ Action { text: "Find Previous" }
+ Action { text: "Replace" }
+ }
+ }
+ \endcode
+
+ Sub-menus are \l {cascade}{cascading} by default on desktop platforms
+ that have a mouse cursor available. Non-cascading menus are shown one
+ menu at a time, and centered over the parent menu.
+
Typically, menu items are statically declared as children of the menu, but
Menu also provides API to \l {addItem}{add}, \l {insertItem}{insert},
\l {moveItem}{move} and \l {removeItem}{remove} items dynamically. The
@@ -99,12 +169,28 @@ QT_BEGIN_NAMESPACE
Although \l {MenuItem}{MenuItems} are most commonly used with Menu, it can
contain any type of item.
- \sa {Customizing Menu}, {Menu Controls}, {Popup Controls}
+ \sa {Customizing Menu}, MenuItem, {Menu Controls}, {Popup Controls}
*/
+static const QQuickPopup::ClosePolicy cascadingSubMenuClosePolicy = QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutsideParent;
+
+static bool shouldCascade()
+{
+#if QT_CONFIG(cursor)
+ return QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows);
+#else
+ return false;
+#endif
+}
+
QQuickMenuPrivate::QQuickMenuPrivate()
- : contentItem(nullptr),
- contentModel(nullptr)
+ : cascade(shouldCascade()),
+ hoverTimer(0),
+ currentIndex(-1),
+ overlap(0),
+ contentItem(nullptr),
+ contentModel(nullptr),
+ delegate(nullptr)
{
Q_Q(QQuickMenu);
contentModel = new QQmlObjectModel(q);
@@ -129,9 +215,12 @@ void QQuickMenuPrivate::insertItem(int index, QQuickItem *item)
QQuickMenuItem *menuItem = qobject_cast<QQuickMenuItem *>(item);
if (menuItem) {
Q_Q(QQuickMenu);
- QObjectPrivate::connect(menuItem, &QQuickMenuItem::pressed, this, &QQuickMenuPrivate::onItemPressed);
- QObject::connect(menuItem, &QQuickMenuItem::triggered, q, &QQuickPopup::close);
+ QQuickMenuItemPrivate::get(menuItem)->setMenu(q);
+ if (QQuickMenu *subMenu = menuItem->subMenu())
+ QQuickMenuPrivate::get(subMenu)->setParentMenu(q);
+ QObjectPrivate::connect(menuItem, &QQuickMenuItem::triggered, this, &QQuickMenuPrivate::onItemTriggered);
QObjectPrivate::connect(menuItem, &QQuickItem::activeFocusChanged, this, &QQuickMenuPrivate::onItemActiveFocusChanged);
+ QObjectPrivate::connect(menuItem, &QQuickControl::hoveredChanged, this, &QQuickMenuPrivate::onItemHovered);
}
}
@@ -150,13 +239,63 @@ void QQuickMenuPrivate::removeItem(int index, QQuickItem *item)
QQuickMenuItem *menuItem = qobject_cast<QQuickMenuItem *>(item);
if (menuItem) {
- Q_Q(QQuickMenu);
- QObjectPrivate::disconnect(menuItem, &QQuickMenuItem::pressed, this, &QQuickMenuPrivate::onItemPressed);
- QObject::disconnect(menuItem, &QQuickMenuItem::triggered, q, &QQuickPopup::close);
+ QQuickMenuItemPrivate::get(menuItem)->setMenu(nullptr);
+ if (QQuickMenu *subMenu = menuItem->subMenu())
+ QQuickMenuPrivate::get(subMenu)->setParentMenu(nullptr);
+ QObjectPrivate::disconnect(menuItem, &QQuickMenuItem::triggered, this, &QQuickMenuPrivate::onItemTriggered);
QObjectPrivate::disconnect(menuItem, &QQuickItem::activeFocusChanged, this, &QQuickMenuPrivate::onItemActiveFocusChanged);
+ QObjectPrivate::disconnect(menuItem, &QQuickControl::hoveredChanged, this, &QQuickMenuPrivate::onItemHovered);
}
}
+QQuickItem *QQuickMenuPrivate::beginCreateItem()
+{
+ Q_Q(QQuickMenu);
+ if (!delegate)
+ return nullptr;
+
+ QQmlContext *creationContext = delegate->creationContext();
+ if (!creationContext)
+ creationContext = qmlContext(q);
+ QQmlContext *context = new QQmlContext(creationContext, q);
+ context->setContextObject(q);
+
+ QObject *object = delegate->beginCreate(context);
+ QQuickItem *item = qobject_cast<QQuickItem *>(object);
+ if (!item)
+ delete object;
+
+ QQml_setParent_noEvent(item, q);
+
+ return item;
+}
+
+void QQuickMenuPrivate::completeCreateItem()
+{
+ if (!delegate)
+ return;
+
+ delegate->completeCreate();
+}
+
+QQuickItem *QQuickMenuPrivate::createItem(QQuickMenu *menu)
+{
+ QQuickItem *item = beginCreateItem();
+ if (QQuickMenuItem *menuItem = qobject_cast<QQuickMenuItem *>(item))
+ QQuickMenuItemPrivate::get(menuItem)->setSubMenu(menu);
+ completeCreateItem();
+ return item;
+}
+
+QQuickItem *QQuickMenuPrivate::createItem(QQuickAction *action)
+{
+ QQuickItem *item = beginCreateItem();
+ if (QQuickAbstractButton *button = qobject_cast<QQuickAbstractButton *>(item))
+ button->setAction(action);
+ completeCreateItem();
+ return item;
+}
+
void QQuickMenuPrivate::resizeItem(QQuickItem *item)
{
if (!item || !contentItem)
@@ -222,12 +361,105 @@ void QQuickMenuPrivate::itemGeometryChanged(QQuickItem *, QQuickGeometryChange,
resizeItems();
}
-void QQuickMenuPrivate::onItemPressed()
+void QQuickMenuPrivate::reposition()
{
Q_Q(QQuickMenu);
- QQuickItem *item = qobject_cast<QQuickItem*>(q->sender());
- if (item)
- item->forceActiveFocus();
+ if (parentMenu) {
+ if (cascade) {
+ if (popupItem->isMirrored())
+ q->setPosition(QPointF(-q->width() - parentMenu->leftPadding() + q->overlap(), -q->topPadding()));
+ else if (parentItem)
+ q->setPosition(QPointF(parentItem->width() + parentMenu->rightPadding() - q->overlap(), -q->topPadding()));
+ } else {
+ q->setPosition(QPointF(parentMenu->x() + (parentMenu->width() - q->width()) / 2,
+ parentMenu->y() + (parentMenu->height() - q->height()) / 2));
+ }
+ }
+ QQuickPopupPrivate::reposition();
+}
+
+bool QQuickMenuPrivate::prepareEnterTransition()
+{
+ Q_Q(QQuickMenu);
+ if (parentMenu && !cascade)
+ parentMenu->close();
+
+ // If a cascading sub-menu doesn't have enough space to open on
+ // the right, it flips on the other side of the parent menu.
+ allowHorizontalFlip = cascade && parentMenu;
+
+ if (!QQuickPopupPrivate::prepareEnterTransition())
+ return false;
+
+ if (!hasClosePolicy) {
+ if (cascade && parentMenu)
+ closePolicy = cascadingSubMenuClosePolicy;
+ else
+ q->resetClosePolicy();
+ }
+ return true;
+}
+
+bool QQuickMenuPrivate::prepareExitTransition()
+{
+ if (!QQuickPopupPrivate::prepareExitTransition())
+ return false;
+
+ stopHoverTimer();
+
+ QQuickMenu *subMenu = currentSubMenu();
+ while (subMenu) {
+ QPointer<QQuickMenuItem> currentSubMenuItem = QQuickMenuPrivate::get(subMenu)->currentItem;
+ subMenu->close();
+ subMenu = currentSubMenuItem ? currentSubMenuItem->subMenu() : nullptr;
+ }
+ return true;
+}
+
+bool QQuickMenuPrivate::blockInput(QQuickItem *item, const QPointF &point) const
+{
+ // keep the parent menu open when a cascading sub-menu (this menu) is interacted with
+ return (cascade && parentMenu && contains(point)) || QQuickPopupPrivate::blockInput(item, point);
+}
+
+void QQuickMenuPrivate::onItemHovered()
+{
+ Q_Q(QQuickMenu);
+ QQuickAbstractButton *button = qobject_cast<QQuickAbstractButton *>(q->sender());
+ if (!button || !button->isHovered() || QQuickAbstractButtonPrivate::get(button)->touchId != -1)
+ return;
+
+ QQuickMenuItem *oldCurrentItem = currentItem;
+
+ int index = contentModel->indexOf(button, nullptr);
+ if (index != -1) {
+ setCurrentIndex(index, Qt::OtherFocusReason);
+ if (oldCurrentItem != currentItem) {
+ if (oldCurrentItem) {
+ QQuickMenu *subMenu = oldCurrentItem->subMenu();
+ if (subMenu)
+ subMenu->close();
+ }
+ if (currentItem) {
+ QQuickMenu *subMenu = currentItem->menu();
+ if (subMenu && subMenu->cascade())
+ startHoverTimer();
+ }
+ }
+ }
+}
+
+void QQuickMenuPrivate::onItemTriggered()
+{
+ Q_Q(QQuickMenu);
+ QQuickMenuItem *item = qobject_cast<QQuickMenuItem *>(q->sender());
+ if (!item)
+ return;
+
+ if (QQuickMenu *subMenu = item->subMenu())
+ subMenu->popup(subMenu->itemAt(0));
+ else
+ q->dismiss();
}
void QQuickMenuPrivate::onItemActiveFocusChanged()
@@ -238,52 +470,158 @@ void QQuickMenuPrivate::onItemActiveFocusChanged()
return;
int indexOfItem = contentModel->indexOf(item, nullptr);
- setCurrentIndex(indexOfItem);
+ QQuickControl *control = qobject_cast<QQuickControl *>(item);
+ setCurrentIndex(indexOfItem, control ? control->focusReason() : Qt::OtherFocusReason);
}
-int QQuickMenuPrivate::currentIndex() const
+QQuickMenu *QQuickMenuPrivate::currentSubMenu() const
{
- QVariant index = contentItem->property("currentIndex");
- if (!index.isValid())
- return -1;
- return index.toInt();
+ if (!currentItem)
+ return nullptr;
+
+ return currentItem->subMenu();
}
-void QQuickMenuPrivate::setCurrentIndex(int index)
+void QQuickMenuPrivate::setParentMenu(QQuickMenu *parent)
{
- contentItem->setProperty("currentIndex", index);
+ Q_Q(QQuickMenu);
+ if (parentMenu == parent)
+ return;
+
+ if (parentMenu) {
+ QObject::disconnect(parentMenu.data(), &QQuickMenu::cascadeChanged, q, &QQuickMenu::setCascade);
+ disconnect(parentMenu.data(), &QQuickMenu::parentChanged, this, &QQuickMenuPrivate::resolveParentItem);
+ }
+ if (parent) {
+ QObject::connect(parent, &QQuickMenu::cascadeChanged, q, &QQuickMenu::setCascade);
+ connect(parent, &QQuickMenu::parentChanged, this, &QQuickMenuPrivate::resolveParentItem);
+ }
+
+ parentMenu = parent;
+ q->resetCascade();
+ resolveParentItem();
+}
+
+static QQuickItem *findParentMenuItem(QQuickMenu *subMenu)
+{
+ QQuickMenu *menu = QQuickMenuPrivate::get(subMenu)->parentMenu;
+ for (int i = 0; i < QQuickMenuPrivate::get(menu)->contentModel->count(); ++i) {
+ QQuickMenuItem *item = qobject_cast<QQuickMenuItem *>(menu->itemAt(i));
+ if (item && item->subMenu() == subMenu)
+ return item;
+ }
+ return nullptr;
+}
+
+void QQuickMenuPrivate::resolveParentItem()
+{
+ Q_Q(QQuickMenu);
+ if (!parentMenu)
+ q->resetParentItem();
+ else if (!cascade)
+ q->setParentItem(parentMenu->parentItem());
+ else
+ q->setParentItem(findParentMenuItem(q));
}
-void QQuickMenuPrivate::activateNextItem()
+void QQuickMenuPrivate::propagateKeyEvent(QKeyEvent *event)
{
- int index = currentIndex();
+ if (QQuickMenuItem *menuItem = qobject_cast<QQuickMenuItem *>(parentItem)) {
+ if (QQuickMenu *menu = menuItem->menu())
+ QQuickMenuPrivate::get(menu)->propagateKeyEvent(event);
+ } else if (QQuickMenuBarItem *menuBarItem = qobject_cast<QQuickMenuBarItem *>(parentItem)) {
+ if (QQuickMenuBar *menuBar = menuBarItem->menuBar()) {
+ event->accept();
+ QCoreApplication::sendEvent(menuBar, event);
+ }
+ }
+}
+
+void QQuickMenuPrivate::startHoverTimer()
+{
+ Q_Q(QQuickMenu);
+ stopHoverTimer();
+ hoverTimer = q->startTimer(SUBMENU_DELAY);
+}
+
+void QQuickMenuPrivate::stopHoverTimer()
+{
+ Q_Q(QQuickMenu);
+ if (!hoverTimer)
+ return;
+
+ q->killTimer(hoverTimer);
+ hoverTimer = 0;
+}
+
+void QQuickMenuPrivate::setCurrentIndex(int index, Qt::FocusReason reason)
+{
+ Q_Q(QQuickMenu);
+ if (currentIndex == index)
+ return;
+
+ QQuickMenuItem *newCurrentItem = qobject_cast<QQuickMenuItem *>(itemAt(index));
+ if (currentItem != newCurrentItem) {
+ stopHoverTimer();
+ if (currentItem) {
+ currentItem->setHighlighted(false);
+ if (!newCurrentItem && window) {
+ QQuickItem *focusItem = QQuickItemPrivate::get(contentItem)->subFocusItem;
+ if (focusItem)
+ QQuickWindowPrivate::get(window)->clearFocusInScope(contentItem, focusItem, Qt::OtherFocusReason);
+ }
+ }
+ if (newCurrentItem) {
+ newCurrentItem->setHighlighted(true);
+ newCurrentItem->forceActiveFocus(reason);
+ }
+ currentItem = newCurrentItem;
+ }
+
+ currentIndex = index;
+ emit q->currentIndexChanged();
+}
+
+bool QQuickMenuPrivate::activateNextItem()
+{
+ int index = currentIndex;
int count = contentModel->count();
while (++index < count) {
QQuickItem *item = itemAt(index);
if (!item || !item->activeFocusOnTab())
continue;
- item->forceActiveFocus(Qt::TabFocusReason);
- break;
+ setCurrentIndex(index, Qt::TabFocusReason);
+ return true;
}
+ return false;
}
-void QQuickMenuPrivate::activatePreviousItem()
+bool QQuickMenuPrivate::activatePreviousItem()
{
- int index = currentIndex();
+ int index = currentIndex;
while (--index >= 0) {
QQuickItem *item = itemAt(index);
if (!item || !item->activeFocusOnTab())
continue;
- item->forceActiveFocus(Qt::BacktabFocusReason);
- break;
+ setCurrentIndex(index, Qt::BacktabFocusReason);
+ return true;
}
+ return false;
}
void QQuickMenuPrivate::contentData_append(QQmlListProperty<QObject> *prop, QObject *obj)
{
- QQuickMenuPrivate *p = static_cast<QQuickMenuPrivate *>(prop->data);
- QQuickMenu *q = static_cast<QQuickMenu *>(prop->object);
+ QQuickMenu *q = qobject_cast<QQuickMenu *>(prop->object);
+ QQuickMenuPrivate *p = QQuickMenuPrivate::get(q);
+
QQuickItem *item = qobject_cast<QQuickItem *>(obj);
+ if (!item) {
+ if (QQuickAction *action = qobject_cast<QQuickAction *>(obj))
+ item = p->createItem(action);
+ else if (QQuickMenu *menu = qobject_cast<QQuickMenu *>(obj))
+ item = p->createItem(menu);
+ }
+
if (item) {
if (QQuickItemPrivate::get(item)->isTransparentForPositioner()) {
QQuickItemPrivate::get(item)->addItemChangeListener(p, QQuickItemPrivate::SiblingOrder);
@@ -298,26 +636,28 @@ void QQuickMenuPrivate::contentData_append(QQmlListProperty<QObject> *prop, QObj
int QQuickMenuPrivate::contentData_count(QQmlListProperty<QObject> *prop)
{
- QQuickMenuPrivate *p = static_cast<QQuickMenuPrivate *>(prop->data);
- return p->contentData.count();
+ QQuickMenu *q = static_cast<QQuickMenu *>(prop->object);
+ return QQuickMenuPrivate::get(q)->contentData.count();
}
QObject *QQuickMenuPrivate::contentData_at(QQmlListProperty<QObject> *prop, int index)
{
- QQuickMenuPrivate *p = static_cast<QQuickMenuPrivate *>(prop->data);
- return p->contentData.value(index);
+ QQuickMenu *q = static_cast<QQuickMenu *>(prop->object);
+ return QQuickMenuPrivate::get(q)->contentData.value(index);
}
void QQuickMenuPrivate::contentData_clear(QQmlListProperty<QObject> *prop)
{
- QQuickMenuPrivate *p = static_cast<QQuickMenuPrivate *>(prop->data);
- p->contentData.clear();
+ QQuickMenu *q = static_cast<QQuickMenu *>(prop->object);
+ QQuickMenuPrivate::get(q)->contentData.clear();
}
QQuickMenu::QQuickMenu(QObject *parent)
: QQuickPopup(*(new QQuickMenuPrivate), parent)
{
+ Q_D(QQuickMenu);
setFocus(true);
+ connect(d->contentModel, &QQmlObjectModel::countChanged, this, &QQuickMenu::countChanged);
}
/*!
@@ -386,22 +726,247 @@ void QQuickMenu::moveItem(int from, int to)
}
/*!
+ \deprecated
\qmlmethod void QtQuick.Controls::Menu::removeItem(int index)
- Removes the item at \a index.
+ Use Menu::removeItem(Item) or Menu::takeItem(int) instead.
+*/
+void QQuickMenu::removeItem(const QVariant &var)
+{
+ if (var.userType() == QMetaType::Nullptr)
+ return;
+
+ if (QQuickItem *item = var.value<QQuickItem *>())
+ removeItem(item);
+ else
+ takeItem(var.toInt());
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::removeItem(Item item)
+
+ Removes and destroys the specified \a item.
+*/
+void QQuickMenu::removeItem(QQuickItem *item)
+{
+ Q_D(QQuickMenu);
+ if (!item)
+ return;
+
+ const int index = d->contentModel->indexOf(item, nullptr);
+ if (index == -1)
+ return;
+
+ d->removeItem(index, item);
+ item->deleteLater();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod MenuItem QtQuick.Controls::Menu::takeItem(int index)
+
+ Removes and returns the item at \a index.
\note The ownership of the item is transferred to the caller.
*/
-void QQuickMenu::removeItem(int index)
+QQuickItem *QQuickMenu::takeItem(int index)
{
Q_D(QQuickMenu);
const int count = d->contentModel->count();
if (index < 0 || index >= count)
- return;
+ return nullptr;
QQuickItem *item = itemAt(index);
if (item)
d->removeItem(index, item);
+ return item;
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod Menu QtQuick.Controls::Menu::menuAt(int index)
+
+ Returns the sub-menu at \a index, or \c null if the index is not valid or
+ there is no sub-menu at the specified index.
+*/
+QQuickMenu *QQuickMenu::menuAt(int index) const
+{
+ Q_D(const QQuickMenu);
+ QQuickMenuItem *item = qobject_cast<QQuickMenuItem *>(d->itemAt(index));
+ if (!item)
+ return nullptr;
+
+ return item->subMenu();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::addMenu(Menu menu)
+
+ Adds \a menu as a sub-menu to the end of this menu.
+*/
+void QQuickMenu::addMenu(QQuickMenu *menu)
+{
+ Q_D(QQuickMenu);
+ insertMenu(d->contentModel->count(), menu);
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::insertMenu(int index, Menu menu)
+
+ Inserts \a menu as a sub-menu at \a index. The index is within all items in the menu.
+*/
+void QQuickMenu::insertMenu(int index, QQuickMenu *menu)
+{
+ Q_D(QQuickMenu);
+ if (!menu)
+ return;
+
+ insertItem(index, d->createItem(menu));
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::removeMenu(Menu menu)
+
+ Removes and destroys the specified \a menu.
+*/
+void QQuickMenu::removeMenu(QQuickMenu *menu)
+{
+ Q_D(QQuickMenu);
+ if (!menu)
+ return;
+
+ const int count = d->contentModel->count();
+ for (int i = 0; i < count; ++i) {
+ QQuickMenuItem *item = qobject_cast<QQuickMenuItem *>(d->itemAt(i));
+ if (!item || item->subMenu() != menu)
+ continue;
+
+ removeItem(item);
+ break;
+ }
+
+ menu->deleteLater();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod Menu QtQuick.Controls::Menu::takeMenu(int index)
+
+ Removes and returns the menu at \a index. The index is within all items in the menu.
+
+ \note The ownership of the menu is transferred to the caller.
+*/
+QQuickMenu *QQuickMenu::takeMenu(int index)
+{
+ Q_D(QQuickMenu);
+ QQuickMenuItem *item = qobject_cast<QQuickMenuItem *>(d->itemAt(index));
+ if (!item)
+ return nullptr;
+
+ QQuickMenu *subMenu = item->subMenu();
+ if (!subMenu)
+ return nullptr;
+
+ d->removeItem(index, item);
+ item->deleteLater();
+ return subMenu;
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod Action QtQuick.Controls::Menu::actionAt(int index)
+
+ Returns the action at \a index, or \c null if the index is not valid or
+ there is no action at the specified index.
+*/
+QQuickAction *QQuickMenu::actionAt(int index) const
+{
+ Q_D(const QQuickMenu);
+ QQuickAbstractButton *item = qobject_cast<QQuickAbstractButton *>(d->itemAt(index));
+ if (!item)
+ return nullptr;
+
+ return item->action();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::addAction(Action action)
+
+ Adds \a action to the end of this menu.
+*/
+void QQuickMenu::addAction(QQuickAction *action)
+{
+ Q_D(QQuickMenu);
+ insertAction(d->contentModel->count(), action);
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::insertAction(int index, Action action)
+
+ Inserts \a action at \a index. The index is within all items in the menu.
+*/
+void QQuickMenu::insertAction(int index, QQuickAction *action)
+{
+ Q_D(QQuickMenu);
+ if (!action)
+ return;
+
+ insertItem(index, d->createItem(action));
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::removeAction(Action action)
+
+ Removes and destroys the specified \a action.
+*/
+void QQuickMenu::removeAction(QQuickAction *action)
+{
+ Q_D(QQuickMenu);
+ if (!action)
+ return;
+
+ const int count = d->contentModel->count();
+ for (int i = 0; i < count; ++i) {
+ QQuickMenuItem *item = qobject_cast<QQuickMenuItem *>(d->itemAt(i));
+ if (!item || item->action() != action)
+ continue;
+
+ removeItem(item);
+ break;
+ }
+
+ action->deleteLater();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod Action QtQuick.Controls::Menu::takeAction(int index)
+
+ Removes and returns the action at \a index. The index is within all items in the menu.
+
+ \note The ownership of the action is transferred to the caller.
+*/
+QQuickAction *QQuickMenu::takeAction(int index)
+{
+ Q_D(QQuickMenu);
+ QQuickMenuItem *item = qobject_cast<QQuickMenuItem *>(d->itemAt(index));
+ if (!item)
+ return nullptr;
+
+ QQuickAction *action = item->action();
+ if (!action)
+ return nullptr;
+
+ d->removeItem(index, item);
+ item->deleteLater();
+ return action;
}
/*!
@@ -448,8 +1013,7 @@ QVariant QQuickMenu::contentModel() const
*/
QQmlListProperty<QObject> QQuickMenu::contentData()
{
- Q_D(QQuickMenu);
- return QQmlListProperty<QObject>(this, d,
+ return QQmlListProperty<QObject>(this, nullptr,
QQuickMenuPrivate::contentData_append,
QQuickMenuPrivate::contentData_count,
QQuickMenuPrivate::contentData_at,
@@ -477,7 +1041,300 @@ void QQuickMenu::setTitle(QString &title)
if (title == d->title)
return;
d->title = title;
- emit titleChanged();
+ emit titleChanged(title);
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::Menu::cascade
+
+ This property holds whether the menu cascades its sub-menus.
+
+ The default value is platform-specific. Menus are cascading by default on
+ desktop platforms that have a mouse cursor available. Non-cascading menus
+ are shown one menu at a time, and centered over the parent menu.
+
+ \note Changing the value of the property has no effect while the menu is open.
+
+ \sa overlap
+*/
+bool QQuickMenu::cascade() const
+{
+ Q_D(const QQuickMenu);
+ return d->cascade;
+}
+
+void QQuickMenu::setCascade(bool cascade)
+{
+ Q_D(QQuickMenu);
+ if (d->cascade == cascade)
+ return;
+ d->cascade = cascade;
+ if (d->parentMenu)
+ d->resolveParentItem();
+ emit cascadeChanged(cascade);
+}
+
+void QQuickMenu::resetCascade()
+{
+ Q_D(QQuickMenu);
+ if (d->parentMenu)
+ setCascade(d->parentMenu->cascade());
+ else
+ setCascade(shouldCascade());
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty real QtQuick.Controls::Menu::overlap
+
+ This property holds the amount of pixels by which the menu horizontally overlaps its parent menu.
+
+ The property only has effect when the menu is used as a cascading sub-menu.
+
+ The default value is style-specific.
+
+ \note Changing the value of the property has no effect while the menu is open.
+
+ \sa cascade
+*/
+qreal QQuickMenu::overlap() const
+{
+ Q_D(const QQuickMenu);
+ return d->overlap;
+}
+
+void QQuickMenu::setOverlap(qreal overlap)
+{
+ Q_D(QQuickMenu);
+ if (d->overlap == overlap)
+ return;
+ d->overlap = overlap;
+ emit overlapChanged();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty Component QtQuick.Controls::Menu::delegate
+
+ This property holds the component that is used to create items
+ to present actions.
+
+ \code
+ Menu {
+ Action { text: "Cut" }
+ Action { text: "Copy" }
+ Action { text: "Paste" }
+ }
+ \endcode
+
+ \sa Action
+*/
+QQmlComponent *QQuickMenu::delegate() const
+{
+ Q_D(const QQuickMenu);
+ return d->delegate;
+}
+
+void QQuickMenu::setDelegate(QQmlComponent *delegate)
+{
+ Q_D(QQuickMenu);
+ if (d->delegate == delegate)
+ return;
+
+ d->delegate = delegate;
+ emit delegateChanged();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty int QtQuick.Controls::Menu::currentIndex
+
+ This property holds the index of the currently highlighted item.
+
+ Menu items can be highlighted by mouse hover or keyboard navigation.
+
+ \sa MenuItem::highlighted
+*/
+int QQuickMenu::currentIndex() const
+{
+ Q_D(const QQuickMenu);
+ return d->currentIndex;
+}
+
+void QQuickMenu::setCurrentIndex(int index)
+{
+ Q_D(QQuickMenu);
+ d->setCurrentIndex(index, Qt::OtherFocusReason);
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty int QtQuick.Controls::Menu::count
+ \readonly
+
+ This property holds the number of items.
+*/
+int QQuickMenu::count() const
+{
+ Q_D(const QQuickMenu);
+ return d->contentModel->count();
+}
+
+void QQuickMenu::popup(QQuickItem *menuItem)
+{
+ Q_D(QQuickMenu);
+ // No position has been explicitly specified, so position the menu at the mouse cursor
+ // on desktop platforms that have a mouse cursor available and support multiple windows.
+ QQmlNullableValue<QPointF> pos;
+#if QT_CONFIG(cursor)
+ if (d->parentItem && QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows))
+ pos = d->parentItem->mapFromGlobal(QCursor::pos());
+#endif
+
+ // As a fallback, center the menu over its parent item.
+ if (pos.isNull && d->parentItem)
+ pos = QPointF((d->parentItem->width() - width()) / 2, (d->parentItem->height() - height()) / 2);
+
+ popup(pos.isNull ? QPointF() : pos.value, menuItem);
+}
+
+void QQuickMenu::popup(const QPointF &pos, QQuickItem *menuItem)
+{
+ Q_D(QQuickMenu);
+ qreal offset = 0;
+#if QT_CONFIG(cursor)
+ if (menuItem)
+ offset = d->popupItem->mapFromItem(menuItem, QPointF(0, 0)).y();
+#endif
+ setPosition(pos - QPointF(0, offset));
+
+ if (menuItem)
+ d->setCurrentIndex(d->contentModel->indexOf(menuItem, nullptr), Qt::PopupFocusReason);
+ open();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::popup(MenuItem item = null)
+ \qmlmethod void QtQuick.Controls::Menu::popup(Item parent, MenuItem item = null)
+
+ Opens the menu at the mouse cursor on desktop platforms that have a mouse cursor
+ available, and otherwise centers the menu over its \a parent item.
+
+ The menu can be optionally aligned to a specific menu \a item.
+
+ \sa Popup::open()
+*/
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::popup(point pos, MenuItem item = null)
+ \qmlmethod void QtQuick.Controls::Menu::popup(Item parent, point pos, MenuItem item = null)
+
+ Opens the menu at the specified position \a pos in the popups coordinate system,
+ that is, a coordinate relative to its \a parent item.
+
+ The menu can be optionally aligned to a specific menu \a item.
+
+ \sa Popup::open()
+*/
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::popup(real x, real y, MenuItem item = null)
+ \qmlmethod void QtQuick.Controls::Menu::popup(Item parent, real x, real y, MenuItem item = null)
+
+ Opens the menu at the specified position \a x, \a y in the popups coordinate system,
+ that is, a coordinate relative to its \a parent item.
+
+ The menu can be optionally aligned to a specific menu \a item.
+
+ \sa dismiss(), Popup::open()
+*/
+void QQuickMenu::popup(QQmlV4Function *args)
+{
+ Q_D(QQuickMenu);
+ const int len = args->length();
+ if (len > 4) {
+ args->v4engine()->throwTypeError();
+ return;
+ }
+
+ QV4::ExecutionEngine *v4 = args->v4engine();
+ QV4::Scope scope(v4);
+
+ QQmlNullableValue<QPointF> pos;
+ QQuickItem *menuItem = nullptr;
+ QQuickItem *parentItem = nullptr;
+
+ if (len > 0) {
+ // Item parent
+ QV4::ScopedValue firstArg(scope, (*args)[0]);
+ if (const QV4::QObjectWrapper *obj = firstArg->as<QV4::QObjectWrapper>()) {
+ QQuickItem *item = qobject_cast<QQuickItem *>(obj->object());
+ if (item && !d->popupItem->isAncestorOf(item))
+ parentItem = item;
+ } else if (firstArg->isUndefined()) {
+ resetParentItem();
+ parentItem = d->parentItem;
+ }
+
+ // MenuItem item
+ QV4::ScopedValue lastArg(scope, (*args)[len - 1]);
+ if (const QV4::QObjectWrapper *obj = lastArg->as<QV4::QObjectWrapper>()) {
+ QQuickItem *item = qobject_cast<QQuickItem *>(obj->object());
+ if (item && d->popupItem->isAncestorOf(item))
+ menuItem = item;
+ }
+ }
+
+ if (len >= 3 || (!parentItem && len >= 2)) {
+ // real x, real y
+ QV4::ScopedValue xArg(scope, (*args)[parentItem ? 1 : 0]);
+ QV4::ScopedValue yArg(scope, (*args)[parentItem ? 2 : 1]);
+ if (xArg->isNumber() && yArg->isNumber())
+ pos = QPointF(xArg->asDouble(), yArg->asDouble());
+ }
+
+ if (pos.isNull && (len >= 2 || (!parentItem && len >= 1))) {
+ // point pos
+ QV4::ScopedValue posArg(scope, (*args)[parentItem ? 1 : 0]);
+ const QVariant var = v4->toVariant(posArg, -1);
+ if (var.userType() == QMetaType::QPointF)
+ pos = var.toPointF();
+ }
+
+ if (parentItem)
+ setParentItem(parentItem);
+
+ if (pos.isNull)
+ popup(menuItem);
+ else
+ popup(pos, menuItem);
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlmethod void QtQuick.Controls::Menu::dismiss()
+
+ Closes all menus in the hierarchy that this menu belongs to.
+
+ \note Unlike \l {Popup::}{close()} that only closes a menu and its sub-menus,
+ \c dismiss() closes the whole hierarchy of menus, including the parent menus.
+ In practice, \c close() is suitable e.g. for implementing navigation in a
+ hierarchy of menus, and \c dismiss() is the appropriate method for closing
+ the whole hierarchy of menus.
+
+ \sa popup(), Popup::close()
+*/
+void QQuickMenu::dismiss()
+{
+ QQuickMenu *menu = this;
+ while (menu) {
+ menu->close();
+ menu = QQuickMenuPrivate::get(menu)->parentMenu;
+ }
}
void QQuickMenu::componentComplete()
@@ -506,26 +1363,18 @@ void QQuickMenu::itemChange(QQuickItem::ItemChange change, const QQuickItem::Ite
QQuickPopup::itemChange(change, data);
if (change == QQuickItem::ItemVisibleHasChanged) {
- if (!data.boolValue) {
+ if (!data.boolValue && d->cascade) {
// Ensure that when the menu isn't visible, there's no current item
// the next time it's opened.
- QQuickItem *focusItem = QQuickItemPrivate::get(d->contentItem)->subFocusItem;
- if (focusItem) {
- QQuickWindow *window = QQuickPopup::window();
- if (window)
- QQuickWindowPrivate::get(window)->clearFocusInScope(d->contentItem, focusItem, Qt::OtherFocusReason);
- }
- d->setCurrentIndex(-1);
+ d->setCurrentIndex(-1, Qt::OtherFocusReason);
}
}
}
-void QQuickMenu::keyReleaseEvent(QKeyEvent *event)
+void QQuickMenu::keyPressEvent(QKeyEvent *event)
{
Q_D(QQuickMenu);
- QQuickPopup::keyReleaseEvent(event);
- if (d->contentModel->count() == 0)
- return;
+ QQuickPopup::keyPressEvent(event);
// QTBUG-17051
// Work around the fact that ListView has no way of distinguishing between
@@ -535,23 +1384,59 @@ void QQuickMenu::keyReleaseEvent(QKeyEvent *event)
// shown at once.
switch (event->key()) {
case Qt::Key_Up:
- d->activatePreviousItem();
+ if (!d->activatePreviousItem())
+ d->propagateKeyEvent(event);
break;
case Qt::Key_Down:
d->activateNextItem();
break;
+ case Qt::Key_Left:
+ case Qt::Key_Right:
+ event->ignore();
+ if (d->popupItem->isMirrored() == (event->key() == Qt::Key_Right)) {
+ if (d->parentMenu && d->currentItem) {
+ if (!d->cascade)
+ d->parentMenu->open();
+ close();
+ event->accept();
+ }
+ } else {
+ if (QQuickMenu *subMenu = d->currentSubMenu()) {
+ subMenu->popup(subMenu->itemAt(0));
+ event->accept();
+ }
+ }
+ if (!event->isAccepted())
+ d->propagateKeyEvent(event);
+ break;
+
default:
break;
}
}
+void QQuickMenu::timerEvent(QTimerEvent *event)
+{
+ Q_D(QQuickMenu);
+ if (event->timerId() == d->hoverTimer) {
+ if (QQuickMenu *subMenu = d->currentSubMenu())
+ subMenu->open();
+ d->stopHoverTimer();
+ }
+}
+
QFont QQuickMenu::defaultFont() const
{
return QQuickControlPrivate::themeFont(QPlatformTheme::MenuFont);
}
+QPalette QQuickMenu::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::MenuPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickMenu::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickmenu_p.h b/src/quicktemplates2/qquickmenu_p.h
index 6d1a4985..01b970f8 100644
--- a/src/quicktemplates2/qquickmenu_p.h
+++ b/src/quicktemplates2/qquickmenu_p.h
@@ -55,6 +55,8 @@
QT_BEGIN_NAMESPACE
+class QQuickAction;
+class QQmlComponent;
class QQuickMenuItem;
class QQuickMenuPrivate;
@@ -63,7 +65,13 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenu : public QQuickPopup
Q_OBJECT
Q_PROPERTY(QVariant contentModel READ contentModel CONSTANT FINAL)
Q_PROPERTY(QQmlListProperty<QObject> contentData READ contentData FINAL)
- Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
+ Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(int count READ count NOTIFY countChanged FINAL REVISION 3)
+ Q_PROPERTY(bool cascade READ cascade WRITE setCascade RESET resetCascade NOTIFY cascadeChanged FINAL REVISION 3)
+ Q_PROPERTY(qreal overlap READ overlap WRITE setOverlap NOTIFY overlapChanged FINAL REVISION 3)
+ Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL REVISION 3)
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL REVISION 3)
Q_CLASSINFO("DefaultProperty", "contentData")
public:
@@ -73,7 +81,8 @@ public:
Q_INVOKABLE void addItem(QQuickItem *item);
Q_INVOKABLE void insertItem(int index, QQuickItem *item);
Q_INVOKABLE void moveItem(int from, int to);
- Q_INVOKABLE void removeItem(int index);
+ Q_INVOKABLE void removeItem(const QVariant &item); // ### Qt 6: remove
+ void removeItem(QQuickItem *item); // ### Qt 6: Q_INVOKABLE
QVariant contentModel() const;
QQmlListProperty<QObject> contentData();
@@ -81,17 +90,61 @@ public:
QString title() const;
void setTitle(QString &title);
+ bool cascade() const;
+ void setCascade(bool cascade);
+ void resetCascade();
+
+ qreal overlap() const;
+ void setOverlap(qreal overlap);
+
+ QQmlComponent *delegate() const;
+ void setDelegate(QQmlComponent *delegate);
+
+ int currentIndex() const;
+ void setCurrentIndex(int index);
+
+ // 2.3 (Qt 5.10)
+ int count() const;
+ Q_REVISION(3) Q_INVOKABLE QQuickItem *takeItem(int index);
+
+ Q_REVISION(3) Q_INVOKABLE QQuickMenu *menuAt(int index) const;
+ Q_REVISION(3) Q_INVOKABLE void addMenu(QQuickMenu *menu);
+ Q_REVISION(3) Q_INVOKABLE void insertMenu(int index, QQuickMenu *menu);
+ Q_REVISION(3) Q_INVOKABLE void removeMenu(QQuickMenu *menu);
+ Q_REVISION(3) Q_INVOKABLE QQuickMenu *takeMenu(int index);
+
+ Q_REVISION(3) Q_INVOKABLE QQuickAction *actionAt(int index) const;
+ Q_REVISION(3) Q_INVOKABLE void addAction(QQuickAction *action);
+ Q_REVISION(3) Q_INVOKABLE void insertAction(int index, QQuickAction *action);
+ Q_REVISION(3) Q_INVOKABLE void removeAction(QQuickAction *action);
+ Q_REVISION(3) Q_INVOKABLE QQuickAction *takeAction(int index);
+
+ void popup(QQuickItem *menuItem = nullptr);
+ void popup(const QPointF &pos, QQuickItem *menuItem = nullptr);
+
+ Q_REVISION(3) Q_INVOKABLE void popup(QQmlV4Function *args);
+ Q_REVISION(3) Q_INVOKABLE void dismiss();
+
protected:
void componentComplete() override;
void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data) override;
- void keyReleaseEvent(QKeyEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
Q_SIGNALS:
- void titleChanged();
+ void titleChanged(const QString &title);
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void countChanged();
+ Q_REVISION(3) void cascadeChanged(bool cascade);
+ Q_REVISION(3) void overlapChanged();
+ Q_REVISION(3) void delegateChanged();
+ Q_REVISION(3) void currentIndexChanged();
protected:
+ void timerEvent(QTimerEvent *event) override;
+
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
diff --git a/src/quicktemplates2/qquickmenu_p_p.h b/src/quicktemplates2/qquickmenu_p_p.h
index 583bb41d..0c8ffb4d 100644
--- a/src/quicktemplates2/qquickmenu_p_p.h
+++ b/src/quicktemplates2/qquickmenu_p_p.h
@@ -51,11 +51,15 @@
#include <QtCore/qvector.h>
#include <QtCore/qpointer.h>
+#include <QtQuickTemplates2/private/qquickmenu_p.h>
#include <QtQuickTemplates2/private/qquickpopup_p_p.h>
QT_BEGIN_NAMESPACE
+class QQuickAction;
+class QQmlComponent;
class QQmlObjectModel;
+class QQuickMenuItem;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuPrivate : public QQuickPopupPrivate
{
@@ -64,11 +68,22 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuPrivate : public QQuickPopupPri
public:
QQuickMenuPrivate();
+ static QQuickMenuPrivate *get(QQuickMenu *menu)
+ {
+ return menu->d_func();
+ }
+
QQuickItem *itemAt(int index) const;
void insertItem(int index, QQuickItem *item);
void moveItem(int from, int to);
void removeItem(int index, QQuickItem *item);
+ QQuickItem *beginCreateItem();
+ void completeCreateItem();
+
+ QQuickItem *createItem(QQuickMenu *menu);
+ QQuickItem *createItem(QQuickAction *action);
+
void resizeItem(QQuickItem *item);
void resizeItems();
@@ -78,23 +93,43 @@ public:
void itemDestroyed(QQuickItem *item) override;
void itemGeometryChanged(QQuickItem *, QQuickGeometryChange change, const QRectF &diff) override;
- void onItemPressed();
+ void reposition() override;
+ bool prepareEnterTransition() override;
+ bool prepareExitTransition() override;
+ bool blockInput(QQuickItem *item, const QPointF &point) const override;
+
+ void onItemHovered();
+ void onItemTriggered();
void onItemActiveFocusChanged();
- int currentIndex() const;
- void setCurrentIndex(int index);
+ QQuickMenu *currentSubMenu() const;
+ void setParentMenu(QQuickMenu *parent);
+ void resolveParentItem();
+
+ void propagateKeyEvent(QKeyEvent *event);
+
+ void startHoverTimer();
+ void stopHoverTimer();
- void activateNextItem();
- void activatePreviousItem();
+ void setCurrentIndex(int index, Qt::FocusReason reason);
+ bool activateNextItem();
+ bool activatePreviousItem();
static void contentData_append(QQmlListProperty<QObject> *prop, QObject *obj);
static int contentData_count(QQmlListProperty<QObject> *prop);
static QObject *contentData_at(QQmlListProperty<QObject> *prop, int index);
static void contentData_clear(QQmlListProperty<QObject> *prop);
+ bool cascade;
+ int hoverTimer;
+ int currentIndex;
+ qreal overlap;
+ QPointer<QQuickMenu> parentMenu;
+ QPointer<QQuickMenuItem> currentItem;
QQuickItem *contentItem; // TODO: cleanup
QVector<QObject *> contentData;
QQmlObjectModel *contentModel;
+ QQmlComponent *delegate;
QString title;
};
diff --git a/src/quicktemplates2/qquickmenubar.cpp b/src/quicktemplates2/qquickmenubar.cpp
new file mode 100644
index 00000000..de3cc9a7
--- /dev/null
+++ b/src/quicktemplates2/qquickmenubar.cpp
@@ -0,0 +1,659 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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 "qquickmenubar_p.h"
+#include "qquickmenubar_p_p.h"
+#include "qquickmenubaritem_p_p.h"
+#include "qquickmenu_p.h"
+#include "qquickmenu_p_p.h"
+
+#include <QtQml/qqmlcontext.h>
+#include <QtQml/qqmlcomponent.h>
+#include <QtQml/qqmlengine.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmltype MenuBar
+ \inherits Container
+ \instantiates QQuickMenuBar
+ \inqmlmodule QtQuick.Controls
+ \since 5.10
+ \ingroup qtquickcontrols2-menus
+ \brief Provides a window menu bar.
+
+ \image qtquickcontrols2-menubar.png
+
+ MenuBar consists of drop-down menus, and is normally located at the top
+ edge of the window.
+
+ \quotefromfile qtquickcontrols2-menubar.qml
+ \skipuntil begin
+ \printto skipfrom
+ \skipuntil skipto
+ \printto end
+
+ Typically, menus are statically declared as children of the menu bar, but
+ MenuBar also provides API to \l {addMenu}{add}, \l {insertMenu}{insert},
+ \l {removeMenu}{remove}, and \l {takeMenu}{take} menus dynamically. The
+ menus in a menu bar can be accessed using \l menuAt().
+
+ \sa {Customizing MenuBar}, Menu, MenuBarItem, {Menu Controls}
+*/
+
+QQuickMenuBarPrivate::QQuickMenuBarPrivate()
+ : popupMode(false),
+ triggering(false),
+ hasContentWidth(false),
+ hasContentHeight(false),
+ contentWidth(0),
+ contentHeight(0),
+ delegate(nullptr)
+{
+ changeTypes |= Geometry;
+}
+
+QQuickItem *QQuickMenuBarPrivate::beginCreateItem()
+{
+ Q_Q(QQuickMenuBar);
+ if (!delegate)
+ return nullptr;
+
+ QQmlContext *creationContext = delegate->creationContext();
+ if (!creationContext)
+ creationContext = qmlContext(q);
+ QQmlContext *context = new QQmlContext(creationContext, q);
+ context->setContextObject(q);
+
+ QObject *object = delegate->beginCreate(context);
+ QQuickItem *item = qobject_cast<QQuickItem *>(object);
+ if (!item) {
+ delete object;
+ delete context;
+ return nullptr;
+ }
+
+ item->setParentItem(q);
+ QQml_setParent_noEvent(item, q);
+
+ return item;
+}
+
+void QQuickMenuBarPrivate::completeCreateItem()
+{
+ if (!delegate)
+ return;
+
+ delegate->completeCreate();
+}
+
+QQuickItem *QQuickMenuBarPrivate::createItem(QQuickMenu *menu)
+{
+ QQuickItem *item = beginCreateItem();
+ if (QQuickMenuBarItem *menuBarItem = qobject_cast<QQuickMenuBarItem *>(item))
+ menuBarItem->setMenu(menu);
+ completeCreateItem();
+ return item;
+}
+
+void QQuickMenuBarPrivate::toggleCurrentMenu(bool visible, bool activate)
+{
+ if (!currentItem || visible == popupMode)
+ return;
+
+ QQuickMenu *menu = currentItem->menu();
+
+ triggering = true;
+ popupMode = visible;
+ if (menu)
+ menu->setVisible(visible);
+ if (!visible)
+ currentItem->forceActiveFocus();
+ else if (menu && activate)
+ menu->setCurrentIndex(0);
+ triggering = false;
+}
+
+void QQuickMenuBarPrivate::activateItem(QQuickMenuBarItem *item)
+{
+ if (currentItem == item)
+ return;
+
+ if (currentItem) {
+ currentItem->setHighlighted(false);
+ if (popupMode) {
+ if (QQuickMenu *menu = currentItem->menu())
+ menu->dismiss();
+ }
+ }
+
+ if (item) {
+ item->setHighlighted(true);
+ if (popupMode) {
+ if (QQuickMenu *menu = item->menu())
+ menu->open();
+ }
+ }
+
+ currentItem = item;
+}
+
+void QQuickMenuBarPrivate::activateNextItem()
+{
+ int index = currentItem ? contentModel->indexOf(currentItem, nullptr) : -1;
+ if (index >= contentModel->count() - 1)
+ index = -1;
+ activateItem(qobject_cast<QQuickMenuBarItem *>(itemAt(++index)));
+}
+
+void QQuickMenuBarPrivate::activatePreviousItem()
+{
+ int index = currentItem ? contentModel->indexOf(currentItem, nullptr) : contentModel->count();
+ if (index <= 0)
+ index = contentModel->count();
+ activateItem(qobject_cast<QQuickMenuBarItem *>(itemAt(--index)));
+}
+
+void QQuickMenuBarPrivate::onItemHovered()
+{
+ Q_Q(QQuickMenuBar);
+ QQuickMenuBarItem *item = qobject_cast<QQuickMenuBarItem *>(q->sender());
+ if (!item || item == currentItem || !item->isHovered() || QQuickMenuBarItemPrivate::get(item)->touchId != -1)
+ return;
+
+ activateItem(item);
+}
+
+void QQuickMenuBarPrivate::onItemTriggered()
+{
+ Q_Q(QQuickMenuBar);
+ QQuickMenuBarItem *item = qobject_cast<QQuickMenuBarItem *>(q->sender());
+ if (!item)
+ return;
+
+ if (item == currentItem) {
+ toggleCurrentMenu(!popupMode, false);
+ } else {
+ popupMode = true;
+ activateItem(item);
+ }
+}
+
+void QQuickMenuBarPrivate::onMenuAboutToHide()
+{
+ if (triggering || !currentItem || currentItem->isHovered() || !currentItem->isHighlighted())
+ return;
+
+ popupMode = false;
+ activateItem(nullptr);
+}
+
+void QQuickMenuBarPrivate::updateContentSize()
+{
+ Q_Q(QQuickMenuBar);
+ if (hasContentWidth && hasContentHeight)
+ return;
+
+ const int count = contentModel->count();
+ if (count <= 0 || !contentItem)
+ return;
+
+ qreal maxHeight = 0;
+ qreal totalWidth = qMax(0, count - 1) * spacing;
+
+ for (int i = 0; i < count; ++i) {
+ QQuickItem *item = q->itemAt(i);
+ if (item) {
+ totalWidth += item->width();
+ maxHeight = qMax(maxHeight, item->implicitHeight());
+ }
+ }
+
+ bool contentWidthChange = false;
+ if (!hasContentWidth && !qFuzzyCompare(contentWidth, totalWidth)) {
+ contentWidth = totalWidth;
+ contentWidthChange = true;
+ }
+
+ bool contentHeightChange = false;
+ if (!hasContentHeight && !qFuzzyCompare(contentHeight, maxHeight)) {
+ contentHeight = maxHeight;
+ contentHeightChange = true;
+ }
+
+ if (contentWidthChange)
+ emit q->contentWidthChanged();
+ if (contentHeightChange)
+ emit q->contentHeightChanged();
+}
+
+void QQuickMenuBarPrivate::itemGeometryChanged(QQuickItem *, QQuickGeometryChange change, const QRectF &)
+{
+ if ((change.widthChange() && !hasContentWidth) || (change.heightChange() && !hasContentHeight))
+ updateContentSize();
+}
+
+void QQuickMenuBarPrivate::contentData_append(QQmlListProperty<QObject> *prop, QObject *obj)
+{
+ QQuickMenuBar *menuBar = static_cast<QQuickMenuBar *>(prop->object);
+ if (QQuickMenu *menu = qobject_cast<QQuickMenu *>(obj))
+ obj = QQuickMenuBarPrivate::get(menuBar)->createItem(menu);
+ QQuickContainerPrivate::contentData_append(prop, obj);
+}
+
+void QQuickMenuBarPrivate::menus_append(QQmlListProperty<QQuickMenu> *prop, QQuickMenu *obj)
+{
+ QQuickMenuBar *menuBar = static_cast<QQuickMenuBar *>(prop->object);
+ menuBar->addMenu(obj);
+}
+
+int QQuickMenuBarPrivate::menus_count(QQmlListProperty<QQuickMenu> *prop)
+{
+ QQuickMenuBar *menuBar = static_cast<QQuickMenuBar *>(prop->object);
+ return menuBar->count();
+}
+
+QQuickMenu *QQuickMenuBarPrivate::menus_at(QQmlListProperty<QQuickMenu> *prop, int index)
+{
+ QQuickMenuBar *menuBar = static_cast<QQuickMenuBar *>(prop->object);
+ return menuBar->menuAt(index);
+}
+
+void QQuickMenuBarPrivate::menus_clear(QQmlListProperty<QQuickMenu> *prop)
+{
+ QQuickMenuBar *menuBar = static_cast<QQuickMenuBar *>(prop->object);
+ QQuickMenuBarPrivate::get(menuBar)->contentModel->clear();
+}
+
+QQuickMenuBar::QQuickMenuBar(QQuickItem *parent)
+ : QQuickContainer(*(new QQuickMenuBarPrivate), parent)
+{
+ setFlag(ItemIsFocusScope);
+ setFocusPolicy(Qt::ClickFocus);
+}
+
+/*!
+ \qmlproperty Component QtQuick.Controls::MenuBar::delegate
+
+ This property holds the component that is used to create menu bar
+ items to present menus in the menu bar.
+
+ \sa MenuBarItem
+*/
+QQmlComponent *QQuickMenuBar::delegate() const
+{
+ Q_D(const QQuickMenuBar);
+ return d->delegate;
+}
+
+void QQuickMenuBar::setDelegate(QQmlComponent *delegate)
+{
+ Q_D(QQuickMenuBar);
+ if (d->delegate == delegate)
+ return;
+
+ d->delegate = delegate;
+ emit delegateChanged();
+}
+
+/*!
+ \qmlmethod Menu QtQuick.Controls::MenuBar::menuAt(int index)
+
+ Returns the menu at \a index, or \c null if it does not exist.
+*/
+QQuickMenu *QQuickMenuBar::menuAt(int index) const
+{
+ Q_D(const QQuickMenuBar);
+ QQuickMenuBarItem *item = qobject_cast<QQuickMenuBarItem *>(d->itemAt(index));
+ if (!item)
+ return nullptr;
+ return item->menu();
+}
+
+/*!
+ \qmlmethod void QtQuick.Controls::MenuBar::addMenu(Menu menu)
+
+ Adds \a menu to the end of the list of menus.
+*/
+void QQuickMenuBar::addMenu(QQuickMenu *menu)
+{
+ Q_D(QQuickMenuBar);
+ addItem(d->createItem(menu));
+}
+
+/*!
+ \qmlmethod void QtQuick.Controls::MenuBar::insertMenu(int index, Menu menu)
+
+ Inserts \a menu at \a index.
+*/
+void QQuickMenuBar::insertMenu(int index, QQuickMenu *menu)
+{
+ Q_D(QQuickMenuBar);
+ insertItem(index, d->createItem(menu));
+}
+
+/*!
+ \qmlmethod void QtQuick.Controls::MenuBar::removeMenu(Menu menu)
+
+ Removes and destroys the specified \a menu.
+*/
+void QQuickMenuBar::removeMenu(QQuickMenu *menu)
+{
+ Q_D(QQuickMenuBar);
+ if (!menu)
+ return;
+
+ const int count = d->contentModel->count();
+ for (int i = 0; i < count; ++i) {
+ QQuickMenuBarItem *item = qobject_cast<QQuickMenuBarItem *>(itemAt(i));
+ if (!item || item->menu() != menu)
+ continue;
+
+ removeItem(item);
+ break;
+ }
+
+ menu->deleteLater();
+}
+
+/*!
+ \qmlmethod Menu QtQuick.Controls::MenuBar::takeMenu(int index)
+
+ Removes and returns the menu at \a index.
+
+ \note The ownership of the item is transferred to the caller.
+*/
+QQuickMenu *QQuickMenuBar::takeMenu(int index)
+{
+ Q_D(QQuickMenuBar);
+ QQuickMenuBarItem *item = qobject_cast<QQuickMenuBarItem *>(itemAt(index));
+ if (!item)
+ return nullptr;
+
+ QQuickMenu *menu = item->menu();
+ if (!menu)
+ return nullptr;
+
+ d->removeItem(index, item);
+ item->deleteLater();
+ return menu;
+}
+
+/*!
+ \qmlproperty real QtQuick.Controls::MenuBar::contentWidth
+
+ This property holds the content width. It is used for calculating the total
+ implicit width of the menu bar.
+
+ Unless explicitly overridden, the content width is automatically calculated
+ based on the total implicit width of the items and the \l {Control::}{spacing}
+ of the menu bar.
+
+ \sa contentHeight
+*/
+qreal QQuickMenuBar::contentWidth() const
+{
+ Q_D(const QQuickMenuBar);
+ return d->contentWidth;
+}
+
+void QQuickMenuBar::setContentWidth(qreal width)
+{
+ Q_D(QQuickMenuBar);
+ d->hasContentWidth = true;
+ if (qFuzzyCompare(d->contentWidth, width))
+ return;
+
+ d->contentWidth = width;
+ emit contentWidthChanged();
+}
+
+void QQuickMenuBar::resetContentWidth()
+{
+ Q_D(QQuickMenuBar);
+ if (!d->hasContentWidth)
+ return;
+
+ d->hasContentWidth = false;
+ if (isComponentComplete())
+ d->updateContentSize();
+}
+
+/*!
+ \qmlproperty real QtQuick.Controls::MenuBar::contentHeight
+
+ This property holds the content height. It is used for calculating the total
+ implicit height of the menu bar.
+
+ Unless explicitly overridden, the content height is automatically calculated
+ based on the maximum implicit height of the items.
+
+ \sa contentWidth
+*/
+qreal QQuickMenuBar::contentHeight() const
+{
+ Q_D(const QQuickMenuBar);
+ return d->contentHeight;
+}
+
+void QQuickMenuBar::setContentHeight(qreal height)
+{
+ Q_D(QQuickMenuBar);
+ d->hasContentHeight = true;
+ if (qFuzzyCompare(d->contentHeight, height))
+ return;
+
+ d->contentHeight = height;
+ emit contentHeightChanged();
+}
+
+void QQuickMenuBar::resetContentHeight()
+{
+ Q_D(QQuickMenuBar);
+ if (!d->hasContentHeight)
+ return;
+
+ d->hasContentHeight = false;
+ if (isComponentComplete())
+ d->updateContentSize();
+}
+
+/*!
+ \qmlproperty list<Menu> QtQuick.Controls::MenuBar::menus
+
+ This property holds the list of menus.
+
+ The list contains all menus that have been declared in QML as children
+ of the menu bar, and also menus that have been dynamically added or
+ inserted using the \l addMenu() and \l insertMenu() methods, respectively.
+*/
+QQmlListProperty<QQuickMenu> QQuickMenuBar::menus()
+{
+ return QQmlListProperty<QQuickMenu>(this, nullptr,
+ QQuickMenuBarPrivate::menus_append,
+ QQuickMenuBarPrivate::menus_count,
+ QQuickMenuBarPrivate::menus_at,
+ QQuickMenuBarPrivate::menus_clear);
+}
+
+QQmlListProperty<QObject> QQuickMenuBar::contentData()
+{
+ return QQmlListProperty<QObject>(this, nullptr,
+ QQuickMenuBarPrivate::contentData_append,
+ QQuickContainerPrivate::contentData_count,
+ QQuickContainerPrivate::contentData_at,
+ QQuickContainerPrivate::contentData_clear);
+}
+
+void QQuickMenuBar::updatePolish()
+{
+ Q_D(QQuickMenuBar);
+ QQuickContainer::updatePolish();
+ d->updateContentSize();
+}
+
+void QQuickMenuBar::componentComplete()
+{
+ Q_D(QQuickMenuBar);
+ QQuickContainer::componentComplete();
+ d->updateContentSize();
+}
+
+bool QQuickMenuBar::eventFilter(QObject *object, QEvent *event)
+{
+ return QObject::eventFilter(object, event);
+}
+
+void QQuickMenuBar::keyPressEvent(QKeyEvent *event)
+{
+ Q_D(QQuickMenuBar);
+ QQuickContainer::keyReleaseEvent(event);
+
+ switch (event->key()) {
+ case Qt::Key_Up:
+ d->toggleCurrentMenu(false, false);
+ break;
+
+ case Qt::Key_Down:
+ d->toggleCurrentMenu(true, true);
+ break;
+
+ case Qt::Key_Left:
+ case Qt::Key_Right:
+ if (isMirrored() == (event->key() == Qt::Key_Left))
+ d->activateNextItem();
+ else
+ d->activatePreviousItem();
+ break;
+ case Qt::Key_Escape:
+ if (d->currentItem) {
+ d->activateItem(nullptr);
+ setFocus(false);
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void QQuickMenuBar::keyReleaseEvent(QKeyEvent *event)
+{
+ QQuickContainer::keyReleaseEvent(event);
+
+ switch (event->key()) {
+ case Qt::Key_Up:
+ case Qt::Key_Down:
+ case Qt::Key_Left:
+ case Qt::Key_Right:
+ case Qt::Key_Escape:
+ event->accept();
+ break;
+
+ default:
+ event->ignore();
+ break;
+ }
+}
+
+void QQuickMenuBar::hoverLeaveEvent(QHoverEvent *event)
+{
+ Q_D(QQuickMenuBar);
+ QQuickContainer::hoverLeaveEvent(event);
+ if (!d->popupMode && d->currentItem)
+ d->activateItem(nullptr);
+}
+
+bool QQuickMenuBar::isContent(QQuickItem *item) const
+{
+ return qobject_cast<QQuickMenuBarItem *>(item);
+}
+
+void QQuickMenuBar::itemAdded(int index, QQuickItem *item)
+{
+ Q_D(QQuickMenuBar);
+ QQuickContainer::itemAdded(index, item);
+ if (QQuickMenuBarItem *menuBarItem = qobject_cast<QQuickMenuBarItem *>(item)) {
+ QQuickMenuBarItemPrivate::get(menuBarItem)->setMenuBar(this);
+ QObjectPrivate::connect(menuBarItem, &QQuickControl::hoveredChanged, d, &QQuickMenuBarPrivate::onItemHovered);
+ QObjectPrivate::connect(menuBarItem, &QQuickMenuBarItem::triggered, d, &QQuickMenuBarPrivate::onItemTriggered);
+ if (QQuickMenu *menu = menuBarItem->menu())
+ QObjectPrivate::connect(menu, &QQuickPopup::aboutToHide, d, &QQuickMenuBarPrivate::onMenuAboutToHide);
+ }
+ if (isComponentComplete())
+ polish();
+ if (isComponentComplete())
+ polish();
+ emit menusChanged();
+}
+
+void QQuickMenuBar::itemMoved(int index, QQuickItem *item)
+{
+ QQuickContainer::itemMoved(index, item);
+ emit menusChanged();
+}
+
+void QQuickMenuBar::itemRemoved(int index, QQuickItem *item)
+{
+ Q_D(QQuickMenuBar);
+ QQuickContainer::itemRemoved(index, item);
+ if (QQuickMenuBarItem *menuBarItem = qobject_cast<QQuickMenuBarItem *>(item)) {
+ QQuickMenuBarItemPrivate::get(menuBarItem)->setMenuBar(nullptr);
+ QObjectPrivate::disconnect(menuBarItem, &QQuickControl::hoveredChanged, d, &QQuickMenuBarPrivate::onItemHovered);
+ QObjectPrivate::disconnect(menuBarItem, &QQuickMenuBarItem::triggered, d, &QQuickMenuBarPrivate::onItemTriggered);
+ if (QQuickMenu *menu = menuBarItem->menu())
+ QObjectPrivate::disconnect(menu, &QQuickPopup::aboutToHide, d, &QQuickMenuBarPrivate::onMenuAboutToHide);
+ }
+ emit menusChanged();
+}
+
+QFont QQuickMenuBar::defaultFont() const
+{
+ return QQuickControlPrivate::themeFont(QPlatformTheme::MenuBarFont);
+}
+
+QPalette QQuickMenuBar::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::MenuBarPalette);
+}
+
+#if QT_CONFIG(accessibility)
+QAccessible::Role QQuickMenuBar::accessibleRole() const
+{
+ return QAccessible::MenuBar;
+}
+#endif
+
+QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickmenubar_p.h b/src/quicktemplates2/qquickmenubar_p.h
new file mode 100644
index 00000000..8c703f25
--- /dev/null
+++ b/src/quicktemplates2/qquickmenubar_p.h
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKMENUBAR_P_H
+#define QQUICKMENUBAR_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuickTemplates2/private/qquickcontainer_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickMenu;
+class QQuickMenuBarPrivate;
+
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuBar : public QQuickContainer
+{
+ Q_OBJECT
+ Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
+ Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL)
+ Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL)
+ Q_PROPERTY(QQmlListProperty<QQuickMenu> menus READ menus NOTIFY menusChanged FINAL)
+ Q_PROPERTY(QQmlListProperty<QObject> contentData READ contentData FINAL)
+
+public:
+ explicit QQuickMenuBar(QQuickItem *parent = nullptr);
+
+ QQmlComponent *delegate() const;
+ void setDelegate(QQmlComponent *delegate);
+
+ Q_INVOKABLE QQuickMenu *menuAt(int index) const;
+ Q_INVOKABLE void addMenu(QQuickMenu *menu);
+ Q_INVOKABLE void insertMenu(int index, QQuickMenu *menu);
+ Q_INVOKABLE void removeMenu(QQuickMenu *menu);
+ Q_INVOKABLE QQuickMenu *takeMenu(int index);
+
+ qreal contentWidth() const;
+ void setContentWidth(qreal width);
+ void resetContentWidth();
+
+ qreal contentHeight() const;
+ void setContentHeight(qreal height);
+ void resetContentHeight();
+
+ QQmlListProperty<QQuickMenu> menus();
+ QQmlListProperty<QObject> contentData();
+
+Q_SIGNALS:
+ void delegateChanged();
+ void contentWidthChanged();
+ void contentHeightChanged();
+ void menusChanged();
+
+protected:
+ void updatePolish() override;
+ void componentComplete() override;
+
+ bool eventFilter(QObject *object, QEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
+ void hoverLeaveEvent(QHoverEvent *event) override;
+
+ bool isContent(QQuickItem *item) const override;
+ void itemAdded(int index, QQuickItem *item) override;
+ void itemMoved(int index, QQuickItem *item) override;
+ void itemRemoved(int index, QQuickItem *item) override;
+
+ QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
+
+#if QT_CONFIG(accessibility)
+ QAccessible::Role accessibleRole() const override;
+#endif
+
+private:
+ Q_DISABLE_COPY(QQuickMenuBar)
+ Q_DECLARE_PRIVATE(QQuickMenuBar)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickMenuBar)
+
+#endif // QQUICKMENUBAR_P_H
diff --git a/src/quicktemplates2/qquickmenubar_p_p.h b/src/quicktemplates2/qquickmenubar_p_p.h
new file mode 100644
index 00000000..161806fb
--- /dev/null
+++ b/src/quicktemplates2/qquickmenubar_p_p.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKMENUBAR_P_P_H
+#define QQUICKMENUBAR_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuickTemplates2/private/qquickmenubar_p.h>
+#include <QtQuickTemplates2/private/qquickcontainer_p_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQmlComponent;
+class QQuickMenuBarItem;
+
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuBarPrivate : public QQuickContainerPrivate
+{
+ Q_DECLARE_PUBLIC(QQuickMenuBar)
+
+public:
+ QQuickMenuBarPrivate();
+
+ static QQuickMenuBarPrivate *get(QQuickMenuBar *menuBar)
+ {
+ return menuBar->d_func();
+ }
+
+ QQuickItem *beginCreateItem();
+ void completeCreateItem();
+
+ QQuickItem *createItem(QQuickMenu *menu);
+
+ void toggleCurrentMenu(bool visible, bool activate);
+ void activateItem(QQuickMenuBarItem *item);
+ void activateNextItem();
+ void activatePreviousItem();
+
+ void onItemHovered();
+ void onItemTriggered();
+ void onMenuAboutToHide();
+
+ void updateContentSize();
+ void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override;
+
+ static void contentData_append(QQmlListProperty<QObject> *prop, QObject *obj);
+
+ static void menus_append(QQmlListProperty<QQuickMenu> *prop, QQuickMenu *obj);
+ static int menus_count(QQmlListProperty<QQuickMenu> *prop);
+ static QQuickMenu *menus_at(QQmlListProperty<QQuickMenu> *prop, int index);
+ static void menus_clear(QQmlListProperty<QQuickMenu> *prop);
+
+ bool popupMode;
+ bool triggering;
+ bool hasContentWidth;
+ bool hasContentHeight;
+ qreal contentWidth;
+ qreal contentHeight;
+ QQmlComponent *delegate;
+ QPointer<QQuickMenuBarItem> currentItem;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKMENUBAR_P_P_H
diff --git a/src/quicktemplates2/qquickmenubaritem.cpp b/src/quicktemplates2/qquickmenubaritem.cpp
new file mode 100644
index 00000000..cbf490b8
--- /dev/null
+++ b/src/quicktemplates2/qquickmenubaritem.cpp
@@ -0,0 +1,185 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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 "qquickmenubaritem_p.h"
+#include "qquickmenubaritem_p_p.h"
+#include "qquickmenubar_p.h"
+#include "qquickmenu_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmltype MenuBarItem
+ \inherits AbstractButton
+ \instantiates QQuickMenuBarItem
+ \inqmlmodule QtQuick.Controls
+ \since 5.10
+ \ingroup qtquickcontrols2-menus
+ \brief Presents a drop-down menu within a MenuBar.
+
+ MenuBarItem presents a Menu within a MenuBar. The respective drop-down menu
+ is shown when a MenuBarItem is \l triggered via keyboard, mouse, or touch.
+
+ \image qtquickcontrols2-menubar.png
+
+ MenuBarItem is used as a default \l {MenuBar::}{delegate} type for MenuBar.
+ Notice that it is not necessary to declare MenuBarItem instances by hand when
+ using MenuBar. It is sufficient to declare Menu instances as children of the
+ MenuBar and the respective items are created automatically.
+
+ \sa {Customizing MenuBar}, MenuBar, {Menu Controls}
+*/
+
+/*!
+ \qmlsignal void QtQuick.Controls::MenuBarItem::triggered()
+
+ This signal is emitted when the menu bar item is triggered by the user.
+*/
+
+void QQuickMenuBarItemPrivate::setMenuBar(QQuickMenuBar *newMenuBar)
+{
+ Q_Q(QQuickMenuBarItem);
+ if (menuBar == newMenuBar)
+ return;
+
+ menuBar = newMenuBar;
+ emit q->menuBarChanged();
+}
+
+QQuickMenuBarItem::QQuickMenuBarItem(QQuickItem *parent)
+ : QQuickAbstractButton(*(new QQuickMenuBarItemPrivate), parent)
+{
+ setFocusPolicy(Qt::NoFocus);
+ connect(this, &QQuickAbstractButton::clicked, this, &QQuickMenuBarItem::triggered);
+}
+
+/*!
+ \qmlproperty Menu QtQuick.Controls::MenuBarItem::menuBar
+ \readonly
+
+ This property holds the menu bar that contains this item,
+ or \c null if the item is not in a menu bar.
+*/
+QQuickMenuBar *QQuickMenuBarItem::menuBar() const
+{
+ Q_D(const QQuickMenuBarItem);
+ return d->menuBar;
+}
+
+/*!
+ \qmlproperty Menu QtQuick.Controls::MenuBarItem::menu
+
+ This property holds the menu that this item presents in a
+ menu bar, or \c null if this item does not have a menu.
+*/
+QQuickMenu *QQuickMenuBarItem::menu() const
+{
+ Q_D(const QQuickMenuBarItem);
+ return d->menu;
+}
+
+void QQuickMenuBarItem::setMenu(QQuickMenu *menu)
+{
+ Q_D(QQuickMenuBarItem);
+ if (d->menu == menu)
+ return;
+
+ if (d->menu)
+ disconnect(d->menu, &QQuickMenu::titleChanged, this, &QQuickAbstractButton::setText);
+
+ if (menu) {
+ setText(menu->title());
+ menu->setY(height());
+ menu->setParentItem(this);
+ menu->setClosePolicy(QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutsideParent | QQuickPopup::CloseOnReleaseOutsideParent);
+ connect(menu, &QQuickMenu::titleChanged, this, &QQuickAbstractButton::setText);
+ }
+
+ d->menu = menu;
+ emit menuChanged();
+}
+
+/*!
+ \qmlproperty bool QtQuick.Controls::MenuBarItem::highlighted
+
+ This property holds whether the menu bar item is highlighted by the user.
+
+ A menu bar item can be highlighted by mouse hover or keyboard navigation.
+
+ The default value is \c false.
+*/
+bool QQuickMenuBarItem::isHighlighted() const
+{
+ Q_D(const QQuickMenuBarItem);
+ return d->highlighted;
+}
+
+void QQuickMenuBarItem::setHighlighted(bool highlighted)
+{
+ Q_D(QQuickMenuBarItem);
+ if (highlighted == d->highlighted)
+ return;
+
+ d->highlighted = highlighted;
+ emit highlightedChanged();
+}
+
+void QQuickMenuBarItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
+{
+ Q_D(QQuickMenuBarItem);
+ QQuickAbstractButton::geometryChanged(newGeometry, oldGeometry);
+ if (d->menu)
+ d->menu->setY(newGeometry.height());
+}
+
+QFont QQuickMenuBarItem::defaultFont() const
+{
+ return QQuickControlPrivate::themeFont(QPlatformTheme::MenuBarFont);
+}
+
+QPalette QQuickMenuBarItem::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::MenuBarPalette);
+}
+
+#if QT_CONFIG(accessibility)
+QAccessible::Role QQuickMenuBarItem::accessibleRole() const
+{
+ return QAccessible::MenuBar;
+}
+#endif
+
+QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickmenubaritem_p.h b/src/quicktemplates2/qquickmenubaritem_p.h
new file mode 100644
index 00000000..86cd6a6a
--- /dev/null
+++ b/src/quicktemplates2/qquickmenubaritem_p.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKMENUBARITEM_P_H
+#define QQUICKMENUBARITEM_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuickTemplates2/private/qquickabstractbutton_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickMenu;
+class QQuickMenuBar;
+class QQuickMenuBarItemPrivate;
+
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuBarItem : public QQuickAbstractButton
+{
+ Q_OBJECT
+ Q_PROPERTY(QQuickMenuBar *menuBar READ menuBar NOTIFY menuBarChanged FINAL)
+ Q_PROPERTY(QQuickMenu *menu READ menu WRITE setMenu NOTIFY menuChanged FINAL)
+ Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
+
+public:
+ explicit QQuickMenuBarItem(QQuickItem *parent = nullptr);
+
+ QQuickMenuBar *menuBar() const;
+
+ QQuickMenu *menu() const;
+ void setMenu(QQuickMenu *menu);
+
+ bool isHighlighted() const;
+ void setHighlighted(bool highlighted);
+
+Q_SIGNALS:
+ void triggered();
+ void menuBarChanged();
+ void menuChanged();
+ void highlightedChanged();
+
+protected:
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+
+ QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
+
+#if QT_CONFIG(accessibility)
+ QAccessible::Role accessibleRole() const override;
+#endif
+
+private:
+ Q_DISABLE_COPY(QQuickMenuBarItem)
+ Q_DECLARE_PRIVATE(QQuickMenuBarItem)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickMenuBarItem)
+
+#endif // QQUICKMENUBARITEM_P_H
diff --git a/src/quicktemplates2/qquickmenubaritem_p_p.h b/src/quicktemplates2/qquickmenubaritem_p_p.h
new file mode 100644
index 00000000..bd4c3a43
--- /dev/null
+++ b/src/quicktemplates2/qquickmenubaritem_p_p.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKMENUBARITEM_P_P_H
+#define QQUICKMENUBARITEM_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuickTemplates2/private/qquickmenubaritem_p.h>
+#include <QtQuickTemplates2/private/qquickabstractbutton_p_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickMenu;
+class QQuickMenuBar;
+
+class QQuickMenuBarItemPrivate : public QQuickAbstractButtonPrivate
+{
+ Q_DECLARE_PUBLIC(QQuickMenuBarItem)
+
+public:
+ QQuickMenuBarItemPrivate()
+ : highlighted(false),
+ menu(nullptr),
+ menuBar(nullptr)
+ {
+ }
+
+ static QQuickMenuBarItemPrivate *get(QQuickMenuBarItem *item)
+ {
+ return item->d_func();
+ }
+
+ void setMenuBar(QQuickMenuBar *menuBar);
+
+ bool highlighted;
+ QQuickMenu *menu;
+ QQuickMenuBar *menuBar;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKMENUBARITEM_P_P_H
diff --git a/src/quicktemplates2/qquickmenuitem.cpp b/src/quicktemplates2/qquickmenuitem.cpp
index e15640fb..f71b9c35 100644
--- a/src/quicktemplates2/qquickmenuitem.cpp
+++ b/src/quicktemplates2/qquickmenuitem.cpp
@@ -35,7 +35,8 @@
****************************************************************************/
#include "qquickmenuitem_p.h"
-#include "qquickabstractbutton_p_p.h"
+#include "qquickmenuitem_p_p.h"
+#include "qquickmenu_p.h"
#include <QtGui/qpa/qplatformtheme.h>
#include <QtQuick/private/qquickevents_p_p.h>
@@ -55,6 +56,10 @@ QT_BEGIN_NAMESPACE
providing a familiar way to respond to menu items being \l triggered, for
example.
+ MenuItem inherits its API from AbstractButton. For instance, you can set
+ \l {AbstractButton::text}{text} and \l {Icons in Qt Quick Controls 2}{icon}
+ using the AbstractButton API.
+
\code
Button {
id: fileButton
@@ -80,22 +85,53 @@ QT_BEGIN_NAMESPACE
}
\endcode
- \sa {Customizing MenuItem}, {Menu Controls}
+ \sa {Customizing Menu}, Menu, {Menu Controls}
*/
-class QQuickMenuItemPrivate : public QQuickAbstractButtonPrivate
+QQuickMenuItemPrivate::QQuickMenuItemPrivate()
+ : highlighted(false),
+ arrow(nullptr),
+ menu(nullptr),
+ subMenu(nullptr)
{
- Q_DECLARE_PUBLIC(QQuickMenuItem)
+}
-public:
- QQuickMenuItemPrivate();
+void QQuickMenuItemPrivate::setMenu(QQuickMenu *newMenu)
+{
+ Q_Q(QQuickMenuItem);
+ if (menu == newMenu)
+ return;
- bool highlighted;
-};
+ menu = newMenu;
+ emit q->menuChanged();
+}
-QQuickMenuItemPrivate::QQuickMenuItemPrivate()
- : highlighted(false)
+void QQuickMenuItemPrivate::setSubMenu(QQuickMenu *newSubMenu)
{
+ Q_Q(QQuickMenuItem);
+ if (subMenu == newSubMenu)
+ return;
+
+ if (subMenu) {
+ QObject::disconnect(subMenu, &QQuickMenu::titleChanged, q, &QQuickAbstractButton::setText);
+ QObjectPrivate::disconnect(subMenu, &QQuickPopup::enabledChanged, this, &QQuickMenuItemPrivate::updateEnabled);
+ }
+
+ if (newSubMenu) {
+ QObject::connect(newSubMenu, &QQuickMenu::titleChanged, q, &QQuickAbstractButton::setText);
+ QObjectPrivate::connect(newSubMenu, &QQuickPopup::enabledChanged, this, &QQuickMenuItemPrivate::updateEnabled);
+ q->setText(newSubMenu->title());
+ }
+
+ subMenu = newSubMenu;
+ updateEnabled();
+ emit q->subMenuChanged();
+}
+
+void QQuickMenuItemPrivate::updateEnabled()
+{
+ Q_Q(QQuickMenuItem);
+ q->setEnabled(subMenu && subMenu->isEnabled());
}
/*!
@@ -110,20 +146,16 @@ QQuickMenuItem::QQuickMenuItem(QQuickItem *parent)
connect(this, &QQuickAbstractButton::clicked, this, &QQuickMenuItem::triggered);
}
-QFont QQuickMenuItem::defaultFont() const
-{
- return QQuickControlPrivate::themeFont(QPlatformTheme::MenuItemFont);
-}
-
/*!
\qmlproperty bool QtQuick.Controls::MenuItem::highlighted
- This property holds whether the menu item is highlighted.
+ This property holds whether the menu item is highlighted by the user.
- A menu item can be highlighted in order to draw the user's attention
- towards it. It has no effect on keyboard interaction.
+ A menu item can be highlighted by mouse hover or keyboard navigation.
The default value is \c false.
+
+ \sa Menu::currentIndex
*/
bool QQuickMenuItem::isHighlighted() const
{
@@ -141,6 +173,71 @@ void QQuickMenuItem::setHighlighted(bool highlighted)
emit highlightedChanged();
}
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty Item QtQuick.Controls::MenuItem::arrow
+
+ This property holds the sub-menu arrow item.
+
+ \sa {Customizing Menu}
+*/
+QQuickItem *QQuickMenuItem::arrow() const
+{
+ Q_D(const QQuickMenuItem);
+ return d->arrow;
+}
+
+void QQuickMenuItem::setArrow(QQuickItem *arrow)
+{
+ Q_D(QQuickMenuItem);
+ if (d->arrow == arrow)
+ return;
+
+ QQuickControlPrivate::destroyDelegate(d->arrow, this);
+ d->arrow = arrow;
+ if (arrow && !arrow->parentItem())
+ arrow->setParentItem(this);
+ emit arrowChanged();
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty Menu QtQuick.Controls::MenuItem::menu
+ \readonly
+
+ This property holds the menu that contains this menu item,
+ or \c null if the item is not in a menu.
+*/
+QQuickMenu *QQuickMenuItem::menu() const
+{
+ Q_D(const QQuickMenuItem);
+ return d->menu;
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty Menu QtQuick.Controls::MenuItem::subMenu
+ \readonly
+
+ This property holds the sub-menu that this item presents in
+ the parent menu, or \c null if this item is not a sub-menu item.
+*/
+QQuickMenu *QQuickMenuItem::subMenu() const
+{
+ Q_D(const QQuickMenuItem);
+ return d->subMenu;
+}
+
+QFont QQuickMenuItem::defaultFont() const
+{
+ return QQuickControlPrivate::themeFont(QPlatformTheme::MenuItemFont);
+}
+
+QPalette QQuickMenuItem::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::MenuPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickMenuItem::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickmenuitem_p.h b/src/quicktemplates2/qquickmenuitem_p.h
index 76f41f9d..8af3cbd1 100644
--- a/src/quicktemplates2/qquickmenuitem_p.h
+++ b/src/quicktemplates2/qquickmenuitem_p.h
@@ -52,12 +52,17 @@
QT_BEGIN_NAMESPACE
+class QQuickMenu;
class QQuickMenuItemPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuItem : public QQuickAbstractButton
{
Q_OBJECT
Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(QQuickItem *arrow READ arrow WRITE setArrow NOTIFY arrowChanged FINAL REVISION 3)
+ Q_PROPERTY(QQuickMenu *menu READ menu NOTIFY menuChanged FINAL REVISION 3)
+ Q_PROPERTY(QQuickMenu *subMenu READ subMenu NOTIFY subMenuChanged FINAL REVISION 3)
public:
explicit QQuickMenuItem(QQuickItem *parent = nullptr);
@@ -65,12 +70,24 @@ public:
bool isHighlighted() const;
void setHighlighted(bool highlighted);
+ // 2.3 (Qt 5.10)
+ QQuickItem *arrow() const;
+ void setArrow(QQuickItem *arrow);
+
+ QQuickMenu *menu() const;
+ QQuickMenu *subMenu() const;
+
Q_SIGNALS:
void triggered();
void highlightedChanged();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void arrowChanged();
+ Q_REVISION(3) void menuChanged();
+ Q_REVISION(3) void subMenuChanged();
protected:
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
diff --git a/src/quicktemplates2/qquickmenuitem_p_p.h b/src/quicktemplates2/qquickmenuitem_p_p.h
new file mode 100644
index 00000000..e0e90ff1
--- /dev/null
+++ b/src/quicktemplates2/qquickmenuitem_p_p.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKMENUITEM_P_P_H
+#define QQUICKMENUITEM_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuickTemplates2/private/qquickmenuitem_p.h>
+#include <QtQuickTemplates2/private/qquickabstractbutton_p_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickMenu;
+
+class QQuickMenuItemPrivate : public QQuickAbstractButtonPrivate
+{
+ Q_DECLARE_PUBLIC(QQuickMenuItem)
+
+public:
+ QQuickMenuItemPrivate();
+
+ static QQuickMenuItemPrivate *get(QQuickMenuItem *item)
+ {
+ return item->d_func();
+ }
+
+ void setMenu(QQuickMenu *menu);
+ void setSubMenu(QQuickMenu *subMenu);
+
+ void updateEnabled();
+
+ bool highlighted;
+ QQuickItem *arrow;
+ QQuickMenu *menu;
+ QQuickMenu *subMenu;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKMENUITEM_P_P_H
diff --git a/src/quicktemplates2/qquickmenuseparator.cpp b/src/quicktemplates2/qquickmenuseparator.cpp
index 366f0a27..dee5287a 100644
--- a/src/quicktemplates2/qquickmenuseparator.cpp
+++ b/src/quicktemplates2/qquickmenuseparator.cpp
@@ -35,6 +35,7 @@
****************************************************************************/
#include "qquickmenuseparator_p.h"
+#include "qquickcontrol_p_p.h"
QT_BEGIN_NAMESPACE
@@ -62,7 +63,7 @@ QT_BEGIN_NAMESPACE
\printuntil }
\printuntil }
- \sa {Customizing MenuSeparator}, {Separator Controls}
+ \sa {Customizing Menu}, Menu, {Separator Controls}
*/
QQuickMenuSeparator::QQuickMenuSeparator(QQuickItem *parent)
@@ -70,6 +71,11 @@ QQuickMenuSeparator::QQuickMenuSeparator(QQuickItem *parent)
{
}
+QPalette QQuickMenuSeparator::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::MenuPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickMenuSeparator::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickmenuseparator_p.h b/src/quicktemplates2/qquickmenuseparator_p.h
index 42147f77..002b68ba 100644
--- a/src/quicktemplates2/qquickmenuseparator_p.h
+++ b/src/quicktemplates2/qquickmenuseparator_p.h
@@ -60,6 +60,8 @@ public:
explicit QQuickMenuSeparator(QQuickItem *parent = nullptr);
protected:
+ QPalette defaultPalette() const override;
+
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
#endif
diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp
index f30f6a5e..38f7949e 100644
--- a/src/quicktemplates2/qquickoverlay.cpp
+++ b/src/quicktemplates2/qquickoverlay.cpp
@@ -47,102 +47,42 @@
QT_BEGIN_NAMESPACE
-void QQuickOverlayPrivate::popupAboutToShow()
-{
- Q_Q(QQuickOverlay);
- QQuickPopup *popup = qobject_cast<QQuickPopup *>(q->sender());
- if (!popup || !popup->dim())
- return;
-
- // use QQmlProperty instead of QQuickItem::setOpacity() to trigger QML Behaviors
- QQuickPopupPrivate *p = QQuickPopupPrivate::get(popup);
- if (p->dimmer)
- QQmlProperty::write(p->dimmer, QStringLiteral("opacity"), 1.0);
-}
-
-void QQuickOverlayPrivate::popupAboutToHide()
-{
- Q_Q(QQuickOverlay);
- QQuickPopup *popup = qobject_cast<QQuickPopup *>(q->sender());
- if (!popup || !popup->dim())
- return;
-
- // use QQmlProperty instead of QQuickItem::setOpacity() to trigger QML Behaviors
- QQuickPopupPrivate *p = QQuickPopupPrivate::get(popup);
- if (p->dimmer)
- QQmlProperty::write(p->dimmer, QStringLiteral("opacity"), 0.0);
-}
-
-static QQuickItem *createDimmer(QQmlComponent *component, QQuickPopup *popup, QQuickItem *parent)
-{
- QQuickItem *item = nullptr;
- if (component) {
- QQmlContext *creationContext = component->creationContext();
- if (!creationContext)
- creationContext = qmlContext(popup);
- QQmlContext *context = new QQmlContext(creationContext, popup);
- context->setContextObject(popup);
- item = qobject_cast<QQuickItem*>(component->beginCreate(context));
- }
-
- // when there is no overlay component available (with plain QQuickWindow),
- // use a plain QQuickItem as a fallback to block hover events
- if (!item && popup->isModal())
- item = new QQuickItem;
-
- if (item) {
- item->setOpacity(popup->isVisible() ? 1.0 : 0.0);
- item->setParentItem(parent);
- item->stackBefore(popup->popupItem());
- item->setZ(popup->z());
- if (popup->isModal()) {
- item->setAcceptedMouseButtons(Qt::AllButtons);
-#if QT_CONFIG(cursor)
- item->setCursor(Qt::ArrowCursor);
-#endif
-#if QT_CONFIG(quicktemplates2_hover)
- // TODO: switch to QStyleHints::useHoverEffects in Qt 5.8
- item->setAcceptHoverEvents(true);
- // item->setAcceptHoverEvents(QGuiApplication::styleHints()->useHoverEffects());
- // connect(QGuiApplication::styleHints(), &QStyleHints::useHoverEffectsChanged, item, &QQuickItem::setAcceptHoverEvents);
-#endif
+/*!
+ \qmltype Overlay
+ \inherits Item
+ \instantiates QQuickOverlay
+ \inqmlmodule QtQuick.Controls
+ \since 5.10
+ \brief A window overlay for popups.
+
+ Overlay provides a layer for popups, ensuring that popups are displayed above
+ other content and that the background is dimmed when a \l {Popup::}{modal} or
+ \l {Popup::dim}{dimmed} popup is visible.
+
+ The overlay is an ordinary Item that covers the entire window. It can be used
+ as a visual parent to position a popup in scene coordinates. The following
+ example uses the attached \c overlay property to position a popup to the center
+ of the window, despite the position of the button that opens the popup.
+
+ \code
+ Button {
+ onClicked: popup.open()
+
+ Popup {
+ id: popup
+
+ parent: Overlay.overlay
+
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 100
+ height: 100
}
- if (component)
- component->completeCreate();
}
- return item;
-}
+ \endcode
-void QQuickOverlayPrivate::createOverlay(QQuickPopup *popup)
-{
- Q_Q(QQuickOverlay);
- QQuickPopupPrivate *p = QQuickPopupPrivate::get(popup);
- if (!p->dimmer)
- p->dimmer = createDimmer(popup->isModal() ? modal : modeless, popup, q);
- p->resizeOverlay();
-}
-
-void QQuickOverlayPrivate::destroyOverlay(QQuickPopup *popup)
-{
- QQuickPopupPrivate *p = QQuickPopupPrivate::get(popup);
- if (p->dimmer) {
- p->dimmer->setParentItem(nullptr);
- p->dimmer->deleteLater();
- p->dimmer = nullptr;
- }
-}
-
-void QQuickOverlayPrivate::toggleOverlay()
-{
- Q_Q(QQuickOverlay);
- QQuickPopup *popup = qobject_cast<QQuickPopup *>(q->sender());
- if (!popup)
- return;
-
- destroyOverlay(popup);
- if (popup->dim())
- createOverlay(popup);
-}
+ \sa ApplicationWindow
+*/
QVector<QQuickPopup *> QQuickOverlayPrivate::stackingOrderPopups() const
{
@@ -461,37 +401,18 @@ QQuickOverlay *QQuickOverlay::overlay(QQuickWindow *window)
return overlay;
}
+QQuickOverlayAttached *QQuickOverlay::qmlAttachedProperties(QObject *object)
+{
+ return new QQuickOverlayAttached(object);
+}
+
void QQuickOverlay::itemChange(ItemChange change, const ItemChangeData &data)
{
Q_D(QQuickOverlay);
QQuickItem::itemChange(change, data);
- QQuickPopup *popup = nullptr;
- if (change == ItemChildAddedChange || change == ItemChildRemovedChange) {
- popup = qobject_cast<QQuickPopup *>(data.item->parent());
+ if (change == ItemChildAddedChange || change == ItemChildRemovedChange)
setVisible(!d->allDrawers.isEmpty() || !childItems().isEmpty());
- }
- if (!popup)
- return;
-
- if (change == ItemChildAddedChange) {
- if (popup->dim())
- d->createOverlay(popup);
- QObjectPrivate::connect(popup, &QQuickPopup::dimChanged, d, &QQuickOverlayPrivate::toggleOverlay);
- QObjectPrivate::connect(popup, &QQuickPopup::modalChanged, d, &QQuickOverlayPrivate::toggleOverlay);
- if (!qobject_cast<QQuickDrawer *>(popup)) {
- QObjectPrivate::connect(popup, &QQuickPopup::aboutToShow, d, &QQuickOverlayPrivate::popupAboutToShow);
- QObjectPrivate::connect(popup, &QQuickPopup::aboutToHide, d, &QQuickOverlayPrivate::popupAboutToHide);
- }
- } else if (change == ItemChildRemovedChange) {
- d->destroyOverlay(popup);
- QObjectPrivate::disconnect(popup, &QQuickPopup::dimChanged, d, &QQuickOverlayPrivate::toggleOverlay);
- QObjectPrivate::disconnect(popup, &QQuickPopup::modalChanged, d, &QQuickOverlayPrivate::toggleOverlay);
- if (!qobject_cast<QQuickDrawer *>(popup)) {
- QObjectPrivate::disconnect(popup, &QQuickPopup::aboutToShow, d, &QQuickOverlayPrivate::popupAboutToShow);
- QObjectPrivate::disconnect(popup, &QQuickPopup::aboutToHide, d, &QQuickOverlayPrivate::popupAboutToHide);
- }
- }
}
void QQuickOverlay::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
@@ -654,4 +575,149 @@ bool QQuickOverlay::eventFilter(QObject *object, QEvent *event)
return false;
}
+class QQuickOverlayAttachedPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QQuickOverlayAttached)
+
+public:
+ QQuickOverlayAttachedPrivate()
+ : window(nullptr),
+ modal(nullptr),
+ modeless(nullptr)
+ {
+ }
+
+ void setWindow(QQuickWindow *newWindow);
+
+ QQuickWindow *window;
+ QQmlComponent *modal;
+ QQmlComponent *modeless;
+};
+
+void QQuickOverlayAttachedPrivate::setWindow(QQuickWindow *newWindow)
+{
+ Q_Q(QQuickOverlayAttached);
+ if (window == newWindow)
+ return;
+
+ if (QQuickOverlay *oldOverlay = QQuickOverlay::overlay(window)) {
+ QObject::disconnect(oldOverlay, &QQuickOverlay::pressed, q, &QQuickOverlayAttached::pressed);
+ QObject::disconnect(oldOverlay, &QQuickOverlay::released, q, &QQuickOverlayAttached::released);
+ }
+
+ if (QQuickOverlay *newOverlay = QQuickOverlay::overlay(newWindow)) {
+ QObject::connect(newOverlay, &QQuickOverlay::pressed, q, &QQuickOverlayAttached::pressed);
+ QObject::connect(newOverlay, &QQuickOverlay::released, q, &QQuickOverlayAttached::released);
+ }
+
+ window = newWindow;
+ emit q->overlayChanged();
+}
+
+/*!
+ \qmlattachedsignal QtQuick.Controls::Overlay::pressed()
+
+ This attached signal is emitted when the overlay is pressed by the user while
+ a popup is visible.
+
+ The signal can be attached to any item, popup, or window. When attached to an
+ item or a popup, the signal is only emitted if the item or popup is in a window.
+*/
+
+/*!
+ \qmlattachedsignal QtQuick.Controls::Overlay::released()
+
+ This attached signal is emitted when the overlay is released by the user while
+ a popup is visible.
+
+ The signal can be attached to any item, popup, or window. When attached to an
+ item or a popup, the signal is only emitted if the item or popup is in a window.
+*/
+
+QQuickOverlayAttached::QQuickOverlayAttached(QObject *parent)
+ : QObject(*(new QQuickOverlayAttachedPrivate), parent)
+{
+ Q_D(QQuickOverlayAttached);
+ if (QQuickItem *item = qobject_cast<QQuickItem *>(parent)) {
+ d->setWindow(item->window());
+ QObjectPrivate::connect(item, &QQuickItem::windowChanged, d, &QQuickOverlayAttachedPrivate::setWindow);
+ } else if (QQuickPopup *popup = qobject_cast<QQuickPopup *>(parent)) {
+ d->setWindow(popup->window());
+ QObjectPrivate::connect(popup, &QQuickPopup::windowChanged, d, &QQuickOverlayAttachedPrivate::setWindow);
+ } else {
+ d->setWindow(qobject_cast<QQuickWindow *>(parent));
+ }
+}
+
+/*!
+ \qmlattachedproperty Overlay QtQuick.Controls::Overlay::overlay
+ \readonly
+
+ This attached property holds the window overlay item.
+
+ The property can be attached to any item, popup, or window. When attached to an
+ item or a popup, the value is \c null if the item or popup is not in a window.
+*/
+QQuickOverlay *QQuickOverlayAttached::overlay() const
+{
+ Q_D(const QQuickOverlayAttached);
+ return QQuickOverlay::overlay(d->window);
+}
+
+/*!
+ \qmlattachedproperty Component QtQuick.Controls::Overlay::modal
+
+ This attached property holds a component to use as a visual item that implements
+ background dimming for modal popups. It is created for and stacked below visible
+ modal popups.
+
+ The property can be attached to any popup.
+
+ \sa Popup::modal
+*/
+QQmlComponent *QQuickOverlayAttached::modal() const
+{
+ Q_D(const QQuickOverlayAttached);
+ return d->modal;
+}
+
+void QQuickOverlayAttached::setModal(QQmlComponent *modal)
+{
+ Q_D(QQuickOverlayAttached);
+ if (d->modal == modal)
+ return;
+
+ delete d->modal;
+ d->modal = modal;
+ emit modalChanged();
+}
+
+/*!
+ \qmlattachedproperty Component QtQuick.Controls::Overlay::modeless
+
+ This attached property holds a component to use as a visual item that implements
+ background dimming for modeless popups. It is created for and stacked below visible
+ dimming popups.
+
+ The property can be attached to any popup.
+
+ \sa Popup::dim
+*/
+QQmlComponent *QQuickOverlayAttached::modeless() const
+{
+ Q_D(const QQuickOverlayAttached);
+ return d->modeless;
+}
+
+void QQuickOverlayAttached::setModeless(QQmlComponent *modeless)
+{
+ Q_D(QQuickOverlayAttached);
+ if (d->modeless == modeless)
+ return;
+
+ delete d->modeless;
+ d->modeless = modeless;
+ emit modelessChanged();
+}
+
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickoverlay_p.h b/src/quicktemplates2/qquickoverlay_p.h
index ba61c9c9..0d8bccf5 100644
--- a/src/quicktemplates2/qquickoverlay_p.h
+++ b/src/quicktemplates2/qquickoverlay_p.h
@@ -55,6 +55,8 @@ QT_BEGIN_NAMESPACE
class QQmlComponent;
class QQuickOverlayPrivate;
+class QQuickOverlayAttached;
+class QQuickOverlayAttachedPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickOverlay : public QQuickItem
{
@@ -74,6 +76,8 @@ public:
static QQuickOverlay *overlay(QQuickWindow *window);
+ static QQuickOverlayAttached *qmlAttachedProperties(QObject *object);
+
Q_SIGNALS:
void modalChanged();
void modelessChanged();
@@ -101,8 +105,39 @@ private:
Q_DECLARE_PRIVATE(QQuickOverlay)
};
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickOverlayAttached : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QQuickOverlay *overlay READ overlay NOTIFY overlayChanged FINAL)
+ Q_PROPERTY(QQmlComponent *modal READ modal WRITE setModal NOTIFY modalChanged FINAL)
+ Q_PROPERTY(QQmlComponent *modeless READ modeless WRITE setModeless NOTIFY modelessChanged FINAL)
+
+public:
+ explicit QQuickOverlayAttached(QObject *parent = nullptr);
+
+ QQuickOverlay *overlay() const;
+
+ QQmlComponent *modal() const;
+ void setModal(QQmlComponent *modal);
+
+ QQmlComponent *modeless() const;
+ void setModeless(QQmlComponent *modeless);
+
+Q_SIGNALS:
+ void overlayChanged();
+ void modalChanged();
+ void modelessChanged();
+ void pressed();
+ void released();
+
+private:
+ Q_DISABLE_COPY(QQuickOverlayAttached)
+ Q_DECLARE_PRIVATE(QQuickOverlayAttached)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickOverlay)
+QML_DECLARE_TYPEINFO(QQuickOverlay, QML_HAS_ATTACHED_PROPERTIES)
#endif // QQUICKOVERLAY_P_H
diff --git a/src/quicktemplates2/qquickoverlay_p_p.h b/src/quicktemplates2/qquickoverlay_p_p.h
index dfedf7c0..a290ecc2 100644
--- a/src/quicktemplates2/qquickoverlay_p_p.h
+++ b/src/quicktemplates2/qquickoverlay_p_p.h
@@ -48,7 +48,7 @@
// We mean it.
//
-#include "qquickoverlay_p.h"
+#include <QtQuickTemplates2/private/qquickoverlay_p.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qquickitemchangelistener_p.h>
@@ -84,13 +84,6 @@ public:
void removePopup(QQuickPopup *popup);
void setMouseGrabberPopup(QQuickPopup *popup);
- void popupAboutToShow();
- void popupAboutToHide();
-
- void createOverlay(QQuickPopup *popup);
- void destroyOverlay(QQuickPopup *popup);
- void toggleOverlay();
-
QVector<QQuickPopup *> stackingOrderPopups() const;
QVector<QQuickDrawer *> stackingOrderDrawers() const;
diff --git a/src/quicktemplates2/qquickpalette.cpp b/src/quicktemplates2/qquickpalette.cpp
new file mode 100644
index 00000000..018d6fdc
--- /dev/null
+++ b/src/quicktemplates2/qquickpalette.cpp
@@ -0,0 +1,326 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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 "qquickpalette_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QColor QQuickPalette::alternateBase() const
+{
+ return v.color(QPalette::AlternateBase);
+}
+
+void QQuickPalette::setAlternateBase(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::AlternateBase, color);
+}
+
+void QQuickPalette::resetAlternateBase()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::AlternateBase));
+}
+
+QColor QQuickPalette::base() const
+{
+ return v.color(QPalette::Base);
+}
+
+void QQuickPalette::setBase(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Base, color);
+}
+
+void QQuickPalette::resetBase()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Base));
+}
+
+QColor QQuickPalette::brightText() const
+{
+ return v.color(QPalette::BrightText);
+}
+
+void QQuickPalette::setBrightText(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::BrightText, color);
+}
+
+void QQuickPalette::resetBrightText()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::BrightText));
+}
+
+QColor QQuickPalette::button() const
+{
+ return v.color(QPalette::Button);
+}
+
+void QQuickPalette::setButton(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Button, color);
+}
+
+void QQuickPalette::resetButton()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Button));
+}
+
+QColor QQuickPalette::buttonText() const
+{
+ return v.color(QPalette::ButtonText);
+}
+
+void QQuickPalette::setButtonText(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::ButtonText, color);
+}
+
+void QQuickPalette::resetButtonText()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::ButtonText));
+}
+
+QColor QQuickPalette::dark() const
+{
+ return v.color(QPalette::Dark);
+}
+
+void QQuickPalette::setDark(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Dark, color);
+}
+
+void QQuickPalette::resetDark()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Dark));
+}
+
+QColor QQuickPalette::highlight() const
+{
+ return v.color(QPalette::Highlight);
+}
+
+void QQuickPalette::setHighlight(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Highlight, color);
+}
+
+void QQuickPalette::resetHighlight()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Highlight));
+}
+
+QColor QQuickPalette::highlightedText() const
+{
+ return v.color(QPalette::HighlightedText);
+}
+
+void QQuickPalette::setHighlightedText(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::HighlightedText, color);
+}
+
+void QQuickPalette::resetHighlightedText()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::HighlightedText));
+}
+
+QColor QQuickPalette::light() const
+{
+ return v.color(QPalette::Light);
+}
+
+void QQuickPalette::setLight(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Light, color);
+}
+
+void QQuickPalette::resetLight()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Light));
+}
+
+QColor QQuickPalette::link() const
+{
+ return v.color(QPalette::Link);
+}
+
+void QQuickPalette::setLink(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Link, color);
+}
+
+void QQuickPalette::resetLink()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Link));
+}
+
+QColor QQuickPalette::linkVisited() const
+{
+ return v.color(QPalette::LinkVisited);
+}
+
+void QQuickPalette::setLinkVisited(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::LinkVisited, color);
+}
+
+void QQuickPalette::resetLinkVisited()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::LinkVisited));
+}
+
+QColor QQuickPalette::mid() const
+{
+ return v.color(QPalette::Mid);
+}
+
+void QQuickPalette::setMid(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Mid, color);
+}
+
+void QQuickPalette::resetMid()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Mid));
+}
+
+QColor QQuickPalette::midlight() const
+{
+ return v.color(QPalette::Midlight);
+}
+
+void QQuickPalette::setMidlight(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Midlight, color);
+}
+
+void QQuickPalette::resetMidlight()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Midlight));
+}
+
+QColor QQuickPalette::shadow() const
+{
+ return v.color(QPalette::Shadow);
+}
+
+void QQuickPalette::setShadow(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Shadow, color);
+}
+
+void QQuickPalette::resetShadow()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Shadow));
+}
+
+QColor QQuickPalette::text() const
+{
+ return v.color(QPalette::Text);
+}
+
+void QQuickPalette::setText(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Text, color);
+}
+
+void QQuickPalette::resetText()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Text));
+}
+
+QColor QQuickPalette::toolTipBase() const
+{
+ return v.color(QPalette::ToolTipBase);
+}
+
+void QQuickPalette::setToolTipBase(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::ToolTipBase, color);
+}
+
+void QQuickPalette::resetToolTipBase()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::ToolTipBase));
+}
+
+QColor QQuickPalette::toolTipText() const
+{
+ return v.color(QPalette::ToolTipText);
+}
+
+void QQuickPalette::setToolTipText(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::ToolTipText, color);
+}
+
+void QQuickPalette::resetToolTipText()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::ToolTipText));
+}
+
+QColor QQuickPalette::window() const
+{
+ return v.color(QPalette::Window);
+}
+
+void QQuickPalette::setWindow(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::Window, color);
+}
+
+void QQuickPalette::resetWindow()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::Window));
+}
+
+QColor QQuickPalette::windowText() const
+{
+ return v.color(QPalette::WindowText);
+}
+
+void QQuickPalette::setWindowText(const QColor &color)
+{
+ v.setColor(QPalette::All, QPalette::WindowText, color);
+}
+
+void QQuickPalette::resetWindowText()
+{
+ v.resolve(v.resolve() & ~(1 << QPalette::WindowText));
+}
+
+QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickpalette_p.h b/src/quicktemplates2/qquickpalette_p.h
new file mode 100644
index 00000000..d43e78a6
--- /dev/null
+++ b/src/quicktemplates2/qquickpalette_p.h
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module 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$
+**
+****************************************************************************/
+
+#ifndef QQUICKPALETTE_P_H
+#define QQUICKPALETTE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtGui/qcolor.h>
+#include <QtGui/qpalette.h>
+#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPalette
+{
+ Q_GADGET
+ Q_PROPERTY(QColor alternateBase READ alternateBase WRITE setAlternateBase RESET resetAlternateBase FINAL)
+ Q_PROPERTY(QColor base READ base WRITE setBase RESET resetBase FINAL)
+ Q_PROPERTY(QColor brightText READ brightText WRITE setBrightText RESET resetBrightText FINAL)
+ Q_PROPERTY(QColor button READ button WRITE setButton RESET resetButton FINAL)
+ Q_PROPERTY(QColor buttonText READ buttonText WRITE setButtonText RESET resetButtonText FINAL)
+ Q_PROPERTY(QColor dark READ dark WRITE setDark RESET resetDark FINAL)
+ Q_PROPERTY(QColor highlight READ highlight WRITE setHighlight RESET resetHighlight FINAL)
+ Q_PROPERTY(QColor highlightedText READ highlightedText WRITE setHighlightedText RESET resetHighlightedText FINAL)
+ Q_PROPERTY(QColor light READ light WRITE setLight RESET resetLight FINAL)
+ Q_PROPERTY(QColor link READ link WRITE setLink RESET resetLink FINAL)
+ Q_PROPERTY(QColor linkVisited READ linkVisited WRITE setLinkVisited RESET resetLinkVisited FINAL)
+ Q_PROPERTY(QColor mid READ mid WRITE setMid RESET resetMid FINAL)
+ Q_PROPERTY(QColor midlight READ midlight WRITE setMidlight RESET resetMidlight FINAL)
+ Q_PROPERTY(QColor shadow READ shadow WRITE setShadow RESET resetShadow FINAL)
+ Q_PROPERTY(QColor text READ text WRITE setText RESET resetText FINAL)
+ Q_PROPERTY(QColor toolTipBase READ toolTipBase WRITE setToolTipBase RESET resetToolTipBase FINAL)
+ Q_PROPERTY(QColor toolTipText READ toolTipText WRITE setToolTipText RESET resetToolTipText FINAL)
+ Q_PROPERTY(QColor window READ window WRITE setWindow RESET resetWindow FINAL)
+ Q_PROPERTY(QColor windowText READ windowText WRITE setWindowText RESET resetWindowText FINAL)
+
+public:
+ QColor alternateBase() const;
+ void setAlternateBase(const QColor &color);
+ void resetAlternateBase();
+
+ QColor base() const;
+ void setBase(const QColor &color);
+ void resetBase();
+
+ QColor brightText() const;
+ void setBrightText(const QColor &color);
+ void resetBrightText();
+
+ QColor button() const;
+ void setButton(const QColor &color);
+ void resetButton();
+
+ QColor buttonText() const;
+ void setButtonText(const QColor &color);
+ void resetButtonText();
+
+ QColor dark() const;
+ void setDark(const QColor &color);
+ void resetDark();
+
+ QColor highlight() const;
+ void setHighlight(const QColor &color);
+ void resetHighlight();
+
+ QColor highlightedText() const;
+ void setHighlightedText(const QColor &color);
+ void resetHighlightedText();
+
+ QColor light() const;
+ void setLight(const QColor &color);
+ void resetLight();
+
+ QColor link() const;
+ void setLink(const QColor &color);
+ void resetLink();
+
+ QColor linkVisited() const;
+ void setLinkVisited(const QColor &color);
+ void resetLinkVisited();
+
+ QColor mid() const;
+ void setMid(const QColor &color);
+ void resetMid();
+
+ QColor midlight() const;
+ void setMidlight(const QColor &color);
+ void resetMidlight();
+
+ QColor shadow() const;
+ void setShadow(const QColor &color);
+ void resetShadow();
+
+ QColor text() const;
+ void setText(const QColor &color);
+ void resetText();
+
+ QColor toolTipBase() const;
+ void setToolTipBase(const QColor &color);
+ void resetToolTipBase();
+
+ QColor toolTipText() const;
+ void setToolTipText(const QColor &color);
+ void resetToolTipText();
+
+ QColor window() const;
+ void setWindow(const QColor &color);
+ void resetWindow();
+
+ QColor windowText() const;
+ void setWindowText(const QColor &color);
+ void resetWindowText();
+
+private:
+ QPalette v;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKPALETTE_P_H
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index ce4072e5..472d2124 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -203,6 +203,8 @@ QT_BEGIN_NAMESPACE
\sa closed()
*/
+static const QQuickPopup::ClosePolicy DefaultClosePolicy = QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutside;
+
QQuickPopupPrivate::QQuickPopupPrivate()
: focus(false),
modal(false),
@@ -225,6 +227,7 @@ QQuickPopupPrivate::QQuickPopupPrivate()
allowHorizontalResize(true),
hadActiveFocusBeforeExitTransition(false),
interactive(true),
+ hasClosePolicy(false),
touchId(-1),
x(0),
y(0),
@@ -238,7 +241,7 @@ QQuickPopupPrivate::QQuickPopupPrivate()
contentWidth(0),
contentHeight(0),
transitionState(QQuickPopupPrivate::NoTransition),
- closePolicy(QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutside),
+ closePolicy(DefaultClosePolicy),
parentItem(nullptr),
dimmer(nullptr),
window(nullptr),
@@ -260,6 +263,7 @@ void QQuickPopupPrivate::init()
popupItem = new QQuickPopupItem(q);
popupItem->setVisible(false);
q->setParentItem(qobject_cast<QQuickItem *>(parent));
+ QObject::connect(popupItem, &QQuickItem::enabledChanged, q, &QQuickPopup::enabledChanged);
QObject::connect(popupItem, &QQuickControl::paddingChanged, q, &QQuickPopup::paddingChanged);
QObject::connect(popupItem, &QQuickControl::contentItemChanged, q, &QQuickPopup::contentItemChanged);
positioner = new QQuickPopupPositioner(q);
@@ -425,6 +429,9 @@ bool QQuickPopupPrivate::prepareEnterTransition()
if (transitionState != EnterTransition) {
popupItem->setParentItem(QQuickOverlay::overlay(window));
+ if (dim)
+ createOverlay();
+ showOverlay();
emit q->aboutToShow();
visible = true;
transitionState = EnterTransition;
@@ -449,7 +456,9 @@ bool QQuickPopupPrivate::prepareExitTransition()
popupItem->setFocus(false);
}
transitionState = ExitTransition;
+ hideOverlay();
emit q->aboutToHide();
+ emit q->openedChanged();
}
return true;
}
@@ -460,6 +469,7 @@ void QQuickPopupPrivate::finalizeEnterTransition()
if (focus)
popupItem->setFocus(true);
transitionState = NoTransition;
+ emit q->openedChanged();
emit q->opened();
}
@@ -469,6 +479,7 @@ void QQuickPopupPrivate::finalizeExitTransition()
positioner->setParentItem(nullptr);
popupItem->setParentItem(nullptr);
popupItem->setVisible(false);
+ destroyOverlay();
if (hadActiveFocusBeforeExitTransition && window) {
// restore focus to the next popup in chain, or to the window content if there are no other popups open
@@ -572,6 +583,7 @@ void QQuickPopupPrivate::setWindow(QQuickWindow *newWindow)
QQuickControlPrivate *p = QQuickControlPrivate::get(popupItem);
p->resolveFont();
+ p->resolvePalette();
if (QQuickApplicationWindow *appWindow = qobject_cast<QQuickApplicationWindow *>(newWindow))
p->updateLocale(appWindow->locale(), false); // explicit=false
}
@@ -594,6 +606,96 @@ void QQuickPopupPrivate::reposition()
positioner->reposition();
}
+static QQuickItem *createDimmer(QQmlComponent *component, QQuickPopup *popup, QQuickItem *parent)
+{
+ QQuickItem *item = nullptr;
+ if (component) {
+ QQmlContext *creationContext = component->creationContext();
+ if (!creationContext)
+ creationContext = qmlContext(popup);
+ QQmlContext *context = new QQmlContext(creationContext, popup);
+ context->setContextObject(popup);
+ item = qobject_cast<QQuickItem*>(component->beginCreate(context));
+ }
+
+ // when there is no overlay component available (with plain QQuickWindow),
+ // use a plain QQuickItem as a fallback to block hover events
+ if (!item && popup->isModal())
+ item = new QQuickItem;
+
+ if (item) {
+ item->setOpacity(popup->isVisible() ? 1.0 : 0.0);
+ item->setParentItem(parent);
+ item->stackBefore(popup->popupItem());
+ item->setZ(popup->z());
+ if (popup->isModal()) {
+ item->setAcceptedMouseButtons(Qt::AllButtons);
+#if QT_CONFIG(cursor)
+ item->setCursor(Qt::ArrowCursor);
+#endif
+#if QT_CONFIG(quicktemplates2_hover)
+ // TODO: switch to QStyleHints::useHoverEffects in Qt 5.8
+ item->setAcceptHoverEvents(true);
+ // item->setAcceptHoverEvents(QGuiApplication::styleHints()->useHoverEffects());
+ // connect(QGuiApplication::styleHints(), &QStyleHints::useHoverEffectsChanged, item, &QQuickItem::setAcceptHoverEvents);
+#endif
+ }
+ if (component)
+ component->completeCreate();
+ }
+ return item;
+}
+
+void QQuickPopupPrivate::createOverlay()
+{
+ Q_Q(QQuickPopup);
+ QQuickOverlay *overlay = QQuickOverlay::overlay(window);
+ if (!overlay)
+ return;
+
+ QQmlComponent *component = nullptr;
+ QQuickOverlayAttached *overlayAttached = qobject_cast<QQuickOverlayAttached *>(qmlAttachedPropertiesObject<QQuickOverlay>(q, false));
+ if (overlayAttached)
+ component = modal ? overlayAttached->modal() : overlayAttached->modeless();
+
+ if (!component)
+ component = modal ? overlay->modal() : overlay->modeless();
+
+ if (!dimmer)
+ dimmer = createDimmer(component, q, overlay);
+ resizeOverlay();
+}
+
+void QQuickPopupPrivate::destroyOverlay()
+{
+ if (dimmer) {
+ dimmer->setParentItem(nullptr);
+ dimmer->deleteLater();
+ dimmer = nullptr;
+ }
+}
+
+void QQuickPopupPrivate::toggleOverlay()
+{
+ destroyOverlay();
+ if (dim)
+ createOverlay();
+}
+
+void QQuickPopupPrivate::showOverlay()
+{
+ // use QQmlProperty instead of QQuickItem::setOpacity() to trigger QML Behaviors
+ if (dim && dimmer)
+ QQmlProperty::write(dimmer, QStringLiteral("opacity"), 1.0);
+}
+
+void QQuickPopupPrivate::hideOverlay()
+{
+ // use QQmlProperty instead of QQuickItem::setOpacity() to trigger QML Behaviors
+ if (dim && dimmer)
+ QQmlProperty::write(dimmer, QStringLiteral("opacity"), 0.0);
+}
+
void QQuickPopupPrivate::resizeOverlay()
{
if (!dimmer)
@@ -662,6 +764,7 @@ QQuickPopup::~QQuickPopup()
setParentItem(nullptr);
d->popupItem->ungrabShortcut();
delete d->popupItem;
+ d->popupItem = nullptr;
}
/*!
@@ -1291,7 +1394,7 @@ void QQuickPopup::resetBottomPadding()
This property holds the locale of the popup.
- \sa {LayoutMirroring}{LayoutMirroring}
+ \sa mirrored, {LayoutMirroring}{LayoutMirroring}
*/
QLocale QQuickPopup::locale() const
{
@@ -1312,6 +1415,25 @@ void QQuickPopup::resetLocale()
}
/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::Popup::mirrored
+ \readonly
+
+ This property holds whether the popup is mirrored.
+
+ This property is provided for convenience. A popup is considered mirrored
+ when its visual layout direction is right-to-left; that is, when using a
+ right-to-left locale.
+
+ \sa locale, {Right-to-left User Interfaces}
+*/
+bool QQuickPopup::isMirrored() const
+{
+ Q_D(const QQuickPopup);
+ return d->popupItem->isMirrored();
+}
+
+/*!
\qmlproperty font QtQuick.Controls::Popup::font
This property holds the font currently set for the popup.
@@ -1356,6 +1478,53 @@ void QQuickPopup::resetFont()
d->popupItem->resetFont();
}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty palette QtQuick.Controls::Popup::palette
+
+ This property holds the palette currently set for the popup.
+
+ Popup propagates explicit palette properties to its children. If you change a specific
+ property on a popup's palette, that property propagates to all of the popup's children,
+ overriding any system defaults for that property.
+
+ \code
+ Popup {
+ palette.text: "red"
+
+ Column {
+ Label {
+ text: qsTr("This will use red color...")
+ }
+
+ Switch {
+ text: qsTr("... and so will this")
+ }
+ }
+ }
+ \endcode
+
+ \sa Control::palette, ApplicationWindow::palette, {qtquickcontrols2-palette}{palette QML Basic Type}
+*/
+QPalette QQuickPopup::palette() const
+{
+ Q_D(const QQuickPopup);
+ return d->popupItem->palette();
+}
+
+void QQuickPopup::setPalette(const QPalette &palette)
+{
+ Q_D(QQuickPopup);
+ d->popupItem->setPalette(palette);
+}
+
+void QQuickPopup::resetPalette()
+{
+ Q_D(QQuickPopup);
+ d->popupItem->resetPalette();
+}
+
QQuickWindow *QQuickPopup::window() const
{
Q_D(const QQuickPopup);
@@ -1402,6 +1571,14 @@ void QQuickPopup::setParentItem(QQuickItem *parent)
emit parentChanged();
}
+void QQuickPopup::resetParentItem()
+{
+ if (QQuickWindow *window = qobject_cast<QQuickWindow *>(parent()))
+ setParentItem(window->contentItem());
+ else
+ setParentItem(qobject_cast<QQuickItem *>(parent()));
+}
+
/*!
\qmlproperty Item QtQuick.Controls::Popup::background
@@ -1603,6 +1780,8 @@ void QQuickPopup::setModal(bool modal)
if (d->modal == modal)
return;
d->modal = modal;
+ if (d->complete && d->visible)
+ d->toggleOverlay();
emit modalChanged();
if (!d->hasDim) {
@@ -1636,6 +1815,8 @@ void QQuickPopup::setDim(bool dim)
return;
d->dim = dim;
+ if (d->complete && d->visible)
+ d->toggleOverlay();
emit dimChanged();
}
@@ -1654,7 +1835,7 @@ void QQuickPopup::resetDim()
This property holds whether the popup is visible. The default value is \c false.
- \sa open(), close()
+ \sa open(), close(), opened
*/
bool QQuickPopup::isVisible() const
{
@@ -1679,6 +1860,41 @@ void QQuickPopup::setVisible(bool visible)
}
/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::Popup::enabled
+
+ This property holds whether the popup is enabled. The default value is \c true.
+
+ \sa visible, Item::enabled
+*/
+bool QQuickPopup::isEnabled() const
+{
+ Q_D(const QQuickPopup);
+ return d->popupItem->isEnabled();
+}
+
+void QQuickPopup::setEnabled(bool enabled)
+{
+ Q_D(QQuickPopup);
+ d->popupItem->setEnabled(enabled);
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::Popup::opened
+
+ This property holds whether the popup is fully open. The popup is considered opened
+ when it's visible and neither the \l enter nor \l exit transitions are running.
+
+ \sa open(), close(), visible
+*/
+bool QQuickPopup::isOpened() const
+{
+ Q_D(const QQuickPopup);
+ return d->transitionState == QQuickPopupPrivate::NoTransition && isVisible();
+}
+
+/*!
\qmlproperty real QtQuick.Controls::Popup::opacity
This property holds the opacity of the popup. Opacity is specified as a number between
@@ -1752,6 +1968,7 @@ QQuickPopup::ClosePolicy QQuickPopup::closePolicy() const
void QQuickPopup::setClosePolicy(ClosePolicy policy)
{
Q_D(QQuickPopup);
+ d->hasClosePolicy = true;
if (d->closePolicy == policy)
return;
d->closePolicy = policy;
@@ -1764,6 +1981,13 @@ void QQuickPopup::setClosePolicy(ClosePolicy policy)
emit closePolicyChanged();
}
+void QQuickPopup::resetClosePolicy()
+{
+ Q_D(QQuickPopup);
+ setClosePolicy(DefaultClosePolicy);
+ d->hasClosePolicy = false;
+}
+
/*!
\qmlproperty enumeration QtQuick.Controls::Popup::transformOrigin
@@ -1892,12 +2116,8 @@ void QQuickPopup::classBegin()
void QQuickPopup::componentComplete()
{
Q_D(QQuickPopup);
- if (!parentItem()) {
- if (QQuickItem *item = qobject_cast<QQuickItem *>(parent()))
- setParentItem(item);
- else if (QQuickWindow *window = qobject_cast<QQuickWindow *>(parent()))
- setParentItem(window->contentItem());
- }
+ if (!parentItem())
+ resetParentItem();
if (d->visible && d->window)
d->transitionManager.transitionEnter();
@@ -2111,6 +2331,13 @@ void QQuickPopup::paddingChange(const QMarginsF &newPadding, const QMarginsF &ol
emit availableHeightChanged();
}
+void QQuickPopup::paletteChange(const QPalette &newPalette, const QPalette &oldPalette)
+{
+ Q_UNUSED(newPalette);
+ Q_UNUSED(oldPalette);
+ emit paletteChanged();
+}
+
void QQuickPopup::spacingChange(qreal newSpacing, qreal oldSpacing)
{
Q_UNUSED(newSpacing);
@@ -2123,6 +2350,11 @@ QFont QQuickPopup::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::SystemFont);
}
+QPalette QQuickPopup::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::SystemPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickPopup::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickpopup_p.h b/src/quicktemplates2/qquickpopup_p.h
index 199f7e4c..ada4b649 100644
--- a/src/quicktemplates2/qquickpopup_p.h
+++ b/src/quicktemplates2/qquickpopup_p.h
@@ -53,6 +53,7 @@
#include <QtGui/qevent.h>
#include <QtCore/qlocale.h>
#include <QtGui/qfont.h>
+#include <QtGui/qpalette.h>
#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
#include <QtQml/qqml.h>
#include <QtQml/qqmllist.h>
@@ -96,7 +97,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopup : public QObject, public QQml
Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged FINAL)
Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET resetLocale NOTIFY localeChanged FINAL)
Q_PROPERTY(QFont font READ font WRITE setFont RESET resetFont NOTIFY fontChanged FINAL)
- Q_PROPERTY(QQuickItem *parent READ parentItem WRITE setParentItem NOTIFY parentChanged FINAL)
+ Q_PROPERTY(QQuickItem *parent READ parentItem WRITE setParentItem RESET resetParentItem NOTIFY parentChanged FINAL)
Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
Q_PROPERTY(QQuickItem *contentItem READ contentItem WRITE setContentItem NOTIFY contentItemChanged FINAL)
Q_PROPERTY(QQmlListProperty<QObject> contentData READ contentData FINAL)
@@ -109,12 +110,17 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopup : public QObject, public QQml
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL)
Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged FINAL)
Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged FINAL)
- Q_PROPERTY(ClosePolicy closePolicy READ closePolicy WRITE setClosePolicy NOTIFY closePolicyChanged FINAL)
- Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin)
+ Q_PROPERTY(ClosePolicy closePolicy READ closePolicy WRITE setClosePolicy RESET resetClosePolicy NOTIFY closePolicyChanged FINAL)
+ Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin FINAL)
Q_PROPERTY(QQuickTransition *enter READ enter WRITE setEnter NOTIFY enterChanged FINAL)
Q_PROPERTY(QQuickTransition *exit READ exit WRITE setExit NOTIFY exitChanged FINAL)
// 2.1 (Qt 5.8)
Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing RESET resetSpacing NOTIFY spacingChanged FINAL REVISION 1)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(bool opened READ isOpened NOTIFY openedChanged FINAL REVISION 3)
+ Q_PROPERTY(bool mirrored READ isMirrored NOTIFY mirroredChanged FINAL REVISION 3)
+ Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL REVISION 3)
+ Q_PROPERTY(QPalette palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged FINAL REVISION 3)
Q_CLASSINFO("DefaultProperty", "contentData")
public:
@@ -209,6 +215,7 @@ public:
QQuickItem *parentItem() const;
void setParentItem(QQuickItem *parent);
+ void resetParentItem();
QQuickItem *background() const;
void setBackground(QQuickItem *background);
@@ -256,6 +263,7 @@ public:
ClosePolicy closePolicy() const;
void setClosePolicy(ClosePolicy policy);
+ void resetClosePolicy();
// keep in sync with Item.TransformOrigin
enum TransformOrigin {
@@ -284,6 +292,17 @@ public:
void setSpacing(qreal spacing);
void resetSpacing();
+ // 2.3 (Qt 5.10)
+ bool isOpened() const;
+ bool isMirrored() const;
+
+ bool isEnabled() const;
+ void setEnabled(bool enabled);
+
+ QPalette palette() const;
+ void setPalette(const QPalette &palette);
+ void resetPalette();
+
public Q_SLOTS:
void open();
void close();
@@ -334,6 +353,11 @@ Q_SIGNALS:
void windowChanged(QQuickWindow *window);
// 2.1 (Qt 5.8)
Q_REVISION(1) void spacingChanged();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void openedChanged();
+ Q_REVISION(3) void mirroredChanged();
+ Q_REVISION(3) void enabledChanged();
+ Q_REVISION(3) void paletteChanged();
protected:
QQuickPopup(QQuickPopupPrivate &dd, QObject *parent);
@@ -368,9 +392,11 @@ protected:
virtual void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data);
virtual void marginsChange(const QMarginsF &newMargins, const QMarginsF &oldMargins);
virtual void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding);
+ virtual void paletteChange(const QPalette &newPalette, const QPalette &oldPalette);
virtual void spacingChange(qreal newSpacing, qreal oldSpacing);
virtual QFont defaultFont() const;
+ virtual QPalette defaultPalette() const;
#if QT_CONFIG(accessibility)
virtual QAccessible::Role accessibleRole() const;
diff --git a/src/quicktemplates2/qquickpopup_p_p.h b/src/quicktemplates2/qquickpopup_p_p.h
index ce64d49e..6890fdac 100644
--- a/src/quicktemplates2/qquickpopup_p_p.h
+++ b/src/quicktemplates2/qquickpopup_p_p.h
@@ -48,8 +48,8 @@
// We mean it.
//
-#include "qquickpopup_p.h"
-#include "qquickcontrol_p.h"
+#include <QtQuickTemplates2/private/qquickpopup_p.h>
+#include <QtQuickTemplates2/private/qquickcontrol_p.h>
#include <QtCore/private/qobject_p.h>
#include <QtQuick/qquickitem.h>
@@ -115,6 +115,12 @@ public:
#endif
virtual void reposition();
+
+ void createOverlay();
+ void destroyOverlay();
+ void toggleOverlay();
+ virtual void showOverlay();
+ virtual void hideOverlay();
virtual void resizeOverlay();
virtual bool prepareEnterTransition();
@@ -157,6 +163,7 @@ public:
bool allowHorizontalResize;
bool hadActiveFocusBeforeExitTransition;
bool interactive;
+ bool hasClosePolicy;
int touchId;
qreal x;
qreal y;
diff --git a/src/quicktemplates2/qquickpopupitem.cpp b/src/quicktemplates2/qquickpopupitem.cpp
index 6f9d7697..27528f2f 100644
--- a/src/quicktemplates2/qquickpopupitem.cpp
+++ b/src/quicktemplates2/qquickpopupitem.cpp
@@ -56,6 +56,7 @@ public:
void implicitHeightChanged() override;
void resolveFont() override;
+ void resolvePalette() override;
QQuickItem *getContentItem() override;
@@ -92,6 +93,14 @@ void QQuickPopupItemPrivate::resolveFont()
inheritFont(themeFont(QPlatformTheme::SystemFont));
}
+void QQuickPopupItemPrivate::resolvePalette()
+{
+ if (QQuickApplicationWindow *window = qobject_cast<QQuickApplicationWindow *>(popup->window()))
+ inheritPalette(window->palette());
+ else
+ inheritPalette(themePalette(QPlatformTheme::SystemPalette));
+}
+
QQuickItem *QQuickPopupItemPrivate::getContentItem()
{
Q_Q(QQuickPopupItem);
@@ -280,6 +289,12 @@ void QQuickPopupItem::localeChange(const QLocale &newLocale, const QLocale &oldL
d->popup->localeChange(newLocale, oldLocale);
}
+void QQuickPopupItem::mirrorChange()
+{
+ Q_D(QQuickPopupItem);
+ emit d->popup->mirroredChanged();
+}
+
void QQuickPopupItem::itemChange(ItemChange change, const ItemChangeData &data)
{
Q_D(QQuickPopupItem);
@@ -294,12 +309,25 @@ void QQuickPopupItem::paddingChange(const QMarginsF &newPadding, const QMarginsF
d->popup->paddingChange(newPadding, oldPadding);
}
+void QQuickPopupItem::paletteChange(const QPalette &newPalette, const QPalette &oldPalette)
+{
+ Q_D(QQuickPopupItem);
+ QQuickControl::paletteChange(newPalette, oldPalette);
+ d->popup->paletteChange(newPalette, oldPalette);
+}
+
QFont QQuickPopupItem::defaultFont() const
{
Q_D(const QQuickPopupItem);
return d->popup->defaultFont();
}
+QPalette QQuickPopupItem::defaultPalette() const
+{
+ Q_D(const QQuickPopupItem);
+ return d->popup->defaultPalette();
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickPopupItem::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickpopupitem_p_p.h b/src/quicktemplates2/qquickpopupitem_p_p.h
index d5447383..0187b77a 100644
--- a/src/quicktemplates2/qquickpopupitem_p_p.h
+++ b/src/quicktemplates2/qquickpopupitem_p_p.h
@@ -48,7 +48,7 @@
// We mean it.
//
-#include "qquickcontrol_p.h"
+#include <QtQuickTemplates2/private/qquickcontrol_p.h>
QT_BEGIN_NAMESPACE
@@ -91,10 +91,13 @@ protected:
void fontChange(const QFont &newFont, const QFont &oldFont) override;
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override;
+ void mirrorChange() override;
void itemChange(ItemChange change, const ItemChangeData &data) override;
void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override;
+ void paletteChange(const QPalette &newPalette, const QPalette &oldPalette) override;
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
diff --git a/src/quicktemplates2/qquickradiobutton.cpp b/src/quicktemplates2/qquickradiobutton.cpp
index c923fbbf..86be3ed6 100644
--- a/src/quicktemplates2/qquickradiobutton.cpp
+++ b/src/quicktemplates2/qquickradiobutton.cpp
@@ -102,6 +102,11 @@ QFont QQuickRadioButton::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::RadioButtonFont);
}
+QPalette QQuickRadioButton::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::RadioButtonPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickRadioButton::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickradiobutton_p.h b/src/quicktemplates2/qquickradiobutton_p.h
index 0fe4eb70..ea372687 100644
--- a/src/quicktemplates2/qquickradiobutton_p.h
+++ b/src/quicktemplates2/qquickradiobutton_p.h
@@ -61,6 +61,7 @@ public:
protected:
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
diff --git a/src/quicktemplates2/qquickrangeslider.cpp b/src/quicktemplates2/qquickrangeslider.cpp
index 274c887d..d16cd3b4 100644
--- a/src/quicktemplates2/qquickrangeslider.cpp
+++ b/src/quicktemplates2/qquickrangeslider.cpp
@@ -790,6 +790,8 @@ void QQuickRangeSlider::setSnapMode(SnapMode mode)
Possible values:
\value Qt.Horizontal Horizontal (default)
\value Qt.Vertical Vertical
+
+ \sa horizontal, vertical
*/
Qt::Orientation QQuickRangeSlider::orientation() const
{
@@ -891,6 +893,36 @@ void QQuickRangeSlider::setLive(bool live)
emit liveChanged();
}
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::RangeSlider::horizontal
+ \readonly
+
+ This property holds whether the slider is horizontal.
+
+ \sa orientation
+*/
+bool QQuickRangeSlider::isHorizontal() const
+{
+ Q_D(const QQuickRangeSlider);
+ return d->orientation == Qt::Horizontal;
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::RangeSlider::vertical
+ \readonly
+
+ This property holds whether the slider is vertical.
+
+ \sa orientation
+*/
+bool QQuickRangeSlider::isVertical() const
+{
+ Q_D(const QQuickRangeSlider);
+ return d->orientation == Qt::Vertical;
+}
+
void QQuickRangeSlider::focusInEvent(QFocusEvent *event)
{
Q_D(QQuickRangeSlider);
diff --git a/src/quicktemplates2/qquickrangeslider_p.h b/src/quicktemplates2/qquickrangeslider_p.h
index fc5a1d99..ef6e5677 100644
--- a/src/quicktemplates2/qquickrangeslider_p.h
+++ b/src/quicktemplates2/qquickrangeslider_p.h
@@ -60,13 +60,16 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRangeSlider : public QQuickControl
Q_OBJECT
Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged FINAL)
Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged FINAL)
- Q_PROPERTY(QQuickRangeSliderNode *first READ first CONSTANT)
- Q_PROPERTY(QQuickRangeSliderNode *second READ second CONSTANT)
+ Q_PROPERTY(QQuickRangeSliderNode *first READ first CONSTANT FINAL)
+ Q_PROPERTY(QQuickRangeSliderNode *second READ second CONSTANT FINAL)
Q_PROPERTY(qreal stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL)
Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
// 2.2 (Qt 5.9)
Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION 2)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
public:
explicit QQuickRangeSlider(QQuickItem *parent = nullptr);
@@ -102,6 +105,10 @@ public:
bool live() const;
void setLive(bool live);
+ // 2.3 (Qt 5.10)
+ bool isHorizontal() const;
+ bool isVertical() const;
+
Q_SIGNALS:
void fromChanged();
void toChanged();
diff --git a/src/quicktemplates2/qquickscrollbar.cpp b/src/quicktemplates2/qquickscrollbar.cpp
index 87ff4b0a..e75fed5a 100644
--- a/src/quicktemplates2/qquickscrollbar.cpp
+++ b/src/quicktemplates2/qquickscrollbar.cpp
@@ -438,6 +438,8 @@ void QQuickScrollBar::setPressed(bool pressed)
This property is automatically set when the scroll bar is
\l {Attaching ScrollBar to a Flickable}{attached to a flickable}.
+
+ \sa horizontal, vertical
*/
Qt::Orientation QQuickScrollBar::orientation() const
{
@@ -559,6 +561,36 @@ void QQuickScrollBar::setPolicy(Policy policy)
}
/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::ScrollBar::horizontal
+ \readonly
+
+ This property holds whether the scroll bar is horizontal.
+
+ \sa orientation
+*/
+bool QQuickScrollBar::isHorizontal() const
+{
+ Q_D(const QQuickScrollBar);
+ return d->orientation == Qt::Horizontal;
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::ScrollBar::vertical
+ \readonly
+
+ This property holds whether the scroll bar is vertical.
+
+ \sa orientation
+*/
+bool QQuickScrollBar::isVertical() const
+{
+ Q_D(const QQuickScrollBar);
+ return d->orientation == Qt::Vertical;
+}
+
+/*!
\qmlmethod void QtQuick.Controls::ScrollBar::increase()
Increases the position by \l stepSize or \c 0.1 if stepSize is \c 0.0.
diff --git a/src/quicktemplates2/qquickscrollbar_p.h b/src/quicktemplates2/qquickscrollbar_p.h
index 892ef2e4..6dda6f2e 100644
--- a/src/quicktemplates2/qquickscrollbar_p.h
+++ b/src/quicktemplates2/qquickscrollbar_p.h
@@ -68,6 +68,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollBar : public QQuickControl
Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL REVISION 2)
Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive RESET resetInteractive NOTIFY interactiveChanged FINAL REVISION 2)
Q_PROPERTY(Policy policy READ policy WRITE setPolicy NOTIFY policyChanged FINAL REVISION 2)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
public:
explicit QQuickScrollBar(QQuickItem *parent = nullptr);
@@ -114,6 +117,10 @@ public:
Policy policy() const;
void setPolicy(Policy policy);
+ // 2.3 (Qt 5.10)
+ bool isHorizontal() const;
+ bool isVertical() const;
+
public Q_SLOTS:
void increase();
void decrease();
diff --git a/src/quicktemplates2/qquickscrollindicator.cpp b/src/quicktemplates2/qquickscrollindicator.cpp
index 780eff1e..ee1078e4 100644
--- a/src/quicktemplates2/qquickscrollindicator.cpp
+++ b/src/quicktemplates2/qquickscrollindicator.cpp
@@ -276,6 +276,8 @@ void QQuickScrollIndicator::setActive(bool active)
This property is automatically set when the scroll indicator is
\l {Attaching ScrollIndicator to a Flickable}{attached to a flickable}.
+
+ \sa horizontal, vertical
*/
Qt::Orientation QQuickScrollIndicator::orientation() const
{
@@ -295,6 +297,36 @@ void QQuickScrollIndicator::setOrientation(Qt::Orientation orientation)
emit orientationChanged();
}
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::ScrollIndicator::horizontal
+ \readonly
+
+ This property holds whether the scroll indicator is horizontal.
+
+ \sa orientation
+*/
+bool QQuickScrollIndicator::isHorizontal() const
+{
+ Q_D(const QQuickScrollIndicator);
+ return d->orientation == Qt::Horizontal;
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::ScrollIndicator::vertical
+ \readonly
+
+ This property holds whether the scroll indicator is vertical.
+
+ \sa orientation
+*/
+bool QQuickScrollIndicator::isVertical() const
+{
+ Q_D(const QQuickScrollIndicator);
+ return d->orientation == Qt::Vertical;
+}
+
class QQuickScrollIndicatorAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener
{
public:
diff --git a/src/quicktemplates2/qquickscrollindicator_p.h b/src/quicktemplates2/qquickscrollindicator_p.h
index 476a7859..d679cf74 100644
--- a/src/quicktemplates2/qquickscrollindicator_p.h
+++ b/src/quicktemplates2/qquickscrollindicator_p.h
@@ -63,6 +63,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollIndicator : public QQuickCont
Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
public:
explicit QQuickScrollIndicator(QQuickItem *parent = nullptr);
@@ -78,6 +81,10 @@ public:
Qt::Orientation orientation() const;
void setOrientation(Qt::Orientation orientation);
+ // 2.3 (Qt 5.10)
+ bool isHorizontal() const;
+ bool isVertical() const;
+
public Q_SLOTS:
void setSize(qreal size);
void setPosition(qreal position);
diff --git a/src/quicktemplates2/qquickshortcutcontext.cpp b/src/quicktemplates2/qquickshortcutcontext.cpp
index 6553beb4..b44c723b 100644
--- a/src/quicktemplates2/qquickshortcutcontext.cpp
+++ b/src/quicktemplates2/qquickshortcutcontext.cpp
@@ -38,6 +38,8 @@
#include "qquickoverlay_p_p.h"
#include "qquicktooltip_p.h"
#include "qquickpopup_p.h"
+#include "qquickmenu_p.h"
+#include "qquickmenubaritem_p.h"
#include <QtGui/qguiapplication.h>
@@ -53,8 +55,13 @@ static bool isBlockedByPopup(QQuickItem *item)
for (QQuickPopup *popup : popups) {
if (qobject_cast<QQuickToolTip *>(popup))
continue; // ignore tooltips (QTBUG-60492)
- if (popup->isModal() || popup->closePolicy() & QQuickPopup::CloseOnEscape)
+ if (popup->isModal() || popup->closePolicy() & QQuickPopup::CloseOnEscape) {
+ if (QQuickMenu *menu = qobject_cast<QQuickMenu *>(popup)) {
+ if (qobject_cast<QQuickMenuBarItem *>(menu->parentItem()))
+ continue;
+ }
return item != popup->popupItem() && !popup->popupItem()->isAncestorOf(item);
+ }
}
return false;
diff --git a/src/quicktemplates2/qquickslider.cpp b/src/quicktemplates2/qquickslider.cpp
index da2f402f..b358663d 100644
--- a/src/quicktemplates2/qquickslider.cpp
+++ b/src/quicktemplates2/qquickslider.cpp
@@ -452,6 +452,36 @@ void QQuickSlider::setPressed(bool pressed)
}
/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::Slider::horizontal
+ \readonly
+
+ This property holds whether the slider is horizontal.
+
+ \sa orientation
+*/
+bool QQuickSlider::isHorizontal() const
+{
+ Q_D(const QQuickSlider);
+ return d->orientation == Qt::Horizontal;
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::Slider::vertical
+ \readonly
+
+ This property holds whether the slider is vertical.
+
+ \sa orientation
+*/
+bool QQuickSlider::isVertical() const
+{
+ Q_D(const QQuickSlider);
+ return d->orientation == Qt::Vertical;
+}
+
+/*!
\qmlproperty enumeration QtQuick.Controls::Slider::orientation
This property holds the orientation.
@@ -459,6 +489,8 @@ void QQuickSlider::setPressed(bool pressed)
Possible values:
\value Qt.Horizontal Horizontal (default)
\value Qt.Vertical Vertical
+
+ \sa horizontal, vertical
*/
Qt::Orientation QQuickSlider::orientation() const
{
diff --git a/src/quicktemplates2/qquickslider_p.h b/src/quicktemplates2/qquickslider_p.h
index f33c330a..b2f4897c 100644
--- a/src/quicktemplates2/qquickslider_p.h
+++ b/src/quicktemplates2/qquickslider_p.h
@@ -68,6 +68,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSlider : public QQuickControl
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION 2)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
public:
explicit QQuickSlider(QQuickItem *parent = nullptr);
@@ -113,6 +116,10 @@ public:
bool live() const;
void setLive(bool live);
+ // 2.3 (Qt 5.10)
+ bool isHorizontal() const;
+ bool isVertical() const;
+
public Q_SLOTS:
void increase();
void decrease();
diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp
index 1989d768..ef1c9d97 100644
--- a/src/quicktemplates2/qquickspinbox.cpp
+++ b/src/quicktemplates2/qquickspinbox.cpp
@@ -108,6 +108,7 @@ class QQuickSpinBoxPrivate : public QQuickControlPrivate
public:
QQuickSpinBoxPrivate()
: editable(false),
+ wrap(false),
from(0),
to(99),
value(0),
@@ -121,9 +122,10 @@ public:
{
}
- int boundValue(int value) const;
+ int boundValue(int value, bool wrap) const;
void updateValue();
- bool setValue(int value, bool modified);
+ bool setValue(int value, bool wrap, bool modified);
+ bool stepBy(int steps, bool modified);
void increase(bool modified);
void decrease(bool modified);
@@ -145,6 +147,7 @@ public:
void handleUngrab() override;
bool editable;
+ bool wrap;
int from;
int to;
int value;
@@ -159,9 +162,20 @@ public:
Qt::InputMethodHints inputMethodHints;
};
-int QQuickSpinBoxPrivate::boundValue(int value) const
+int QQuickSpinBoxPrivate::boundValue(int value, bool wrap) const
{
- return from > to ? qBound(to, value, from) : qBound(from, value, to);
+ bool inverted = from > to;
+ if (!wrap)
+ return inverted ? qBound(to, value, from) : qBound(from, value, to);
+
+ int f = inverted ? to : from;
+ int t = inverted ? from : to;
+ if (value < f)
+ value = t;
+ else if (value > t)
+ value = f;
+
+ return value;
}
void QQuickSpinBoxPrivate::updateValue()
@@ -175,17 +189,17 @@ void QQuickSpinBoxPrivate::updateValue()
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(engine);
QJSValue loc(v4, QQmlLocale::wrap(v4, locale));
QJSValue val = q->valueFromText().call(QJSValueList() << text.toString() << loc);
- setValue(val.toInt(), true);
+ setValue(val.toInt(), /* allowWrap = */ false, /* modified = */ true);
}
}
}
}
-bool QQuickSpinBoxPrivate::setValue(int newValue, bool modified)
+bool QQuickSpinBoxPrivate::setValue(int newValue, bool allowWrap, bool modified)
{
Q_Q(QQuickSpinBox);
if (q->isComponentComplete())
- newValue = boundValue(newValue);
+ newValue = boundValue(newValue, allowWrap);
if (value == newValue)
return false;
@@ -201,14 +215,19 @@ bool QQuickSpinBoxPrivate::setValue(int newValue, bool modified)
return true;
}
+bool QQuickSpinBoxPrivate::stepBy(int steps, bool modified)
+{
+ return setValue(value + steps, wrap, modified);
+}
+
void QQuickSpinBoxPrivate::increase(bool modified)
{
- setValue(value + effectiveStepSize(), modified);
+ setValue(value + effectiveStepSize(), wrap, modified);
}
void QQuickSpinBoxPrivate::decrease(bool modified)
{
- setValue(value - effectiveStepSize(), modified);
+ setValue(value - effectiveStepSize(), wrap, modified);
}
int QQuickSpinBoxPrivate::effectiveStepSize() const
@@ -228,7 +247,7 @@ void QQuickSpinBoxPrivate::updateUpEnabled()
if (!upIndicator)
return;
- upIndicator->setEnabled(from < to ? value < to : value > to);
+ upIndicator->setEnabled(wrap || (from < to ? value < to : value > to));
}
bool QQuickSpinBoxPrivate::downEnabled() const
@@ -243,7 +262,7 @@ void QQuickSpinBoxPrivate::updateDownEnabled()
if (!downIndicator)
return;
- downIndicator->setEnabled(from < to ? value > from : value < from);
+ downIndicator->setEnabled(wrap || (from < to ? value > from : value < from));
}
void QQuickSpinBoxPrivate::updateHover(const QPointF &pos)
@@ -384,7 +403,7 @@ void QQuickSpinBox::setFrom(int from)
d->from = from;
emit fromChanged();
if (isComponentComplete()) {
- if (!d->setValue(d->value, false)) {
+ if (!d->setValue(d->value, /* allowWrap = */ false, /* modified = */ false)) {
d->updateUpEnabled();
d->updateDownEnabled();
}
@@ -413,7 +432,7 @@ void QQuickSpinBox::setTo(int to)
d->to = to;
emit toChanged();
if (isComponentComplete()) {
- if (!d->setValue(d->value, false)) {
+ if (!d->setValue(d->value, /* allowWrap = */false, /* modified = */ false)) {
d->updateUpEnabled();
d->updateDownEnabled();
}
@@ -434,7 +453,7 @@ int QQuickSpinBox::value() const
void QQuickSpinBox::setValue(int value)
{
Q_D(QQuickSpinBox);
- d->setValue(value, false);
+ d->setValue(value, /* allowWrap = */ false, /* modified = */ false);
}
/*!
@@ -706,6 +725,34 @@ bool QQuickSpinBox::isInputMethodComposing() const
}
/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::SpinBox::wrap
+
+ This property holds whether the spinbox wraps. The default value is \c false.
+
+ If wrap is \c true, stepping past \l to changes the value to \l from and vice versa.
+*/
+bool QQuickSpinBox::wrap() const
+{
+ Q_D(const QQuickSpinBox);
+ return d->wrap;
+}
+
+void QQuickSpinBox::setWrap(bool wrap)
+{
+ Q_D(QQuickSpinBox);
+ if (d->wrap == wrap)
+ return;
+
+ d->wrap = wrap;
+ if (d->value == d->from || d->value == d->to) {
+ d->updateUpEnabled();
+ d->updateDownEnabled();
+ }
+ emit wrapChanged();
+}
+
+/*!
\qmlmethod void QtQuick.Controls::SpinBox::increase()
Increases the value by \l stepSize, or \c 1 if stepSize is not defined.
@@ -827,8 +874,8 @@ void QQuickSpinBox::wheelEvent(QWheelEvent *event)
if (d->wheelEnabled) {
const QPointF angle = event->angleDelta();
const qreal delta = (qFuzzyIsNull(angle.y()) ? angle.x() : angle.y()) / QWheelEvent::DefaultDeltasPerStep;
- if (!d->setValue(d->value + qRound(d->effectiveStepSize() * delta), true))
- event->ignore();
+ if (!d->stepBy(qRound(d->effectiveStepSize() * delta), true))
+ event->ignore();
}
}
#endif
@@ -837,7 +884,7 @@ void QQuickSpinBox::componentComplete()
{
Q_D(QQuickSpinBox);
QQuickControl::componentComplete();
- if (!d->setValue(d->value, false)) {
+ if (!d->setValue(d->value, /* allowWrap = */ false, /* modified = */ false)) {
d->updateUpEnabled();
d->updateDownEnabled();
}
@@ -874,6 +921,11 @@ QFont QQuickSpinBox::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::EditorFont);
}
+QPalette QQuickSpinBox::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::TextLineEditPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickSpinBox::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickspinbox_p.h b/src/quicktemplates2/qquickspinbox_p.h
index e62f8614..6485c053 100644
--- a/src/quicktemplates2/qquickspinbox_p.h
+++ b/src/quicktemplates2/qquickspinbox_p.h
@@ -74,6 +74,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSpinBox : public QQuickControl
// 2.2 (Qt 5.9)
Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION 2)
Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION 2)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged FINAL REVISION 3)
public:
explicit QQuickSpinBox(QQuickItem *parent = nullptr);
@@ -111,6 +113,10 @@ public:
bool isInputMethodComposing() const;
+ // 2.3 (Qt 5.10)
+ bool wrap() const;
+ void setWrap(bool wrap);
+
public Q_SLOTS:
void increase();
void decrease();
@@ -128,6 +134,8 @@ Q_SIGNALS:
Q_REVISION(2) void valueModified();
Q_REVISION(2) void inputMethodHintsChanged();
Q_REVISION(2) void inputMethodComposingChanged();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void wrapChanged();
protected:
void focusInEvent(QFocusEvent *event) override;
@@ -146,6 +154,7 @@ protected:
void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp
index 20e3c817..2f13b1a1 100644
--- a/src/quicktemplates2/qquickstackview.cpp
+++ b/src/quicktemplates2/qquickstackview.cpp
@@ -516,8 +516,9 @@ void QQuickStackView::push(QQmlV4Function *args)
if (!d->elements.isEmpty())
exit = d->elements.top();
+ int oldDepth = d->elements.count();
if (d->pushElements(elements)) {
- emit depthChanged();
+ d->depthChange(d->elements.count(), oldDepth);
QQuickStackElement *enter = d->elements.top();
d->startTransition(QQuickStackTransition::pushEnter(operation, enter, this),
QQuickStackTransition::pushExit(operation, exit, this),
@@ -574,6 +575,7 @@ void QQuickStackView::pop(QQmlV4Function *args)
return;
}
+ int oldDepth = d->elements.count();
QQuickStackElement *exit = d->elements.pop();
QQuickStackElement *enter = d->elements.top();
@@ -612,7 +614,7 @@ void QQuickStackView::pop(QQmlV4Function *args)
d->removing.insert(exit);
previousItem = exit->item;
}
- emit depthChanged();
+ d->depthChange(d->elements.count(), oldDepth);
d->startTransition(QQuickStackTransition::popExit(operation, exit, this),
QQuickStackTransition::popEnter(operation, enter, this),
operation == Immediate);
@@ -752,14 +754,13 @@ void QQuickStackView::replace(QQmlV4Function *args)
return;
}
- int depth = d->elements.count();
+ int oldDepth = d->elements.count();
QQuickStackElement* exit = nullptr;
if (!d->elements.isEmpty())
exit = d->elements.pop();
if (exit != target ? d->replaceElements(target, elements) : d->pushElements(elements)) {
- if (depth != d->elements.count())
- emit depthChanged();
+ d->depthChange(d->elements.count(), oldDepth);
if (exit) {
exit->removal = true;
d->removing.insert(exit);
@@ -780,20 +781,51 @@ void QQuickStackView::replace(QQmlV4Function *args)
}
/*!
- \qmlmethod void QtQuick.Controls::StackView::clear()
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::StackView::empty
+ \readonly
+
+ This property holds whether the stack is empty.
+
+ \sa depth
+*/
+bool QQuickStackView::isEmpty() const
+{
+ Q_D(const QQuickStackView);
+ return d->elements.isEmpty();
+}
- Removes all items from the stack. No animations are applied.
+/*!
+ \qmlmethod void QtQuick.Controls::StackView::clear(transition)
+
+ Removes all items from the stack.
+
+ Since QtQuick.Controls 2.3, a \a transition can be optionally specified. Supported transitions:
+
+ \value StackView.Immediate Clear the stack immediately without any transition (default).
+ \value StackView.PushTransition Clear the stack with a push transition.
+ \value StackView.ReplaceTransition Clear the stack with a replace transition.
+ \value StackView.PopTransition Clear the stack with a pop transition.
*/
-void QQuickStackView::clear()
+void QQuickStackView::clear(Operation operation)
{
Q_D(QQuickStackView);
if (d->elements.isEmpty())
return;
+ if (operation != Immediate) {
+ QQuickStackElement *exit = d->elements.pop();
+ exit->removal = true;
+ d->removing.insert(exit);
+ d->startTransition(QQuickStackTransition::popExit(operation, exit, this),
+ QQuickStackTransition::popEnter(operation, nullptr, this), false);
+ }
+
+ int oldDepth = d->elements.count();
d->setCurrentItem(nullptr);
qDeleteAll(d->elements);
d->elements.clear();
- emit depthChanged();
+ d->depthChange(0, oldDepth);
}
/*!
@@ -990,6 +1022,7 @@ void QQuickStackView::componentComplete()
QScopedValueRollback<QString> rollback(d->operation, QStringLiteral("initialItem"));
QQuickStackElement *element = nullptr;
QString error;
+ int oldDepth = d->elements.count();
if (QObject *o = d->initialItem.value<QObject *>())
element = QQuickStackElement::fromObject(o, this, &error);
else if (d->initialItem.canConvert<QString>())
@@ -998,7 +1031,7 @@ void QQuickStackView::componentComplete()
d->warn(error);
delete element;
} else if (d->pushElement(element)) {
- emit depthChanged();
+ d->depthChange(d->elements.count(), oldDepth);
d->setCurrentItem(element);
element->setStatus(QQuickStackView::Active);
}
diff --git a/src/quicktemplates2/qquickstackview_p.cpp b/src/quicktemplates2/qquickstackview_p.cpp
index 0b0f5ef5..0167ad97 100644
--- a/src/quicktemplates2/qquickstackview_p.cpp
+++ b/src/quicktemplates2/qquickstackview_p.cpp
@@ -301,4 +301,15 @@ void QQuickStackViewPrivate::setBusy(bool b)
emit q->busyChanged();
}
+void QQuickStackViewPrivate::depthChange(int newDepth, int oldDepth)
+{
+ Q_Q(QQuickStackView);
+ if (newDepth == oldDepth)
+ return;
+
+ emit q->depthChanged();
+ if (newDepth == 0 || oldDepth == 0)
+ emit q->emptyChanged();
+}
+
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickstackview_p.h b/src/quicktemplates2/qquickstackview_p.h
index ff115416..2cddb800 100644
--- a/src/quicktemplates2/qquickstackview_p.h
+++ b/src/quicktemplates2/qquickstackview_p.h
@@ -72,6 +72,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickStackView : public QQuickControl
Q_PROPERTY(QQuickTransition *pushExit READ pushExit WRITE setPushExit NOTIFY pushExitChanged FINAL)
Q_PROPERTY(QQuickTransition *replaceEnter READ replaceEnter WRITE setReplaceEnter NOTIFY replaceEnterChanged FINAL)
Q_PROPERTY(QQuickTransition *replaceExit READ replaceExit WRITE setReplaceExit NOTIFY replaceExitChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged FINAL REVISION 3)
public:
explicit QQuickStackView(QQuickItem *parent = nullptr);
@@ -134,8 +136,11 @@ public:
Q_INVOKABLE void pop(QQmlV4Function *args);
Q_INVOKABLE void replace(QQmlV4Function *args);
+ // 2.3 (Qt 5.10)
+ bool isEmpty() const;
+
public Q_SLOTS:
- void clear();
+ void clear(Operation operation = Immediate);
Q_SIGNALS:
void busyChanged();
@@ -147,6 +152,8 @@ Q_SIGNALS:
void pushExitChanged();
void replaceEnterChanged();
void replaceExitChanged();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void emptyChanged();
protected:
void componentComplete() override;
diff --git a/src/quicktemplates2/qquickstackview_p_p.h b/src/quicktemplates2/qquickstackview_p_p.h
index 81ca9164..d86f35cd 100644
--- a/src/quicktemplates2/qquickstackview_p_p.h
+++ b/src/quicktemplates2/qquickstackview_p_p.h
@@ -92,6 +92,7 @@ public:
void viewItemTransitionFinished(QQuickItemViewTransitionableItem *item) override;
void setBusy(bool busy);
+ void depthChange(int newDepth, int oldDepth);
bool busy;
QString operation;
diff --git a/src/quicktemplates2/qquickswipedelegate_p.h b/src/quicktemplates2/qquickswipedelegate_p.h
index 5ba0604d..a9900eb8 100644
--- a/src/quicktemplates2/qquickswipedelegate_p.h
+++ b/src/quicktemplates2/qquickswipedelegate_p.h
@@ -60,7 +60,7 @@ class QQuickSwipeDelegateAttachedPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeDelegate : public QQuickItemDelegate
{
Q_OBJECT
- Q_PROPERTY(QQuickSwipe *swipe READ swipe CONSTANT)
+ Q_PROPERTY(QQuickSwipe *swipe READ swipe CONSTANT FINAL)
public:
explicit QQuickSwipeDelegate(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickswipeview.cpp b/src/quicktemplates2/qquickswipeview.cpp
index 72754b0f..5f84f93e 100644
--- a/src/quicktemplates2/qquickswipeview.cpp
+++ b/src/quicktemplates2/qquickswipeview.cpp
@@ -121,6 +121,32 @@ public:
Qt::Orientation orientation;
};
+class QQuickSwipeViewAttachedPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QQuickSwipeViewAttached)
+
+public:
+ QQuickSwipeViewAttachedPrivate()
+ : swipeView(nullptr),
+ index(-1),
+ currentIndex(-1)
+ {
+ }
+
+ static QQuickSwipeViewAttachedPrivate *get(QQuickSwipeViewAttached *attached)
+ {
+ return attached->d_func();
+ }
+
+ void update(QQuickSwipeView *newView, int newIndex);
+ void updateCurrentIndex();
+ void setCurrentIndex(int i);
+
+ QQuickSwipeView *swipeView;
+ int index;
+ int currentIndex;
+};
+
void QQuickSwipeViewPrivate::resizeItems()
{
Q_Q(QQuickSwipeView);
@@ -190,6 +216,8 @@ void QQuickSwipeView::setInteractive(bool interactive)
Possible values:
\value Qt.Horizontal Horizontal (default)
\value Qt.Vertical Vertical
+
+ \sa horizontal, vertical
*/
Qt::Orientation QQuickSwipeView::orientation() const
{
@@ -209,6 +237,36 @@ void QQuickSwipeView::setOrientation(Qt::Orientation orientation)
emit orientationChanged();
}
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::SwipeView::horizontal
+ \readonly
+
+ This property holds whether the swipe view is horizontal.
+
+ \sa orientation
+*/
+bool QQuickSwipeView::isHorizontal() const
+{
+ Q_D(const QQuickSwipeView);
+ return d->orientation == Qt::Horizontal;
+}
+
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty bool QtQuick.Controls::SwipeView::vertical
+ \readonly
+
+ This property holds whether the swipe view is vertical.
+
+ \sa orientation
+*/
+bool QQuickSwipeView::isVertical() const
+{
+ Q_D(const QQuickSwipeView);
+ return d->orientation == Qt::Vertical;
+}
+
QQuickSwipeViewAttached *QQuickSwipeView::qmlAttachedProperties(QObject *object)
{
return new QQuickSwipeViewAttached(object);
@@ -221,12 +279,29 @@ void QQuickSwipeView::geometryChanged(const QRectF &newGeometry, const QRectF &o
d->resizeItems();
}
-void QQuickSwipeView::itemAdded(int, QQuickItem *item)
+void QQuickSwipeView::itemAdded(int index, QQuickItem *item)
{
Q_D(QQuickSwipeView);
QQuickItemPrivate::get(item)->setCulled(true); // QTBUG-51078, QTBUG-51669
if (isComponentComplete())
item->setSize(QSizeF(d->contentItem->width(), d->contentItem->height()));
+ QQuickSwipeViewAttached *attached = qobject_cast<QQuickSwipeViewAttached *>(qmlAttachedPropertiesObject<QQuickSwipeView>(item));
+ if (attached)
+ QQuickSwipeViewAttachedPrivate::get(attached)->update(this, index);
+}
+
+void QQuickSwipeView::itemMoved(int index, QQuickItem *item)
+{
+ QQuickSwipeViewAttached *attached = qobject_cast<QQuickSwipeViewAttached *>(qmlAttachedPropertiesObject<QQuickSwipeView>(item));
+ if (attached)
+ QQuickSwipeViewAttachedPrivate::get(attached)->update(this, index);
+}
+
+void QQuickSwipeView::itemRemoved(int, QQuickItem *item)
+{
+ QQuickSwipeViewAttached *attached = qobject_cast<QQuickSwipeViewAttached *>(qmlAttachedPropertiesObject<QQuickSwipeView>(item));
+ if (attached)
+ QQuickSwipeViewAttachedPrivate::get(attached)->update(nullptr, -1);
}
#if QT_CONFIG(accessibility)
@@ -283,85 +358,11 @@ QAccessible::Role QQuickSwipeView::accessibleRole() const
It is attached to each child item of the SwipeView.
*/
-class QQuickSwipeViewAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener
-{
- Q_DECLARE_PUBLIC(QQuickSwipeViewAttached)
-public:
- QQuickSwipeViewAttachedPrivate()
- : item(nullptr),
- swipeView(nullptr),
- index(-1),
- currentIndex(-1)
- {
- }
-
- ~QQuickSwipeViewAttachedPrivate() {
- }
-
- void updateView(QQuickItem *parent);
-
- void itemChildAdded(QQuickItem *, QQuickItem *) override;
- void itemChildRemoved(QQuickItem *, QQuickItem *) override;
- void itemParentChanged(QQuickItem *, QQuickItem *) override;
- void itemDestroyed(QQuickItem *) override;
-
- void updateIndex();
- void updateCurrentIndex();
-
- void setView(QQuickSwipeView *view);
- void setIndex(int i);
- void setCurrentIndex(int i);
-
- QQuickItem *item;
- QQuickSwipeView *swipeView;
- int index;
- int currentIndex;
-};
-
-void QQuickSwipeViewAttachedPrivate::updateIndex()
-{
- setIndex(swipeView ? QQuickSwipeViewPrivate::get(swipeView)->contentModel->indexOf(item, nullptr) : -1);
-}
-
void QQuickSwipeViewAttachedPrivate::updateCurrentIndex()
{
setCurrentIndex(swipeView ? swipeView->currentIndex() : -1);
}
-void QQuickSwipeViewAttachedPrivate::setView(QQuickSwipeView *view)
-{
- if (view == swipeView)
- return;
-
- if (swipeView) {
- QQuickItemPrivate *p = QQuickItemPrivate::get(swipeView);
- p->removeItemChangeListener(this, QQuickItemPrivate::Children);
-
- disconnect(swipeView, &QQuickSwipeView::currentIndexChanged,
- this, &QQuickSwipeViewAttachedPrivate::updateCurrentIndex);
- disconnect(swipeView, &QQuickSwipeView::contentChildrenChanged,
- this, &QQuickSwipeViewAttachedPrivate::updateIndex);
- }
-
- swipeView = view;
-
- if (swipeView) {
- QQuickItemPrivate *p = QQuickItemPrivate::get(swipeView);
- p->addItemChangeListener(this, QQuickItemPrivate::Children);
-
- connect(swipeView, &QQuickSwipeView::currentIndexChanged,
- this, &QQuickSwipeViewAttachedPrivate::updateCurrentIndex);
- connect(swipeView, &QQuickSwipeView::contentChildrenChanged,
- this, &QQuickSwipeViewAttachedPrivate::updateIndex);
- }
-
- Q_Q(QQuickSwipeViewAttached);
- emit q->viewChanged();
-
- updateIndex();
- updateCurrentIndex();
-}
-
void QQuickSwipeViewAttachedPrivate::setCurrentIndex(int i)
{
if (i == currentIndex)
@@ -381,79 +382,37 @@ void QQuickSwipeViewAttachedPrivate::setCurrentIndex(int i)
emit q->isPreviousItemChanged();
}
-void QQuickSwipeViewAttachedPrivate::setIndex(int i)
+void QQuickSwipeViewAttachedPrivate::update(QQuickSwipeView *newView, int newIndex)
{
- if (i == index)
- return;
-
- index = i;
Q_Q(QQuickSwipeViewAttached);
- emit q->indexChanged();
-}
+ int oldIndex = index;
+ QQuickSwipeView *oldView = swipeView;
-void QQuickSwipeViewAttachedPrivate::updateView(QQuickItem *parent)
-{
- // parent can be, e.g.:
- // - The contentItem of a ListView (typically the case)
- // - A non-visual or weird type like TestCase, when child items are created from components
- // wherein the attached properties are used
- // - null, when the item was removed with removeItem()
- QQuickSwipeView *view = nullptr;
- if (parent) {
- view = qobject_cast<QQuickSwipeView*>(parent);
- if (!view) {
- if (parent->parentItem() && parent->parentItem()->property("contentItem").isValid()) {
- // The parent is the contentItem of some kind of view.
- view = qobject_cast<QQuickSwipeView*>(parent->parentItem()->parentItem());
- }
+ index = newIndex;
+ swipeView = newView;
+
+ if (oldView != newView) {
+ if (oldView) {
+ disconnect(oldView, &QQuickSwipeView::currentIndexChanged,
+ this, &QQuickSwipeViewAttachedPrivate::updateCurrentIndex);
}
+ if (newView) {
+ connect(newView, &QQuickSwipeView::currentIndexChanged,
+ this, &QQuickSwipeViewAttachedPrivate::updateCurrentIndex);
+ }
+ emit q->viewChanged();
}
+ if (oldIndex != newIndex)
+ emit q->indexChanged();
- setView(view);
-}
-
-void QQuickSwipeViewAttachedPrivate::itemChildAdded(QQuickItem *, QQuickItem *)
-{
- updateIndex();
-}
-
-void QQuickSwipeViewAttachedPrivate::itemChildRemoved(QQuickItem *, QQuickItem *)
-{
- updateIndex();
-}
-
-void QQuickSwipeViewAttachedPrivate::itemParentChanged(QQuickItem *, QQuickItem *parent)
-{
- updateView(parent);
-}
-
-void QQuickSwipeViewAttachedPrivate::itemDestroyed(QQuickItem *item)
-{
- QQuickItemPrivate::get(item)->removeItemChangeListener(this, QQuickItemPrivate::Parent | QQuickItemPrivate::Destroyed);
+ updateCurrentIndex();
}
QQuickSwipeViewAttached::QQuickSwipeViewAttached(QObject *parent)
: QObject(*(new QQuickSwipeViewAttachedPrivate), parent)
{
- Q_D(QQuickSwipeViewAttached);
- d->item = qobject_cast<QQuickItem *>(parent);
- if (d->item) {
- if (d->item->parentItem())
- d->updateView(d->item->parentItem());
-
- QQuickItemPrivate *p = QQuickItemPrivate::get(d->item);
- p->addItemChangeListener(d, QQuickItemPrivate::Parent | QQuickItemPrivate::Destroyed);
- } else if (parent) {
+ if (!qobject_cast<QQuickItem *>(parent))
qmlWarning(parent) << "SwipeView: attached properties must be accessed from within a child item";
- }
-}
-
-QQuickSwipeViewAttached::~QQuickSwipeViewAttached()
-{
- Q_D(QQuickSwipeViewAttached);
- QQuickItem *item = qobject_cast<QQuickItem *>(parent());
- if (item)
- QQuickItemPrivate::get(item)->removeItemChangeListener(d, QQuickItemPrivate::Parent | QQuickItemPrivate::Destroyed);
}
int QQuickSwipeViewAttached::index() const
diff --git a/src/quicktemplates2/qquickswipeview_p.h b/src/quicktemplates2/qquickswipeview_p.h
index 98594bd3..03f6cefa 100644
--- a/src/quicktemplates2/qquickswipeview_p.h
+++ b/src/quicktemplates2/qquickswipeview_p.h
@@ -62,6 +62,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeView : public QQuickContainer
Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION 1)
// 2.2 (Qt 5.9)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL REVISION 2)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
public:
explicit QQuickSwipeView(QQuickItem *parent = nullptr);
@@ -76,6 +79,10 @@ public:
Qt::Orientation orientation() const;
void setOrientation(Qt::Orientation orientation);
+ // 2.3 (Qt 5.10)
+ bool isHorizontal() const;
+ bool isVertical() const;
+
Q_SIGNALS:
// 2.1 (Qt 5.8)
Q_REVISION(1) void interactiveChanged();
@@ -85,6 +92,8 @@ Q_SIGNALS:
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
void itemAdded(int index, QQuickItem *item) override;
+ void itemMoved(int index, QQuickItem *item) override;
+ void itemRemoved(int index, QQuickItem *item) override;
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
@@ -109,7 +118,6 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeViewAttached : public QObject
public:
explicit QQuickSwipeViewAttached(QObject *parent = nullptr);
- ~QQuickSwipeViewAttached();
int index() const;
bool isCurrentItem() const;
diff --git a/src/quicktemplates2/qquickswitch.cpp b/src/quicktemplates2/qquickswitch.cpp
index f9bbff25..da1f0408 100644
--- a/src/quicktemplates2/qquickswitch.cpp
+++ b/src/quicktemplates2/qquickswitch.cpp
@@ -231,4 +231,10 @@ void QQuickSwitch::buttonChange(ButtonChange change)
QQuickAbstractButton::buttonChange(change);
}
+QPalette QQuickSwitch::defaultPalette() const
+{
+ // ### TODO: add QPlatformTheme::SwitchPalette
+ return QQuickControlPrivate::themePalette(QPlatformTheme::CheckBoxPalette);
+}
+
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickswitch_p.h b/src/quicktemplates2/qquickswitch_p.h
index 12e20bde..0faaf114 100644
--- a/src/quicktemplates2/qquickswitch_p.h
+++ b/src/quicktemplates2/qquickswitch_p.h
@@ -83,6 +83,8 @@ protected:
void nextCheckState() override;
void buttonChange(ButtonChange change) override;
+ QPalette defaultPalette() const override;
+
private:
Q_DISABLE_COPY(QQuickSwitch)
Q_DECLARE_PRIVATE(QQuickSwitch)
diff --git a/src/quicktemplates2/qquicktabbar.cpp b/src/quicktemplates2/qquicktabbar.cpp
index 65a4a863..814d14ea 100644
--- a/src/quicktemplates2/qquicktabbar.cpp
+++ b/src/quicktemplates2/qquicktabbar.cpp
@@ -116,6 +116,28 @@ public:
QQuickTabBar::Position position;
};
+class QQuickTabBarAttachedPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QQuickTabBarAttached)
+
+public:
+ QQuickTabBarAttachedPrivate()
+ : index(-1),
+ tabBar(nullptr)
+ {
+ }
+
+ static QQuickTabBarAttachedPrivate *get(QQuickTabBarAttached *attached)
+ {
+ return attached->d_func();
+ }
+
+ void update(QQuickTabBar *tabBar, int index);
+
+ int index;
+ QQuickTabBar *tabBar;
+};
+
QQuickTabBarPrivate::QQuickTabBarPrivate()
: updatingLayout(false),
hasContentWidth(false),
@@ -152,38 +174,47 @@ void QQuickTabBarPrivate::updateLayout()
qreal maxHeight = 0;
qreal totalWidth = 0;
qreal reservedWidth = 0;
+ int resizableCount = 0;
- QVector<QQuickItem *> resizableItems;
- resizableItems.reserve(count);
+ QVector<QQuickItem *> allItems;
+ allItems.reserve(count);
for (int i = 0; i < count; ++i) {
QQuickItem *item = q->itemAt(i);
if (item) {
QQuickItemPrivate *p = QQuickItemPrivate::get(item);
if (!p->widthValid) {
- resizableItems += item;
+ ++resizableCount;
totalWidth += item->implicitWidth();
} else {
reservedWidth += item->width();
totalWidth += item->width();
}
maxHeight = qMax(maxHeight, item->implicitHeight());
+ allItems += item;
}
}
const qreal totalSpacing = qMax(0, count - 1) * spacing;
totalWidth += totalSpacing;
- if (!resizableItems.isEmpty()) {
- const qreal itemWidth = (contentItem->width() - reservedWidth - totalSpacing) / resizableItems.count();
+ const qreal itemWidth = (contentItem->width() - reservedWidth - totalSpacing) / qMax(1, resizableCount);
- updatingLayout = true;
- for (QQuickItem *item : qAsConst(resizableItems)) {
+ updatingLayout = true;
+ for (QQuickItem *item : qAsConst(allItems)) {
+ QQuickItemPrivate *p = QQuickItemPrivate::get(item);
+ if (!p->widthValid) {
item->setWidth(itemWidth);
- QQuickItemPrivate::get(item)->widthValid = false;
+ p->widthValid = false;
+ }
+ if (!p->heightValid) {
+ item->setHeight(hasContentHeight ? contentHeight : maxHeight);
+ p->heightValid = false;
+ } else {
+ item->setY((maxHeight - item->height()) / 2);
}
- updatingLayout = false;
}
+ updatingLayout = false;
bool contentWidthChange = false;
if (!hasContentWidth && !qFuzzyCompare(contentWidth, totalWidth)) {
@@ -342,6 +373,11 @@ void QQuickTabBar::resetContentHeight()
d->updateLayout();
}
+QQuickTabBarAttached *QQuickTabBar::qmlAttachedProperties(QObject *object)
+{
+ return new QQuickTabBarAttached(object);
+}
+
void QQuickTabBar::updatePolish()
{
Q_D(QQuickTabBar);
@@ -376,20 +412,38 @@ void QQuickTabBar::itemAdded(int index, QQuickItem *item)
QQuickItemPrivate::get(item)->setCulled(true); // QTBUG-55129
if (QQuickTabButton *button = qobject_cast<QQuickTabButton *>(item))
QObjectPrivate::connect(button, &QQuickTabButton::checkedChanged, d, &QQuickTabBarPrivate::updateCurrentIndex);
+ QQuickTabBarAttached *attached = qobject_cast<QQuickTabBarAttached *>(qmlAttachedPropertiesObject<QQuickTabBar>(item));
+ if (attached)
+ QQuickTabBarAttachedPrivate::get(attached)->update(this, index);
if (isComponentComplete())
polish();
}
+void QQuickTabBar::itemMoved(int index, QQuickItem *item)
+{
+ QQuickTabBarAttached *attached = qobject_cast<QQuickTabBarAttached *>(qmlAttachedPropertiesObject<QQuickTabBar>(item));
+ if (attached)
+ QQuickTabBarAttachedPrivate::get(attached)->update(this, index);
+}
+
void QQuickTabBar::itemRemoved(int index, QQuickItem *item)
{
Q_D(QQuickTabBar);
Q_UNUSED(index);
if (QQuickTabButton *button = qobject_cast<QQuickTabButton *>(item))
QObjectPrivate::disconnect(button, &QQuickTabButton::checkedChanged, d, &QQuickTabBarPrivate::updateCurrentIndex);
+ QQuickTabBarAttached *attached = qobject_cast<QQuickTabBarAttached *>(qmlAttachedPropertiesObject<QQuickTabBar>(item));
+ if (attached)
+ QQuickTabBarAttachedPrivate::get(attached)->update(nullptr, -1);
if (isComponentComplete())
polish();
}
+QPalette QQuickTabBar::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::TabBarPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickTabBar::accessibleRole() const
{
@@ -397,4 +451,87 @@ QAccessible::Role QQuickTabBar::accessibleRole() const
}
#endif
+/*!
+ \qmlattachedproperty int QtQuick.Controls::TabBar::index
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \readonly
+
+ This attached property holds the index of each tab button in the TabBar.
+
+ It is attached to each tab button of the TabBar.
+*/
+
+/*!
+ \qmlattachedproperty TabBar QtQuick.Controls::TabBar::tabBar
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \readonly
+
+ This attached property holds the tab bar that manages this tab button.
+
+ It is attached to each tab button of the TabBar.
+*/
+
+/*!
+ \qmlattachedproperty enumeration QtQuick.Controls::TabBar::position
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \readonly
+
+ This attached property holds the position of the tab bar.
+
+ It is attached to each tab button of the TabBar.
+
+ Possible values:
+ \value TabBar.Header The tab bar is at the top, as a window or page header.
+ \value TabBar.Footer The tab bar is at the bottom, as a window or page footer.
+*/
+
+void QQuickTabBarAttachedPrivate::update(QQuickTabBar *newTabBar, int newIndex)
+{
+ Q_Q(QQuickTabBarAttached);
+ const int oldIndex = index;
+ const QQuickTabBar *oldTabBar = tabBar;
+ const QQuickTabBar::Position oldPos = q->position();
+
+ index = newIndex;
+ tabBar = newTabBar;
+
+ if (oldTabBar != newTabBar) {
+ if (oldTabBar)
+ QObject::disconnect(oldTabBar, &QQuickTabBar::positionChanged, q, &QQuickTabBarAttached::positionChanged);
+ if (newTabBar)
+ QObject::connect(newTabBar, &QQuickTabBar::positionChanged, q, &QQuickTabBarAttached::positionChanged);
+ emit q->tabBarChanged();
+ }
+
+ if (oldIndex != newIndex)
+ emit q->indexChanged();
+ if (oldPos != q->position())
+ emit q->positionChanged();
+}
+
+QQuickTabBarAttached::QQuickTabBarAttached(QObject *parent)
+ : QObject(*(new QQuickTabBarAttachedPrivate), parent)
+{
+}
+
+int QQuickTabBarAttached::index() const
+{
+ Q_D(const QQuickTabBarAttached);
+ return d->index;
+}
+
+QQuickTabBar *QQuickTabBarAttached::tabBar() const
+{
+ Q_D(const QQuickTabBarAttached);
+ return d->tabBar;
+}
+
+QQuickTabBar::Position QQuickTabBarAttached::position() const
+{
+ Q_D(const QQuickTabBarAttached);
+ if (!d->tabBar)
+ return QQuickTabBar::Header;
+ return d->tabBar->position();
+}
+
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquicktabbar_p.h b/src/quicktemplates2/qquicktabbar_p.h
index 5780197b..f0299bd5 100644
--- a/src/quicktemplates2/qquicktabbar_p.h
+++ b/src/quicktemplates2/qquicktabbar_p.h
@@ -53,6 +53,8 @@
QT_BEGIN_NAMESPACE
class QQuickTabBarPrivate;
+class QQuickTabBarAttached;
+class QQuickTabBarAttachedPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTabBar : public QQuickContainer
{
@@ -83,6 +85,8 @@ public:
void setContentHeight(qreal height);
void resetContentHeight();
+ static QQuickTabBarAttached *qmlAttachedProperties(QObject *object);
+
Q_SIGNALS:
void positionChanged();
// 2.2 (Qt 5.9)
@@ -95,8 +99,11 @@ protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
bool isContent(QQuickItem *item) const override;
void itemAdded(int index, QQuickItem *item) override;
+ void itemMoved(int index, QQuickItem *item) override;
void itemRemoved(int index, QQuickItem *item) override;
+ QPalette defaultPalette() const override;
+
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
#endif
@@ -106,8 +113,33 @@ private:
Q_DECLARE_PRIVATE(QQuickTabBar)
};
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTabBarAttached : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int index READ index NOTIFY indexChanged FINAL)
+ Q_PROPERTY(QQuickTabBar *tabBar READ tabBar NOTIFY tabBarChanged FINAL)
+ Q_PROPERTY(QQuickTabBar::Position position READ position NOTIFY positionChanged FINAL)
+
+public:
+ explicit QQuickTabBarAttached(QObject *parent = nullptr);
+
+ int index() const;
+ QQuickTabBar *tabBar() const;
+ QQuickTabBar::Position position() const;
+
+Q_SIGNALS:
+ void indexChanged();
+ void tabBarChanged();
+ void positionChanged();
+
+private:
+ Q_DISABLE_COPY(QQuickTabBarAttached)
+ Q_DECLARE_PRIVATE(QQuickTabBarAttached)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickTabBar)
+QML_DECLARE_TYPEINFO(QQuickTabBar, QML_HAS_ATTACHED_PROPERTIES)
#endif // QQUICKTABBAR_P_H
diff --git a/src/quicktemplates2/qquicktabbutton.cpp b/src/quicktemplates2/qquicktabbutton.cpp
index 9afe5363..617d4aea 100644
--- a/src/quicktemplates2/qquicktabbutton.cpp
+++ b/src/quicktemplates2/qquicktabbutton.cpp
@@ -75,6 +75,11 @@ QFont QQuickTabButton::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::TabButtonFont);
}
+QPalette QQuickTabButton::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::TabBarPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickTabButton::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquicktabbutton_p.h b/src/quicktemplates2/qquicktabbutton_p.h
index 49ecee50..9ca9df9f 100644
--- a/src/quicktemplates2/qquicktabbutton_p.h
+++ b/src/quicktemplates2/qquicktabbutton_p.h
@@ -61,6 +61,7 @@ public:
protected:
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp
index 8c48bdf9..02e84a35 100644
--- a/src/quicktemplates2/qquicktextarea.cpp
+++ b/src/quicktemplates2/qquicktextarea.cpp
@@ -138,7 +138,6 @@ QQuickTextAreaPrivate::QQuickTextAreaPrivate()
#endif
background(nullptr),
focusReason(Qt::OtherFocusReason),
- accessibleAttached(nullptr),
flickable(nullptr)
{
#if QT_CONFIG(accessibility)
@@ -189,21 +188,71 @@ void QQuickTextAreaPrivate::resolveFont()
inheritFont(QQuickControlPrivate::parentFont(q));
}
-void QQuickTextAreaPrivate::inheritFont(const QFont &f)
+void QQuickTextAreaPrivate::inheritFont(const QFont &font)
{
- Q_Q(QQuickTextArea);
- QFont parentFont = font.resolve(f);
- parentFont.resolve(font.resolve() | f.resolve());
+ QFont parentFont = extra.isAllocated() ? extra->requestedFont.resolve(font) : font;
+ parentFont.resolve(extra.isAllocated() ? extra->requestedFont.resolve() | font.resolve() : font.resolve());
const QFont defaultFont = QQuickControlPrivate::themeFont(QPlatformTheme::EditorFont);
const QFont resolvedFont = parentFont.resolve(defaultFont);
- const bool changed = resolvedFont != sourceFont;
- q->QQuickTextEdit::setFont(resolvedFont);
- if (changed)
+ setFont_helper(resolvedFont);
+}
+
+/*!
+ \internal
+
+ Assign \a font to this control, and propagate it to all children.
+*/
+void QQuickTextAreaPrivate::updateFont(const QFont &font)
+{
+ Q_Q(QQuickTextArea);
+ QFont oldFont = sourceFont;
+ q->QQuickTextEdit::setFont(font);
+
+ QQuickControlPrivate::updateFontRecur(q, font);
+
+ if (oldFont != font)
emit q->fontChanged();
}
+/*!
+ \internal
+
+ Determine which palette is implicitly imposed on this control by its ancestors
+ and QGuiApplication::palette, resolve this against its own palette (attributes from
+ the implicit palette are copied over). Then propagate this palette to this
+ control's children.
+*/
+void QQuickTextAreaPrivate::resolvePalette()
+{
+ Q_Q(QQuickTextArea);
+ inheritPalette(QQuickControlPrivate::parentPalette(q));
+}
+
+void QQuickTextAreaPrivate::inheritPalette(const QPalette &palette)
+{
+ QPalette parentPalette = extra.isAllocated() ? extra->requestedPalette.resolve(palette) : palette;
+ parentPalette.resolve(extra.isAllocated() ? extra->requestedPalette.resolve() | palette.resolve() : palette.resolve());
+
+ const QPalette defaultPalette = QQuickControlPrivate::themePalette(QPlatformTheme::TextEditPalette);
+ const QPalette resolvedPalette = parentPalette.resolve(defaultPalette);
+
+ setPalette_helper(resolvedPalette);
+}
+
+void QQuickTextAreaPrivate::updatePalette(const QPalette &palette)
+{
+ Q_Q(QQuickTextArea);
+ QPalette oldPalette = resolvedPalette;
+ resolvedPalette = palette;
+
+ QQuickControlPrivate::updatePaletteRecur(q, palette);
+
+ if (oldPalette != palette)
+ emit q->paletteChanged();
+}
+
#if QT_CONFIG(quicktemplates2_hover)
void QQuickTextAreaPrivate::updateHoverEnabled(bool enabled, bool xplicit)
{
@@ -360,7 +409,7 @@ void QQuickTextAreaPrivate::readOnlyChanged(bool isReadOnly)
{
Q_UNUSED(isReadOnly);
#if QT_CONFIG(accessibility)
- if (accessibleAttached)
+ if (QQuickAccessibleAttached *accessibleAttached = QQuickControlPrivate::accessibleAttached(q_func()))
accessibleAttached->set_readOnly(isReadOnly);
#endif
#if QT_CONFIG(cursor)
@@ -371,18 +420,15 @@ void QQuickTextAreaPrivate::readOnlyChanged(bool isReadOnly)
#if QT_CONFIG(accessibility)
void QQuickTextAreaPrivate::accessibilityActiveChanged(bool active)
{
- if (accessibleAttached || !active)
+ if (!active)
return;
Q_Q(QQuickTextArea);
- accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(q, true));
- if (accessibleAttached) {
- accessibleAttached->setRole(accessibleRole());
- accessibleAttached->set_readOnly(q->isReadOnly());
- accessibleAttached->setDescription(placeholder);
- } else {
- qWarning() << "QQuickTextArea: " << q << " QQuickAccessibleAttached object creation failed!";
- }
+ QQuickAccessibleAttached *accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(q, true));
+ Q_ASSERT(accessibleAttached);
+ accessibleAttached->setRole(accessibleRole());
+ accessibleAttached->set_readOnly(q->isReadOnly());
+ accessibleAttached->setDescription(placeholder);
}
QAccessible::Role QQuickTextAreaPrivate::accessibleRole() const
@@ -426,10 +472,10 @@ QFont QQuickTextArea::font() const
void QQuickTextArea::setFont(const QFont &font)
{
Q_D(QQuickTextArea);
- if (d->font.resolve() == font.resolve() && d->font == font)
+ if (d->extra.value().requestedFont.resolve() == font.resolve() && d->extra.value().requestedFont == font)
return;
- d->font = font;
+ d->extra.value().requestedFont = font;
d->resolveFont();
}
@@ -486,8 +532,8 @@ void QQuickTextArea::setPlaceholderText(const QString &text)
d->placeholder = text;
#if QT_CONFIG(accessibility)
- if (d->accessibleAttached)
- d->accessibleAttached->setDescription(text);
+ if (QQuickAccessibleAttached *accessibleAttached = QQuickControlPrivate::accessibleAttached(this))
+ accessibleAttached->setDescription(text);
#endif
emit placeholderTextChanged();
}
@@ -597,11 +643,44 @@ void QQuickTextArea::resetHoverEnabled()
#endif
}
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty palette QtQuick.Controls::TextArea::palette
+
+ This property holds the palette currently set for the text area.
+
+ \sa Control::palette
+*/
+QPalette QQuickTextArea::palette() const
+{
+ Q_D(const QQuickTextArea);
+ QPalette palette = d->resolvedPalette;
+ if (!isEnabled())
+ palette.setCurrentColorGroup(QPalette::Disabled);
+ return palette;
+}
+
+void QQuickTextArea::setPalette(const QPalette &palette)
+{
+ Q_D(QQuickTextArea);
+ if (d->extra.value().requestedPalette.resolve() == palette.resolve() && d->extra.value().requestedPalette == palette)
+ return;
+
+ d->extra.value().requestedPalette = palette;
+ d->resolvePalette();
+}
+
+void QQuickTextArea::resetPalette()
+{
+ setPalette(QPalette());
+}
+
void QQuickTextArea::classBegin()
{
Q_D(QQuickTextArea);
QQuickTextEdit::classBegin();
d->resolveFont();
+ d->resolvePalette();
}
void QQuickTextArea::componentComplete()
@@ -613,7 +692,7 @@ void QQuickTextArea::componentComplete()
setAcceptHoverEvents(QQuickControlPrivate::calcHoverEnabled(d->parentItem));
#endif
#if QT_CONFIG(accessibility)
- if (!d->accessibleAttached && QAccessible::isActive())
+ if (QAccessible::isActive())
d->accessibilityActiveChanged(true);
#endif
}
@@ -622,20 +701,31 @@ void QQuickTextArea::itemChange(QQuickItem::ItemChange change, const QQuickItem:
{
Q_D(QQuickTextArea);
QQuickTextEdit::itemChange(change, value);
- if ((change == ItemParentHasChanged && value.item) || (change == ItemSceneChange && value.window)) {
- d->resolveFont();
+ switch (change) {
+ case ItemEnabledHasChanged:
+ emit paletteChanged();
+ break;
+ case ItemSceneChange:
+ case ItemParentHasChanged:
+ if ((change == ItemParentHasChanged && value.item) || (change == ItemSceneChange && value.window)) {
+ d->resolveFont();
+ d->resolvePalette();
#if QT_CONFIG(quicktemplates2_hover)
- if (!d->explicitHoverEnabled)
- d->updateHoverEnabled(QQuickControlPrivate::calcHoverEnabled(d->parentItem), false); // explicit=false
+ if (!d->explicitHoverEnabled)
+ d->updateHoverEnabled(QQuickControlPrivate::calcHoverEnabled(d->parentItem), false); // explicit=false
#endif
- if (change == ItemParentHasChanged) {
- QQuickFlickable *flickable = qobject_cast<QQuickFlickable *>(value.item->parentItem());
- if (flickable) {
- QQuickScrollView *scrollView = qobject_cast<QQuickScrollView *>(flickable->parentItem());
- if (scrollView)
- d->attachFlickable(flickable);
+ if (change == ItemParentHasChanged) {
+ QQuickFlickable *flickable = qobject_cast<QQuickFlickable *>(value.item->parentItem());
+ if (flickable) {
+ QQuickScrollView *scrollView = qobject_cast<QQuickScrollView *>(flickable->parentItem());
+ if (scrollView)
+ d->attachFlickable(flickable);
+ }
}
}
+ break;
+ default:
+ break;
}
}
diff --git a/src/quicktemplates2/qquicktextarea_p.h b/src/quicktemplates2/qquicktextarea_p.h
index 507f8b14..26799532 100644
--- a/src/quicktemplates2/qquicktextarea_p.h
+++ b/src/quicktemplates2/qquicktextarea_p.h
@@ -48,6 +48,7 @@
// We mean it.
//
+#include <QtGui/qpalette.h>
#include <QtQuick/private/qquicktextedit_p.h>
#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
@@ -70,6 +71,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTextArea : public QQuickTextEdit
// 2.1 (Qt 5.8)
Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION 1)
Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION 1)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(QPalette palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged FINAL REVISION 3)
public:
explicit QQuickTextArea(QQuickItem *parent = nullptr);
@@ -99,6 +102,11 @@ public:
void setHoverEnabled(bool enabled);
void resetHoverEnabled();
+ // 2.3 (Qt 5.10)
+ QPalette palette() const;
+ void setPalette(const QPalette &palette);
+ void resetPalette();
+
Q_SIGNALS:
void fontChanged();
void implicitWidthChanged3();
@@ -112,6 +120,8 @@ Q_SIGNALS:
Q_REVISION(1) void released(QQuickMouseEvent *event);
Q_REVISION(1) void hoveredChanged();
Q_REVISION(1) void hoverEnabledChanged();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void paletteChanged();
protected:
void classBegin() override;
diff --git a/src/quicktemplates2/qquicktextarea_p_p.h b/src/quicktemplates2/qquicktextarea_p_p.h
index ef2c7237..32f53c4f 100644
--- a/src/quicktemplates2/qquicktextarea_p_p.h
+++ b/src/quicktemplates2/qquicktextarea_p_p.h
@@ -48,11 +48,12 @@
// We mean it.
//
+#include <QtQml/private/qlazilyallocated_p.h>
#include <QtQuick/private/qquicktextedit_p_p.h>
#include <QtQuick/private/qquickitemchangelistener_p.h>
#include <QtQuickTemplates2/private/qquickpresshandler_p_p.h>
-#include "qquicktextarea_p.h"
+#include <QtQuickTemplates2/private/qquicktextarea_p.h>
#if QT_CONFIG(accessibility)
#include <QtGui/qaccessible.h>
@@ -61,7 +62,6 @@
QT_BEGIN_NAMESPACE
class QQuickFlickable;
-class QQuickAccessibleAttached;
class QQuickTextAreaPrivate : public QQuickTextEditPrivate, public QQuickItemChangeListener
#if QT_CONFIG(accessibility)
@@ -80,8 +80,24 @@ public:
}
void resizeBackground();
+
void resolveFont();
- void inheritFont(const QFont &f);
+ void inheritFont(const QFont &font);
+ void updateFont(const QFont &font);
+ inline void setFont_helper(const QFont &font) {
+ if (sourceFont.resolve() == font.resolve() && sourceFont == font)
+ return;
+ updateFont(font);
+ }
+
+ void resolvePalette();
+ void inheritPalette(const QPalette &palette);
+ void updatePalette(const QPalette &palette);
+ inline void setPalette_helper(const QPalette &palette) {
+ if (resolvedPalette.resolve() == palette.resolve() && resolvedPalette == palette)
+ return;
+ updatePalette(palette);
+ }
#if QT_CONFIG(quicktemplates2_hover)
void updateHoverEnabled(bool h, bool e);
@@ -112,12 +128,18 @@ public:
bool hovered;
bool explicitHoverEnabled;
#endif
- QFont font;
+
+ struct ExtraData {
+ QFont requestedFont;
+ QPalette requestedPalette;
+ };
+ QLazilyAllocated<ExtraData> extra;
+
+ QPalette resolvedPalette;
QQuickItem *background;
QString placeholder;
Qt::FocusReason focusReason;
QQuickPressHandler pressHandler;
- QQuickAccessibleAttached *accessibleAttached;
QQuickFlickable *flickable;
};
diff --git a/src/quicktemplates2/qquicktextfield.cpp b/src/quicktemplates2/qquicktextfield.cpp
index 397e666e..fba0e67c 100644
--- a/src/quicktemplates2/qquicktextfield.cpp
+++ b/src/quicktemplates2/qquicktextfield.cpp
@@ -118,8 +118,7 @@ QQuickTextFieldPrivate::QQuickTextFieldPrivate()
explicitHoverEnabled(false),
#endif
background(nullptr),
- focusReason(Qt::OtherFocusReason),
- accessibleAttached(nullptr)
+ focusReason(Qt::OtherFocusReason)
{
#if QT_CONFIG(accessibility)
QAccessible::installActivationObserver(this);
@@ -163,21 +162,71 @@ void QQuickTextFieldPrivate::resolveFont()
inheritFont(QQuickControlPrivate::parentFont(q));
}
-void QQuickTextFieldPrivate::inheritFont(const QFont &f)
+void QQuickTextFieldPrivate::inheritFont(const QFont &font)
{
- Q_Q(QQuickTextField);
- QFont parentFont = font.resolve(f);
- parentFont.resolve(font.resolve() | f.resolve());
+ QFont parentFont = extra.isAllocated() ? extra->requestedFont.resolve(font) : font;
+ parentFont.resolve(extra.isAllocated() ? extra->requestedFont.resolve() | font.resolve() : font.resolve());
const QFont defaultFont = QQuickControlPrivate::themeFont(QPlatformTheme::EditorFont);
const QFont resolvedFont = parentFont.resolve(defaultFont);
- const bool changed = resolvedFont != sourceFont;
- q->QQuickTextInput::setFont(resolvedFont);
- if (changed)
+ setFont_helper(resolvedFont);
+}
+
+/*!
+ \internal
+
+ Assign \a font to this control, and propagate it to all children.
+*/
+void QQuickTextFieldPrivate::updateFont(const QFont &font)
+{
+ Q_Q(QQuickTextField);
+ QFont oldFont = sourceFont;
+ q->QQuickTextInput::setFont(font);
+
+ QQuickControlPrivate::updateFontRecur(q, font);
+
+ if (oldFont != font)
emit q->fontChanged();
}
+/*!
+ \internal
+
+ Determine which palette is implicitly imposed on this control by its ancestors
+ and QGuiApplication::palette, resolve this against its own palette (attributes from
+ the implicit palette are copied over). Then propagate this palette to this
+ control's children.
+*/
+void QQuickTextFieldPrivate::resolvePalette()
+{
+ Q_Q(QQuickTextField);
+ inheritPalette(QQuickControlPrivate::parentPalette(q));
+}
+
+void QQuickTextFieldPrivate::inheritPalette(const QPalette &palette)
+{
+ QPalette parentPalette = extra.isAllocated() ? extra->requestedPalette.resolve(palette) : palette;
+ parentPalette.resolve(extra.isAllocated() ? extra->requestedPalette.resolve() | palette.resolve() : palette.resolve());
+
+ const QPalette defaultPalette = QQuickControlPrivate::themePalette(QPlatformTheme::TextLineEditPalette);
+ const QPalette resolvedPalette = parentPalette.resolve(defaultPalette);
+
+ setPalette_helper(resolvedPalette);
+}
+
+void QQuickTextFieldPrivate::updatePalette(const QPalette &palette)
+{
+ Q_Q(QQuickTextField);
+ QPalette oldPalette = resolvedPalette;
+ resolvedPalette = palette;
+
+ QQuickControlPrivate::updatePaletteRecur(q, palette);
+
+ if (oldPalette != palette)
+ emit q->paletteChanged();
+}
+
#if QT_CONFIG(quicktemplates2_hover)
void QQuickTextFieldPrivate::updateHoverEnabled(bool enabled, bool xplicit)
{
@@ -223,7 +272,7 @@ void QQuickTextFieldPrivate::readOnlyChanged(bool isReadOnly)
{
Q_UNUSED(isReadOnly);
#if QT_CONFIG(accessibility)
- if (accessibleAttached)
+ if (QQuickAccessibleAttached *accessibleAttached = QQuickControlPrivate::accessibleAttached(q_func()))
accessibleAttached->set_readOnly(isReadOnly);
#endif
#if QT_CONFIG(cursor)
@@ -234,7 +283,7 @@ void QQuickTextFieldPrivate::readOnlyChanged(bool isReadOnly)
void QQuickTextFieldPrivate::echoModeChanged(QQuickTextField::EchoMode echoMode)
{
#if QT_CONFIG(accessibility)
- if (accessibleAttached)
+ if (QQuickAccessibleAttached *accessibleAttached = QQuickControlPrivate::accessibleAttached(q_func()))
accessibleAttached->set_passwordEdit((echoMode == QQuickTextField::Password || echoMode == QQuickTextField::PasswordEchoOnEdit) ? true : false);
#else
Q_UNUSED(echoMode)
@@ -244,19 +293,16 @@ void QQuickTextFieldPrivate::echoModeChanged(QQuickTextField::EchoMode echoMode)
#if QT_CONFIG(accessibility)
void QQuickTextFieldPrivate::accessibilityActiveChanged(bool active)
{
- if (accessibleAttached || !active)
+ if (!active)
return;
Q_Q(QQuickTextField);
- accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(q, true));
- if (accessibleAttached) {
- accessibleAttached->setRole(accessibleRole());
- accessibleAttached->set_readOnly(m_readOnly);
- accessibleAttached->set_passwordEdit((m_echoMode == QQuickTextField::Password || m_echoMode == QQuickTextField::PasswordEchoOnEdit) ? true : false);
- accessibleAttached->setDescription(placeholder);
- } else {
- qWarning() << "QQuickTextField: " << q << " QQuickAccessibleAttached object creation failed!";
- }
+ QQuickAccessibleAttached *accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(q, true));
+ Q_ASSERT(accessibleAttached);
+ accessibleAttached->setRole(accessibleRole());
+ accessibleAttached->set_readOnly(m_readOnly);
+ accessibleAttached->set_passwordEdit((m_echoMode == QQuickTextField::Password || m_echoMode == QQuickTextField::PasswordEchoOnEdit) ? true : false);
+ accessibleAttached->setDescription(placeholder);
}
QAccessible::Role QQuickTextFieldPrivate::accessibleRole() const
@@ -288,10 +334,10 @@ QFont QQuickTextField::font() const
void QQuickTextField::setFont(const QFont &font)
{
Q_D(QQuickTextField);
- if (d->font.resolve() == font.resolve() && d->font == font)
+ if (d->extra.value().requestedFont.resolve() == font.resolve() && d->extra.value().requestedFont == font)
return;
- d->font = font;
+ d->extra.value().requestedFont = font;
d->resolveFont();
}
@@ -348,8 +394,8 @@ void QQuickTextField::setPlaceholderText(const QString &text)
d->placeholder = text;
#if QT_CONFIG(accessibility)
- if (d->accessibleAttached)
- d->accessibleAttached->setDescription(text);
+ if (QQuickAccessibleAttached *accessibleAttached = QQuickControlPrivate::accessibleAttached(this))
+ accessibleAttached->setDescription(text);
#endif
emit placeholderTextChanged();
}
@@ -451,11 +497,44 @@ void QQuickTextField::resetHoverEnabled()
#endif
}
+/*!
+ \since QtQuick.Controls 2.3 (Qt 5.10)
+ \qmlproperty palette QtQuick.Controls::TextField::palette
+
+ This property holds the palette currently set for the text field.
+
+ \sa Control::palette
+*/
+QPalette QQuickTextField::palette() const
+{
+ Q_D(const QQuickTextField);
+ QPalette palette = d->resolvedPalette;
+ if (!isEnabled())
+ palette.setCurrentColorGroup(QPalette::Disabled);
+ return palette;
+}
+
+void QQuickTextField::setPalette(const QPalette &palette)
+{
+ Q_D(QQuickTextField);
+ if (d->extra.value().requestedPalette.resolve() == palette.resolve() && d->extra.value().requestedPalette == palette)
+ return;
+
+ d->extra.value().requestedPalette = palette;
+ d->resolvePalette();
+}
+
+void QQuickTextField::resetPalette()
+{
+ setPalette(QPalette());
+}
+
void QQuickTextField::classBegin()
{
Q_D(QQuickTextField);
QQuickTextInput::classBegin();
d->resolveFont();
+ d->resolvePalette();
}
void QQuickTextField::componentComplete()
@@ -467,7 +546,7 @@ void QQuickTextField::componentComplete()
setAcceptHoverEvents(QQuickControlPrivate::calcHoverEnabled(d->parentItem));
#endif
#if QT_CONFIG(accessibility)
- if (!d->accessibleAttached && QAccessible::isActive())
+ if (QAccessible::isActive())
d->accessibilityActiveChanged(true);
#endif
}
@@ -476,12 +555,23 @@ void QQuickTextField::itemChange(QQuickItem::ItemChange change, const QQuickItem
{
Q_D(QQuickTextField);
QQuickTextInput::itemChange(change, value);
- if ((change == ItemParentHasChanged && value.item) || (change == ItemSceneChange && value.window)) {
- d->resolveFont();
+ switch (change) {
+ case ItemEnabledHasChanged:
+ emit paletteChanged();
+ break;
+ case ItemSceneChange:
+ case ItemParentHasChanged:
+ if ((change == ItemParentHasChanged && value.item) || (change == ItemSceneChange && value.window)) {
+ d->resolveFont();
+ d->resolvePalette();
#if QT_CONFIG(quicktemplates2_hover)
- if (!d->explicitHoverEnabled)
- d->updateHoverEnabled(QQuickControlPrivate::calcHoverEnabled(d->parentItem), false); // explicit=false
+ if (!d->explicitHoverEnabled)
+ d->updateHoverEnabled(QQuickControlPrivate::calcHoverEnabled(d->parentItem), false); // explicit=false
#endif
+ }
+ break;
+ default:
+ break;
}
}
diff --git a/src/quicktemplates2/qquicktextfield_p.h b/src/quicktemplates2/qquicktextfield_p.h
index 49e0be13..7dab0caf 100644
--- a/src/quicktemplates2/qquicktextfield_p.h
+++ b/src/quicktemplates2/qquicktextfield_p.h
@@ -48,6 +48,7 @@
// We mean it.
//
+#include <QtGui/qpalette.h>
#include <QtQuick/private/qquicktextinput_p.h>
#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
@@ -69,6 +70,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTextField : public QQuickTextInput
// 2.1 (Qt 5.8)
Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION 1)
Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION 1)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(QPalette palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged FINAL REVISION 3)
public:
explicit QQuickTextField(QQuickItem *parent = nullptr);
@@ -93,6 +96,11 @@ public:
void setHoverEnabled(bool enabled);
void resetHoverEnabled();
+ // 2.3 (Qt 5.10)
+ QPalette palette() const;
+ void setPalette(const QPalette &palette);
+ void resetPalette();
+
Q_SIGNALS:
void fontChanged();
void implicitWidthChanged3();
@@ -106,6 +114,8 @@ Q_SIGNALS:
Q_REVISION(1) void released(QQuickMouseEvent *event);
Q_REVISION(1) void hoveredChanged();
Q_REVISION(1) void hoverEnabledChanged();
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void paletteChanged();
protected:
void classBegin() override;
diff --git a/src/quicktemplates2/qquicktextfield_p_p.h b/src/quicktemplates2/qquicktextfield_p_p.h
index 31ccb361..65767452 100644
--- a/src/quicktemplates2/qquicktextfield_p_p.h
+++ b/src/quicktemplates2/qquicktextfield_p_p.h
@@ -48,10 +48,11 @@
// We mean it.
//
+#include <QtQml/private/qlazilyallocated_p.h>
#include <QtQuick/private/qquicktextinput_p_p.h>
#include <QtQuickTemplates2/private/qquickpresshandler_p_p.h>
-#include "qquicktextfield_p.h"
+#include <QtQuickTemplates2/private/qquicktextfield_p.h>
#if QT_CONFIG(accessibility)
#include <QtGui/qaccessible.h>
@@ -59,8 +60,6 @@
QT_BEGIN_NAMESPACE
-class QQuickAccessibleAttached;
-
class QQuickTextFieldPrivate : public QQuickTextInputPrivate
#if QT_CONFIG(accessibility)
, public QAccessible::ActivationObserver
@@ -76,8 +75,24 @@ public:
return static_cast<QQuickTextFieldPrivate *>(QObjectPrivate::get(item)); }
void resizeBackground();
+
void resolveFont();
- void inheritFont(const QFont &f);
+ void inheritFont(const QFont &font);
+ void updateFont(const QFont &font);
+ inline void setFont_helper(const QFont &font) {
+ if (sourceFont.resolve() == font.resolve() && sourceFont == font)
+ return;
+ updateFont(font);
+ }
+
+ void resolvePalette();
+ void inheritPalette(const QPalette &palette);
+ void updatePalette(const QPalette &palette);
+ inline void setPalette_helper(const QPalette &palette) {
+ if (resolvedPalette.resolve() == palette.resolve() && resolvedPalette == palette)
+ return;
+ updatePalette(palette);
+ }
#if QT_CONFIG(quicktemplates2_hover)
void updateHoverEnabled(bool h, bool e);
@@ -101,12 +116,18 @@ public:
bool hovered;
bool explicitHoverEnabled;
#endif
- QFont font;
+
+ struct ExtraData {
+ QFont requestedFont;
+ QPalette requestedPalette;
+ };
+ QLazilyAllocated<ExtraData> extra;
+
+ QPalette resolvedPalette;
QQuickItem *background;
QString placeholder;
Qt::FocusReason focusReason;
QQuickPressHandler pressHandler;
- QQuickAccessibleAttached *accessibleAttached;
};
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquicktoolbar.cpp b/src/quicktemplates2/qquicktoolbar.cpp
index 9f5f210e..99775c6a 100644
--- a/src/quicktemplates2/qquicktoolbar.cpp
+++ b/src/quicktemplates2/qquicktoolbar.cpp
@@ -141,6 +141,11 @@ void QQuickToolBar::setPosition(Position position)
emit positionChanged();
}
+QPalette QQuickToolBar::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::ToolButtonPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickToolBar::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquicktoolbar_p.h b/src/quicktemplates2/qquicktoolbar_p.h
index 58192ff9..b919c615 100644
--- a/src/quicktemplates2/qquicktoolbar_p.h
+++ b/src/quicktemplates2/qquicktoolbar_p.h
@@ -75,6 +75,8 @@ Q_SIGNALS:
void positionChanged();
protected:
+ QPalette defaultPalette() const override;
+
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
#endif
diff --git a/src/quicktemplates2/qquicktoolbutton.cpp b/src/quicktemplates2/qquicktoolbutton.cpp
index 5ef25e3e..f87a58b2 100644
--- a/src/quicktemplates2/qquicktoolbutton.cpp
+++ b/src/quicktemplates2/qquicktoolbutton.cpp
@@ -58,8 +58,8 @@ QT_BEGIN_NAMESPACE
\snippet qtquickcontrols2-toolbar.qml 1
ToolButton inherits its API from AbstractButton. For instance, you can set
- \l {AbstractButton::text}{text}, and react to \l {AbstractButton::clicked}{clicks}
- using the AbstractButton API.
+ \l {AbstractButton::text}{text}, display an \l {Icons in Qt Quick Controls 2}{icon},
+ and react to \l {AbstractButton::clicked}{clicks} using the AbstractButton API.
\sa ToolBar, {Customizing ToolButton}, {Button Controls}
*/
@@ -74,4 +74,9 @@ QFont QQuickToolButton::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::ToolButtonFont);
}
+QPalette QQuickToolButton::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::ToolButtonPalette);
+}
+
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquicktoolbutton_p.h b/src/quicktemplates2/qquicktoolbutton_p.h
index 06745cd9..0e376f7b 100644
--- a/src/quicktemplates2/qquicktoolbutton_p.h
+++ b/src/quicktemplates2/qquicktoolbutton_p.h
@@ -61,6 +61,7 @@ public:
protected:
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
};
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquicktoolseparator.cpp b/src/quicktemplates2/qquicktoolseparator.cpp
index 4da63907..2ec7799f 100644
--- a/src/quicktemplates2/qquicktoolseparator.cpp
+++ b/src/quicktemplates2/qquicktoolseparator.cpp
@@ -133,6 +133,11 @@ bool QQuickToolSeparator::isVertical() const
return d->orientation == Qt::Vertical;
}
+QPalette QQuickToolSeparator::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::ToolButtonPalette);
+}
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickToolSeparator::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquicktoolseparator_p.h b/src/quicktemplates2/qquicktoolseparator_p.h
index 055f475c..2108cc5b 100644
--- a/src/quicktemplates2/qquicktoolseparator_p.h
+++ b/src/quicktemplates2/qquicktoolseparator_p.h
@@ -74,6 +74,8 @@ Q_SIGNALS:
void orientationChanged();
protected:
+ QPalette defaultPalette() const override;
+
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
#endif
diff --git a/src/quicktemplates2/qquicktooltip.cpp b/src/quicktemplates2/qquicktooltip.cpp
index 25fb74ab..f0bc6ffc 100644
--- a/src/quicktemplates2/qquicktooltip.cpp
+++ b/src/quicktemplates2/qquicktooltip.cpp
@@ -281,6 +281,11 @@ QFont QQuickToolTip::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::TipLabelFont);
}
+QPalette QQuickToolTip::defaultPalette() const
+{
+ return QQuickControlPrivate::themePalette(QPlatformTheme::ToolTipPalette);
+}
+
void QQuickToolTip::itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data)
{
Q_D(QQuickToolTip);
@@ -355,7 +360,7 @@ QQuickToolTip *QQuickToolTipAttachedPrivate::instance(bool create) const
if (!tip && create) {
// TODO: a cleaner way to create the instance? QQml(Meta)Type?
QQmlComponent component(engine);
- component.setData("import QtQuick.Controls 2.2; ToolTip { }", QUrl());
+ component.setData("import QtQuick.Controls 2.3; ToolTip { }", QUrl());
QObject *object = component.create();
if (object)
diff --git a/src/quicktemplates2/qquicktooltip_p.h b/src/quicktemplates2/qquicktooltip_p.h
index bdfbe362..60b02502 100644
--- a/src/quicktemplates2/qquicktooltip_p.h
+++ b/src/quicktemplates2/qquicktooltip_p.h
@@ -86,6 +86,7 @@ Q_SIGNALS:
protected:
QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data) override;
void timerEvent(QTimerEvent *event) override;
diff --git a/src/quicktemplates2/qquicktumbler.cpp b/src/quicktemplates2/qquicktumbler.cpp
index 3429f1f4..bed3e400 100644
--- a/src/quicktemplates2/qquicktumbler.cpp
+++ b/src/quicktemplates2/qquicktumbler.cpp
@@ -36,6 +36,7 @@
#include "qquicktumbler_p.h"
+#include <QtGui/qpa/qplatformtheme.h>
#include <QtQml/qqmlinfo.h>
#include <QtQuick/private/qquickflickable_p.h>
#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
@@ -123,11 +124,13 @@ QQuickItem *QQuickTumblerPrivate::determineViewType(QQuickItem *contentItem)
view = contentItem;
viewContentItem = contentItem;
viewContentItemType = PathViewContentItem;
+ viewOffset = 0;
return contentItem;
} else if (contentItem->inherits("QQuickListView")) {
view = contentItem;
viewContentItem = qobject_cast<QQuickFlickable*>(contentItem)->contentItem();
viewContentItemType = ListViewContentItem;
+ viewContentY = 0;
return contentItem;
} else {
const auto childItems = contentItem->childItems();
@@ -146,6 +149,10 @@ void QQuickTumblerPrivate::resetViewData()
{
view = nullptr;
viewContentItem = nullptr;
+ if (viewContentItemType == PathViewContentItem)
+ viewOffset = 0;
+ else if (viewContentItemType == ListViewContentItem)
+ viewContentY = 0;
viewContentItemType = UnsupportedContentItemType;
}
@@ -228,16 +235,52 @@ void QQuickTumblerPrivate::_q_onViewCountChanged()
}
}
-void QQuickTumblerPrivate::itemChildAdded(QQuickItem *, QQuickItem *)
+void QQuickTumblerPrivate::_q_onViewOffsetChanged()
+{
+ viewOffset = view->property("offset").toReal();
+ calculateDisplacements();
+}
+
+void QQuickTumblerPrivate::_q_onViewContentYChanged()
+{
+ viewContentY = view->property("contentY").toReal();
+ calculateDisplacements();
+}
+
+void QQuickTumblerPrivate::calculateDisplacements()
+{
+ const auto items = viewContentItemChildItems();
+ for (QQuickItem *childItem : items) {
+ QQuickTumblerAttached *attached = qobject_cast<QQuickTumblerAttached *>(qmlAttachedPropertiesObject<QQuickTumbler>(childItem, false));
+ if (attached)
+ QQuickTumblerAttachedPrivate::get(attached)->calculateDisplacement();
+ }
+}
+
+void QQuickTumblerPrivate::itemChildAdded(QQuickItem *, QQuickItem *child)
{
_q_updateItemWidths();
_q_updateItemHeights();
+
+ QQuickTumblerAttached *attached = qobject_cast<QQuickTumblerAttached *>(qmlAttachedPropertiesObject<QQuickTumbler>(child, false));
+ if (attached)
+ QQuickTumblerAttachedPrivate::get(attached)->calculateDisplacement();
}
-void QQuickTumblerPrivate::itemChildRemoved(QQuickItem *, QQuickItem *)
+void QQuickTumblerPrivate::itemChildRemoved(QQuickItem *, QQuickItem *child)
{
_q_updateItemWidths();
_q_updateItemHeights();
+
+ QQuickTumblerAttached *attached = qobject_cast<QQuickTumblerAttached *>(qmlAttachedPropertiesObject<QQuickTumbler>(child, false));
+ if (attached)
+ QQuickTumblerAttachedPrivate::get(attached)->calculateDisplacement();
+}
+
+void QQuickTumblerPrivate::itemGeometryChanged(QQuickItem *, QQuickGeometryChange change, const QRectF &)
+{
+ if (change.sizeChange())
+ calculateDisplacements();
}
QQuickTumbler::QQuickTumbler(QQuickItem *parent)
@@ -531,8 +574,13 @@ void QQuickTumblerPrivate::disconnectFromView()
QObject::disconnect(view, SIGNAL(countChanged()), q, SLOT(_q_onViewCountChanged()));
QObject::disconnect(view, SIGNAL(movingChanged()), q, SIGNAL(movingChanged()));
+ if (viewContentItemType == PathViewContentItem)
+ QObject::disconnect(view, SIGNAL(offsetChanged()), q, SLOT(_q_onViewOffsetChanged()));
+ else
+ QObject::disconnect(view, SIGNAL(contentYChanged()), q, SLOT(_q_onViewContentYChanged()));
+
QQuickItemPrivate *oldViewContentItemPrivate = QQuickItemPrivate::get(viewContentItem);
- oldViewContentItemPrivate->removeItemChangeListener(this, QQuickItemPrivate::Children);
+ oldViewContentItemPrivate->removeItemChangeListener(this, QQuickItemPrivate::Children | QQuickItemPrivate::Geometry);
resetViewData();
}
@@ -556,8 +604,16 @@ void QQuickTumblerPrivate::setupViewData(QQuickItem *newControlContentItem)
QObject::connect(view, SIGNAL(countChanged()), q, SLOT(_q_onViewCountChanged()));
QObject::connect(view, SIGNAL(movingChanged()), q, SIGNAL(movingChanged()));
+ if (viewContentItemType == PathViewContentItem) {
+ QObject::connect(view, SIGNAL(offsetChanged()), q, SLOT(_q_onViewOffsetChanged()));
+ _q_onViewOffsetChanged();
+ } else {
+ QObject::connect(view, SIGNAL(contentYChanged()), q, SLOT(_q_onViewContentYChanged()));
+ _q_onViewContentYChanged();
+ }
+
QQuickItemPrivate *viewContentItemPrivate = QQuickItemPrivate::get(viewContentItem);
- viewContentItemPrivate->addItemChangeListener(this, QQuickItemPrivate::Children);
+ viewContentItemPrivate->addItemChangeListener(this, QQuickItemPrivate::Children | QQuickItemPrivate::Geometry);
// Sync the view's currentIndex with ours.
syncCurrentIndex();
@@ -689,81 +745,46 @@ void QQuickTumbler::updatePolish()
}
}
-class QQuickTumblerAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener
+QFont QQuickTumbler::defaultFont() const
{
- Q_DECLARE_PUBLIC(QQuickTumblerAttached)
-public:
- QQuickTumblerAttachedPrivate()
- : tumbler(nullptr),
- index(-1),
- displacement(0)
- {
- }
-
- void init(QQuickItem *delegateItem)
- {
- if (!delegateItem->parentItem()) {
- qWarning() << "Tumbler: attached properties must be accessed through a delegate item that has a parent";
- return;
- }
-
- QVariant indexContextProperty = qmlContext(delegateItem)->contextProperty(QStringLiteral("index"));
- if (!indexContextProperty.isValid()) {
- qWarning() << "Tumbler: attempting to access attached property on item without an \"index\" property";
- return;
- }
-
- index = indexContextProperty.toInt();
-
- QQuickItem *parentItem = delegateItem;
- while ((parentItem = parentItem->parentItem())) {
- if ((tumbler = qobject_cast<QQuickTumbler*>(parentItem)))
- break;
- }
- }
-
- void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override;
- void itemChildAdded(QQuickItem *, QQuickItem *) override;
- void itemChildRemoved(QQuickItem *, QQuickItem *) override;
-
- void _q_calculateDisplacement();
- void emitIfDisplacementChanged(qreal oldDisplacement, qreal newDisplacement);
-
- // The Tumbler that contains the delegate. Required to calculated the displacement.
- QPointer<QQuickTumbler> tumbler;
- // The index of the delegate. Used to calculate the displacement.
- int index;
- // The displacement for our delegate.
- qreal displacement;
-};
+ return QQuickControlPrivate::themeFont(QPlatformTheme::ItemViewFont);
+}
-void QQuickTumblerAttachedPrivate::itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &)
+QPalette QQuickTumbler::defaultPalette() const
{
- _q_calculateDisplacement();
+ return QQuickControlPrivate::themePalette(QPlatformTheme::ItemViewPalette);
}
-void QQuickTumblerAttachedPrivate::itemChildAdded(QQuickItem *, QQuickItem *)
+QQuickTumblerAttachedPrivate::QQuickTumblerAttachedPrivate()
+ : tumbler(nullptr),
+ index(-1),
+ displacement(0)
{
- _q_calculateDisplacement();
}
-void QQuickTumblerAttachedPrivate::itemChildRemoved(QQuickItem *item, QQuickItem *child)
+void QQuickTumblerAttachedPrivate::init(QQuickItem *delegateItem)
{
- _q_calculateDisplacement();
+ if (!delegateItem->parentItem()) {
+ qWarning() << "Tumbler: attached properties must be accessed through a delegate item that has a parent";
+ return;
+ }
- if (parent == child) {
- // The child that was removed from the contentItem was the delegate
- // that our properties are attached to. If we don't remove the change
- // listener, the contentItem will attempt to notify a destroyed
- // listener, causing a crash.
+ QVariant indexContextProperty = qmlContext(delegateItem)->contextProperty(QStringLiteral("index"));
+ if (!indexContextProperty.isValid()) {
+ qWarning() << "Tumbler: attempting to access attached property on item without an \"index\" property";
+ return;
+ }
- // item is the "actual content item" of Tumbler's contentItem, i.e. a PathView or ListView.contentItem
- QQuickItemPrivate *p = QQuickItemPrivate::get(item);
- p->removeItemChangeListener(this, QQuickItemPrivate::Geometry | QQuickItemPrivate::Children);
+ index = indexContextProperty.toInt();
+
+ QQuickItem *parentItem = delegateItem;
+ while ((parentItem = parentItem->parentItem())) {
+ if ((tumbler = qobject_cast<QQuickTumbler*>(parentItem)))
+ break;
}
}
-void QQuickTumblerAttachedPrivate::_q_calculateDisplacement()
+void QQuickTumblerAttachedPrivate::calculateDisplacement()
{
const int previousDisplacement = displacement;
displacement = 0;
@@ -791,7 +812,7 @@ void QQuickTumblerAttachedPrivate::_q_calculateDisplacement()
}
if (tumblerPrivate->viewContentItemType == QQuickTumblerPrivate::PathViewContentItem) {
- const qreal offset = tumblerPrivate->view->property("offset").toReal();
+ const qreal offset = tumblerPrivate->viewOffset;
displacement = count > 1 ? count - index - offset : 0;
// Don't add 1 if count <= visibleItemCount
@@ -802,7 +823,7 @@ void QQuickTumblerAttachedPrivate::_q_calculateDisplacement()
else if (displacement < -halfVisibleItems)
displacement += count;
} else {
- const qreal contentY = tumblerPrivate->view->property("contentY").toReal();
+ const qreal contentY = tumblerPrivate->viewContentY;
const qreal delegateH = delegateHeight(tumbler);
const qreal preferredHighlightBegin = tumblerPrivate->view->property("preferredHighlightBegin").toReal();
// Tumbler's displacement goes from negative at the top to positive towards the bottom, so we must switch this around.
@@ -842,31 +863,10 @@ QQuickTumblerAttached::QQuickTumblerAttached(QObject *parent)
if (!tumblerPrivate->viewContentItem)
return;
- QQuickItemPrivate *p = QQuickItemPrivate::get(tumblerPrivate->viewContentItem);
- p->addItemChangeListener(d, QQuickItemPrivate::Geometry | QQuickItemPrivate::Children);
-
- const char *contentItemSignal = tumblerPrivate->viewContentItemType == QQuickTumblerPrivate::PathViewContentItem
- ? SIGNAL(offsetChanged()) : SIGNAL(contentYChanged());
- connect(tumblerPrivate->view, contentItemSignal, this, SLOT(_q_calculateDisplacement()));
-
- d->_q_calculateDisplacement();
+ d->calculateDisplacement();
}
}
-QQuickTumblerAttached::~QQuickTumblerAttached()
-{
- Q_D(QQuickTumblerAttached);
- if (!d->tumbler)
- return;
-
- QQuickTumblerPrivate *tumblerPrivate = QQuickTumblerPrivate::get(d->tumbler);
- if (!tumblerPrivate->viewContentItem)
- return;
-
- QQuickItemPrivate *viewContentItemPrivate = QQuickItemPrivate::get(tumblerPrivate->viewContentItem);
- viewContentItemPrivate->removeItemChangeListener(d, QQuickItemPrivate::Geometry | QQuickItemPrivate::Children);
-}
-
/*!
\qmlattachedproperty Tumbler QtQuick.Controls::Tumbler::tumbler
\readonly
diff --git a/src/quicktemplates2/qquicktumbler_p.h b/src/quicktemplates2/qquicktumbler_p.h
index de7de595..5d4df4a7 100644
--- a/src/quicktemplates2/qquicktumbler_p.h
+++ b/src/quicktemplates2/qquicktumbler_p.h
@@ -119,6 +119,9 @@ protected:
void keyPressEvent(QKeyEvent *event) override;
void updatePolish() override;
+ QFont defaultFont() const override;
+ QPalette defaultPalette() const override;
+
private:
Q_DISABLE_COPY(QQuickTumbler)
Q_DECLARE_PRIVATE(QQuickTumbler)
@@ -127,6 +130,8 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_updateItemHeights())
Q_PRIVATE_SLOT(d_func(), void _q_onViewCurrentIndexChanged())
Q_PRIVATE_SLOT(d_func(), void _q_onViewCountChanged())
+ Q_PRIVATE_SLOT(d_func(), void _q_onViewOffsetChanged())
+ Q_PRIVATE_SLOT(d_func(), void _q_onViewContentYChanged())
};
class QQuickTumblerAttachedPrivate;
@@ -134,12 +139,11 @@ class QQuickTumblerAttachedPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTumblerAttached : public QObject
{
Q_OBJECT
- Q_PROPERTY(QQuickTumbler *tumbler READ tumbler CONSTANT)
+ Q_PROPERTY(QQuickTumbler *tumbler READ tumbler CONSTANT FINAL)
Q_PROPERTY(qreal displacement READ displacement NOTIFY displacementChanged FINAL)
public:
explicit QQuickTumblerAttached(QObject *parent = nullptr);
- ~QQuickTumblerAttached();
QQuickTumbler *tumbler() const;
qreal displacement() const;
@@ -150,8 +154,6 @@ Q_SIGNALS:
private:
Q_DISABLE_COPY(QQuickTumblerAttached)
Q_DECLARE_PRIVATE(QQuickTumblerAttached)
-
- Q_PRIVATE_SLOT(d_func(), void _q_calculateDisplacement())
};
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquicktumbler_p_p.h b/src/quicktemplates2/qquicktumbler_p_p.h
index 0dcae762..fe8a4ad2 100644
--- a/src/quicktemplates2/qquicktumbler_p_p.h
+++ b/src/quicktemplates2/qquicktumbler_p_p.h
@@ -50,11 +50,10 @@
#include <QtQuick/private/qquickitemchangelistener_p.h>
#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
+#include <QtQuickTemplates2/private/qquicktumbler_p.h>
QT_BEGIN_NAMESPACE
-class QQuickTumbler;
-
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTumblerPrivate : public QQuickControlPrivate, public QQuickItemChangeListener
{
Q_DECLARE_PUBLIC(QQuickTumbler)
@@ -84,6 +83,10 @@ public:
QQuickItem *view;
QQuickItem *viewContentItem;
ContentItemType viewContentItemType;
+ union {
+ qreal viewOffset; // PathView
+ qreal viewContentY; // ListView
+ };
int currentIndex;
int pendingCurrentIndex;
bool ignoreCurrentIndexChanges;
@@ -94,6 +97,10 @@ public:
void _q_updateItemWidths();
void _q_onViewCurrentIndexChanged();
void _q_onViewCountChanged();
+ void _q_onViewOffsetChanged();
+ void _q_onViewContentYChanged();
+
+ void calculateDisplacements();
void disconnectFromView();
void setupViewData(QQuickItem *newControlContentItem);
@@ -107,6 +114,32 @@ public:
void itemChildAdded(QQuickItem *, QQuickItem *) override;
void itemChildRemoved(QQuickItem *, QQuickItem *) override;
+ void itemGeometryChanged(QQuickItem *, QQuickGeometryChange , const QRectF &) override;
+};
+
+class QQuickTumblerAttachedPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QQuickTumblerAttached)
+
+public:
+ QQuickTumblerAttachedPrivate();
+
+ static QQuickTumblerAttachedPrivate *get(QQuickTumblerAttached *attached)
+ {
+ return attached->d_func();
+ }
+
+ void init(QQuickItem *delegateItem);
+
+ void calculateDisplacement();
+ void emitIfDisplacementChanged(qreal oldDisplacement, qreal newDisplacement);
+
+ // The Tumbler that contains the delegate. Required to calculated the displacement.
+ QPointer<QQuickTumbler> tumbler;
+ // The index of the delegate. Used to calculate the displacement.
+ int index;
+ // The displacement for our delegate.
+ qreal displacement;
};
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qtquicktemplates2global_p.h b/src/quicktemplates2/qtquicktemplates2global_p.h
index b7f54bb6..e5ee3f2e 100644
--- a/src/quicktemplates2/qtquicktemplates2global_p.h
+++ b/src/quicktemplates2/qtquicktemplates2global_p.h
@@ -49,6 +49,7 @@
//
#include <QtCore/qglobal.h>
+#include <QtQml/private/qqmlglobal_p.h>
#include <QtQuickTemplates2/private/qtquicktemplates2-config_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quicktemplates2/quicktemplates2.pri b/src/quicktemplates2/quicktemplates2.pri
index a7570ec5..a90b4f94 100644
--- a/src/quicktemplates2/quicktemplates2.pri
+++ b/src/quicktemplates2/quicktemplates2.pri
@@ -3,6 +3,8 @@ INCLUDEPATH += $$PWD
HEADERS += \
$$PWD/qquickabstractbutton_p.h \
$$PWD/qquickabstractbutton_p_p.h \
+ $$PWD/qquickaction_p.h \
+ $$PWD/qquickactiongroup_p.h \
$$PWD/qquickapplicationwindow_p.h \
$$PWD/qquickbusyindicator_p.h \
$$PWD/qquickbutton_p.h \
@@ -26,19 +28,26 @@ HEADERS += \
$$PWD/qquickframe_p.h \
$$PWD/qquickframe_p_p.h \
$$PWD/qquickgroupbox_p.h \
+ $$PWD/qquickicon_p.h \
$$PWD/qquickitemdelegate_p.h \
$$PWD/qquickitemdelegate_p_p.h \
$$PWD/qquicklabel_p.h \
$$PWD/qquicklabel_p_p.h \
$$PWD/qquickmenu_p.h \
$$PWD/qquickmenu_p_p.h \
+ $$PWD/qquickmenubar_p.h \
+ $$PWD/qquickmenubar_p_p.h \
+ $$PWD/qquickmenubaritem_p.h \
+ $$PWD/qquickmenubaritem_p_p.h \
$$PWD/qquickmenuitem_p.h \
+ $$PWD/qquickmenuitem_p_p.h \
$$PWD/qquickmenuseparator_p.h \
$$PWD/qquickoverlay_p.h \
$$PWD/qquickoverlay_p_p.h \
$$PWD/qquickpage_p.h \
$$PWD/qquickpageindicator_p.h \
$$PWD/qquickpagelayout_p_p.h \
+ $$PWD/qquickpalette_p.h \
$$PWD/qquickpane_p.h \
$$PWD/qquickpane_p_p.h \
$$PWD/qquickpopup_p.h \
@@ -82,6 +91,8 @@ HEADERS += \
SOURCES += \
$$PWD/qquickabstractbutton.cpp \
+ $$PWD/qquickaction.cpp \
+ $$PWD/qquickactiongroup.cpp \
$$PWD/qquickapplicationwindow.cpp \
$$PWD/qquickbusyindicator.cpp \
$$PWD/qquickbutton.cpp \
@@ -98,15 +109,19 @@ SOURCES += \
$$PWD/qquickdrawer.cpp \
$$PWD/qquickframe.cpp \
$$PWD/qquickgroupbox.cpp \
+ $$PWD/qquickicon.cpp \
$$PWD/qquickitemdelegate.cpp \
$$PWD/qquicklabel.cpp \
$$PWD/qquickmenu.cpp \
+ $$PWD/qquickmenubar.cpp \
+ $$PWD/qquickmenubaritem.cpp \
$$PWD/qquickmenuitem.cpp \
$$PWD/qquickmenuseparator.cpp \
$$PWD/qquickoverlay.cpp \
$$PWD/qquickpage.cpp \
$$PWD/qquickpageindicator.cpp \
$$PWD/qquickpagelayout.cpp \
+ $$PWD/qquickpalette.cpp \
$$PWD/qquickpane.cpp \
$$PWD/qquickpopup.cpp \
$$PWD/qquickpopupitem.cpp \
diff --git a/tests/auto/accessibility/tst_accessibility.cpp b/tests/auto/accessibility/tst_accessibility.cpp
index 4208a366..7e491b54 100644
--- a/tests/auto/accessibility/tst_accessibility.cpp
+++ b/tests/auto/accessibility/tst_accessibility.cpp
@@ -43,6 +43,9 @@
#include "../shared/util.h"
#if QT_CONFIG(accessibility)
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtGui/qpa/qplatformintegration.h>
+#include <QtGui/qpa/qplatformaccessibility.h>
#include <QtQuick/private/qquickaccessibleattached_p.h>
#endif
@@ -114,12 +117,10 @@ void tst_accessibility::a11y_data()
}
#if QT_CONFIG(accessibility)
-static QQuickAccessibleAttached *accessibleAttached(QQuickItem *item)
+static QPlatformAccessibility *platformAccessibility()
{
- QQuickAccessibleAttached *acc = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(item, false));
- if (!acc)
- acc = item->findChild<QQuickAccessibleAttached *>();
- return acc;
+ QPlatformIntegration *pfIntegration = QGuiApplicationPrivate::platformIntegration();
+ return pfIntegration ? pfIntegration->accessibility() : nullptr;
}
#endif
@@ -152,7 +153,7 @@ void tst_accessibility::a11y()
QVERIFY(item);
#if QT_CONFIG(accessibility)
- QQuickAccessibleAttached *acc = accessibleAttached(item);
+ QQuickAccessibleAttached *acc = QQuickAccessibleAttached::attachedProperties(item);
if (name != QLatin1Literal("dayofweekrow")
&& name != QLatin1Literal("monthgrid")
&& name != QLatin1Literal("weeknumbercolumn")) {
@@ -160,8 +161,11 @@ void tst_accessibility::a11y()
QVERIFY(acc);
} else {
QVERIFY(!acc);
- QAccessible::setActive(true);
- acc = accessibleAttached(item);
+ QPlatformAccessibility *accessibility = platformAccessibility();
+ if (!accessibility)
+ QSKIP("No QPlatformAccessibility available.");
+ accessibility->setActive(true);
+ acc = QQuickAccessibleAttached::attachedProperties(item);
}
}
QVERIFY(acc);
@@ -170,8 +174,6 @@ void tst_accessibility::a11y()
#else
Q_UNUSED(role)
Q_UNUSED(text)
- QObject *acc = qmlAttachedPropertiesObject<QObject>(item, false);
- QVERIFY(!acc);
#endif
}
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 0aeef414..7dfd552e 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -6,13 +6,20 @@ SUBDIRS += \
cursor \
focus \
font \
+ palette \
platform \
pressandhold \
qquickapplicationwindow \
+ qquickcolor \
qquickdrawer \
+ qquickiconimage \
+ qquickiconlabel \
+ qquickimaginestyle \
qquickmaterialstyle \
qquickmaterialstyleconf \
qquickmenu \
+ qquickmenubar \
+ qquickninepatchimage \
qquickpopup \
qquickstyle \
qquickstyleselector \
@@ -21,9 +28,3 @@ SUBDIRS += \
revisions \
sanity \
snippets
-
-# QTBUG-60268
-boot2qt: SUBDIRS -= qquickapplicationwindow calendar controls cursor \
- qquickdrawer focus font qquickmenu platform qquickpopup qquickmaterialstyle \
- qquickmaterialstyleconf qquickuniversalstyle \
- qquickuniversalstyleconf snippets
diff --git a/tests/auto/controls/controls.pro b/tests/auto/controls/controls.pro
index 8f2f8e69..fd852c4b 100644
--- a/tests/auto/controls/controls.pro
+++ b/tests/auto/controls/controls.pro
@@ -1,5 +1,7 @@
TEMPLATE = subdirs
SUBDIRS += \
default \
+ fusion \
+ imagine \
material \
universal
diff --git a/tests/auto/controls/data/tst_abstractbutton.qml b/tests/auto/controls/data/tst_abstractbutton.qml
index bddb952f..90c6567f 100644
--- a/tests/auto/controls/data/tst_abstractbutton.qml
+++ b/tests/auto/controls/data/tst_abstractbutton.qml
@@ -50,7 +50,7 @@
import QtQuick 2.2
import QtTest 1.0
-import QtQuick.Controls 2.2
+import QtQuick.Controls 2.3
TestCase {
id: testCase
@@ -71,6 +71,11 @@ TestCase {
}
Component {
+ id: action
+ Action { }
+ }
+
+ Component {
id: signalSpy
SignalSpy { }
}
@@ -162,4 +167,231 @@ TestCase {
keyRelease(data.key)
compare(container.lastKeyRelease, data.result)
}
+
+ function test_icon() {
+ var control = createTemporaryObject(button, testCase)
+ verify(control)
+ compare(control.icon.name, "")
+ compare(control.icon.source, "")
+ compare(control.icon.width, 0)
+ compare(control.icon.height, 0)
+ compare(control.icon.color, "#00000000")
+
+ var iconSpy = signalSpy.createObject(control, { target: control, signalName: "iconChanged"} )
+ verify(iconSpy.valid)
+
+ control.icon.name = "test-name"
+ compare(control.icon.name, "test-name")
+ compare(iconSpy.count, 1)
+
+ control.icon.source = "qrc:/test-source"
+ compare(control.icon.source, "qrc:/test-source")
+ compare(iconSpy.count, 2)
+
+ control.icon.width = 32
+ compare(control.icon.width, 32)
+ compare(iconSpy.count, 3)
+
+ control.icon.height = 32
+ compare(control.icon.height, 32)
+ compare(iconSpy.count, 4)
+
+ control.icon.color = "#ff0000"
+ compare(control.icon.color, "#ff0000")
+ compare(iconSpy.count, 5)
+ }
+
+ Component {
+ id: actionButton
+ AbstractButton {
+ action: Action {
+ text: "Default"
+ icon.name: "default"
+ icon.source: "qrc:/icons/default.png"
+ checkable: true
+ checked: true
+ enabled: false
+ }
+ }
+ }
+
+ function test_action() {
+ var control = createTemporaryObject(actionButton, testCase)
+ verify(control)
+
+ // initial values
+ compare(control.text, "Default")
+ compare(control.icon.name, "default")
+ compare(control.icon.source, "qrc:/icons/default.png")
+ compare(control.checkable, true)
+ compare(control.checked, true)
+ compare(control.enabled, false)
+
+ // changes via action
+ control.action.text = "Action"
+ control.action.icon.name = "action"
+ control.action.icon.source = "qrc:/icons/action.png"
+ control.action.checkable = false
+ control.action.checked = false
+ control.action.enabled = true
+ compare(control.text, "Action") // propagates
+ compare(control.icon.name, "action") // propagates
+ compare(control.icon.source, "qrc:/icons/action.png") // propagates
+ compare(control.checkable, false) // propagates
+ compare(control.checked, false) // propagates
+ compare(control.enabled, true) // propagates
+
+ // changes via button
+ control.text = "Button"
+ control.icon.name = "button"
+ control.icon.source = "qrc:/icons/button.png"
+ control.checkable = true
+ control.checked = true
+ control.enabled = false
+ compare(control.text, "Button")
+ compare(control.icon.name, "button")
+ compare(control.icon.source, "qrc:/icons/button.png")
+ compare(control.checkable, true)
+ compare(control.checked, true)
+ compare(control.enabled, false)
+ compare(control.action.text, "Action") // does NOT propagate
+ compare(control.action.icon.name, "action") // does NOT propagate
+ compare(control.action.icon.source, "qrc:/icons/action.png") // does NOT propagate
+ compare(control.action.checkable, true) // propagates
+ compare(control.action.checked, true) // propagates
+ compare(control.action.enabled, true) // does NOT propagate
+ }
+
+ function test_trigger_data() {
+ return [
+ {tag: "click", click: true, button: true, action: true, clicked: true, triggered: true},
+ {tag: "click disabled button", click: true, button: false, action: true, clicked: false, triggered: false},
+ {tag: "click disabled action", click: true, button: true, action: false, clicked: true, triggered: false},
+ {tag: "trigger", trigger: true, button: true, action: true, clicked: true, triggered: true},
+ {tag: "trigger disabled button", trigger: true, button: false, action: true, clicked: false, triggered: true},
+ {tag: "trigger disabled action", trigger: true, button: true, action: false, clicked: false, triggered: false}
+ ]
+ }
+
+ function test_trigger(data) {
+ var control = createTemporaryObject(actionButton, testCase, {"enabled": data.button, "action.enabled": data.action})
+ verify(control)
+
+ compare(control.enabled, data.button)
+ compare(control.action.enabled, data.action)
+
+ var buttonSpy = signalSpy.createObject(control, {target: control, signalName: "clicked"})
+ verify(buttonSpy.valid)
+
+ var actionSpy = signalSpy.createObject(control, {target: control.action, signalName: "triggered"})
+ verify(actionSpy.valid)
+
+ if (data.click)
+ mouseClick(control)
+ else if (data.trigger)
+ control.action.trigger()
+
+ compare(buttonSpy.count, data.clicked ? 1 : 0)
+ compare(actionSpy.count, data.triggered ? 1 : 0)
+ }
+
+ function test_mnemonic() {
+ if (Qt.platform.os === "osx" || Qt.platform.os === "macos")
+ skip("Mnemonics are not used on macOS")
+
+ var control = createTemporaryObject(button, testCase)
+ verify(control)
+
+ control.text = "&Hello"
+ compare(control.text, "&Hello")
+
+ var clickSpy = signalSpy.createObject(control, {target: control, signalName: "clicked"})
+ verify(clickSpy.valid)
+
+ keyClick(Qt.Key_H, Qt.AltModifier)
+ compare(clickSpy.count, 1)
+
+ control.visible = false
+ keyClick(Qt.Key_H, Qt.AltModifier)
+ compare(clickSpy.count, 1)
+
+ control.visible = true
+ keyClick(Qt.Key_H, Qt.AltModifier)
+ compare(clickSpy.count, 2)
+
+ control.text = "Te&st"
+ compare(control.text, "Te&st")
+
+ keyClick(Qt.Key_H, Qt.AltModifier)
+ compare(clickSpy.count, 2)
+
+ keyClick(Qt.Key_S, Qt.AltModifier)
+ compare(clickSpy.count, 3)
+
+ control.visible = false
+ control.text = "&Hidden"
+ keyClick(Qt.Key_H, Qt.AltModifier)
+ compare(clickSpy.count, 3)
+
+ control.visible = true
+ keyClick(Qt.Key_H, Qt.AltModifier)
+ compare(clickSpy.count, 4)
+
+ control.action = action.createObject(control, {text: "&Action"})
+
+ var actionSpy = signalSpy.createObject(control, {target: control.action, signalName: "triggered"})
+ verify(actionSpy.valid)
+
+ keyClick(Qt.Key_A, Qt.AltModifier)
+ compare(actionSpy.count, 1)
+ compare(clickSpy.count, 5)
+
+ // ungrab on destruction (don't crash)
+ control.Component.onDestruction.connect(function() { control = null })
+ control.destroy()
+ wait(0)
+ verify(!control)
+ keyClick(Qt.Key_H, Qt.AltModifier)
+ }
+
+ Component {
+ id: actionGroup
+ ActionGroup {
+ Action { id: action1; checkable: true; checked: true }
+ Action { id: action2; checkable: true }
+ Action { id: action3; checkable: true }
+ }
+ }
+
+ function test_actionGroup() {
+ var group = createTemporaryObject(actionGroup, testCase)
+ verify(group)
+
+ var button1 = createTemporaryObject(button, testCase, {action: group.actions[0], width: 10, height: 10})
+ var button2 = createTemporaryObject(button, testCase, {action: group.actions[1], width: 10, height: 10, y: 10})
+ var button3 = createTemporaryObject(button, testCase, {action: group.actions[2], width: 10, height: 10, y: 20})
+
+ verify(button1)
+ compare(button1.checked, true)
+ compare(button1.action.checked, true)
+
+ verify(button2)
+ compare(button2.checked, false)
+ compare(button2.action.checked, false)
+
+ verify(button3)
+ compare(button3.checked, false)
+ compare(button3.action.checked, false)
+
+ mouseClick(button2)
+
+ compare(button1.checked, false)
+ compare(button1.action.checked, false)
+
+ compare(button2.checked, true)
+ compare(button2.action.checked, true)
+
+ compare(button3.checked, false)
+ compare(button3.action.checked, false)
+ }
}
diff --git a/tests/auto/controls/data/tst_action.qml b/tests/auto/controls/data/tst_action.qml
new file mode 100644
index 00000000..7d057c26
--- /dev/null
+++ b/tests/auto/controls/data/tst_action.qml
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** 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.2
+import QtTest 1.0
+import QtQuick.Controls 2.3
+import QtQuick.Templates 2.3 as T
+
+TestCase {
+ id: testCase
+ width: 400
+ height: 400
+ visible: true
+ when: windowShown
+ name: "Action"
+
+ Component {
+ id: component
+ Action { }
+ }
+
+ Component {
+ id: signalSpy
+ SignalSpy { }
+ }
+
+ function test_enabled() {
+ var action = createTemporaryObject(component, testCase)
+ verify(action)
+
+ var spy = createTemporaryObject(signalSpy, testCase, {target: action, signalName: "triggered"})
+ verify(spy.valid)
+
+ action.trigger()
+ compare(spy.count, 1)
+
+ action.enabled = false
+ action.trigger()
+ compare(spy.count, 1)
+
+ action.enabled = undefined // reset
+ action.trigger()
+ compare(spy.count, 2)
+ }
+
+ Component {
+ id: buttonAndMenu
+ Item {
+ property alias button: button
+ property alias menu: menu
+ property alias menuItem: menuItem
+ property alias action: sharedAction
+ property var lastSource
+ Action {
+ id: sharedAction
+ text: "Shared"
+ shortcut: "Ctrl+B"
+ onTriggered: lastSource = source
+ }
+ Button {
+ id: button
+ action: sharedAction
+ Menu {
+ id: menu
+ MenuItem {
+ id: menuItem
+ action: sharedAction
+ }
+ }
+ }
+ }
+ }
+
+ function test_shared() {
+ var container = createTemporaryObject(buttonAndMenu, testCase)
+ verify(container)
+
+ keyClick(Qt.Key_B, Qt.ControlModifier)
+ compare(container.lastSource, container.button)
+
+ container.menu.open()
+ keyClick(Qt.Key_B, Qt.ControlModifier)
+ compare(container.lastSource, container.menuItem)
+
+ tryVerify(function() { return !container.menu.visible })
+ keyClick(Qt.Key_B, Qt.ControlModifier)
+ compare(container.lastSource, container.button)
+
+ container.button.visible = false
+ keyClick(Qt.Key_B, Qt.ControlModifier)
+ compare(container.lastSource, container.action)
+ }
+}
diff --git a/tests/auto/controls/data/tst_actiongroup.qml b/tests/auto/controls/data/tst_actiongroup.qml
new file mode 100644
index 00000000..700d247a
--- /dev/null
+++ b/tests/auto/controls/data/tst_actiongroup.qml
@@ -0,0 +1,400 @@
+/****************************************************************************
+**
+** 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.2
+import QtTest 1.0
+import QtQuick.Controls 2.3
+
+TestCase {
+ id: testCase
+ width: 200
+ height: 200
+ visible: true
+ when: windowShown
+ name: "ActionGroup"
+
+ Component {
+ id: actionGroup
+ ActionGroup { }
+ }
+
+ Component {
+ id: nonExclusiveGroup
+ ActionGroup { exclusive: false }
+ }
+
+ Component {
+ id: declarativeGroup
+ ActionGroup {
+ Action { text: "First" }
+ Action { text: "Second" }
+ Action { text: "Third" }
+ }
+ }
+
+ Component {
+ id: signalSpy
+ SignalSpy { }
+ }
+
+ function test_null() {
+ var group = createTemporaryObject(actionGroup, testCase)
+ verify(group)
+
+ group.addAction(null)
+ group.removeAction(null)
+ }
+
+ Component {
+ id: action
+ Action { }
+ }
+
+ function test_defaults() {
+ var group = createTemporaryObject(actionGroup, testCase)
+ verify(group)
+ compare(group.actions.length, 0)
+ compare(group.checkedAction, null)
+ compare(group.exclusive, true)
+ }
+
+ function test_current() {
+ var group = createTemporaryObject(actionGroup, testCase)
+ verify(group)
+
+ var checkedActionSpy = createTemporaryObject(signalSpy, testCase, {target: group, signalName: "checkedActionChanged"})
+ verify(checkedActionSpy.valid)
+ verify(!group.checkedAction)
+
+ var action1 = createTemporaryObject(action, testCase, {checked: true})
+ var action2 = createTemporaryObject(action, testCase, {checked: false})
+ var action3 = createTemporaryObject(action, testCase, {checked: true, objectName: "3"})
+
+ // add checked
+ group.addAction(action1)
+ compare(group.checkedAction, action1)
+ compare(action1.checked, true)
+ compare(action2.checked, false)
+ compare(action3.checked, true)
+ compare(checkedActionSpy.count, 1)
+
+ // add non-checked
+ group.addAction(action2)
+ compare(group.checkedAction, action1)
+ compare(action1.checked, true)
+ compare(action2.checked, false)
+ compare(action3.checked, true)
+ compare(checkedActionSpy.count, 1)
+
+ // add checked
+ group.addAction(action3)
+ compare(group.checkedAction, action3)
+ compare(action1.checked, false)
+ compare(action2.checked, false)
+ compare(action3.checked, true)
+ compare(checkedActionSpy.count, 2)
+
+ // change current
+ group.checkedAction = action2
+ compare(group.checkedAction, action2)
+ compare(action1.checked, false)
+ compare(action2.checked, true)
+ compare(action3.checked, false)
+ compare(checkedActionSpy.count, 3)
+
+ // check
+ action1.checked = true
+ compare(group.checkedAction, action1)
+ compare(action1.checked, true)
+ compare(action2.checked, false)
+ compare(action3.checked, false)
+ compare(checkedActionSpy.count, 4)
+
+ // remove non-checked
+ group.removeAction(action2)
+ compare(group.checkedAction, action1)
+ compare(action1.checked, true)
+ compare(action2.checked, false)
+ compare(action3.checked, false)
+ compare(checkedActionSpy.count, 4)
+
+ // remove checked
+ group.removeAction(action1)
+ verify(!group.checkedAction)
+ compare(action1.checked, false)
+ compare(action2.checked, false)
+ compare(action3.checked, false)
+ compare(checkedActionSpy.count, 5)
+ }
+
+ function test_actions() {
+ var group = createTemporaryObject(actionGroup, testCase)
+ verify(group)
+
+ var actionsSpy = createTemporaryObject(signalSpy, testCase, {target: group, signalName: "actionsChanged"})
+ verify(actionsSpy.valid)
+
+ compare(group.actions.length, 0)
+ compare(group.checkedAction, null)
+
+ var action1 = createTemporaryObject(action, testCase, {checked: true})
+ var action2 = createTemporaryObject(action, testCase, {checked: false})
+
+ group.actions = [action1, action2]
+ compare(group.actions.length, 2)
+ compare(group.actions[0], action1)
+ compare(group.actions[1], action2)
+ compare(group.checkedAction, action1)
+ compare(actionsSpy.count, 2)
+
+ var action3 = createTemporaryObject(action, testCase, {checked: true})
+
+ group.addAction(action3)
+ compare(group.actions.length, 3)
+ compare(group.actions[0], action1)
+ compare(group.actions[1], action2)
+ compare(group.actions[2], action3)
+ compare(group.checkedAction, action3)
+ compare(actionsSpy.count, 3)
+
+ group.removeAction(action1)
+ compare(group.actions.length, 2)
+ compare(group.actions[0], action2)
+ compare(group.actions[1], action3)
+ compare(group.checkedAction, action3)
+ compare(actionsSpy.count, 4)
+
+ group.actions = []
+ compare(group.actions.length, 0)
+ tryCompare(group, "checkedAction", null)
+ compare(actionsSpy.count, 5)
+ }
+
+ function test_declarative() {
+ var group = createTemporaryObject(declarativeGroup, testCase)
+ verify(group)
+
+ compare(group.actions.length, 3)
+ compare(group.actions[0].text, "First")
+ compare(group.actions[1].text, "Second")
+ compare(group.actions[2].text, "Third")
+ }
+
+ function test_triggered_data() {
+ return [
+ {tag: "exclusive", exclusive: true},
+ {tag: "non-exclusive", exclusive: false}
+ ]
+ }
+
+ function test_triggered(data) {
+ var group = createTemporaryObject(actionGroup, testCase, {exclusive: data.exclusive})
+ verify(group)
+
+ var triggeredSpy = createTemporaryObject(signalSpy, testCase, {target: group, signalName: "triggered"})
+ verify(triggeredSpy.valid)
+
+ var action1 = createTemporaryObject(action, testCase)
+ var action2 = createTemporaryObject(action, testCase)
+
+ group.addAction(action1)
+ group.addAction(action2)
+
+ action1.triggered()
+ compare(triggeredSpy.count, 1)
+ compare(triggeredSpy.signalArguments[0][0], action1)
+
+ action2.triggered()
+ compare(triggeredSpy.count, 2)
+ compare(triggeredSpy.signalArguments[1][0], action2)
+ }
+
+ Component {
+ id: attachedGroup
+ Item {
+ property ActionGroup group: ActionGroup { id: group }
+ property Action action1: Action { ActionGroup.group: group }
+ property Action action2: Action { ActionGroup.group: group }
+ property Action action3: Action { ActionGroup.group: group }
+ }
+ }
+
+ function test_attached() {
+ var container = createTemporaryObject(attachedGroup, testCase)
+ verify(container)
+
+ verify(!container.group.checkedAction)
+
+ container.action1.checked = true
+ compare(container.group.checkedAction, container.action1)
+ compare(container.action1.checked, true)
+ compare(container.action2.checked, false)
+ compare(container.action3.checked, false)
+
+ container.action2.checked = true
+ compare(container.group.checkedAction, container.action2)
+ compare(container.action1.checked, false)
+ compare(container.action2.checked, true)
+ compare(container.action3.checked, false)
+
+ container.action3.checked = true
+ compare(container.group.checkedAction, container.action3)
+ compare(container.action1.checked, false)
+ compare(container.action2.checked, false)
+ compare(container.action3.checked, true)
+ }
+
+ function test_actionDestroyed() {
+ var group = createTemporaryObject(actionGroup, testCase)
+ verify(group)
+
+ var actionsSpy = createTemporaryObject(signalSpy, testCase, {target: group, signalName: "actionsChanged"})
+ verify(actionsSpy.valid)
+
+ var action1 = createTemporaryObject(action, testCase, {objectName: "action1", checked: true})
+
+ group.addAction(action1)
+ compare(group.actions.length, 1)
+ compare(group.actions[0], action1)
+ compare(group.checkedAction, action1)
+ compare(actionsSpy.count, 1)
+
+ action1.destroy()
+ wait(0)
+ compare(group.actions.length, 0)
+ compare(group.checkedAction, null)
+ compare(actionsSpy.count, 2)
+ }
+
+ function test_nonExclusive() {
+ var group = createTemporaryObject(nonExclusiveGroup, testCase)
+ verify(group)
+
+ var action1 = createTemporaryObject(action, testCase, {checked: true})
+ group.addAction(action1)
+ compare(action1.checked, true)
+ compare(group.checkedAction, null)
+
+ var action2 = createTemporaryObject(action, testCase, {checked: true})
+ group.addAction(action2)
+ compare(action1.checked, true)
+ compare(action2.checked, true)
+ compare(group.checkedAction, null)
+
+ action1.checked = false
+ compare(action1.checked, false)
+ compare(action2.checked, true)
+ compare(group.checkedAction, null)
+
+ action2.checked = false
+ compare(action1.checked, false)
+ compare(action2.checked, false)
+ compare(group.checkedAction, null)
+
+ action1.checked = true
+ compare(action1.checked, true)
+ compare(action2.checked, false)
+ compare(group.checkedAction, null)
+
+ action2.checked = true
+ compare(action1.checked, true)
+ compare(action2.checked, true)
+ compare(group.checkedAction, null)
+ }
+
+ function test_enabled() {
+ var group = createTemporaryObject(actionGroup, testCase)
+ verify(group)
+
+ compare(group.enabled, true)
+
+ var action1 = createTemporaryObject(action, testCase)
+ var action2 = createTemporaryObject(action, testCase)
+ compare(action1.enabled, true)
+ compare(action2.enabled, true)
+
+ var action1Spy = createTemporaryObject(signalSpy, testCase, {target: action1, signalName: "enabledChanged"})
+ var action2Spy = createTemporaryObject(signalSpy, testCase, {target: action2, signalName: "enabledChanged"})
+ verify(action1Spy.valid && action2Spy.valid)
+
+ group.addAction(action1)
+ compare(action1.enabled, true)
+ compare(action2.enabled, true)
+ compare(action1Spy.count, 0)
+ compare(action2Spy.count, 0)
+
+ group.enabled = false
+ compare(action1.enabled, false)
+ compare(action2.enabled, true)
+ compare(action1Spy.count, 1)
+ compare(action1Spy.signalArguments[0][0], false)
+ compare(action2Spy.count, 0)
+
+ group.addAction(action2)
+ compare(action1.enabled, false)
+ compare(action2.enabled, false)
+ compare(action1Spy.count, 1)
+ compare(action2Spy.count, 1)
+ compare(action2Spy.signalArguments[0][0], false)
+
+ action1.enabled = false
+ compare(action1.enabled, false)
+ compare(action1Spy.count, 2)
+ compare(action1Spy.signalArguments[1][0], false)
+ compare(action2Spy.count, 1)
+
+ group.enabled = true
+ compare(action1.enabled, false)
+ compare(action2.enabled, true)
+ compare(action1Spy.count, 2)
+ compare(action2Spy.count, 2)
+ compare(action2Spy.signalArguments[1][0], true)
+ }
+}
diff --git a/tests/auto/controls/data/tst_button.qml b/tests/auto/controls/data/tst_button.qml
index cf9cf64d..2cf399f4 100644
--- a/tests/auto/controls/data/tst_button.qml
+++ b/tests/auto/controls/data/tst_button.qml
@@ -50,7 +50,7 @@
import QtQuick 2.2
import QtTest 1.0
-import QtQuick.Controls 2.2
+import QtQuick.Controls 2.3
TestCase {
id: testCase
@@ -430,4 +430,83 @@ TestCase {
control.highlighted = true
verify(control.highlighted)
}
+
+ function test_spacing() {
+ var control = createTemporaryObject(button, testCase, { text: "Some long, long, long text" })
+ verify(control)
+ verify(control.contentItem.implicitWidth + control.leftPadding + control.rightPadding > control.background.implicitWidth)
+
+ var textLabel = findChild(control.contentItem, "label")
+ verify(textLabel)
+
+ // The implicitWidth of the IconLabel that all buttons use as their contentItem
+ // should be equal to the implicitWidth of the Text while no icon is set.
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth)
+
+ // That means that spacing shouldn't affect it.
+ control.spacing += 100
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth)
+
+ // The implicitWidth of the Button itself should, therefore, also never include spacing while no icon is set.
+ compare(control.implicitWidth, textLabel.implicitWidth + control.leftPadding + control.rightPadding)
+ }
+
+ function test_display_data() {
+ return [
+ { "tag": "IconOnly", display: Button.IconOnly },
+ { "tag": "TextOnly", display: Button.TextOnly },
+ { "tag": "TextUnderIcon", display: Button.TextUnderIcon },
+ { "tag": "TextBesideIcon", display: Button.TextBesideIcon },
+ { "tag": "IconOnly, mirrored", display: Button.IconOnly, mirrored: true },
+ { "tag": "TextOnly, mirrored", display: Button.TextOnly, mirrored: true },
+ { "tag": "TextUnderIcon, mirrored", display: Button.TextUnderIcon, mirrored: true },
+ { "tag": "TextBesideIcon, mirrored", display: Button.TextBesideIcon, mirrored: true }
+ ]
+ }
+
+ function test_display(data) {
+ var control = createTemporaryObject(button, testCase, {
+ text: "Button",
+ display: data.display,
+ "icon.source": "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png",
+ "LayoutMirroring.enabled": !!data.mirrored
+ })
+ verify(control)
+ compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png")
+
+ var iconImage = findChild(control.contentItem, "image")
+ var textLabel = findChild(control.contentItem, "label")
+
+ switch (control.display) {
+ case Button.IconOnly:
+ verify(iconImage)
+ verify(!textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ break;
+ case Button.TextOnly:
+ verify(!iconImage)
+ verify(textLabel)
+ compare(textLabel.x, (control.availableWidth - textLabel.width) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ case Button.TextUnderIcon:
+ verify(iconImage)
+ verify(textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(textLabel.x, (control.availableWidth - textLabel.width) / 2)
+ verify(iconImage.y < textLabel.y)
+ break;
+ case Button.TextBesideIcon:
+ verify(iconImage)
+ verify(textLabel)
+ if (control.mirrored)
+ verify(textLabel.x < iconImage.x)
+ else
+ verify(iconImage.x < textLabel.x)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ }
+ }
}
diff --git a/tests/auto/controls/data/tst_buttongroup.qml b/tests/auto/controls/data/tst_buttongroup.qml
index 6baff494..7d981dd3 100644
--- a/tests/auto/controls/data/tst_buttongroup.qml
+++ b/tests/auto/controls/data/tst_buttongroup.qml
@@ -50,7 +50,7 @@
import QtQuick 2.2
import QtTest 1.0
-import QtQuick.Controls 2.2
+import QtQuick.Controls 2.3
TestCase {
id: testCase
@@ -66,6 +66,11 @@ TestCase {
}
Component {
+ id: nonExclusiveGroup
+ ButtonGroup { exclusive: false }
+ }
+
+ Component {
id: signalSpy
SignalSpy { }
}
@@ -88,6 +93,14 @@ TestCase {
QtObject { }
}
+ function test_defaults() {
+ var group = createTemporaryObject(buttonGroup, testCase)
+ verify(group)
+ compare(group.buttons.length, 0)
+ compare(group.checkedButton, null)
+ compare(group.exclusive, true)
+ }
+
function test_current() {
var group = createTemporaryObject(buttonGroup, testCase)
verify(group)
@@ -200,8 +213,15 @@ TestCase {
compare(buttonsSpy.count, 5)
}
- function test_clicked() {
- var group = createTemporaryObject(buttonGroup, testCase)
+ function test_clicked_data() {
+ return [
+ {tag: "exclusive", exclusive: true},
+ {tag: "non-exclusive", exclusive: false}
+ ]
+ }
+
+ function test_clicked(data) {
+ var group = createTemporaryObject(buttonGroup, testCase, {exclusive: data.exclusive})
verify(group)
var clickedSpy = createTemporaryObject(signalSpy, testCase, {target: group, signalName: "clicked"})
@@ -347,6 +367,42 @@ TestCase {
compare(container.group.checkedButton.objectName, "0")
}
+ function test_nonExclusive() {
+ var group = createTemporaryObject(nonExclusiveGroup, testCase)
+ verify(group)
+
+ var button1 = createTemporaryObject(button, testCase, {checked: true})
+ group.addButton(button1)
+ compare(button1.checked, true)
+ compare(group.checkedButton, null)
+
+ var button2 = createTemporaryObject(button, testCase, {checked: true})
+ group.addButton(button2)
+ compare(button1.checked, true)
+ compare(button2.checked, true)
+ compare(group.checkedButton, null)
+
+ button1.checked = false
+ compare(button1.checked, false)
+ compare(button2.checked, true)
+ compare(group.checkedButton, null)
+
+ button2.checked = false
+ compare(button1.checked, false)
+ compare(button2.checked, false)
+ compare(group.checkedButton, null)
+
+ button1.checked = true
+ compare(button1.checked, true)
+ compare(button2.checked, false)
+ compare(group.checkedButton, null)
+
+ button2.checked = true
+ compare(button1.checked, true)
+ compare(button2.checked, true)
+ compare(group.checkedButton, null)
+ }
+
Component {
id: checkedButtonColumn
Column {
diff --git a/tests/auto/controls/data/tst_checkdelegate.qml b/tests/auto/controls/data/tst_checkdelegate.qml
index 8933a7dd..9f92b4dc 100644
--- a/tests/auto/controls/data/tst_checkdelegate.qml
+++ b/tests/auto/controls/data/tst_checkdelegate.qml
@@ -89,4 +89,85 @@ TestCase {
verify(control);
compare(control.baselineOffset, control.contentItem.y + control.contentItem.baselineOffset);
}
+
+ function test_spacing() {
+ var control = createTemporaryObject(checkDelegate, testCase, { text: "Some long, long, long text" })
+ verify(control)
+ verify(control.contentItem.implicitWidth + control.leftPadding + control.rightPadding > control.background.implicitWidth)
+
+ var textLabel = findChild(control.contentItem, "label")
+ verify(textLabel)
+
+ // The implicitWidth of the IconLabel that all buttons use as their contentItem should be
+ // equal to the implicitWidth of the Text and the check indicator + spacing while no icon is set.
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth + control.indicator.width + control.spacing)
+
+ control.spacing += 100
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth + control.indicator.width + control.spacing)
+
+ compare(control.implicitWidth, textLabel.implicitWidth + control.indicator.width + control.spacing + control.leftPadding + control.rightPadding)
+ }
+
+ function test_display_data() {
+ return [
+ { "tag": "IconOnly", display: CheckDelegate.IconOnly },
+ { "tag": "TextOnly", display: CheckDelegate.TextOnly },
+ { "tag": "TextUnderIcon", display: CheckDelegate.TextUnderIcon },
+ { "tag": "TextBesideIcon", display: CheckDelegate.TextBesideIcon },
+ { "tag": "IconOnly, mirrored", display: CheckDelegate.IconOnly, mirrored: true },
+ { "tag": "TextOnly, mirrored", display: CheckDelegate.TextOnly, mirrored: true },
+ { "tag": "TextUnderIcon, mirrored", display: CheckDelegate.TextUnderIcon, mirrored: true },
+ { "tag": "TextBesideIcon, mirrored", display: CheckDelegate.TextBesideIcon, mirrored: true }
+ ]
+ }
+
+ function test_display(data) {
+ var control = createTemporaryObject(checkDelegate, testCase, {
+ text: "CheckDelegate",
+ display: data.display,
+ width: 400,
+ "icon.source": "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png",
+ "LayoutMirroring.enabled": !!data.mirrored
+ })
+ verify(control)
+ compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png")
+
+ var iconImage = findChild(control.contentItem, "image")
+ var textLabel = findChild(control.contentItem, "label")
+
+ var availableWidth = control.availableWidth - control.indicator.width - control.spacing
+ var indicatorOffset = control.mirrored ? control.indicator.width + control.spacing : 0
+
+ switch (control.display) {
+ case CheckDelegate.IconOnly:
+ verify(iconImage)
+ verify(!textLabel)
+ compare(iconImage.x, indicatorOffset + (availableWidth - iconImage.width) / 2)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ break;
+ case CheckDelegate.TextOnly:
+ verify(!iconImage)
+ verify(textLabel)
+ compare(textLabel.x, control.mirrored ? control.availableWidth - textLabel.width : 0)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ case CheckDelegate.TextUnderIcon:
+ verify(iconImage)
+ verify(textLabel)
+ compare(iconImage.x, indicatorOffset + (availableWidth - iconImage.width) / 2)
+ compare(textLabel.x, indicatorOffset + (availableWidth - textLabel.width) / 2)
+ verify(iconImage.y < textLabel.y)
+ break;
+ case CheckDelegate.TextBesideIcon:
+ verify(iconImage)
+ verify(textLabel)
+ if (control.mirrored)
+ verify(textLabel.x < iconImage.x)
+ else
+ verify(iconImage.x < textLabel.x)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ }
+ }
}
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index abdfd51a..7bc78896 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -705,9 +705,6 @@ TestCase {
var activatedSpy = signalSpy.createObject(control, {target: control, signalName: "activated"})
verify(activatedSpy.valid)
- var highlightedSpy = signalSpy.createObject(control, {target: control, signalName: "highlighted"})
- verify(highlightedSpy.valid)
-
mouseClick(control)
compare(control.popup.visible, true)
@@ -717,25 +714,19 @@ TestCase {
// press - move - release outside - not activated - not closed
mousePress(content)
compare(activatedSpy.count, 0)
- compare(highlightedSpy.count, 0)
mouseMove(content, content.width * 2)
compare(activatedSpy.count, 0)
- compare(highlightedSpy.count, 0)
mouseRelease(content, content.width * 2)
compare(activatedSpy.count, 0)
- compare(highlightedSpy.count, 0)
compare(control.popup.visible, true)
// press - move - release inside - activated - closed
mousePress(content)
compare(activatedSpy.count, 0)
- compare(highlightedSpy.count, 0)
mouseMove(content, content.width / 2 + 1, content.height / 2 + 1)
compare(activatedSpy.count, 0)
- compare(highlightedSpy.count, 0)
mouseRelease(content)
compare(activatedSpy.count, 1)
- compare(highlightedSpy.count, 1)
tryCompare(control.popup, "visible", false)
}
@@ -1176,6 +1167,58 @@ TestCase {
closedSpy.target = null
}
+ function test_mouseHighlight() {
+ if ((Qt.platform.pluginName === "offscreen")
+ || (Qt.platform.pluginName === "minimal"))
+ skip("Mouse highlight not functional on offscreen/minimal platforms")
+ var control = createTemporaryObject(comboBox, testCase, {model: 20})
+ verify(control)
+
+ compare(control.highlightedIndex, -1)
+
+ var openedSpy = signalSpy.createObject(control, {target: control.popup, signalName: "opened"})
+ verify(openedSpy.valid)
+
+ control.popup.open()
+ compare(control.highlightedIndex, 0)
+ tryCompare(openedSpy, "count", 1)
+
+ var listview = control.popup.contentItem
+ verify(listview)
+ waitForRendering(listview)
+
+ // hover-highlight through all visible list items one by one
+ var hoverIndex = -1
+ var prevHoverItem = null
+ for (var y = 0; y < listview.height; ++y) {
+ var hoverItem = listview.itemAt(0, listview.contentY + y)
+ if (!hoverItem || !hoverItem.visible || hoverItem === prevHoverItem)
+ continue
+ mouseMove(hoverItem, 0, 0)
+ tryCompare(control, "highlightedIndex", ++hoverIndex)
+ prevHoverItem = hoverItem
+ }
+
+ mouseMove(listview, listview.width / 2, listview.height / 2)
+
+ // wheel-highlight the rest of the items
+ var delta = 120
+ var prevWheelItem = null
+ while (!listview.atYEnd) {
+ var prevContentY = listview.contentY
+ mouseWheel(listview, listview.width / 2, listview.height / 2, -delta, -delta)
+ tryCompare(listview, "moving", false)
+ verify(listview.contentY > prevContentY)
+
+ var wheelItem = listview.itemAt(listview.width / 2, listview.contentY + listview.height / 2)
+ if (!wheelItem || !wheelItem.visible || wheelItem === prevWheelItem)
+ continue
+
+ tryCompare(control, "highlightedIndex", parseInt(wheelItem.text))
+ prevWheelItem = wheelItem
+ }
+ }
+
RegExpValidator {
id: regExpValidator
regExp: /(red|blue|green)?/
@@ -1417,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")
@@ -1466,7 +1508,7 @@ TestCase {
var control = createTemporaryObject(comboBox, testCase, { model: 1 })
verify(control)
compare(control.popup.implicitHeight, 0)
- compare(control.popup.height, 0)
+ compare(control.popup.height, control.popup.topPadding + control.popup.bottomPadding)
// Ensure that it's open so that the popup's implicitHeight changes when we increase the model count.
control.popup.open()
@@ -1482,6 +1524,6 @@ TestCase {
control.model = 0
control.popup.open()
tryCompare(control.popup, "visible", true)
- compare(control.popup.height, 0)
+ compare(control.popup.height, control.popup.topPadding + control.popup.bottomPadding)
}
}
diff --git a/tests/auto/controls/data/tst_container.qml b/tests/auto/controls/data/tst_container.qml
index 7c5efc1f..c5e74eeb 100644
--- a/tests/auto/controls/data/tst_container.qml
+++ b/tests/auto/controls/data/tst_container.qml
@@ -177,4 +177,46 @@ TestCase {
compare(control.itemAt(2).objectName, "2")
compare(control.itemAt(3).objectName, "3")
}
+
+ function test_removeTakeItem() {
+ var control = createTemporaryObject(container, testCase)
+ verify(control)
+
+ var item1 = rectangle.createObject(control)
+ var item2 = rectangle.createObject(control)
+ var item3 = rectangle.createObject(control)
+
+ item1.Component.onDestruction.connect(function() { item1 = null })
+ item2.Component.onDestruction.connect(function() { item2 = null })
+ item3.Component.onDestruction.connect(function() { item3 = null })
+
+ control.addItem(item1)
+ control.addItem(item2)
+ control.addItem(item3)
+ compare(control.count, 3)
+
+ // takeItem(int) does not destroy
+ compare(control.takeItem(1), item2)
+ compare(control.count, 2)
+ wait(1)
+ verify(item2)
+
+ // removeItem(Item) destroys
+ control.removeItem(item1)
+ compare(control.count, 1)
+ wait(1)
+ verify(!item1)
+
+ // removeItem(null) must not call removeItem(0)
+ control.removeItem(null)
+ compare(control.count, 1)
+ wait(1)
+ verify(item3)
+
+ // deprecated removeItem(int) does not destroy
+ control.removeItem(0)
+ compare(control.count, 0)
+ wait(1)
+ verify(item3)
+ }
}
diff --git a/tests/auto/controls/data/tst_dialog.qml b/tests/auto/controls/data/tst_dialog.qml
index 2f3d2a6b..e2557a04 100644
--- a/tests/auto/controls/data/tst_dialog.qml
+++ b/tests/auto/controls/data/tst_dialog.qml
@@ -99,11 +99,14 @@ TestCase {
verify(acceptedSpy.valid)
control.accept()
compare(acceptedSpy.count, 1)
+ compare(control.result, Dialog.Accepted)
tryCompare(control, "visible", false)
}
function test_reject() {
+ skip("QTBUG-62549, QTBUG-62628")
+
var control = createTemporaryObject(dialog, testCase)
var openedSpy = createTemporaryObject(signalSpy, testCase, {target: control, signalName: "opened"})
@@ -118,6 +121,7 @@ TestCase {
verify(rejectedSpy.valid)
control.reject()
compare(rejectedSpy.count, 1)
+ compare(control.result, Dialog.Rejected)
tryCompare(control, "visible", false)
@@ -356,4 +360,42 @@ TestCase {
- (data.header ? control.header.height + control.spacing : 0)
- (data.footer ? control.footer.height + control.spacing : 0))
}
+
+ function test_signals_data() {
+ return [
+ { tag: "Ok", standardButton: Dialog.Ok, signalName: "accepted" },
+ { tag: "Open", standardButton: Dialog.Open, signalName: "accepted" },
+ { tag: "Save", standardButton: Dialog.Save, signalName: "accepted" },
+ { tag: "Cancel", standardButton: Dialog.Cancel, signalName: "rejected" },
+ { tag: "Close", standardButton: Dialog.Close, signalName: "rejected" },
+ { tag: "Discard", standardButton: Dialog.Discard, signalName: "discarded" },
+ { tag: "Apply", standardButton: Dialog.Apply, signalName: "applied" },
+ { tag: "Reset", standardButton: Dialog.Reset, signalName: "reset" },
+ { tag: "RestoreDefaults", standardButton: Dialog.RestoreDefaults, signalName: "reset" },
+ { tag: "Help", standardButton: Dialog.Help, signalName: "helpRequested" },
+ { tag: "SaveAll", standardButton: Dialog.SaveAll, signalName: "accepted" },
+ { tag: "Yes", standardButton: Dialog.Yes, signalName: "accepted" },
+ { tag: "YesToAll", standardButton: Dialog.YesToAll, signalName: "accepted" },
+ { tag: "No", standardButton: Dialog.No, signalName: "rejected" },
+ { tag: "NoToAll", standardButton: Dialog.NoToAll, signalName: "rejected" },
+ { tag: "Abort", standardButton: Dialog.Abort, signalName: "rejected" },
+ { tag: "Retry", standardButton: Dialog.Retry, signalName: "accepted" },
+ { tag: "Ignore", standardButton: Dialog.Ignore, signalName: "accepted" }
+ ]
+ }
+
+ function test_signals(data) {
+ var control = createTemporaryObject(dialog, testCase)
+ verify(control)
+
+ control.standardButtons = data.standardButton
+ var button = control.standardButton(data.standardButton)
+ verify(button)
+
+ var buttonSpy = signalSpy.createObject(control.contentItem, {target: control, signalName: data.signalName})
+ verify(buttonSpy.valid)
+
+ button.clicked()
+ compare(buttonSpy.count, 1)
+ }
}
diff --git a/tests/auto/controls/data/tst_dialogbuttonbox.qml b/tests/auto/controls/data/tst_dialogbuttonbox.qml
index 9b3d969f..044c9593 100644
--- a/tests/auto/controls/data/tst_dialogbuttonbox.qml
+++ b/tests/auto/controls/data/tst_dialogbuttonbox.qml
@@ -159,10 +159,10 @@ TestCase {
{ tag: "Save", standardButton: DialogButtonBox.Save, buttonRole: DialogButtonBox.AcceptRole, signalName: "accepted" },
{ tag: "Cancel", standardButton: DialogButtonBox.Cancel, buttonRole: DialogButtonBox.RejectRole, signalName: "rejected" },
{ tag: "Close", standardButton: DialogButtonBox.Close, buttonRole: DialogButtonBox.RejectRole, signalName: "rejected" },
- { tag: "Discard", standardButton: DialogButtonBox.Discard, buttonRole: DialogButtonBox.DestructiveRole },
- { tag: "Apply", standardButton: DialogButtonBox.Apply, buttonRole: DialogButtonBox.ApplyRole },
- { tag: "Reset", standardButton: DialogButtonBox.Reset, buttonRole: DialogButtonBox.ResetRole },
- { tag: "RestoreDefaults", standardButton: DialogButtonBox.RestoreDefaults, buttonRole: DialogButtonBox.ResetRole },
+ { tag: "Discard", standardButton: DialogButtonBox.Discard, buttonRole: DialogButtonBox.DestructiveRole, signalName: "discarded" },
+ { tag: "Apply", standardButton: DialogButtonBox.Apply, buttonRole: DialogButtonBox.ApplyRole, signalName: "applied" },
+ { tag: "Reset", standardButton: DialogButtonBox.Reset, buttonRole: DialogButtonBox.ResetRole, signalName: "reset" },
+ { tag: "RestoreDefaults", standardButton: DialogButtonBox.RestoreDefaults, buttonRole: DialogButtonBox.ResetRole, signalName: "reset" },
{ tag: "Help", standardButton: DialogButtonBox.Help, buttonRole: DialogButtonBox.HelpRole, signalName: "helpRequested" },
{ tag: "SaveAll", standardButton: DialogButtonBox.SaveAll, buttonRole: DialogButtonBox.AcceptRole, signalName: "accepted" },
{ tag: "Yes", standardButton: DialogButtonBox.Yes, buttonRole: DialogButtonBox.YesRole, signalName: "accepted" },
@@ -188,11 +188,11 @@ TestCase {
var clickedSpy = signalSpy.createObject(control, {target: control, signalName: "clicked"})
verify(clickedSpy.valid)
var roleSpy = signalSpy.createObject(control, {target: control, signalName: data.signalName})
- compare(roleSpy.valid, !!data.signalName)
+ verify(roleSpy.valid)
button.clicked()
compare(clickedSpy.count, 1)
compare(clickedSpy.signalArguments[0][0], button)
- compare(roleSpy.count, !!data.signalName ? 1 : 0)
+ compare(roleSpy.count, 1)
}
}
diff --git a/tests/auto/controls/data/tst_drawer.qml b/tests/auto/controls/data/tst_drawer.qml
index a33a4bf0..5446b969 100644
--- a/tests/auto/controls/data/tst_drawer.qml
+++ b/tests/auto/controls/data/tst_drawer.qml
@@ -50,7 +50,7 @@
import QtQuick 2.2
import QtTest 1.0
-import QtQuick.Controls 2.2
+import QtQuick.Controls 2.3
TestCase {
id: testCase
@@ -70,7 +70,7 @@ TestCase {
compare(control.edge, Qt.LeftEdge)
compare(control.position, 0.0)
compare(control.dragMargin, Qt.styleHints.startDragDistance)
- compare(control.parent, ApplicationWindow.overlay)
+ compare(control.parent, Overlay.overlay)
}
function test_invalidEdge() {
diff --git a/tests/auto/controls/data/tst_itemdelegate.qml b/tests/auto/controls/data/tst_itemdelegate.qml
index 6f4bb6cb..4e4ca0c4 100644
--- a/tests/auto/controls/data/tst_itemdelegate.qml
+++ b/tests/auto/controls/data/tst_itemdelegate.qml
@@ -79,4 +79,84 @@ TestCase {
control.highlighted = true
verify(control.highlighted)
}
+
+ function test_spacing() {
+ var control = createTemporaryObject(itemDelegate, testCase, { text: "Some long, long, long text" })
+ verify(control)
+ verify(control.contentItem.implicitWidth + control.leftPadding + control.rightPadding > control.background.implicitWidth)
+
+ var textLabel = findChild(control.contentItem, "label")
+ verify(textLabel)
+
+ // The implicitWidth of the IconLabel that all buttons use as their contentItem
+ // should be equal to the implicitWidth of the Text while no icon is set.
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth)
+
+ // That means that spacing shouldn't affect it.
+ control.spacing += 100
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth)
+
+ // The implicitWidth of the ItemDelegate itself should, therefore, also never include spacing while no icon is set.
+ compare(control.implicitWidth, textLabel.implicitWidth + control.leftPadding + control.rightPadding)
+ }
+
+ function test_display_data() {
+ return [
+ { "tag": "IconOnly", display: ItemDelegate.IconOnly },
+ { "tag": "TextOnly", display: ItemDelegate.TextOnly },
+ { "tag": "TextUnderIcon", display: ItemDelegate.TextUnderIcon },
+ { "tag": "TextBesideIcon", display: ItemDelegate.TextBesideIcon },
+ { "tag": "IconOnly, mirrored", display: ItemDelegate.IconOnly, mirrored: true },
+ { "tag": "TextOnly, mirrored", display: ItemDelegate.TextOnly, mirrored: true },
+ { "tag": "TextUnderIcon, mirrored", display: ItemDelegate.TextUnderIcon, mirrored: true },
+ { "tag": "TextBesideIcon, mirrored", display: ItemDelegate.TextBesideIcon, mirrored: true }
+ ]
+ }
+
+ function test_display(data) {
+ var control = createTemporaryObject(itemDelegate, testCase, {
+ text: "ItemDelegate",
+ display: data.display,
+ width: 400,
+ "icon.source": "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png",
+ "LayoutMirroring.enabled": !!data.mirrored
+ })
+ verify(control)
+ compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png")
+
+ var iconImage = findChild(control.contentItem, "image")
+ var textLabel = findChild(control.contentItem, "label")
+
+ switch (control.display) {
+ case ItemDelegate.IconOnly:
+ verify(iconImage)
+ verify(!textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ break;
+ case ItemDelegate.TextOnly:
+ verify(!iconImage)
+ verify(textLabel)
+ compare(textLabel.x, control.mirrored ? control.availableWidth - textLabel.width : 0)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ case ItemDelegate.TextUnderIcon:
+ verify(iconImage)
+ verify(textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(textLabel.x, (control.availableWidth - textLabel.width) / 2)
+ verify(iconImage.y < textLabel.y)
+ break;
+ case ItemDelegate.TextBesideIcon:
+ verify(iconImage)
+ verify(textLabel)
+ if (control.mirrored)
+ verify(textLabel.x < iconImage.x)
+ else
+ verify(iconImage.x < textLabel.x)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ }
+ }
}
diff --git a/tests/auto/controls/data/tst_menuitem.qml b/tests/auto/controls/data/tst_menuitem.qml
index 068e2a5c..57286002 100644
--- a/tests/auto/controls/data/tst_menuitem.qml
+++ b/tests/auto/controls/data/tst_menuitem.qml
@@ -65,6 +65,11 @@ TestCase {
MenuItem { }
}
+ Component {
+ id: menu
+ Menu { }
+ }
+
function test_baseline() {
var control = createTemporaryObject(menuItem, testCase)
verify(control)
@@ -96,4 +101,93 @@ TestCase {
control.highlighted = true
verify(control.highlighted)
}
+
+ function test_display_data() {
+ return [
+ { "tag": "IconOnly", display: MenuItem.IconOnly },
+ { "tag": "TextOnly", display: MenuItem.TextOnly },
+ { "tag": "TextUnderIcon", display: MenuItem.TextUnderIcon },
+ { "tag": "TextBesideIcon", display: MenuItem.TextBesideIcon },
+ { "tag": "IconOnly, mirrored", display: MenuItem.IconOnly, mirrored: true },
+ { "tag": "TextOnly, mirrored", display: MenuItem.TextOnly, mirrored: true },
+ { "tag": "TextUnderIcon, mirrored", display: MenuItem.TextUnderIcon, mirrored: true },
+ { "tag": "TextBesideIcon, mirrored", display: MenuItem.TextBesideIcon, mirrored: true }
+ ]
+ }
+
+ function test_display(data) {
+ var control = createTemporaryObject(menuItem, testCase, {
+ text: "MenuItem",
+ display: data.display,
+ "icon.source": "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png",
+ "LayoutMirroring.enabled": !!data.mirrored
+ })
+ verify(control)
+ compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png")
+
+ var padding = data.mirrored ? control.contentItem.rightPadding : control.contentItem.leftPadding
+ var iconImage = findChild(control.contentItem, "image")
+ var textLabel = findChild(control.contentItem, "label")
+
+ switch (control.display) {
+ case MenuItem.IconOnly:
+ verify(iconImage)
+ verify(!textLabel)
+ compare(iconImage.x, control.mirrored ? control.availableWidth - iconImage.width - padding : padding)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ break;
+ case MenuItem.TextOnly:
+ verify(!iconImage)
+ verify(textLabel)
+ compare(textLabel.x, control.mirrored ? control.availableWidth - textLabel.width - padding : padding)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ case MenuItem.TextUnderIcon:
+ verify(iconImage)
+ verify(textLabel)
+ compare(iconImage.x, control.mirrored ? control.availableWidth - iconImage.width - (textLabel.width - iconImage.width) / 2 - padding : (textLabel.width - iconImage.width) / 2 + padding)
+ compare(textLabel.x, control.mirrored ? control.availableWidth - textLabel.width - padding : padding)
+ verify(iconImage.y < textLabel.y)
+ break;
+ case MenuItem.TextBesideIcon:
+ verify(iconImage)
+ verify(textLabel)
+ if (control.mirrored)
+ verify(textLabel.x < iconImage.x)
+ else
+ verify(iconImage.x < textLabel.x)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ }
+ }
+
+ function test_menu() {
+ var control = createTemporaryObject(menu, testCase)
+ verify(control)
+
+ var item1 = createTemporaryObject(menuItem, testCase)
+ verify(item1)
+ compare(item1.menu, null)
+
+ var item2 = createTemporaryObject(menuItem, testCase)
+ verify(item2)
+ compare(item2.menu, null)
+
+ control.addItem(item1)
+ compare(item1.menu, control)
+ compare(item2.menu, null)
+
+ control.insertItem(1, item2)
+ compare(item1.menu, control)
+ compare(item2.menu, control)
+
+ control.removeItem(1)
+ compare(item1.menu, control)
+ compare(item2.menu, null)
+
+ control.removeItem(0)
+ compare(item1.menu, null)
+ compare(item2.menu, null)
+ }
}
diff --git a/tests/auto/controls/data/tst_page.qml b/tests/auto/controls/data/tst_page.qml
index 2eb11165..4fb2d089 100644
--- a/tests/auto/controls/data/tst_page.qml
+++ b/tests/auto/controls/data/tst_page.qml
@@ -150,8 +150,10 @@ TestCase {
compare(control.contentWidth, 0)
compare(control.contentHeight, 0)
- compare(control.implicitWidth, control.leftPadding + control.rightPadding)
- compare(control.implicitHeight, control.topPadding + control.bottomPadding)
+ compare(control.implicitWidth, Math.max(control.leftPadding + control.rightPadding,
+ control.background ? control.background.implicitWidth : 0))
+ compare(control.implicitHeight, Math.max(control.topPadding + control.bottomPadding,
+ control.background ? control.background.implicitHeight : 0))
}
function test_contentItem() {
diff --git a/tests/auto/controls/data/tst_pageindicator.qml b/tests/auto/controls/data/tst_pageindicator.qml
index 191228f2..dc411e45 100644
--- a/tests/auto/controls/data/tst_pageindicator.qml
+++ b/tests/auto/controls/data/tst_pageindicator.qml
@@ -96,7 +96,7 @@ TestCase {
}
function test_interactive(data) {
- var control = createTemporaryObject(pageIndicator, testCase, {count: 5, spacing: 10, padding: 10})
+ var control = createTemporaryObject(pageIndicator, testCase, {count: 5, spacing: 10, topPadding: 10, leftPadding: 10, rightPadding: 10, bottomPadding: 10})
verify(control)
verify(!control.interactive)
diff --git a/tests/auto/controls/data/tst_popup.qml b/tests/auto/controls/data/tst_popup.qml
index bec50ad0..88ec295f 100644
--- a/tests/auto/controls/data/tst_popup.qml
+++ b/tests/auto/controls/data/tst_popup.qml
@@ -50,8 +50,8 @@
import QtQuick 2.4
import QtTest 1.0
-import QtQuick.Controls 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick.Controls 2.3
+import QtQuick.Templates 2.3 as T
TestCase {
id: testCase
@@ -361,7 +361,7 @@ TestCase {
}
function test_margins() {
- var control = createTemporaryObject(popupControl, testCase, {width: 100, height: 100})
+ var control = createTemporaryObject(popupTemplate, testCase, {width: 100, height: 100})
verify(control)
control.open()
@@ -944,6 +944,10 @@ TestCase {
compare(openedSpy.count, 1)
verify(control.visible)
+ // remove the background so that it won't affect the implicit size of the popup,
+ // so the implicit sizes tested below are entirely based on the content size
+ control.background = null
+
// implicit size of the content
control.contentItem.implicitWidth = 10
compare(control.implicitWidth, 10 + control.leftPadding + control.rightPadding)
@@ -1069,6 +1073,7 @@ TestCase {
tryCompare(window, "active", true)
compare(window.overlay.children.length, 0)
+ compare(window.overlay, window.Overlay.overlay)
var firstOverlay = findOverlay(window, window.firstDrawer)
verify(!firstOverlay)
@@ -1178,16 +1183,6 @@ TestCase {
compare(child.ApplicationWindow.window, null)
}
- SignalSpy {
- id: openedSpy
- signalName: "opened"
- }
-
- SignalSpy {
- id: closedSpy
- signalName: "closed"
- }
-
Component {
id: pausePopup
Popup {
@@ -1200,19 +1195,32 @@ TestCase {
var control = createTemporaryObject(pausePopup, testCase)
verify(control)
- openedSpy.target = control
- closedSpy.target = control
+ var openedSpy = createTemporaryObject(signalSpy, testCase, {target: control, signalName: "opened"})
+ verify(openedSpy.valid)
+ var closedSpy = createTemporaryObject(signalSpy, testCase, {target: control, signalName: "closed"})
+ verify(closedSpy.valid)
+ var openedChangeSpy = createTemporaryObject(signalSpy, testCase, {target: control, signalName: "openedChanged"})
+ verify(openedChangeSpy.valid)
control.open()
compare(control.visible, true)
+ compare(control.opened, false)
+ compare(openedChangeSpy.count, 0)
compare(openedSpy.count, 0)
tryCompare(openedSpy, "count", 1)
+ compare(control.opened, true)
+ compare(openedChangeSpy.count, 1)
compare(closedSpy.count, 0)
control.close()
+ compare(control.visible, true)
+ compare(control.opened, false)
+ compare(openedChangeSpy.count, 2)
compare(openedSpy.count, 1)
compare(closedSpy.count, 0)
tryCompare(closedSpy, "count", 1)
+ compare(control.opened, false)
+ compare(openedChangeSpy.count, 2)
compare(control.visible, false)
}
diff --git a/tests/auto/controls/data/tst_radiodelegate.qml b/tests/auto/controls/data/tst_radiodelegate.qml
index 8fb6f933..b1ee00db 100644
--- a/tests/auto/controls/data/tst_radiodelegate.qml
+++ b/tests/auto/controls/data/tst_radiodelegate.qml
@@ -89,4 +89,85 @@ TestCase {
verify(control);
compare(control.baselineOffset, control.contentItem.y + control.contentItem.baselineOffset);
}
+
+ function test_spacing() {
+ var control = createTemporaryObject(radioDelegate, testCase, { text: "Some long, long, long text" })
+ verify(control)
+ verify(control.contentItem.implicitWidth + control.leftPadding + control.rightPadding > control.background.implicitWidth)
+
+ var textLabel = findChild(control.contentItem, "label")
+ verify(textLabel)
+
+ // The implicitWidth of the IconLabel that all buttons use as their contentItem should be
+ // equal to the implicitWidth of the Text and the radio indicator + spacing while no icon is set.
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth + control.indicator.width + control.spacing)
+
+ control.spacing += 100
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth + control.indicator.width + control.spacing)
+
+ compare(control.implicitWidth, textLabel.implicitWidth + control.indicator.width + control.spacing + control.leftPadding + control.rightPadding)
+ }
+
+ function test_display_data() {
+ return [
+ { "tag": "IconOnly", display: RadioDelegate.IconOnly },
+ { "tag": "TextOnly", display: RadioDelegate.TextOnly },
+ { "tag": "TextUnderIcon", display: RadioDelegate.TextUnderIcon },
+ { "tag": "TextBesideIcon", display: RadioDelegate.TextBesideIcon },
+ { "tag": "IconOnly, mirrored", display: RadioDelegate.IconOnly, mirrored: true },
+ { "tag": "TextOnly, mirrored", display: RadioDelegate.TextOnly, mirrored: true },
+ { "tag": "TextUnderIcon, mirrored", display: RadioDelegate.TextUnderIcon, mirrored: true },
+ { "tag": "TextBesideIcon, mirrored", display: RadioDelegate.TextBesideIcon, mirrored: true }
+ ]
+ }
+
+ function test_display(data) {
+ var control = createTemporaryObject(radioDelegate, testCase, {
+ text: "RadioDelegate",
+ display: data.display,
+ width: 400,
+ "icon.source": "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png",
+ "LayoutMirroring.enabled": !!data.mirrored
+ })
+ verify(control)
+ compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png")
+
+ var iconImage = findChild(control.contentItem, "image")
+ var textLabel = findChild(control.contentItem, "label")
+
+ var availableWidth = control.availableWidth - control.indicator.width - control.spacing
+ var indicatorOffset = control.mirrored ? control.indicator.width + control.spacing : 0
+
+ switch (control.display) {
+ case RadioDelegate.IconOnly:
+ verify(iconImage)
+ verify(!textLabel)
+ compare(iconImage.x, indicatorOffset + (availableWidth - iconImage.width) / 2)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ break;
+ case RadioDelegate.TextOnly:
+ verify(!iconImage)
+ verify(textLabel)
+ compare(textLabel.x, control.mirrored ? control.availableWidth - textLabel.width : 0)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ case RadioDelegate.TextUnderIcon:
+ verify(iconImage)
+ verify(textLabel)
+ compare(iconImage.x, indicatorOffset + (availableWidth - iconImage.width) / 2)
+ compare(textLabel.x, indicatorOffset + (availableWidth - textLabel.width) / 2)
+ verify(iconImage.y < textLabel.y)
+ break;
+ case RadioDelegate.TextBesideIcon:
+ verify(iconImage)
+ verify(textLabel)
+ if (control.mirrored)
+ verify(textLabel.x < iconImage.x)
+ else
+ verify(iconImage.x < textLabel.x)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ }
+ }
}
diff --git a/tests/auto/controls/data/tst_rangeslider.qml b/tests/auto/controls/data/tst_rangeslider.qml
index 791f357f..39b0c4b0 100644
--- a/tests/auto/controls/data/tst_rangeslider.qml
+++ b/tests/auto/controls/data/tst_rangeslider.qml
@@ -96,6 +96,8 @@ TestCase {
compare(control.stepSize, 0)
compare(control.snapMode, RangeSlider.NoSnap)
compare(control.orientation, Qt.Horizontal)
+ compare(control.horizontal, true)
+ compare(control.vertical, false)
}
function test_values() {
@@ -262,9 +264,14 @@ TestCase {
verify(control)
compare(control.orientation, Qt.Horizontal)
+ compare(control.horizontal, true)
+ compare(control.vertical, false)
verify(control.width > control.height)
+
control.orientation = Qt.Vertical
compare(control.orientation, Qt.Vertical)
+ compare(control.horizontal, false)
+ compare(control.vertical, true)
verify(control.width < control.height)
}
diff --git a/tests/auto/controls/data/tst_roundbutton.qml b/tests/auto/controls/data/tst_roundbutton.qml
index 7a533348..c772c85f 100644
--- a/tests/auto/controls/data/tst_roundbutton.qml
+++ b/tests/auto/controls/data/tst_roundbutton.qml
@@ -84,4 +84,83 @@ TestCase {
control.width = 10;
compare(control.radius, 5);
}
+
+ function test_spacing() {
+ var control = createTemporaryObject(roundButton, testCase, { text: "Some long, long, long text" })
+ verify(control)
+ verify(control.contentItem.implicitWidth + control.leftPadding + control.rightPadding > control.background.implicitWidth)
+
+ var textLabel = findChild(control.contentItem, "label")
+ verify(textLabel)
+
+ // The implicitWidth of the IconLabel that all buttons use as their contentItem
+ // should be equal to the implicitWidth of the Text while no icon is set.
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth)
+
+ // That means that spacing shouldn't affect it.
+ control.spacing += 100
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth)
+
+ // The implicitWidth of the Button itself should, therefore, also never include spacing while no icon is set.
+ compare(control.implicitWidth, textLabel.implicitWidth + control.leftPadding + control.rightPadding)
+ }
+
+ function test_display_data() {
+ return [
+ { "tag": "IconOnly", display: RoundButton.IconOnly },
+ { "tag": "TextOnly", display: RoundButton.TextOnly },
+ { "tag": "TextUnderIcon", display: RoundButton.TextUnderIcon },
+ { "tag": "TextBesideIcon", display: RoundButton.TextBesideIcon },
+ { "tag": "IconOnly, mirrored", display: RoundButton.IconOnly, mirrored: true },
+ { "tag": "TextOnly, mirrored", display: RoundButton.TextOnly, mirrored: true },
+ { "tag": "TextUnderIcon, mirrored", display: RoundButton.TextUnderIcon, mirrored: true },
+ { "tag": "TextBesideIcon, mirrored", display: RoundButton.TextBesideIcon, mirrored: true }
+ ]
+ }
+
+ function test_display(data) {
+ var control = createTemporaryObject(roundButton, testCase, {
+ text: "RoundButton",
+ display: data.display,
+ "icon.source": "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png",
+ "LayoutMirroring.enabled": !!data.mirrored
+ })
+ verify(control)
+ compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png")
+
+ var iconImage = findChild(control.contentItem, "image")
+ var textLabel = findChild(control.contentItem, "label")
+
+ switch (control.display) {
+ case RoundButton.IconOnly:
+ verify(iconImage)
+ verify(!textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ break;
+ case RoundButton.TextOnly:
+ verify(!iconImage)
+ verify(textLabel)
+ compare(textLabel.x, (control.availableWidth - textLabel.width) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ case RoundButton.TextUnderIcon:
+ verify(iconImage)
+ verify(textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(textLabel.x, (control.availableWidth - textLabel.width) / 2)
+ verify(iconImage.y < textLabel.y)
+ break;
+ case RoundButton.TextBesideIcon:
+ verify(iconImage)
+ verify(textLabel)
+ if (control.mirrored)
+ verify(textLabel.x < iconImage.x)
+ else
+ verify(iconImage.x < textLabel.x)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ }
+ }
}
diff --git a/tests/auto/controls/data/tst_scrollbar.qml b/tests/auto/controls/data/tst_scrollbar.qml
index b44627c3..d515db7e 100644
--- a/tests/auto/controls/data/tst_scrollbar.qml
+++ b/tests/auto/controls/data/tst_scrollbar.qml
@@ -735,6 +735,20 @@ TestCase {
compare(horizontal.contentItem.width, 0.2 * horizontal.availableWidth)
}
+ function test_orientation() {
+ var control = createTemporaryObject(scrollBar, testCase)
+ verify(control)
+
+ compare(control.orientation, Qt.Vertical)
+ compare(control.horizontal, false)
+ compare(control.vertical, true)
+
+ control.orientation = Qt.Horizontal
+ compare(control.orientation, Qt.Horizontal)
+ compare(control.horizontal, true)
+ compare(control.vertical, false)
+ }
+
function test_flashing() {
var control = createTemporaryObject(scrollBar, testCase, {size: 0.2})
verify(control)
diff --git a/tests/auto/controls/data/tst_scrollindicator.qml b/tests/auto/controls/data/tst_scrollindicator.qml
index 894a035d..a6275f91 100644
--- a/tests/auto/controls/data/tst_scrollindicator.qml
+++ b/tests/auto/controls/data/tst_scrollindicator.qml
@@ -223,6 +223,20 @@ TestCase {
compare(horizontal.contentItem.width, 0.2 * horizontal.availableWidth)
}
+ function test_orientation() {
+ var control = createTemporaryObject(scrollIndicator, testCase)
+ verify(control)
+
+ compare(control.orientation, Qt.Vertical)
+ compare(control.horizontal, false)
+ compare(control.vertical, true)
+
+ control.orientation = Qt.Horizontal
+ compare(control.orientation, Qt.Horizontal)
+ compare(control.horizontal, true)
+ compare(control.vertical, false)
+ }
+
// QTBUG-61785
function test_mouseArea() {
var ma = createTemporaryObject(mouseArea, testCase, {width: testCase.width, height: testCase.height})
diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml
index 9ee8626d..a831e402 100644
--- a/tests/auto/controls/data/tst_slider.qml
+++ b/tests/auto/controls/data/tst_slider.qml
@@ -77,6 +77,8 @@ TestCase {
compare(control.stepSize, 0)
compare(control.snapMode, Slider.NoSnap)
compare(control.orientation, Qt.Horizontal)
+ compare(control.horizontal, true)
+ compare(control.vertical, false)
}
function test_value() {
@@ -201,9 +203,14 @@ TestCase {
verify(control)
compare(control.orientation, Qt.Horizontal)
+ compare(control.horizontal, true)
+ compare(control.vertical, false)
verify(control.width > control.height)
+
control.orientation = Qt.Vertical
compare(control.orientation, Qt.Vertical)
+ compare(control.horizontal, false)
+ compare(control.vertical, true)
verify(control.width < control.height)
}
diff --git a/tests/auto/controls/data/tst_spinbox.qml b/tests/auto/controls/data/tst_spinbox.qml
index 71f0735c..5a3b1f29 100644
--- a/tests/auto/controls/data/tst_spinbox.qml
+++ b/tests/auto/controls/data/tst_spinbox.qml
@@ -116,15 +116,23 @@ TestCase {
compare(control.up.indicator.enabled, false)
compare(control.down.indicator.enabled, true)
+ control.wrap = true
+ compare(control.up.indicator.enabled, true)
+ compare(control.down.indicator.enabled, true)
+
control.value = -1
compare(control.value, 0)
compare(control.up.indicator.enabled, true)
- compare(control.down.indicator.enabled, false)
+ compare(control.down.indicator.enabled, true)
control.from = 25
compare(control.from, 25)
compare(control.value, 25)
compare(control.up.indicator.enabled, true)
+ compare(control.down.indicator.enabled, true)
+
+ control.wrap = false
+ compare(control.up.indicator.enabled, true)
compare(control.down.indicator.enabled, false)
control.value = 30
@@ -229,8 +237,19 @@ TestCase {
compare(valueModifiedSpy.count, data.modified)
}
- function test_keys() {
- var control = createTemporaryObject(spinBox, testCase)
+ function test_keys_data() {
+ return [
+ { tag: "1", from: 1, to: 10, value: 1, stepSize: 1, upSteps: [2,3,4], downSteps: [3,2,1,1] },
+ { tag: "2", from: 1, to: 10, value: 10, stepSize: 2, upSteps: [10,10], downSteps: [8,6,4] },
+ { tag: "25", from: 0, to: 100, value: 50, stepSize: 25, upSteps: [75,100,100], downSteps: [75,50,25,0,0] },
+ { tag: "wrap1", wrap: true, from: 1, to: 10, value: 1, stepSize: 1, upSteps: [2,3], downSteps: [2,1,10,9] },
+ { tag: "wrap2", wrap: true, from: 1, to: 10, value: 10, stepSize: 2, upSteps: [1,3,5], downSteps: [3,1,10,8,6] },
+ { tag: "wrap25", wrap: true, from: 0, to: 100, value: 50, stepSize: 25, upSteps: [75,100,0,25], downSteps: [0,100,75] }
+ ]
+ }
+
+ function test_keys(data) {
+ var control = createTemporaryObject(spinBox, testCase, {wrap: data.wrap, from: data.from, to: data.to, value: data.value, stepSize: data.stepSize})
verify(control)
var upPressedCount = 0
@@ -249,48 +268,31 @@ TestCase {
control.forceActiveFocus()
verify(control.activeFocus)
- control.value = 50
- compare(control.value, 50)
-
- for (var d1 = 1; d1 <= 10; ++d1) {
- keyPress(Qt.Key_Down)
- compare(control.down.pressed, true)
- compare(control.up.pressed, false)
- compare(downPressedSpy.count, ++downPressedCount)
- compare(valueModifiedSpy.count, ++valueModifiedCount)
-
- compare(control.value, 50 - d1)
-
- keyRelease(Qt.Key_Down)
- compare(control.down.pressed, false)
- compare(control.up.pressed, false)
- compare(downPressedSpy.count, ++downPressedCount)
- compare(valueModifiedSpy.count, valueModifiedCount)
- }
- compare(control.value, 40)
-
- for (var i1 = 1; i1 <= 10; ++i1) {
+ for (var u = 0; u < data.upSteps.length; ++u) {
+ var wasUpEnabled = control.wrap || control.value < control.to
keyPress(Qt.Key_Up)
- compare(control.up.pressed, true)
+ compare(control.up.pressed, wasUpEnabled)
compare(control.down.pressed, false)
- compare(upPressedSpy.count, ++upPressedCount)
- compare(valueModifiedSpy.count, ++valueModifiedCount)
+ if (wasUpEnabled) {
+ ++upPressedCount
+ ++valueModifiedCount
+ }
+ compare(upPressedSpy.count, upPressedCount)
+ compare(valueModifiedSpy.count, valueModifiedCount)
- compare(control.value, 40 + i1)
+ compare(control.value, data.upSteps[u])
keyRelease(Qt.Key_Up)
compare(control.down.pressed, false)
compare(control.up.pressed, false)
- compare(upPressedSpy.count, ++upPressedCount)
+ if (wasUpEnabled)
+ ++upPressedCount
+ compare(upPressedSpy.count, upPressedCount)
compare(valueModifiedSpy.count, valueModifiedCount)
}
- compare(control.value, 50)
-
- control.stepSize = 25
- compare(control.stepSize, 25)
- for (var d2 = 1; d2 <= 10; ++d2) {
- var wasDownEnabled = control.value > control.from
+ for (var d = 0; d < data.downSteps.length; ++d) {
+ var wasDownEnabled = control.wrap || control.value > control.from
keyPress(Qt.Key_Down)
compare(control.down.pressed, wasDownEnabled)
compare(control.up.pressed, false)
@@ -301,7 +303,7 @@ TestCase {
compare(downPressedSpy.count, downPressedCount)
compare(valueModifiedSpy.count, valueModifiedCount)
- compare(control.value, Math.max(0, 50 - d2 * 25))
+ compare(control.value, data.downSteps[d])
keyRelease(Qt.Key_Down)
compare(control.down.pressed, false)
@@ -311,31 +313,6 @@ TestCase {
compare(downPressedSpy.count, downPressedCount)
compare(valueModifiedSpy.count, valueModifiedCount)
}
- compare(control.value, 0)
-
- for (var i2 = 1; i2 <= 10; ++i2) {
- var wasUpEnabled = control.value < control.to
- keyPress(Qt.Key_Up)
- compare(control.up.pressed, wasUpEnabled)
- compare(control.down.pressed, false)
- if (wasUpEnabled) {
- ++upPressedCount
- ++valueModifiedCount
- }
- compare(upPressedSpy.count, upPressedCount)
- compare(valueModifiedSpy.count, valueModifiedCount)
-
- compare(control.value, Math.min(99, i2 * 25))
-
- keyRelease(Qt.Key_Up)
- compare(control.down.pressed, false)
- compare(control.up.pressed, false)
- if (wasUpEnabled)
- ++upPressedCount
- compare(upPressedSpy.count, upPressedCount)
- compare(valueModifiedSpy.count, valueModifiedCount)
- }
- compare(control.value, 99)
}
function test_locale() {
@@ -390,6 +367,9 @@ TestCase {
var control = createTemporaryObject(spinBox, testCase)
verify(control)
+ var valueModifiedSpy = signalSpy.createObject(control, {target: control, signalName: "valueModified"})
+ verify(valueModifiedSpy.valid)
+
control.contentItem.forceActiveFocus()
compare(control.contentItem.activeFocus, true)
@@ -398,6 +378,7 @@ TestCase {
keyClick(Qt.Key_5)
keyClick(Qt.Key_Return)
compare(control.value, 0)
+ compare(valueModifiedSpy.count, 0)
control.editable = true
compare(control.editable, true)
@@ -405,48 +386,49 @@ TestCase {
keyClick(Qt.Key_5)
keyClick(Qt.Key_Return)
compare(control.value, 5)
+ compare(valueModifiedSpy.count, 1)
+ }
+
+ function test_wheel_data() {
+ return [
+ { tag: "1", from: 1, to: 10, value: 1, stepSize: 1, upSteps: [2,3,4], downSteps: [3,2,1,1] },
+ { tag: "2", from: 1, to: 10, value: 10, stepSize: 2, upSteps: [10,10], downSteps: [8,6,4] },
+ { tag: "25", from: 0, to: 100, value: 50, stepSize: 25, upSteps: [75,100,100], downSteps: [75,50,25,0,0] },
+ { tag: "wrap1", wrap: true, from: 1, to: 10, value: 1, stepSize: 1, upSteps: [2,3], downSteps: [2,1,10,9] },
+ { tag: "wrap2", wrap: true, from: 1, to: 10, value: 10, stepSize: 2, upSteps: [1,3,5], downSteps: [3,1,10,8,6] },
+ { tag: "wrap25", wrap: true, from: 0, to: 100, value: 50, stepSize: 25, upSteps: [75,100,0,25], downSteps: [0,100,75] }
+ ]
}
function test_wheel(data) {
- var control = createTemporaryObject(spinBox, testCase, {wheelEnabled: true})
+ var control = createTemporaryObject(spinBox, testCase, {wrap: data.wrap, from: data.from, to: data.to, value: data.value, stepSize: data.stepSize, wheelEnabled: true})
verify(control)
+ var valueModifiedCount = 0
var valueModifiedSpy = signalSpy.createObject(control, {target: control, signalName: "valueModified"})
verify(valueModifiedSpy.valid)
var delta = 120
- compare(control.value, 0)
-
- mouseWheel(control, control.width / 2, control.height / 2, delta, delta)
- compare(control.value, 1)
- compare(valueModifiedSpy.count, 1)
-
- control.stepSize = 2
-
- mouseWheel(control, control.width / 2, control.height / 2, delta, delta)
- compare(control.value, 3)
- compare(valueModifiedSpy.count, 2)
-
- control.stepSize = 10
-
- mouseWheel(control, control.width / 2, control.height / 2, -delta, -delta)
- compare(control.value, 0)
- compare(valueModifiedSpy.count, 3)
-
- control.stepSize = 5
+ for (var u = 0; u < data.upSteps.length; ++u) {
+ var wasUpEnabled = control.wrap || control.value < control.to
+ mouseWheel(control, control.width / 2, control.height / 2, delta, delta)
+ if (wasUpEnabled)
+ ++valueModifiedCount
+ compare(valueModifiedSpy.count, valueModifiedCount)
- mouseWheel(control, control.width / 2, control.height / 2, delta, delta)
- compare(control.value, 5)
- compare(valueModifiedSpy.count, 4)
+ compare(control.value, data.upSteps[u])
+ }
- mouseWheel(control, control.width / 2, control.height / 2, 0.5 * delta, 0.5 * delta)
- compare(control.value, 8)
- compare(valueModifiedSpy.count, 5)
+ for (var d = 0; d < data.downSteps.length; ++d) {
+ var wasDownEnabled = control.wrap || control.value > control.from
+ mouseWheel(control, control.width / 2, control.height / 2, -delta, -delta)
+ if (wasDownEnabled)
+ ++valueModifiedCount
+ compare(valueModifiedSpy.count, valueModifiedCount)
- mouseWheel(control, control.width / 2, control.height / 2, -delta, -delta)
- compare(control.value, 3)
- compare(valueModifiedSpy.count, 6)
+ compare(control.value, data.downSteps[d])
+ }
}
function test_initiallyDisabledIndicators_data() {
diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml
index 1b421b4f..f4b7fc4a 100644
--- a/tests/auto/controls/data/tst_stackview.qml
+++ b/tests/auto/controls/data/tst_stackview.qml
@@ -221,33 +221,75 @@ TestCase {
function test_depth() {
var control = createTemporaryObject(stackView, testCase)
verify(control)
+
+ var depthChanges = 0
+ var emptyChanges = 0
var depthSpy = signalSpy.createObject(control, {target: control, signalName: "depthChanged"})
+ var emptySpy = signalSpy.createObject(control, {target: control, signalName: "emptyChanged"})
verify(depthSpy.valid)
+ verify(emptySpy.valid)
compare(control.depth, 0)
+ compare(control.empty, true)
+
control.push(item, StackView.Immediate)
compare(control.depth, 1)
- compare(depthSpy.count, 1)
+ compare(depthSpy.count, ++depthChanges)
+ compare(control.empty, false)
+ compare(emptySpy.count, ++emptyChanges)
+
control.clear()
compare(control.depth, 0)
- compare(depthSpy.count, 2)
+ compare(depthSpy.count, ++depthChanges)
+ compare(control.empty, true)
+ compare(emptySpy.count, ++emptyChanges)
+
control.push(component, StackView.Immediate)
compare(control.depth, 1)
- compare(depthSpy.count, 3)
+ compare(depthSpy.count, ++depthChanges)
+ compare(control.empty, false)
+ compare(emptySpy.count, ++emptyChanges)
+
control.push(component, StackView.Immediate)
compare(control.depth, 2)
- compare(depthSpy.count, 4)
- control.pop(StackView.Immediate)
+ compare(depthSpy.count, ++depthChanges)
+ compare(control.empty, false)
+ compare(emptySpy.count, emptyChanges)
+
+ control.replace(component, StackView.Immediate)
+ compare(control.depth, 2)
+ compare(depthSpy.count, depthChanges)
+ compare(control.empty, false)
+ compare(emptySpy.count, emptyChanges)
+
+ control.replace([component, component], StackView.Immediate)
+ compare(control.depth, 3)
+ compare(depthSpy.count, ++depthChanges)
+ compare(control.empty, false)
+ compare(emptySpy.count, emptyChanges)
+
+ control.pop(null, StackView.Immediate)
compare(control.depth, 1)
- compare(depthSpy.count, 5)
+ compare(depthSpy.count, ++depthChanges)
+ compare(control.empty, false)
+ compare(emptySpy.count, emptyChanges)
+
control.pop(StackView.Immediate) // ignored
compare(control.depth, 1)
- compare(depthSpy.count, 5)
+ compare(depthSpy.count, depthChanges)
+ compare(control.empty, false)
+ compare(emptySpy.count, emptyChanges)
+
control.clear()
compare(control.depth, 0)
- compare(depthSpy.count, 6)
+ compare(depthSpy.count, ++depthChanges)
+ compare(control.empty, true)
+ compare(emptySpy.count, ++emptyChanges)
+
control.clear()
compare(control.depth, 0)
- compare(depthSpy.count, 6)
+ compare(depthSpy.count, depthChanges)
+ compare(control.empty, true)
+ compare(emptySpy.count, emptyChanges)
}
function test_size() {
@@ -510,6 +552,24 @@ TestCase {
compare(control.currentItem, item8)
}
+ function test_clear() {
+ var control = createTemporaryObject(stackView, testCase)
+ verify(control)
+
+ control.push(component, StackView.Immediate)
+
+ control.clear()
+ compare(control.depth, 0)
+ compare(control.busy, false)
+
+ control.push(component, StackView.Immediate)
+
+ control.clear(StackView.PopTransition)
+ compare(control.depth, 0)
+ compare(control.busy, true)
+ tryCompare(control, "busy", false)
+ }
+
function test_visibility_data() {
return [
{tag:"default transitions", properties: {}},
diff --git a/tests/auto/controls/data/tst_swipedelegate.qml b/tests/auto/controls/data/tst_swipedelegate.qml
index c24f6962..d603bd7f 100644
--- a/tests/auto/controls/data/tst_swipedelegate.qml
+++ b/tests/auto/controls/data/tst_swipedelegate.qml
@@ -1569,4 +1569,84 @@ TestCase {
verify(control.behavior.enabled);
verify(control.animation.running);
}
+
+ function test_spacing() {
+ var control = createTemporaryObject(swipeDelegateComponent, testCase, { text: "Some long, long, long text" })
+ verify(control)
+ verify(control.contentItem.implicitWidth + control.leftPadding + control.rightPadding > control.background.implicitWidth)
+
+ var textLabel = findChild(control.contentItem, "label")
+ verify(textLabel)
+
+ // The implicitWidth of the IconLabel that all buttons use as their contentItem
+ // should be equal to the implicitWidth of the Text while no icon is set.
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth)
+
+ // That means that spacing shouldn't affect it.
+ control.spacing += 100
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth)
+
+ // The implicitWidth of the SwipeDelegate itself should, therefore, also never include spacing while no icon is set.
+ compare(control.implicitWidth, textLabel.implicitWidth + control.leftPadding + control.rightPadding)
+ }
+
+ function test_display_data() {
+ return [
+ { "tag": "IconOnly", display: SwipeDelegate.IconOnly },
+ { "tag": "TextOnly", display: SwipeDelegate.TextOnly },
+ { "tag": "TextUnderIcon", display: SwipeDelegate.TextUnderIcon },
+ { "tag": "TextBesideIcon", display: SwipeDelegate.TextBesideIcon },
+ { "tag": "IconOnly, mirrored", display: SwipeDelegate.IconOnly, mirrored: true },
+ { "tag": "TextOnly, mirrored", display: SwipeDelegate.TextOnly, mirrored: true },
+ { "tag": "TextUnderIcon, mirrored", display: SwipeDelegate.TextUnderIcon, mirrored: true },
+ { "tag": "TextBesideIcon, mirrored", display: SwipeDelegate.TextBesideIcon, mirrored: true }
+ ]
+ }
+
+ function test_display(data) {
+ var control = createTemporaryObject(swipeDelegateComponent, testCase, {
+ text: "SwipeDelegate",
+ display: data.display,
+ width: 400,
+ "icon.source": "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png",
+ "LayoutMirroring.enabled": !!data.mirrored
+ })
+ verify(control)
+ compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png")
+
+ var iconImage = findChild(control.contentItem, "image")
+ var textLabel = findChild(control.contentItem, "label")
+
+ switch (control.display) {
+ case SwipeDelegate.IconOnly:
+ verify(iconImage)
+ verify(!textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ break;
+ case SwipeDelegate.TextOnly:
+ verify(!iconImage)
+ verify(textLabel)
+ compare(textLabel.x, control.mirrored ? control.availableWidth - textLabel.width : 0)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ case SwipeDelegate.TextUnderIcon:
+ verify(iconImage)
+ verify(textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(textLabel.x, (control.availableWidth - textLabel.width) / 2)
+ verify(iconImage.y < textLabel.y)
+ break;
+ case SwipeDelegate.TextBesideIcon:
+ verify(iconImage)
+ verify(textLabel)
+ if (control.mirrored)
+ verify(textLabel.x < iconImage.x)
+ else
+ verify(iconImage.x < textLabel.x)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ }
+ }
}
diff --git a/tests/auto/controls/data/tst_swipeview.qml b/tests/auto/controls/data/tst_swipeview.qml
index ff772b74..39311877 100644
--- a/tests/auto/controls/data/tst_swipeview.qml
+++ b/tests/auto/controls/data/tst_swipeview.qml
@@ -539,6 +539,8 @@ TestCase {
control.addItem(page.createObject(control, {text: i}))
compare(control.orientation, Qt.Horizontal)
+ compare(control.horizontal, true)
+ compare(control.vertical, false)
for (i = 0; i < control.count; ++i) {
control.currentIndex = i
@@ -547,6 +549,8 @@ TestCase {
control.orientation = Qt.Vertical
compare(control.orientation, Qt.Vertical)
+ compare(control.horizontal, false)
+ compare(control.vertical, true)
for (i = 0; i < control.count; ++i) {
control.currentIndex = i
diff --git a/tests/auto/controls/data/tst_switch.qml b/tests/auto/controls/data/tst_switch.qml
index 59e29726..079bf820 100644
--- a/tests/auto/controls/data/tst_switch.qml
+++ b/tests/auto/controls/data/tst_switch.qml
@@ -201,12 +201,12 @@ TestCase {
mousePress(control, 0, 0, Qt.LeftButton)
compare(control.pressed, true)
verify(spy.success)
- mouseMove(control, control.width / 4, control.height / 4, 0, Qt.LeftButton)
+ mouseMove(control, control.width / 2, control.height / 2, 0, Qt.LeftButton)
compare(control.pressed, true)
spy.expectedSequence = [["pressedChanged", { "pressed": false, "checked": false }],
"released",
"clicked"]
- mouseRelease(control, control.width / 4, control.height / 4, Qt.LeftButton)
+ mouseRelease(control, control.width / 2, control.height / 2, Qt.LeftButton)
compare(control.checked, false)
compare(control.pressed, false)
tryCompare(control, "position", 0) // QTBUG-57944
@@ -304,12 +304,12 @@ TestCase {
touch.press(0, control, 0, 0).commit()
compare(control.pressed, true)
verify(spy.success)
- touch.move(0, control, control.width / 4, control.height / 4).commit()
+ touch.move(0, control, control.width / 2, control.height / 2).commit()
compare(control.pressed, true)
spy.expectedSequence = [["pressedChanged", { "pressed": false, "checked": false }],
"released",
"clicked"]
- touch.release(0, control, control.width / 4, control.height / 4).commit()
+ touch.release(0, control, control.width / 2, control.height / 2).commit()
compare(control.checked, false)
compare(control.pressed, false)
tryCompare(control, "position", 0) // QTBUG-57944
diff --git a/tests/auto/controls/data/tst_switchdelegate.qml b/tests/auto/controls/data/tst_switchdelegate.qml
index f0c3e68b..8f240409 100644
--- a/tests/auto/controls/data/tst_switchdelegate.qml
+++ b/tests/auto/controls/data/tst_switchdelegate.qml
@@ -523,4 +523,85 @@ TestCase {
compare(control.pressed, false)
verify(spy.success)
}
+
+ function test_spacing() {
+ var control = createTemporaryObject(switchDelegate, testCase, { text: "Some long, long, long text" })
+ verify(control)
+ verify(control.contentItem.implicitWidth + control.leftPadding + control.rightPadding > control.background.implicitWidth)
+
+ var textLabel = findChild(control.contentItem, "label")
+ verify(textLabel)
+
+ // The implicitWidth of the IconLabel that all buttons use as their contentItem should be
+ // equal to the implicitWidth of the Text and the switch indicator + spacing while no icon is set.
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth + control.indicator.width + control.spacing)
+
+ control.spacing += 100
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth + control.indicator.width + control.spacing)
+
+ compare(control.implicitWidth, textLabel.implicitWidth + control.indicator.width + control.spacing + control.leftPadding + control.rightPadding)
+ }
+
+ function test_display_data() {
+ return [
+ { "tag": "IconOnly", display: SwitchDelegate.IconOnly },
+ { "tag": "TextOnly", display: SwitchDelegate.TextOnly },
+ { "tag": "TextUnderIcon", display: SwitchDelegate.TextUnderIcon },
+ { "tag": "TextBesideIcon", display: SwitchDelegate.TextBesideIcon },
+ { "tag": "IconOnly, mirrored", display: SwitchDelegate.IconOnly, mirrored: true },
+ { "tag": "TextOnly, mirrored", display: SwitchDelegate.TextOnly, mirrored: true },
+ { "tag": "TextUnderIcon, mirrored", display: SwitchDelegate.TextUnderIcon, mirrored: true },
+ { "tag": "TextBesideIcon, mirrored", display: SwitchDelegate.TextBesideIcon, mirrored: true }
+ ]
+ }
+
+ function test_display(data) {
+ var control = createTemporaryObject(switchDelegate, testCase, {
+ text: "SwitchDelegate",
+ display: data.display,
+ width: 400,
+ "icon.source": "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png",
+ "LayoutMirroring.enabled": !!data.mirrored
+ })
+ verify(control)
+ compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png")
+
+ var iconImage = findChild(control.contentItem, "image")
+ var textLabel = findChild(control.contentItem, "label")
+
+ var availableWidth = control.availableWidth - control.indicator.width - control.spacing
+ var indicatorOffset = control.mirrored ? control.indicator.width + control.spacing : 0
+
+ switch (control.display) {
+ case SwitchDelegate.IconOnly:
+ verify(iconImage)
+ verify(!textLabel)
+ compare(iconImage.x, indicatorOffset + (availableWidth - iconImage.width) / 2)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ break;
+ case SwitchDelegate.TextOnly:
+ verify(!iconImage)
+ verify(textLabel)
+ compare(textLabel.x, control.mirrored ? control.availableWidth - textLabel.width : 0)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ case SwitchDelegate.TextUnderIcon:
+ verify(iconImage)
+ verify(textLabel)
+ compare(iconImage.x, indicatorOffset + (availableWidth - iconImage.width) / 2)
+ compare(textLabel.x, indicatorOffset + (availableWidth - textLabel.width) / 2)
+ verify(iconImage.y < textLabel.y)
+ break;
+ case SwitchDelegate.TextBesideIcon:
+ verify(iconImage)
+ verify(textLabel)
+ if (control.mirrored)
+ verify(textLabel.x < iconImage.x)
+ else
+ verify(iconImage.x < textLabel.x)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ }
+ }
}
diff --git a/tests/auto/controls/data/tst_tabbar.qml b/tests/auto/controls/data/tst_tabbar.qml
index 5bcd476b..adb27f78 100644
--- a/tests/auto/controls/data/tst_tabbar.qml
+++ b/tests/auto/controls/data/tst_tabbar.qml
@@ -506,47 +506,190 @@ TestCase {
function test_layout(data) {
var control = createTemporaryObject(tabBar, testCase, {spacing: data.spacing, width: 200})
- // remove the implicit size from the background so that it won't affect
- // the implicit size of the tabbar, so the implicit sizes tested below
- // are entirely based on the content size
- control.background.implicitWidth = 0
+ // remove the background so that it won't affect the implicit size of the tabbar,
+ // so the implicit sizes tested below are entirely based on the content size
+ control.background = null
var tab1 = tabButton.createObject(control, {text: "First"})
control.addItem(tab1)
tryCompare(tab1, "width", control.width)
+ compare(tab1.height, control.height)
compare(control.contentWidth, tab1.implicitWidth)
+ compare(control.contentHeight, tab1.implicitHeight)
compare(control.implicitWidth, control.contentWidth + control.leftPadding + control.rightPadding)
+ compare(control.implicitHeight, control.contentHeight + control.topPadding + control.bottomPadding)
- var tab2 = tabButton.createObject(control, {text: "Second"})
+ var tab2 = tabButton.createObject(control, {implicitHeight: tab1.implicitHeight + 10, text: "Second"})
control.addItem(tab2)
tryCompare(tab1, "width", (control.width - data.spacing) / 2)
+ compare(tab1.height, control.height)
compare(tab2.width, (control.width - data.spacing) / 2)
+ compare(tab2.height, control.height)
compare(control.contentWidth, tab1.implicitWidth + tab2.implicitWidth + data.spacing)
+ compare(control.contentHeight, tab2.implicitHeight)
compare(control.implicitWidth, control.contentWidth + control.leftPadding + control.rightPadding)
+ compare(control.implicitHeight, control.contentHeight + control.topPadding + control.bottomPadding)
- var tab3 = tabButton.createObject(control, {width: 50, text: "Third"})
+ var tab3 = tabButton.createObject(control, {width: 50, height: tab1.implicitHeight - 10, text: "Third"})
control.addItem(tab3)
tryCompare(tab1, "width", (control.width - 2 * data.spacing - 50) / 2)
+ compare(tab1.y, 0)
+ compare(tab1.height, control.height)
+ compare(tab2.y, 0)
compare(tab2.width, (control.width - 2 * data.spacing - 50) / 2)
+ compare(tab2.height, control.height)
+ verify(tab3.y > 0)
+ compare(tab3.y, (control.height - tab3.height) / 2)
compare(tab3.width, 50)
+ compare(tab3.height, tab1.implicitHeight - 10)
compare(control.contentWidth, tab1.implicitWidth + tab2.implicitWidth + tab3.width + 2 * data.spacing)
+ compare(control.contentHeight, tab2.implicitHeight)
compare(control.implicitWidth, control.contentWidth + control.leftPadding + control.rightPadding)
+ compare(control.implicitHeight, control.contentHeight + control.topPadding + control.bottomPadding)
var expectedWidth = tab3.contentItem.implicitWidth + tab3.leftPadding + tab3.rightPadding
tab3.width = tab3.implicitWidth
+ tab3.height = tab3.implicitHeight
tryCompare(tab1, "width", (control.width - 2 * data.spacing - expectedWidth) / 2)
- tryCompare(tab2, "width", (control.width - 2 * data.spacing - expectedWidth) / 2)
+ compare(tab1.height, control.height)
+ compare(tab2.width, (control.width - 2 * data.spacing - expectedWidth) / 2)
+ compare(tab2.height, control.height)
compare(tab3.width, expectedWidth)
+ compare(tab3.height, tab3.implicitHeight)
compare(control.contentWidth, tab1.implicitWidth + tab2.implicitWidth + tab3.implicitWidth + 2 * data.spacing)
+ compare(control.contentHeight, tab2.implicitHeight)
compare(control.implicitWidth, control.contentWidth + control.leftPadding + control.rightPadding)
+ compare(control.implicitHeight, control.contentHeight + control.topPadding + control.bottomPadding)
tab3.width = undefined
+ tab3.height = undefined
control.width = undefined
control.contentWidth = 300
+ control.contentHeight = 50
expectedWidth = (control.contentWidth - 2 * data.spacing) / 3
tryCompare(tab1, "width", expectedWidth)
- tryCompare(tab2, "width", expectedWidth)
- tryCompare(tab3, "width", expectedWidth)
+ compare(tab2.width, expectedWidth)
+ compare(tab3.width, expectedWidth)
+ compare(tab1.height, control.contentHeight)
+ compare(tab2.height, control.contentHeight)
+ compare(tab3.height, control.contentHeight)
+ }
+
+ Component {
+ id: attachedButton
+ TabButton {
+ property int index: TabBar.index
+ property TabBar tabBar: TabBar.tabBar
+ property int position: TabBar.position
+ }
+ }
+
+ function test_attached() {
+ var control = createTemporaryObject(tabBar, testCase, {position: TabBar.Footer})
+
+ // append
+ var tab1 = createTemporaryObject(attachedButton, testCase)
+ compare(tab1.index, -1)
+ compare(tab1.tabBar, null)
+ compare(tab1.position, TabBar.Header)
+
+ control.addItem(tab1)
+ compare(tab1.index, 0)
+ compare(tab1.tabBar, control)
+ compare(tab1.position, TabBar.Footer)
+
+ // insert in the beginning
+ var tab2 = createTemporaryObject(attachedButton, testCase)
+ compare(tab2.index, -1)
+ compare(tab2.tabBar, null)
+ compare(tab2.position, TabBar.Header)
+
+ control.insertItem(0, tab2)
+ compare(tab2.index, 0)
+ compare(tab2.tabBar, control)
+ compare(tab2.position, TabBar.Footer)
+
+ compare(tab1.index, 1)
+
+ // insert in the middle
+ var tab3 = createTemporaryObject(attachedButton, testCase)
+ compare(tab3.index, -1)
+ compare(tab3.tabBar, null)
+ compare(tab3.position, TabBar.Header)
+
+ control.insertItem(1, tab3)
+ compare(tab3.index, 1)
+ compare(tab3.tabBar, control)
+ compare(tab3.position, TabBar.Footer)
+
+ compare(tab2.index, 0)
+ compare(tab1.index, 2)
+
+ // insert in the end
+ var tab4 = createTemporaryObject(attachedButton, testCase)
+ compare(tab4.index, -1)
+ compare(tab4.tabBar, null)
+ compare(tab4.position, TabBar.Header)
+
+ control.insertItem(-1, tab4)
+ compare(tab4.index, 3)
+ compare(tab4.tabBar, control)
+ compare(tab4.position, TabBar.Footer)
+
+ compare(tab2.index, 0)
+ compare(tab3.index, 1)
+ compare(tab1.index, 2)
+
+ // move forwards
+ control.moveItem(0, 1)
+ compare(tab3.index, 0)
+ compare(tab2.index, 1)
+ compare(tab1.index, 2)
+ compare(tab4.index, 3)
+
+ control.moveItem(0, 2)
+ compare(tab2.index, 0)
+ compare(tab1.index, 1)
+ compare(tab3.index, 2)
+ compare(tab4.index, 3)
+
+ control.moveItem(1, 3)
+ compare(tab2.index, 0)
+ compare(tab3.index, 1)
+ compare(tab4.index, 2)
+ compare(tab1.index, 3)
+
+ // move backwards
+ control.moveItem(3, 2)
+ compare(tab2.index, 0)
+ compare(tab3.index, 1)
+ compare(tab1.index, 2)
+ compare(tab4.index, 3)
+
+ control.moveItem(3, 1)
+ compare(tab2.index, 0)
+ compare(tab4.index, 1)
+ compare(tab3.index, 2)
+ compare(tab1.index, 3)
+
+ // remove from the beginning
+ control.removeItem(0)
+ compare(tab2.index, -1)
+ compare(tab2.tabBar, null)
+ compare(tab2.position, TabBar.Header)
+
+ compare(tab4.index, 0)
+ compare(tab3.index, 1)
+ compare(tab1.index, 2)
+
+ // remove from the middle
+ control.removeItem(1)
+ compare(tab3.index, -1)
+ compare(tab3.tabBar, null)
+ compare(tab3.position, TabBar.Header)
+
+ compare(tab4.index, 0)
+ compare(tab1.index, 1)
}
}
diff --git a/tests/auto/controls/data/tst_tabbutton.qml b/tests/auto/controls/data/tst_tabbutton.qml
index 60cae927..3cb22ecd 100644
--- a/tests/auto/controls/data/tst_tabbutton.qml
+++ b/tests/auto/controls/data/tst_tabbutton.qml
@@ -95,4 +95,84 @@ TestCase {
verify(control)
compare(control.baselineOffset, control.contentItem.y + control.contentItem.baselineOffset)
}
+
+ function test_spacing() {
+ var control = createTemporaryObject(tabButton, testCase, { text: "Some long, long, long text" })
+ verify(control)
+ if (control.background)
+ verify(control.contentItem.implicitWidth + control.leftPadding + control.rightPadding > control.background.implicitWidth)
+
+ var textLabel = findChild(control.contentItem, "label")
+ verify(textLabel)
+
+ // The implicitWidth of the IconLabel that all buttons use as their contentItem
+ // should be equal to the implicitWidth of the Text while no icon is set.
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth)
+
+ // That means that spacing shouldn't affect it.
+ control.spacing += 100
+ compare(control.contentItem.implicitWidth, textLabel.implicitWidth)
+
+ // The implicitWidth of the TabButton itself should, therefore, also never include spacing while no icon is set.
+ compare(control.implicitWidth, textLabel.implicitWidth + control.leftPadding + control.rightPadding)
+ }
+
+ function test_display_data() {
+ return [
+ { "tag": "IconOnly", display: TabButton.IconOnly },
+ { "tag": "TextOnly", display: TabButton.TextOnly },
+ { "tag": "TextUnderIcon", display: TabButton.TextUnderIcon },
+ { "tag": "TextBesideIcon", display: TabButton.TextBesideIcon },
+ { "tag": "IconOnly, mirrored", display: TabButton.IconOnly, mirrored: true },
+ { "tag": "TextOnly, mirrored", display: TabButton.TextOnly, mirrored: true },
+ { "tag": "TextUnderIcon, mirrored", display: TabButton.TextUnderIcon, mirrored: true },
+ { "tag": "TextBesideIcon, mirrored", display: TabButton.TextBesideIcon, mirrored: true }
+ ]
+ }
+
+ function test_display(data) {
+ var control = createTemporaryObject(tabButton, testCase, {
+ text: "TabButton",
+ display: data.display,
+ "icon.source": "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png",
+ "LayoutMirroring.enabled": !!data.mirrored
+ })
+ verify(control)
+ compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png")
+
+ var iconImage = findChild(control.contentItem, "image")
+ var textLabel = findChild(control.contentItem, "label")
+
+ switch (control.display) {
+ case TabButton.IconOnly:
+ verify(iconImage)
+ verify(!textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ break;
+ case TabButton.TextOnly:
+ verify(!iconImage)
+ verify(textLabel)
+ compare(textLabel.x, (control.availableWidth - textLabel.width) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ case TabButton.TextUnderIcon:
+ verify(iconImage)
+ verify(textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(textLabel.x, (control.availableWidth - textLabel.width) / 2)
+ verify(iconImage.y < textLabel.y)
+ break;
+ case TabButton.TextBesideIcon:
+ verify(iconImage)
+ verify(textLabel)
+ if (control.mirrored)
+ verify(textLabel.x < iconImage.x)
+ else
+ verify(iconImage.x < textLabel.x)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ }
+ }
}
diff --git a/tests/auto/controls/data/tst_textfield.qml b/tests/auto/controls/data/tst_textfield.qml
index dad47e23..0fee7363 100644
--- a/tests/auto/controls/data/tst_textfield.qml
+++ b/tests/auto/controls/data/tst_textfield.qml
@@ -66,6 +66,11 @@ TestCase {
}
Component {
+ id: rectangle
+ Rectangle { }
+ }
+
+ Component {
id: signalSpy
SignalSpy { }
}
@@ -82,8 +87,7 @@ TestCase {
var implicitWidthSpy = signalSpy.createObject(control, { target: control, signalName: "implicitWidthChanged"} )
var implicitHeightSpy = signalSpy.createObject(control, { target: control, signalName: "implicitHeightChanged"} )
- control.background.implicitWidth = 400
- control.background.implicitHeight = 200
+ control.background = rectangle.createObject(control, {implicitWidth: 400, implicitHeight: 200})
compare(control.implicitWidth, 400)
compare(control.implicitHeight, 200)
compare(implicitWidthSpy.count, 1)
@@ -163,14 +167,14 @@ TestCase {
if (data.textAlignment !== undefined)
compare(control.horizontalAlignment, data.textAlignment)
for (var i = 0; i < control.children.length; ++i) {
- if (control.children[i].hasOwnProperty("horizontalAlignment"))
+ if (control.children[i].hasOwnProperty("text") && control.children[i].hasOwnProperty("horizontalAlignment"))
compare(control.children[i].effectiveHorizontalAlignment, data.placeholderAlignment) // placeholder
}
control.verticalAlignment = TextField.AlignBottom
compare(control.verticalAlignment, TextField.AlignBottom)
for (var j = 0; j < control.children.length; ++j) {
- if (control.children[j].hasOwnProperty("verticalAlignment"))
+ if (control.children[j].hasOwnProperty("text") && control.children[j].hasOwnProperty("verticalAlignment"))
compare(control.children[j].verticalAlignment, Text.AlignBottom) // placeholder
}
}
diff --git a/tests/auto/controls/data/tst_toolbutton.qml b/tests/auto/controls/data/tst_toolbutton.qml
index 5eefaf59..9e79cb8c 100644
--- a/tests/auto/controls/data/tst_toolbutton.qml
+++ b/tests/auto/controls/data/tst_toolbutton.qml
@@ -181,4 +181,63 @@ TestCase {
verify(control)
compare(control.baselineOffset, control.contentItem.y + control.contentItem.baselineOffset)
}
+
+ function test_display_data() {
+ return [
+ { "tag": "IconOnly", display: ToolButton.IconOnly },
+ { "tag": "TextOnly", display: ToolButton.TextOnly },
+ { "tag": "TextUnderIcon", display: ToolButton.TextUnderIcon },
+ { "tag": "TextBesideIcon", display: ToolButton.TextBesideIcon },
+ { "tag": "IconOnly, mirrored", display: ToolButton.IconOnly, mirrored: true },
+ { "tag": "TextOnly, mirrored", display: ToolButton.TextOnly, mirrored: true },
+ { "tag": "TextUnderIcon, mirrored", display: ToolButton.TextUnderIcon, mirrored: true },
+ { "tag": "TextBesideIcon, mirrored", display: ToolButton.TextBesideIcon, mirrored: true }
+ ]
+ }
+
+ function test_display(data) {
+ var control = createTemporaryObject(toolButton, testCase, {
+ text: "ToolButton",
+ display: data.display,
+ "icon.source": "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png",
+ "LayoutMirroring.enabled": !!data.mirrored
+ })
+ verify(control)
+ compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png")
+
+ var iconImage = findChild(control.contentItem, "image")
+ var textLabel = findChild(control.contentItem, "label")
+
+ switch (control.display) {
+ case ToolButton.IconOnly:
+ verify(iconImage)
+ verify(!textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ break;
+ case ToolButton.TextOnly:
+ verify(!iconImage)
+ verify(textLabel)
+ compare(textLabel.x, (control.availableWidth - textLabel.width) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ case ToolButton.TextUnderIcon:
+ verify(iconImage)
+ verify(textLabel)
+ compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
+ compare(textLabel.x, (control.availableWidth - textLabel.width) / 2)
+ verify(iconImage.y < textLabel.y)
+ break;
+ case ToolButton.TextBesideIcon:
+ verify(iconImage)
+ verify(textLabel)
+ if (control.mirrored)
+ verify(textLabel.x < iconImage.x)
+ else
+ verify(iconImage.x < textLabel.x)
+ compare(iconImage.y, (control.availableHeight - iconImage.height) / 2)
+ compare(textLabel.y, (control.availableHeight - textLabel.height) / 2)
+ break;
+ }
+ }
}
diff --git a/tests/auto/controls/data/tst_tooltip.qml b/tests/auto/controls/data/tst_tooltip.qml
index a2078e09..e7cc6787 100644
--- a/tests/auto/controls/data/tst_tooltip.qml
+++ b/tests/auto/controls/data/tst_tooltip.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtTest 1.0
import QtQuick.Controls 2.2
@@ -283,6 +283,10 @@ TestCase {
}
function test_activateShortcutWhileToolTipVisible() {
+ if ((Qt.platform.pluginName === "offscreen")
+ || (Qt.platform.pluginName === "minimal"))
+ skip("Mouse hoovering not functional on offscreen/minimal platforms")
+
var root = createTemporaryObject(buttonAndShortcutComponent, testCase)
verify(root)
diff --git a/tests/auto/controls/data/tst_tumbler.qml b/tests/auto/controls/data/tst_tumbler.qml
index aaf888c2..1fab0dab 100644
--- a/tests/auto/controls/data/tst_tumbler.qml
+++ b/tests/auto/controls/data/tst_tumbler.qml
@@ -123,7 +123,9 @@ TestCase {
return child;
}
- return findView(child);
+ var grandChild = findView(child);
+ if (grandChild)
+ return grandChild;
}
return null;
diff --git a/tests/auto/controls/fusion/dependencies.qml b/tests/auto/controls/fusion/dependencies.qml
new file mode 100644
index 00000000..30c32fa5
--- /dev/null
+++ b/tests/auto/controls/fusion/dependencies.qml
@@ -0,0 +1,6 @@
+import QtTest 1.0
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Fusion 2.3
+
+TestCase { }
diff --git a/tests/auto/controls/fusion/fusion.pro b/tests/auto/controls/fusion/fusion.pro
new file mode 100644
index 00000000..f3374f34
--- /dev/null
+++ b/tests/auto/controls/fusion/fusion.pro
@@ -0,0 +1,15 @@
+TEMPLATE = app
+TARGET = tst_fusion
+CONFIG += qmltestcase
+QT += quickcontrols2
+
+DEFINES += TST_CONTROLS_DATA=\\\"$$QQC2_SOURCE_TREE/tests/auto/controls/data\\\"
+
+SOURCES += \
+ $$PWD/tst_fusion.cpp
+
+OTHER_FILES += \
+ $$PWD/../data/*.qml
+
+TESTDATA += \
+ $$PWD/../data/tst_*
diff --git a/tests/auto/controls/fusion/tst_fusion.cpp b/tests/auto/controls/fusion/tst_fusion.cpp
new file mode 100644
index 00000000..84f9c231
--- /dev/null
+++ b/tests/auto/controls/fusion/tst_fusion.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** 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>
+#include <QtQuickControls2/qquickstyle.h>
+
+int main(int argc, char *argv[])
+{
+ QTEST_ADD_GPU_BLACKLIST_SUPPORT
+ QTEST_SET_MAIN_SOURCE_PATH
+ qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+ QQuickStyle::setStyle("Fusion");
+ return quick_test_main(argc, argv, "tst_controls::Fusion", TST_CONTROLS_DATA);
+}
diff --git a/tests/auto/controls/imagine/dependencies.qml b/tests/auto/controls/imagine/dependencies.qml
new file mode 100644
index 00000000..3811fec0
--- /dev/null
+++ b/tests/auto/controls/imagine/dependencies.qml
@@ -0,0 +1,6 @@
+import QtTest 1.0
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Imagine 2.3
+
+TestCase { }
diff --git a/tests/auto/controls/imagine/imagine.pro b/tests/auto/controls/imagine/imagine.pro
new file mode 100644
index 00000000..ab521c98
--- /dev/null
+++ b/tests/auto/controls/imagine/imagine.pro
@@ -0,0 +1,15 @@
+TEMPLATE = app
+TARGET = tst_imagine
+CONFIG += qmltestcase
+QT += quickcontrols2
+
+DEFINES += TST_CONTROLS_DATA=\\\"$$QQC2_SOURCE_TREE/tests/auto/controls/data\\\"
+
+SOURCES += \
+ $$PWD/tst_imagine.cpp
+
+OTHER_FILES += \
+ $$PWD/../data/*.qml
+
+TESTDATA += \
+ $$PWD/../data/tst_*
diff --git a/tests/auto/controls/imagine/tst_imagine.cpp b/tests/auto/controls/imagine/tst_imagine.cpp
new file mode 100644
index 00000000..9777c9c9
--- /dev/null
+++ b/tests/auto/controls/imagine/tst_imagine.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** 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>
+#include <QtQuickControls2/qquickstyle.h>
+
+int main(int argc, char *argv[])
+{
+ QTEST_ADD_GPU_BLACKLIST_SUPPORT
+ QTEST_SET_MAIN_SOURCE_PATH
+ qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+ QQuickStyle::setStyle("Imagine");
+ return quick_test_main(argc, argv, "tst_controls::Imagine", TST_CONTROLS_DATA);
+}
diff --git a/tests/auto/cursor/tst_cursor.cpp b/tests/auto/cursor/tst_cursor.cpp
index 6256112d..0f24a29e 100644
--- a/tests/auto/cursor/tst_cursor.cpp
+++ b/tests/auto/cursor/tst_cursor.cpp
@@ -184,6 +184,11 @@ void tst_cursor::scrollBar()
const QPoint scrollBarPos(window->width() - scrollBar->width() / 2, window->height() / 2);
QTest::mouseMove(window, scrollBarPos);
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QEXPECT_FAIL("", "Active status behaves differently in offscreen/minimal platforms", Continue);
+
QVERIFY(scrollBar->isActive());
QCOMPARE(window->cursor().shape(), scrollBar->cursor().shape());
QCOMPARE(scrollBar->cursor().shape(), Qt::CursorShape::ArrowCursor);
diff --git a/tests/auto/font/data/font-appwindow-custom.qml b/tests/auto/font/data/font-appwindow-custom.qml
index 3d06f64a..e98b678e 100644
--- a/tests/auto/font/data/font-appwindow-custom.qml
+++ b/tests/auto/font/data/font-appwindow-custom.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/font/data/font-appwindow-default.qml b/tests/auto/font/data/font-appwindow-default.qml
index 02643c77..8337b488 100644
--- a/tests/auto/font/data/font-appwindow-default.qml
+++ b/tests/auto/font/data/font-appwindow-default.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/font/data/font-control-custom.qml b/tests/auto/font/data/font-control-custom.qml
index 92136e86..0121eca2 100644
--- a/tests/auto/font/data/font-control-custom.qml
+++ b/tests/auto/font/data/font-control-custom.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
Control {
diff --git a/tests/auto/font/data/font-control-default.qml b/tests/auto/font/data/font-control-default.qml
index 552c77d8..f3af36a2 100644
--- a/tests/auto/font/data/font-control-default.qml
+++ b/tests/auto/font/data/font-control-default.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
Control {
diff --git a/tests/auto/font/data/font-popup-custom.qml b/tests/auto/font/data/font-popup-custom.qml
index e8363a81..3982721e 100644
--- a/tests/auto/font/data/font-popup-custom.qml
+++ b/tests/auto/font/data/font-popup-custom.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
Popup {
diff --git a/tests/auto/font/data/font-popup-default.qml b/tests/auto/font/data/font-popup-default.qml
index 26c522c1..c4fab76a 100644
--- a/tests/auto/font/data/font-popup-default.qml
+++ b/tests/auto/font/data/font-popup-default.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
Popup {
diff --git a/tests/auto/font/data/inheritance-childcontrol.qml b/tests/auto/font/data/inheritance-childcontrol.qml
index 8a04dd52..7c2b0d0c 100644
--- a/tests/auto/font/data/inheritance-childcontrol.qml
+++ b/tests/auto/font/data/inheritance-childcontrol.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/font/data/inheritance-childpopup.qml b/tests/auto/font/data/inheritance-childpopup.qml
index ca5cdc82..304f0486 100644
--- a/tests/auto/font/data/inheritance-childpopup.qml
+++ b/tests/auto/font/data/inheritance-childpopup.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/font/data/inheritance-control.qml b/tests/auto/font/data/inheritance-control.qml
index ac9c940a..fe555237 100644
--- a/tests/auto/font/data/inheritance-control.qml
+++ b/tests/auto/font/data/inheritance-control.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/font/data/inheritance-dynamicchildcontrol.qml b/tests/auto/font/data/inheritance-dynamicchildcontrol.qml
index 98c0f696..982b5611 100644
--- a/tests/auto/font/data/inheritance-dynamicchildcontrol.qml
+++ b/tests/auto/font/data/inheritance-dynamicchildcontrol.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/font/data/inheritance-dynamicchildpopup.qml b/tests/auto/font/data/inheritance-dynamicchildpopup.qml
index ef4fe60c..7af10af6 100644
--- a/tests/auto/font/data/inheritance-dynamicchildpopup.qml
+++ b/tests/auto/font/data/inheritance-dynamicchildpopup.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/font/data/inheritance-dynamiccontrol.qml b/tests/auto/font/data/inheritance-dynamiccontrol.qml
index a261d600..263ad38d 100644
--- a/tests/auto/font/data/inheritance-dynamiccontrol.qml
+++ b/tests/auto/font/data/inheritance-dynamiccontrol.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/font/data/inheritance-dynamicpopup.qml b/tests/auto/font/data/inheritance-dynamicpopup.qml
index f0d567da..cd355682 100644
--- a/tests/auto/font/data/inheritance-dynamicpopup.qml
+++ b/tests/auto/font/data/inheritance-dynamicpopup.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/font/data/inheritance-popup.qml b/tests/auto/font/data/inheritance-popup.qml
index b8415e63..3219a186 100644
--- a/tests/auto/font/data/inheritance-popup.qml
+++ b/tests/auto/font/data/inheritance-popup.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/font/tst_font.cpp b/tests/auto/font/tst_font.cpp
index a851b263..660f4baf 100644
--- a/tests/auto/font/tst_font.cpp
+++ b/tests/auto/font/tst_font.cpp
@@ -255,7 +255,7 @@ void tst_font::defaultFont_data()
QTest::newRow("ToolButton") << "ToolButton" << QPlatformTheme::ToolButtonFont;
QTest::newRow("ToolSeparator") << "ToolSeparator" << QPlatformTheme::SystemFont;
QTest::newRow("ToolTip") << "ToolTip" << QPlatformTheme::TipLabelFont;
- QTest::newRow("Tumbler") << "Tumbler" << QPlatformTheme::SystemFont;
+ QTest::newRow("Tumbler") << "Tumbler" << QPlatformTheme::ItemViewFont;
}
void tst_font::defaultFont()
@@ -263,12 +263,14 @@ void tst_font::defaultFont()
QFETCH(QString, control);
QFETCH(QPlatformTheme::Font, fontType);
- TestFontTheme theme(QGuiApplicationPrivate::platform_theme);
-
QQmlEngine engine;
QQmlComponent component(&engine);
component.setData(QString("import QtQuick.Controls 2.2; %1 { }").arg(control).toUtf8(), QUrl());
+ // The call to setData() above causes QQuickDefaultTheme to be set as the platform theme,
+ // so we must make sure we only set our theme afterwards.
+ TestFontTheme theme(QGuiApplicationPrivate::platform_theme);
+
QScopedPointer<QObject> object(component.create());
QVERIFY2(!object.isNull(), qPrintable(component.errorString()));
diff --git a/tests/auto/palette/data/inheritance-childcontrol.qml b/tests/auto/palette/data/inheritance-childcontrol.qml
new file mode 100644
index 00000000..7c2b0d0c
--- /dev/null
+++ b/tests/auto/palette/data/inheritance-childcontrol.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.2
+
+ApplicationWindow {
+ id: window
+
+ property alias control: control
+ property alias child: child
+ property alias grandChild: grandChild
+
+ Item {
+ Control {
+ id: control
+
+ Control {
+ id: child
+
+ Item {
+ Control {
+ id: grandChild
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/palette/data/inheritance-childpopup.qml b/tests/auto/palette/data/inheritance-childpopup.qml
new file mode 100644
index 00000000..304f0486
--- /dev/null
+++ b/tests/auto/palette/data/inheritance-childpopup.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.2
+
+ApplicationWindow {
+ id: window
+
+ property alias control: control
+ property alias child: child
+ property alias grandChild: grandChild
+
+ Item {
+ Popup {
+ id: control
+
+ Control {
+ id: child
+
+ Item {
+ Control {
+ id: grandChild
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/palette/data/inheritance-control.qml b/tests/auto/palette/data/inheritance-control.qml
new file mode 100644
index 00000000..e5486edb
--- /dev/null
+++ b/tests/auto/palette/data/inheritance-control.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
+
+ApplicationWindow {
+ id: window
+
+ property alias control: control
+ property alias child: child
+ property alias grandChild: grandChild
+
+ Control {
+ id: control
+
+ Control {
+ id: child
+
+ Item {
+ Control {
+ id: grandChild
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/palette/data/inheritance-dynamicchildcontrol.qml b/tests/auto/palette/data/inheritance-dynamicchildcontrol.qml
new file mode 100644
index 00000000..982b5611
--- /dev/null
+++ b/tests/auto/palette/data/inheritance-dynamicchildcontrol.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** 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.2
+
+ApplicationWindow {
+ id: window
+
+ property Control control
+ property Control child
+ property Control grandChild
+
+ Item {
+ id: childItem
+ }
+
+ Component {
+ id: component
+ Control { }
+ }
+
+ Component.onCompleted: {
+ control = component.createObject(childItem)
+ child = component.createObject(control)
+ grandChild = component.createObject(child)
+ }
+}
diff --git a/tests/auto/palette/data/inheritance-dynamicchildpopup.qml b/tests/auto/palette/data/inheritance-dynamicchildpopup.qml
new file mode 100644
index 00000000..7af10af6
--- /dev/null
+++ b/tests/auto/palette/data/inheritance-dynamicchildpopup.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.2
+
+ApplicationWindow {
+ id: window
+
+ property Popup control
+ property Control child
+ property Control grandChild
+
+ Item {
+ id: childItem
+ }
+
+ Component {
+ id: popupComponent
+ Popup { }
+ }
+
+ Component {
+ id: controlComponent
+ Control { }
+ }
+
+ Component.onCompleted: {
+ control = popupComponent.createObject(childItem)
+ child = controlComponent.createObject(control.contentItem)
+ grandChild = controlComponent.createObject(child)
+ }
+}
diff --git a/tests/auto/palette/data/inheritance-dynamiccontrol.qml b/tests/auto/palette/data/inheritance-dynamiccontrol.qml
new file mode 100644
index 00000000..263ad38d
--- /dev/null
+++ b/tests/auto/palette/data/inheritance-dynamiccontrol.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.2
+
+ApplicationWindow {
+ id: window
+
+ property Control control
+ property Control child
+ property Control grandChild
+
+ Component {
+ id: component
+ Control { }
+ }
+
+ Component.onCompleted: {
+ control = component.createObject(contentItem)
+ child = component.createObject(control)
+ grandChild = component.createObject(child)
+ }
+}
diff --git a/tests/auto/palette/data/inheritance-dynamicpopup.qml b/tests/auto/palette/data/inheritance-dynamicpopup.qml
new file mode 100644
index 00000000..cd355682
--- /dev/null
+++ b/tests/auto/palette/data/inheritance-dynamicpopup.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.2
+
+ApplicationWindow {
+ id: window
+
+ property Popup control
+ property Control child
+ property Control grandChild
+
+ Component {
+ id: popupComponent
+ Popup { }
+ }
+
+ Component {
+ id: controlComponent
+ Control { }
+ }
+
+ Component.onCompleted: {
+ control = popupComponent.createObject(window)
+ child = controlComponent.createObject(control.contentItem)
+ grandChild = controlComponent.createObject(child)
+ }
+}
diff --git a/tests/auto/palette/data/inheritance-popup.qml b/tests/auto/palette/data/inheritance-popup.qml
new file mode 100644
index 00000000..e6ac0a3a
--- /dev/null
+++ b/tests/auto/palette/data/inheritance-popup.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
+
+ApplicationWindow {
+ id: window
+
+ property alias control: control
+ property alias child: child
+ property alias grandChild: grandChild
+
+ Popup {
+ id: control
+
+ Control {
+ id: child
+
+ Item {
+ Control {
+ id: grandChild
+ }
+ }
+ }
+ }
+}
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/data/palette-appwindow-custom.qml b/tests/auto/palette/data/palette-appwindow-custom.qml
new file mode 100644
index 00000000..33139e48
--- /dev/null
+++ b/tests/auto/palette/data/palette-appwindow-custom.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
+
+ApplicationWindow {
+ palette.alternateBase: "aqua"
+ palette.base: "azure"
+ palette.brightText: "beige"
+ palette.button: "bisque"
+ palette.buttonText: "chocolate"
+ palette.dark: "coral"
+ palette.highlight: "crimson"
+ palette.highlightedText: "fuchsia"
+ palette.light: "gold"
+ palette.link: "indigo"
+ palette.linkVisited: "ivory"
+ palette.mid: "khaki"
+ palette.midlight: "lavender"
+ palette.shadow: "linen"
+ palette.text: "moccasin"
+ palette.toolTipBase: "navy"
+ palette.toolTipText: "orchid"
+ palette.window: "plum"
+ palette.windowText: "salmon"
+}
diff --git a/tests/auto/palette/data/palette-appwindow-default.qml b/tests/auto/palette/data/palette-appwindow-default.qml
new file mode 100644
index 00000000..c071a0f4
--- /dev/null
+++ b/tests/auto/palette/data/palette-appwindow-default.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** 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
+
+ApplicationWindow {
+}
diff --git a/tests/auto/palette/data/palette-control-custom.qml b/tests/auto/palette/data/palette-control-custom.qml
new file mode 100644
index 00000000..d3eb05bd
--- /dev/null
+++ b/tests/auto/palette/data/palette-control-custom.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
+
+Control {
+ palette.alternateBase: "aqua"
+ palette.base: "azure"
+ palette.brightText: "beige"
+ palette.button: "bisque"
+ palette.buttonText: "chocolate"
+ palette.dark: "coral"
+ palette.highlight: "crimson"
+ palette.highlightedText: "fuchsia"
+ palette.light: "gold"
+ palette.link: "indigo"
+ palette.linkVisited: "ivory"
+ palette.mid: "khaki"
+ palette.midlight: "lavender"
+ palette.shadow: "linen"
+ palette.text: "moccasin"
+ palette.toolTipBase: "navy"
+ palette.toolTipText: "orchid"
+ palette.window: "plum"
+ palette.windowText: "salmon"
+}
diff --git a/tests/auto/palette/data/palette-control-default.qml b/tests/auto/palette/data/palette-control-default.qml
new file mode 100644
index 00000000..b747d7e2
--- /dev/null
+++ b/tests/auto/palette/data/palette-control-default.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** 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
+
+Control {
+}
diff --git a/tests/auto/palette/data/palette-popup-custom.qml b/tests/auto/palette/data/palette-popup-custom.qml
new file mode 100644
index 00000000..3b7cec3d
--- /dev/null
+++ b/tests/auto/palette/data/palette-popup-custom.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
+
+Popup {
+ palette.alternateBase: "aqua"
+ palette.base: "azure"
+ palette.brightText: "beige"
+ palette.button: "bisque"
+ palette.buttonText: "chocolate"
+ palette.dark: "coral"
+ palette.highlight: "crimson"
+ palette.highlightedText: "fuchsia"
+ palette.light: "gold"
+ palette.link: "indigo"
+ palette.linkVisited: "ivory"
+ palette.mid: "khaki"
+ palette.midlight: "lavender"
+ palette.shadow: "linen"
+ palette.text: "moccasin"
+ palette.toolTipBase: "navy"
+ palette.toolTipText: "orchid"
+ palette.window: "plum"
+ palette.windowText: "salmon"
+}
diff --git a/tests/auto/palette/data/palette-popup-default.qml b/tests/auto/palette/data/palette-popup-default.qml
new file mode 100644
index 00000000..f09feae0
--- /dev/null
+++ b/tests/auto/palette/data/palette-popup-default.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** 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
+
+Popup {
+}
diff --git a/tests/auto/palette/palette.pro b/tests/auto/palette/palette.pro
new file mode 100644
index 00000000..c7d55d07
--- /dev/null
+++ b/tests/auto/palette/palette.pro
@@ -0,0 +1,16 @@
+CONFIG += testcase
+TARGET = tst_palette
+SOURCES += tst_palette.cpp
+
+macos:CONFIG -= app_bundle
+
+QT += core-private gui-private qml-private quick-private testlib quicktemplates2-private quickcontrols2-private
+
+include (../shared/util.pri)
+
+RESOURCES += qtquickcontrols2.conf
+
+TESTDATA = data/*
+
+OTHER_FILES += \
+ data/*.qml
diff --git a/tests/auto/palette/qtquickcontrols2.conf b/tests/auto/palette/qtquickcontrols2.conf
new file mode 100644
index 00000000..2ffc7ecc
--- /dev/null
+++ b/tests/auto/palette/qtquickcontrols2.conf
@@ -0,0 +1,5 @@
+[Default]
+Palette\Base=#efefef
+
+[Default\Palette]
+Text=#101010
diff --git a/tests/auto/palette/tst_palette.cpp b/tests/auto/palette/tst_palette.cpp
new file mode 100644
index 00000000..f74e358a
--- /dev/null
+++ b/tests/auto/palette/tst_palette.cpp
@@ -0,0 +1,407 @@
+/****************************************************************************
+**
+** 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 <QtTest/qtest.h>
+#include "../shared/visualtestutil.h"
+
+#include <QtGui/qpalette.h>
+#include <QtGui/qpa/qplatformtheme.h>
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtQml/qqmlengine.h>
+#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>
+
+using namespace QQuickVisualTestUtil;
+
+class tst_palette : public QQmlDataTest
+{
+ Q_OBJECT
+
+private slots:
+ void initTestCase();
+
+ void palette_data();
+ void palette();
+
+ void inheritance_data();
+ void inheritance();
+
+ 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 = QQuickControlPrivate::themePalette(QPlatformTheme::SystemPalette);
+ defaultPalette.setColor(QPalette::Base, QColor("#efefef"));
+ defaultPalette.setColor(QPalette::Text, QColor("#101010"));
+
+ QTest::newRow("Control") << "palette-control-default.qml" << defaultPalette;
+ QTest::newRow("AppWindow") << "palette-appwindow-default.qml" << defaultPalette;
+ QTest::newRow("Popup") << "palette-popup-default.qml" << defaultPalette;
+
+ QPalette customPalette;
+ customPalette.setColor(QPalette::AlternateBase, QColor("aqua"));
+ customPalette.setColor(QPalette::Base, QColor("azure"));
+ customPalette.setColor(QPalette::BrightText, QColor("beige"));
+ customPalette.setColor(QPalette::Button, QColor("bisque"));
+ customPalette.setColor(QPalette::ButtonText, QColor("chocolate"));
+ customPalette.setColor(QPalette::Dark, QColor("coral"));
+ customPalette.setColor(QPalette::Highlight, QColor("crimson"));
+ customPalette.setColor(QPalette::HighlightedText, QColor("fuchsia"));
+ customPalette.setColor(QPalette::Light, QColor("gold"));
+ customPalette.setColor(QPalette::Link, QColor("indigo"));
+ customPalette.setColor(QPalette::LinkVisited, QColor("ivory"));
+ customPalette.setColor(QPalette::Mid, QColor("khaki"));
+ customPalette.setColor(QPalette::Midlight, QColor("lavender"));
+ customPalette.setColor(QPalette::Shadow, QColor("linen"));
+ customPalette.setColor(QPalette::Text, QColor("moccasin"));
+ customPalette.setColor(QPalette::ToolTipBase, QColor("navy"));
+ customPalette.setColor(QPalette::ToolTipText, QColor("orchid"));
+ customPalette.setColor(QPalette::Window, QColor("plum"));
+ customPalette.setColor(QPalette::WindowText, QColor("salmon"));
+
+ QTest::newRow("Control:custom") << "palette-control-custom.qml" << customPalette;
+ QTest::newRow("AppWindow:custom") << "palette-appwindow-custom.qml" << customPalette;
+ QTest::newRow("Popup:custom") << "palette-popup-custom.qml" << customPalette;
+}
+
+void tst_palette::palette()
+{
+ QFETCH(QString, testFile);
+ QFETCH(QPalette, expectedPalette);
+
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.loadUrl(testFileUrl(testFile));
+
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY2(!object.isNull(), qPrintable(component.errorString()));
+
+ QVariant var = object->property("palette");
+ QVERIFY(var.isValid());
+
+ QPalette actualPalette = var.value<QPalette>();
+ QCOMPARE(actualPalette, expectedPalette);
+}
+
+void tst_palette::inheritance_data()
+{
+ QTest::addColumn<QString>("testFile");
+
+ QTest::newRow("Control") << "inheritance-control.qml";
+ QTest::newRow("Child Control") << "inheritance-childcontrol.qml";
+ QTest::newRow("Dynamic Control") << "inheritance-dynamiccontrol.qml";
+ QTest::newRow("Dynamic Child Control") << "inheritance-dynamicchildcontrol.qml";
+
+ QTest::newRow("Popup") << "inheritance-popup.qml";
+ QTest::newRow("Child Popup") << "inheritance-childpopup.qml";
+ QTest::newRow("Dynamic Popup") << "inheritance-dynamicpopup.qml";
+ QTest::newRow("Dynamic Child Popup") << "inheritance-dynamicchildpopup.qml";
+}
+
+void tst_palette::inheritance()
+{
+ QFETCH(QString, testFile);
+
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.loadUrl(testFileUrl(testFile));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(component.create()));
+ QVERIFY2(!window.isNull(), qPrintable(component.errorString()));
+
+ QObject *control = window->property("control").value<QObject *>();
+ QObject *child = window->property("child").value<QObject *>();
+ QObject *grandChild = window->property("grandChild").value<QObject *>();
+ QVERIFY(control && child && grandChild);
+
+ QPalette defaultPalette = QQuickControlPrivate::themePalette(QPlatformTheme::SystemPalette);
+ defaultPalette.setColor(QPalette::Base, QColor("#efefef"));
+ defaultPalette.setColor(QPalette::Text, QColor("#101010"));
+
+ QCOMPARE(window->palette(), defaultPalette);
+
+ QCOMPARE(control->property("palette").value<QPalette>(), defaultPalette);
+ QCOMPARE(child->property("palette").value<QPalette>(), defaultPalette);
+ QCOMPARE(grandChild->property("palette").value<QPalette>(), defaultPalette);
+
+ QPalette childPalette(defaultPalette);
+ childPalette.setColor(QPalette::Base, Qt::red);
+ childPalette.setColor(QPalette::Text, Qt::green);
+ childPalette.setColor(QPalette::Button, Qt::blue);
+ child->setProperty("palette", childPalette);
+ QCOMPARE(child->property("palette").value<QPalette>(), childPalette);
+ QCOMPARE(grandChild->property("palette").value<QPalette>(), childPalette);
+
+ QPalette grandChildPalette(childPalette);
+ grandChildPalette.setColor(QPalette::Base, Qt::cyan);
+ grandChildPalette.setColor(QPalette::Mid, Qt::magenta);
+ grandChild->setProperty("palette", grandChildPalette);
+ QCOMPARE(child->property("palette").value<QPalette>(), childPalette);
+ QCOMPARE(grandChild->property("palette").value<QPalette>(), grandChildPalette);
+
+ QPalette windowPalette(defaultPalette);
+ windowPalette.setColor(QPalette::Window, Qt::gray);
+ window->setPalette(windowPalette);
+ QCOMPARE(window->palette(), windowPalette);
+ QCOMPARE(control->property("palette").value<QPalette>(), windowPalette);
+
+ childPalette.setColor(QPalette::Window, Qt::gray);
+ QCOMPARE(child->property("palette").value<QPalette>(), childPalette);
+
+ grandChildPalette.setColor(QPalette::Window, Qt::gray);
+ QCOMPARE(grandChild->property("palette").value<QPalette>(), grandChildPalette);
+
+ child->setProperty("palette", QVariant());
+ QCOMPARE(child->property("palette").value<QPalette>(), windowPalette);
+ QCOMPARE(grandChild->property("palette").value<QPalette>(), grandChildPalette);
+
+ grandChild->setProperty("palette", QVariant());
+ QCOMPARE(grandChild->property("palette").value<QPalette>(), windowPalette);
+}
+
+class TestTheme : public QQuickProxyTheme
+{
+public:
+ TestTheme(QPlatformTheme *theme) : QQuickProxyTheme(theme)
+ {
+ std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(0));
+
+ QPalette palette = QPalette();
+ palette.setColor(QPalette::Window, Qt::gray);
+ palettes[QPlatformTheme::SystemPalette] = new QPalette(palette);
+
+ palette.setColor(QPalette::ToolTipBase, Qt::yellow);
+ palettes[QPlatformTheme::ToolTipPalette] = new QPalette(palette);
+
+ palette.setColor(QPalette::ButtonText, Qt::blue);
+ palettes[QPlatformTheme::ToolButtonPalette] = new QPalette(palette);
+
+ palette.setColor(QPalette::Button, Qt::red);
+ palettes[QPlatformTheme::ButtonPalette] = new QPalette(palette);
+
+ palette.setColor(QPalette::Text, Qt::green);
+ palettes[QPlatformTheme::CheckBoxPalette] = new QPalette(palette);
+
+ palette.setColor(QPalette::Text, Qt::blue);
+ palettes[QPlatformTheme::RadioButtonPalette] = new QPalette(palette);
+
+ // HeaderPalette unused
+
+ palette.setColor(QPalette::Base, Qt::darkGray);
+ palettes[QPlatformTheme::ComboBoxPalette] = new QPalette(palette);
+
+ palette.setColor(QPalette::Base, Qt::lightGray);
+ palettes[QPlatformTheme::ItemViewPalette] = new QPalette(palette);
+
+ // MessageBoxLabelPalette unused
+
+ palette.setColor(QPalette::ButtonText, Qt::white);
+ palettes[QPlatformTheme::TabBarPalette] = new QPalette(palette);
+
+ palette.setColor(QPalette::WindowText, Qt::darkGray);
+ palettes[QPlatformTheme::LabelPalette] = new QPalette(palette);
+
+ palette.setColor(QPalette::Mid, Qt::gray);
+ palettes[QPlatformTheme::GroupBoxPalette] = new QPalette(palette);
+
+ palette.setColor(QPalette::Shadow, Qt::darkYellow);
+ palettes[QPlatformTheme::MenuPalette] = new QPalette(palette);
+
+ // MenuBarPalette unused
+
+ palette.setColor(QPalette::Base, Qt::cyan);
+ palettes[QPlatformTheme::TextEditPalette] = new QPalette(palette);
+
+ palette.setColor(QPalette::Base, Qt::magenta);
+ palettes[QPlatformTheme::TextLineEditPalette] = new QPalette(palette);
+
+ QGuiApplicationPrivate::platform_theme = this;
+ }
+
+ const QPalette *palette(Palette type = SystemPalette) const override
+ {
+ return palettes[type];
+ }
+
+private:
+ QPalette *palettes[QPlatformTheme::NPalettes];
+};
+
+Q_DECLARE_METATYPE(QPlatformTheme::Palette)
+
+void tst_palette::defaultPalette_data()
+{
+ QTest::addColumn<QString>("control");
+ QTest::addColumn<QPlatformTheme::Palette>("paletteType");
+
+ QTest::newRow("AbstractButton") << "AbstractButton" << QPlatformTheme::SystemPalette;
+ QTest::newRow("ApplicationWindow") << "ApplicationWindow" << QPlatformTheme::SystemPalette;
+ QTest::newRow("Button") << "Button" << QPlatformTheme::ButtonPalette;
+ QTest::newRow("CheckBox") << "CheckBox" << QPlatformTheme::CheckBoxPalette;
+ QTest::newRow("CheckDelegate") << "CheckDelegate" << QPlatformTheme::ItemViewPalette;
+ QTest::newRow("ComboBox") << "ComboBox" << QPlatformTheme::ComboBoxPalette;
+ QTest::newRow("Container") << "Container" << QPlatformTheme::SystemPalette;
+ QTest::newRow("Control") << "Control" << QPlatformTheme::SystemPalette;
+ QTest::newRow("Dial") << "Dial" << QPlatformTheme::SystemPalette;
+ QTest::newRow("Dialog") << "Dialog" << QPlatformTheme::SystemPalette;
+ QTest::newRow("DialogButtonBox") << "DialogButtonBox" << QPlatformTheme::SystemPalette;
+ QTest::newRow("Drawer") << "Drawer" << QPlatformTheme::SystemPalette;
+ QTest::newRow("Frame") << "Frame" << QPlatformTheme::SystemPalette;
+ QTest::newRow("GroupBox") << "GroupBox" << QPlatformTheme::GroupBoxPalette;
+ QTest::newRow("ItemDelegate") << "ItemDelegate" << QPlatformTheme::ItemViewPalette;
+ QTest::newRow("Label") << "Label" << QPlatformTheme::LabelPalette;
+ QTest::newRow("Menu") << "Menu" << QPlatformTheme::MenuPalette;
+ QTest::newRow("MenuItem") << "MenuItem" << QPlatformTheme::MenuPalette;
+ QTest::newRow("MenuSeparator") << "MenuSeparator" << QPlatformTheme::MenuPalette;
+ QTest::newRow("Page") << "Page" << QPlatformTheme::SystemPalette;
+ QTest::newRow("Pane") << "Pane" << QPlatformTheme::SystemPalette;
+ QTest::newRow("Popup") << "Popup" << QPlatformTheme::SystemPalette;
+ QTest::newRow("ProgressBar") << "ProgressBar" << QPlatformTheme::SystemPalette;
+ QTest::newRow("RadioButton") << "RadioButton" << QPlatformTheme::RadioButtonPalette;
+ QTest::newRow("RadioDelegate") << "RadioDelegate" << QPlatformTheme::ItemViewPalette;
+ QTest::newRow("RangeSlider") << "RangeSlider" << QPlatformTheme::SystemPalette;
+ QTest::newRow("RoundButton") << "RoundButton" << QPlatformTheme::ButtonPalette;
+ QTest::newRow("ScrollBar") << "ScrollBar" << QPlatformTheme::SystemPalette;
+ QTest::newRow("ScrollIndicator") << "ScrollIndicator" << QPlatformTheme::SystemPalette;
+ QTest::newRow("Slider") << "Slider" << QPlatformTheme::SystemPalette;
+ QTest::newRow("SpinBox") << "SpinBox" << QPlatformTheme::TextLineEditPalette;
+ QTest::newRow("SwipeDelegate") << "SwipeDelegate" << QPlatformTheme::ItemViewPalette;
+ QTest::newRow("Switch") << "Switch" << QPlatformTheme::CheckBoxPalette; // ### TODO: add QPlatformTheme::SwitchPalette
+ QTest::newRow("SwitchDelegate") << "SwitchDelegate" << QPlatformTheme::ItemViewPalette;
+ QTest::newRow("TabBar") << "TabBar" << QPlatformTheme::TabBarPalette;
+ QTest::newRow("TabButton") << "TabButton" << QPlatformTheme::TabBarPalette;
+ QTest::newRow("TextArea") << "TextArea" << QPlatformTheme::TextEditPalette;
+ QTest::newRow("TextField") << "TextField" << QPlatformTheme::TextLineEditPalette;
+ QTest::newRow("ToolBar") << "ToolBar" << QPlatformTheme::ToolButtonPalette;
+ QTest::newRow("ToolButton") << "ToolButton" << QPlatformTheme::ToolButtonPalette;
+ QTest::newRow("ToolSeparator") << "ToolSeparator" << QPlatformTheme::ToolButtonPalette;
+ QTest::newRow("ToolTip") << "ToolTip" << QPlatformTheme::ToolTipPalette;
+ QTest::newRow("Tumbler") << "Tumbler" << QPlatformTheme::ItemViewPalette;
+}
+
+void tst_palette::defaultPalette()
+{
+ QFETCH(QString, control);
+ QFETCH(QPlatformTheme::Palette, paletteType);
+
+ TestTheme theme(QGuiApplicationPrivate::platform_theme);
+
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData(QString("import QtQuick.Controls 2.3; %1 { }").arg(control).toUtf8(), QUrl());
+
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY2(!object.isNull(), qPrintable(component.errorString()));
+
+ QVariant var = object->property("palette");
+ QVERIFY(var.isValid());
+
+ const QPalette *expectedPalette = theme.palette(paletteType);
+ QVERIFY(expectedPalette);
+
+ QPalette actualPalette = var.value<QPalette>();
+ 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/qquickapplicationwindow/data/layout.qml b/tests/auto/qquickapplicationwindow/data/layout.qml
index a80b2d48..5bcffdf1 100644
--- a/tests/auto/qquickapplicationwindow/data/layout.qml
+++ b/tests/auto/qquickapplicationwindow/data/layout.qml
@@ -49,13 +49,14 @@
****************************************************************************/
import QtQuick 2.6
-import QtQuick.Controls 2.0
+import QtQuick.Controls 2.3
ApplicationWindow {
width: 200
height: 200
visible: true
+ menuBar: MenuBar { }
header: ToolBar { }
footer: ToolBar { }
}
diff --git a/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp b/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp
index 19a0bf3b..aeeddb10 100644
--- a/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp
+++ b/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp
@@ -412,7 +412,7 @@ void tst_QQuickApplicationWindow::attachedProperties()
QCOMPARE(childControl->window(), childAppWindow);
QCOMPARE(childControl->property("attached_window").value<QQuickApplicationWindow *>(), childAppWindow);
QCOMPARE(childControl->property("attached_contentItem").value<QQuickItem *>(), childAppWindow->contentItem());
- QCOMPARE(childControl->property("attached_activeFocusControl").value<QQuickItem *>(), childAppWindow->activeFocusControl());
+ QCOMPARE(childControl->property("attached_activeFocusControl").value<QQuickItem *>(), childAppWindowControl);
QCOMPARE(childControl->property("attached_header").value<QQuickItem *>(), childAppWindow->header());
QCOMPARE(childControl->property("attached_footer").value<QQuickItem *>(), childAppWindow->footer());
QCOMPARE(childControl->property("attached_overlay").value<QQuickItem *>(), childAppWindow->overlay());
@@ -421,7 +421,7 @@ void tst_QQuickApplicationWindow::attachedProperties()
QCOMPARE(childItem->window(), childAppWindow);
QCOMPARE(childItem->property("attached_window").value<QQuickApplicationWindow *>(), childAppWindow);
QCOMPARE(childItem->property("attached_contentItem").value<QQuickItem *>(), childAppWindow->contentItem());
- QCOMPARE(childItem->property("attached_activeFocusControl").value<QQuickItem *>(), childAppWindow->activeFocusControl());
+ QCOMPARE(childItem->property("attached_activeFocusControl").value<QQuickItem *>(), childAppWindowControl);
QCOMPARE(childItem->property("attached_header").value<QQuickItem *>(), childAppWindow->header());
QCOMPARE(childItem->property("attached_footer").value<QQuickItem *>(), childAppWindow->footer());
QCOMPARE(childItem->property("attached_overlay").value<QQuickItem *>(), childAppWindow->overlay());
@@ -443,6 +443,55 @@ void tst_QQuickApplicationWindow::attachedProperties()
QVERIFY(!childItem->property("attached_header").value<QQuickItem *>());
QVERIFY(!childItem->property("attached_footer").value<QQuickItem *>());
QVERIFY(!childItem->property("attached_overlay").value<QQuickItem *>());
+ childAppWindow->close();
+ qApp->processEvents();
+
+ childWindow->show();
+ childWindow->requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(childWindow));
+
+ QVERIFY(!childWindowControl->hasActiveFocus());
+ childWindowControl->forceActiveFocus();
+ QTRY_VERIFY(childWindowControl->hasActiveFocus());
+ QCOMPARE(childWindow->activeFocusItem(), childWindowControl);
+ QCOMPARE(childWindowControl->property("attached_activeFocusControl").value<QQuickItem *>(), childWindowControl);
+
+ childControl->setParentItem(childWindow->contentItem());
+ QCOMPARE(childControl->window(), childWindow);
+ QVERIFY(!childControl->property("attached_window").value<QQuickWindow *>());
+ QCOMPARE(childControl->property("attached_activeFocusControl").value<QQuickItem *>(), childWindowControl);
+ QVERIFY(!childControl->property("attached_contentItem").value<QQuickItem *>());
+ QVERIFY(!childControl->property("attached_header").value<QQuickItem *>());
+ QVERIFY(!childControl->property("attached_footer").value<QQuickItem *>());
+ QCOMPARE(childControl->property("attached_overlay").value<QQuickItem *>(), QQuickOverlay::overlay(childWindow));
+
+ childItem->setParentItem(childWindow->contentItem());
+ QCOMPARE(childItem->window(), childWindow);
+ QVERIFY(!childControl->property("attached_window").value<QQuickWindow *>());
+ QCOMPARE(childControl->property("attached_activeFocusControl").value<QQuickItem *>(), childWindowControl);
+ QVERIFY(!childControl->property("attached_contentItem").value<QQuickItem *>());
+ QVERIFY(!childControl->property("attached_header").value<QQuickItem *>());
+ QVERIFY(!childControl->property("attached_footer").value<QQuickItem *>());
+ QCOMPARE(childControl->property("attached_overlay").value<QQuickItem *>(), QQuickOverlay::overlay(childWindow));
+
+ childControl->setParentItem(nullptr);
+ QVERIFY(!childControl->window());
+ QVERIFY(!childControl->property("attached_window").value<QQuickWindow *>());
+ QVERIFY(!childControl->property("attached_contentItem").value<QQuickItem *>());
+ QVERIFY(!childControl->property("attached_activeFocusControl").value<QQuickItem *>());
+ QVERIFY(!childControl->property("attached_header").value<QQuickItem *>());
+ QVERIFY(!childControl->property("attached_footer").value<QQuickItem *>());
+ QVERIFY(!childControl->property("attached_overlay").value<QQuickItem *>());
+
+ childItem->setParentItem(nullptr);
+ QVERIFY(!childItem->window());
+ QVERIFY(!childItem->property("attached_window").value<QQuickWindow *>());
+ QVERIFY(!childItem->property("attached_contentItem").value<QQuickItem *>());
+ QVERIFY(!childItem->property("attached_activeFocusControl").value<QQuickItem *>());
+ QVERIFY(!childItem->property("attached_header").value<QQuickItem *>());
+ QVERIFY(!childItem->property("attached_footer").value<QQuickItem *>());
+ QVERIFY(!childItem->property("attached_overlay").value<QQuickItem *>());
+ childWindow->close();
// ### A temporary workaround to unblock the CI until the crash caused
// by https://codereview.qt-project.org/#/c/108517/ has been fixed...
@@ -506,7 +555,7 @@ void tst_QQuickApplicationWindow::font()
QCOMPARE(item6->font(), font);
}
-class TestTheme : public QQuickProxyTheme
+class TestTheme : public QQuickProxyTheme
{
public:
TestTheme(QPlatformTheme *theme) : QQuickProxyTheme(theme), m_font("Courier")
@@ -778,11 +827,18 @@ void tst_QQuickApplicationWindow::layout()
QQuickItem *content = window->contentItem();
QVERIFY(content);
+ QQuickItem *menuBar = window->menuBar();
+ QVERIFY(menuBar);
QQuickItem *header = window->header();
QVERIFY(header);
QQuickItem *footer = window->footer();
QVERIFY(footer);
+ QCOMPARE(menuBar->x(), 0.0);
+ QCOMPARE(menuBar->y(), -menuBar->height() - header->height());
+ QCOMPARE(header->width(), qreal(window->width()));
+ QVERIFY(menuBar->height() > 0);
+
QCOMPARE(header->x(), 0.0);
QCOMPARE(header->y(), -header->height());
QCOMPARE(header->width(), qreal(window->width()));
@@ -794,6 +850,12 @@ void tst_QQuickApplicationWindow::layout()
QVERIFY(footer->height() > 0.0);
QCOMPARE(content->x(), 0.0);
+ QCOMPARE(content->y(), menuBar->height() + header->height());
+ QCOMPARE(content->width(), qreal(window->width()));
+ QCOMPARE(content->height(), window->height() - menuBar->height() - header->height() - footer->height());
+
+ menuBar->setVisible(false);
+ QCOMPARE(content->x(), 0.0);
QCOMPARE(content->y(), header->height());
QCOMPARE(content->width(), qreal(window->width()));
QCOMPARE(content->height(), window->height() - header->height() - footer->height());
diff --git a/tests/auto/qquickcolor/data/tst_color.qml b/tests/auto/qquickcolor/data/tst_color.qml
new file mode 100644
index 00000000..fbd74e3c
--- /dev/null
+++ b/tests/auto/qquickcolor/data/tst_color.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 QtTest 1.0
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+TestCase {
+ id: testCase
+ name: "Color"
+
+ function test_transparent() {
+ compare(Color.transparent("red", 0.2), Qt.rgba(1, 0, 0, 0.2))
+ compare(Color.transparent(Qt.rgba(0, 1, 0, 1), 0.2), Qt.rgba(0, 1, 0, 0.2))
+ compare(Color.transparent("#0000ff", 0.2), Qt.rgba(0, 0, 1, 0.2))
+ }
+}
diff --git a/tests/auto/qquickcolor/qquickcolor.pro b/tests/auto/qquickcolor/qquickcolor.pro
new file mode 100644
index 00000000..af562df1
--- /dev/null
+++ b/tests/auto/qquickcolor/qquickcolor.pro
@@ -0,0 +1,12 @@
+TEMPLATE = app
+TARGET = tst_qquickcolor
+CONFIG += qmltestcase
+
+SOURCES += \
+ $$PWD/tst_qquickcolor.cpp
+
+OTHER_FILES += \
+ $$PWD/data/*.qml
+
+TESTDATA += \
+ $$PWD/data/tst_*
diff --git a/tests/auto/qquickcolor/tst_qquickcolor.cpp b/tests/auto/qquickcolor/tst_qquickcolor.cpp
new file mode 100644
index 00000000..94c60080
--- /dev/null
+++ b/tests/auto/qquickcolor/tst_qquickcolor.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_qquickcolor)
diff --git a/tests/auto/qquickiconimage/data/alignment.qml b/tests/auto/qquickiconimage/data/alignment.qml
new file mode 100644
index 00000000..487ebfd0
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/alignment.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+Row {
+ width: 200
+ height: 200
+
+ IconImage {
+ name: "appointment-new"
+ sourceSize: Qt.size(22, 22)
+ }
+ Image {
+ source: "qrc:/icons/testtheme/22x22/actions/appointment-new.png"
+ }
+}
diff --git a/tests/auto/qquickiconimage/data/color.qml b/tests/auto/qquickiconimage/data/color.qml
new file mode 100644
index 00000000..d6f647e6
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/color.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+Row {
+ width: 200
+ height: 200
+
+ IconImage {
+ source: "qrc:/icons/testtheme/22x22/actions/color-test-original.png"
+ sourceSize: Qt.size(22, 22)
+ color: "red"
+ }
+ Image {
+ source: "qrc:/icons/testtheme/22x22/actions/color-test-tinted.png"
+ fillMode: Image.Pad
+ }
+}
diff --git a/tests/auto/qquickiconimage/data/fileSelectors.qml b/tests/auto/qquickiconimage/data/fileSelectors.qml
new file mode 100644
index 00000000..487ebfd0
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/fileSelectors.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+Row {
+ width: 200
+ height: 200
+
+ IconImage {
+ name: "appointment-new"
+ sourceSize: Qt.size(22, 22)
+ }
+ Image {
+ source: "qrc:/icons/testtheme/22x22/actions/appointment-new.png"
+ }
+}
diff --git a/tests/auto/qquickiconimage/data/imageProvider.qml b/tests/auto/qquickiconimage/data/imageProvider.qml
new file mode 100644
index 00000000..0d7d3033
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/imageProvider.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
+
+IconLabel {
+ icon.color: "transparent"
+ icon.source: "image://provider/red"
+}
diff --git a/tests/auto/qquickiconimage/data/nameBindingNoSizes.qml b/tests/auto/qquickiconimage/data/nameBindingNoSizes.qml
new file mode 100644
index 00000000..d6c33bb3
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/nameBindingNoSizes.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+IconImage {
+ name: "appointment-new"
+}
diff --git a/tests/auto/qquickiconimage/data/nameBindingSourceSize.qml b/tests/auto/qquickiconimage/data/nameBindingSourceSize.qml
new file mode 100644
index 00000000..487ebfd0
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/nameBindingSourceSize.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+Row {
+ width: 200
+ height: 200
+
+ IconImage {
+ name: "appointment-new"
+ sourceSize: Qt.size(22, 22)
+ }
+ Image {
+ source: "qrc:/icons/testtheme/22x22/actions/appointment-new.png"
+ }
+}
diff --git a/tests/auto/qquickiconimage/data/nameBindingSourceSizeWidthHeight.qml b/tests/auto/qquickiconimage/data/nameBindingSourceSizeWidthHeight.qml
new file mode 100644
index 00000000..c503d8cf
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/nameBindingSourceSizeWidthHeight.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+IconImage {
+ name: "appointment-new"
+ sourceSize: Qt.size(22, 22)
+ width: 16
+ height: 16
+}
diff --git a/tests/auto/qquickiconimage/data/root.qml b/tests/auto/qquickiconimage/data/root.qml
new file mode 100644
index 00000000..0a8b8db9
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/root.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.10
+
+Item {
+ width: 200
+ height: 200
+}
diff --git a/tests/auto/qquickiconimage/data/sourceBindingNoSizes.qml b/tests/auto/qquickiconimage/data/sourceBindingNoSizes.qml
new file mode 100644
index 00000000..33f4a2d3
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/sourceBindingNoSizes.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+Row {
+ width: 200
+ height: 200
+
+ IconImage {
+ source: "qrc:/icons/testtheme/22x22/actions/appointment-new.png"
+ }
+ Image {
+ source: "qrc:/icons/testtheme/22x22/actions/appointment-new.png"
+ }
+}
diff --git a/tests/auto/qquickiconimage/data/sourceBindingSourceSize.qml b/tests/auto/qquickiconimage/data/sourceBindingSourceSize.qml
new file mode 100644
index 00000000..c246dc74
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/sourceBindingSourceSize.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+Row {
+ width: 200
+ height: 200
+
+ IconImage {
+ source: "qrc:/icons/testtheme/22x22/actions/appointment-new.png"
+ sourceSize: Qt.size(22, 22)
+ }
+ Image {
+ source: "qrc:/icons/testtheme/22x22/actions/appointment-new.png"
+ }
+}
diff --git a/tests/auto/qquickiconimage/data/sourceBindingSourceSizeWidthHeight.qml b/tests/auto/qquickiconimage/data/sourceBindingSourceSizeWidthHeight.qml
new file mode 100644
index 00000000..ecbb7f6d
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/sourceBindingSourceSizeWidthHeight.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+IconImage {
+ source: "qrc:/icons/testtheme/22x22/actions/appointment-new.png"
+ sourceSize: Qt.size(22, 22)
+ width: 16
+ height: 16
+}
diff --git a/tests/auto/qquickiconimage/data/sourceBindingSourceTooLarge.qml b/tests/auto/qquickiconimage/data/sourceBindingSourceTooLarge.qml
new file mode 100644
index 00000000..f9e07899
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/sourceBindingSourceTooLarge.qml
@@ -0,0 +1,8 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+IconImage {
+ source: "qrc:/icons/testtheme/22x22/actions/appointment-new.png"
+ sourceSize: Qt.size(32, 32)
+}
diff --git a/tests/auto/qquickiconimage/data/svgNoSizes.qml b/tests/auto/qquickiconimage/data/svgNoSizes.qml
new file mode 100644
index 00000000..17cccd26
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/svgNoSizes.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+Row {
+ width: 200
+ height: 200
+
+ IconImage {
+ source: "qrc:/icons/testtheme/appointment-new.svg"
+ }
+ Image {
+ source: "qrc:/icons/testtheme/appointment-new.svg"
+ }
+}
diff --git a/tests/auto/qquickiconimage/data/svgSourceBindingSourceSize.qml b/tests/auto/qquickiconimage/data/svgSourceBindingSourceSize.qml
new file mode 100644
index 00000000..2387e98e
--- /dev/null
+++ b/tests/auto/qquickiconimage/data/svgSourceBindingSourceSize.qml
@@ -0,0 +1,17 @@
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+
+Row {
+ width: 200
+ height: 200
+
+ IconImage {
+ source: "qrc:/data/icons/testtheme/appointment-new.svg"
+ sourceSize: Qt.size(22, 22)
+ }
+ Image {
+ source: "qrc:/data/icons/testtheme/appointment-new.svg"
+ sourceSize: Qt.size(22, 22)
+ }
+}
diff --git a/tests/auto/qquickiconimage/icons/testtheme/16x16/actions/appointment-new.png b/tests/auto/qquickiconimage/icons/testtheme/16x16/actions/appointment-new.png
new file mode 100644
index 00000000..18b7c678
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/16x16/actions/appointment-new.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new.png
new file mode 100644
index 00000000..c6ceca43
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new@2x.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new@2x.png
new file mode 100644
index 00000000..f380ebb6
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new@2x.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new.png
new file mode 100644
index 00000000..d676ffd4
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new@2x.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new@2x.png
new file mode 100644
index 00000000..63ae9ce7
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new@2x.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original.png
new file mode 100644
index 00000000..2d876cc1
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original@2x.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original@2x.png
new file mode 100644
index 00000000..c65fbed0
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original@2x.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted.png
new file mode 100644
index 00000000..220a313d
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted@2x.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted@2x.png
new file mode 100644
index 00000000..cd66ef69
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted@2x.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/+testselector/appointment-new.png b/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/+testselector/appointment-new.png
new file mode 100644
index 00000000..f380ebb6
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/+testselector/appointment-new.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/appointment-new.png b/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/appointment-new.png
new file mode 100644
index 00000000..63ae9ce7
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/appointment-new.png
Binary files differ
diff --git a/tests/auto/qquickiconimage/icons/testtheme/appointment-new.svg b/tests/auto/qquickiconimage/icons/testtheme/appointment-new.svg
new file mode 100644
index 00000000..4cb14f82
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/appointment-new.svg
@@ -0,0 +1,425 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="90.000000"
+ inkscape:export-xdpi="90.000000"
+ inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+ width="48px"
+ height="48px"
+ id="svg11300"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions"
+ sodipodi:docname="appointment-new.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 24 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="48 : 24 : 1"
+ inkscape:persp3d-origin="24 : 16 : 1"
+ id="perspective59" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5204">
+ <stop
+ style="stop-color:#c4a000;stop-opacity:1;"
+ offset="0"
+ id="stop5206" />
+ <stop
+ style="stop-color:#c4a000;stop-opacity:0;"
+ offset="1"
+ id="stop5208" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5196">
+ <stop
+ style="stop-color:#c4a000;stop-opacity:1;"
+ offset="0"
+ id="stop5198" />
+ <stop
+ style="stop-color:#c4a000;stop-opacity:0;"
+ offset="1"
+ id="stop5200" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient12512">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop12513" />
+ <stop
+ style="stop-color:#fff520;stop-opacity:0.89108908;"
+ offset="0.50000000"
+ id="stop12517" />
+ <stop
+ style="stop-color:#fff300;stop-opacity:0.0000000;"
+ offset="1.0000000"
+ id="stop12514" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient12512"
+ id="radialGradient278"
+ gradientUnits="userSpaceOnUse"
+ cx="55.000000"
+ cy="125.00000"
+ fx="55.000000"
+ fy="125.00000"
+ r="14.375000" />
+ <linearGradient
+ id="linearGradient10653">
+ <stop
+ style="stop-color:#f3f4ff;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop10655" />
+ <stop
+ style="stop-color:#9193af;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop10657" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient42174">
+ <stop
+ style="stop-color:#a0a0a0;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop42176" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop42178" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2145">
+ <stop
+ style="stop-color:#fffffd;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop2147" />
+ <stop
+ style="stop-color:#cbcbc9;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop2149" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient37935">
+ <stop
+ id="stop37937"
+ offset="0.0000000"
+ style="stop-color:#9497b3;stop-opacity:1.0000000;" />
+ <stop
+ id="stop37939"
+ offset="1.0000000"
+ style="stop-color:#4c4059;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2152">
+ <stop
+ id="stop2154"
+ offset="0.0000000"
+ style="stop-color:#9aa29a;stop-opacity:1.0000000;" />
+ <stop
+ id="stop2156"
+ offset="1.0000000"
+ style="stop-color:#b5beb5;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient3816">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3818" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3820" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3816"
+ id="radialGradient3822"
+ cx="31.112698"
+ cy="19.008621"
+ fx="31.112698"
+ fy="19.008621"
+ r="8.6620579"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2152"
+ id="linearGradient4307"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(3.123841,0.000000,0.000000,0.969691,-31.88758,-19.59492)"
+ x1="8.9156475"
+ y1="37.197018"
+ x2="9.8855033"
+ y2="52.090678" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient10653"
+ id="radialGradient4309"
+ gradientUnits="userSpaceOnUse"
+ cx="11.329200"
+ cy="10.583970"
+ fx="11.329200"
+ fy="10.583970"
+ r="15.532059" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2145"
+ id="radialGradient4311"
+ gradientUnits="userSpaceOnUse"
+ cx="11.901996"
+ cy="10.045444"
+ fx="11.901996"
+ fy="10.045444"
+ r="29.292715" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient42174"
+ id="linearGradient4313"
+ gradientUnits="userSpaceOnUse"
+ x1="6.3422160"
+ y1="7.7893324"
+ x2="22.218424"
+ y2="25.884274" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5196"
+ id="radialGradient5202"
+ cx="23.375"
+ cy="10.972863"
+ fx="23.375"
+ fy="10.972863"
+ r="3.3478092"
+ gradientTransform="matrix(3.630420,1.654030e-15,-1.608743e-15,3.742066,-61.48607,-29.18618)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5204"
+ id="linearGradient5210"
+ x1="19.667364"
+ y1="4.2570662"
+ x2="20.329933"
+ y2="5.2845874"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient37935"
+ id="radialGradient5212"
+ gradientUnits="userSpaceOnUse"
+ cx="8.7468252"
+ cy="6.8283234"
+ fx="8.7468252"
+ fy="6.8283234"
+ r="29.889715" />
+ </defs>
+ <sodipodi:namedview
+ stroke="#c4a000"
+ fill="#babdb6"
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="0.25490196"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="11.313708"
+ inkscape:cx="13.2248"
+ inkscape:cy="25.106052"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="833"
+ inkscape:window-height="772"
+ inkscape:window-x="305"
+ inkscape:window-y="76" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Jakub Steiner</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:source>http://jimmac.musichall.cz</dc:source>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+ <dc:title>New Appointment</dc:title>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>appointment</rdf:li>
+ <rdf:li>new</rdf:li>
+ <rdf:li>meeting</rdf:li>
+ <rdf:li>rvsp</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/publicdomain/">
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.45064,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z"
+ sodipodi:ry="8.6620579"
+ sodipodi:rx="8.6620579"
+ sodipodi:cy="19.008621"
+ sodipodi:cx="31.112698"
+ id="path4318"
+ style="opacity:1;color:#000000;fill:url(#radialGradient3822);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc"
+ transform="matrix(2.563158,0.000000,0.000000,1.219602,-55.98414,14.04144)" />
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path14341"
+ d="M 18.587591,1.403729 L 4.226755,18.096665 L 5.4854717,19.339844 L 18.587591,1.403729 z "
+ style="color:#000000;fill:url(#linearGradient4307);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path18921"
+ d="M 18.467176,1.3138035 L 5.6605716,19.072612 L 7.4900985,20.687913 L 18.467176,1.3138035 z "
+ style="fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <path
+ transform="matrix(1.431529,0.000000,0.000000,1.431529,0.569459,-1.654618)"
+ d="M 31.160714 16.910715 A 14.910714 14.910714 0 1 1 1.3392859,16.910715 A 14.910714 14.910714 0 1 1 31.160714 16.910715 z"
+ sodipodi:ry="14.910714"
+ sodipodi:rx="14.910714"
+ sodipodi:cy="16.910715"
+ sodipodi:cx="16.25"
+ id="path27786"
+ style="fill:url(#radialGradient5212);fill-opacity:1;fill-rule:evenodd;stroke:#605773;stroke-width:0.69855404;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(1.163838,0.000000,0.000000,1.163838,4.824801,2.777556)"
+ d="M 31.160714 16.910715 A 14.910714 14.910714 0 1 1 1.3392859,16.910715 A 14.910714 14.910714 0 1 1 31.160714 16.910715 z"
+ sodipodi:ry="14.910714"
+ sodipodi:rx="14.910714"
+ sodipodi:cy="16.910715"
+ sodipodi:cx="16.25"
+ id="path35549"
+ style="fill:url(#radialGradient4311);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4313);stroke-width:0.71139598;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:url(#radialGradient5202);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5210);stroke-width:0.56498736;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path4120"
+ sodipodi:cx="23.375"
+ sodipodi:cy="11.875"
+ sodipodi:rx="8.5"
+ sodipodi:ry="8.5"
+ d="M 16.679382,6.6387137 A 8.5,8.5 0 0 1 23.332691,3.3751053 L 23.375,11.875 z"
+ transform="matrix(1.769951,0.000000,0.000000,1.769951,-17.02424,1.610741)"
+ sodipodi:start="3.8052902"
+ sodipodi:end="4.7074114" />
+ <path
+ transform="matrix(2.073295,0.000000,0.000000,2.073295,-7.310224,-13.13682)"
+ d="M 16.40625 17.28125 A 1.21875 1.21875 0 1 1 13.96875,17.28125 A 1.21875 1.21875 0 1 1 16.40625 17.28125 z"
+ sodipodi:ry="1.21875"
+ sodipodi:rx="1.21875"
+ sodipodi:cy="17.28125"
+ sodipodi:cx="15.1875"
+ id="path34778"
+ style="fill:#f3f3f3;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.48232403;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;stroke-dasharray:none"
+ sodipodi:type="arc" />
+ <path
+ id="path35559"
+ d="M 22.176614,20.718014 L 13.155702,13.140282"
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ id="path35561"
+ d="M 19.408614,29.776506 L 22.368655,25.283228"
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ sodipodi:nodetypes="cc" />
+ <path
+ transform="matrix(2.749493,0.000000,0.000000,2.749493,-22.30073,-12.40939)"
+ d="M 17.324117 7.6932044 A 0.61871845 0.61871845 0 1 1 16.08668,7.6932044 A 0.61871845 0.61871845 0 1 1 17.324117 7.6932044 z"
+ sodipodi:ry="0.61871845"
+ sodipodi:rx="0.61871845"
+ sodipodi:cy="7.6932044"
+ sodipodi:cx="16.705399"
+ id="path35563"
+ style="fill:#b6b9b1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.36871839;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(2.749493,0.000000,0.000000,2.749493,-22.30073,14.80922)"
+ d="M 17.324117 7.6932044 A 0.61871845 0.61871845 0 1 1 16.08668,7.6932044 A 0.61871845 0.61871845 0 1 1 17.324117 7.6932044 z"
+ sodipodi:ry="0.61871845"
+ sodipodi:rx="0.61871845"
+ sodipodi:cy="7.6932044"
+ sodipodi:cx="16.705399"
+ id="path35565"
+ style="fill:#b6b9b1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.36871839;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(2.749493,0.000000,0.000000,2.749493,-35.91004,1.199890)"
+ d="M 17.324117 7.6932044 A 0.61871845 0.61871845 0 1 1 16.08668,7.6932044 A 0.61871845 0.61871845 0 1 1 17.324117 7.6932044 z"
+ sodipodi:ry="0.61871845"
+ sodipodi:rx="0.61871845"
+ sodipodi:cy="7.6932044"
+ sodipodi:cx="16.705399"
+ id="path35567"
+ style="fill:#b6b9b1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.36871839;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(2.749493,0.000000,0.000000,2.749493,-8.691448,1.199890)"
+ d="M 17.324117 7.6932044 A 0.61871845 0.61871845 0 1 1 16.08668,7.6932044 A 0.61871845 0.61871845 0 1 1 17.324117 7.6932044 z"
+ sodipodi:ry="0.61871845"
+ sodipodi:rx="0.61871845"
+ sodipodi:cy="7.6932044"
+ sodipodi:cx="16.705399"
+ id="path35569"
+ style="fill:#b6b9b1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.36871839;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;opacity:1"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#radialGradient4309);stroke-width:0.73656511;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+ id="path10651"
+ sodipodi:cx="16.25"
+ sodipodi:cy="16.910715"
+ sodipodi:rx="14.910714"
+ sodipodi:ry="14.910714"
+ d="M 31.160714 16.910715 A 14.910714 14.910714 0 1 1 1.3392859,16.910715 A 14.910714 14.910714 0 1 1 31.160714 16.910715 z"
+ transform="matrix(1.357654,0.000000,0.000000,1.357654,1.769896,-0.493735)" />
+ <path
+ sodipodi:type="arc"
+ style="color:#000000;fill:url(#radialGradient278);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.25000024;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block"
+ id="path12511"
+ sodipodi:cx="55"
+ sodipodi:cy="125"
+ sodipodi:rx="14.375"
+ sodipodi:ry="14.375"
+ d="M 69.375 125 A 14.375 14.375 0 1 1 40.625,125 A 14.375 14.375 0 1 1 69.375 125 z"
+ transform="matrix(0.611127,0.000000,0.000000,0.611127,5.544052,-66.92818)"
+ inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/stock_new-16.png"
+ inkscape:export-xdpi="33.852203"
+ inkscape:export-ydpi="33.852203" />
+ </g>
+</svg>
diff --git a/tests/auto/qquickiconimage/icons/testtheme/index.theme b/tests/auto/qquickiconimage/icons/testtheme/index.theme
new file mode 100644
index 00000000..6ab6c15c
--- /dev/null
+++ b/tests/auto/qquickiconimage/icons/testtheme/index.theme
@@ -0,0 +1,21 @@
+[Icon Theme]
+Name=Test
+Comment=Test Theme
+
+Directories=16x16/actions,22x22/actions,22x22@2/actions
+
+[16x16/actions]
+Size=16
+Context=Actions
+Type=Fixed
+
+[22x22/actions]
+Size=22
+Context=Actions
+Type=Fixed
+
+[22x22@2/actions]
+Size=22
+Context=Actions
+Scale=2
+Type=Fixed
diff --git a/tests/auto/qquickiconimage/qquickiconimage.pro b/tests/auto/qquickiconimage/qquickiconimage.pro
new file mode 100644
index 00000000..1a37d4ba
--- /dev/null
+++ b/tests/auto/qquickiconimage/qquickiconimage.pro
@@ -0,0 +1,17 @@
+CONFIG += testcase
+macos:CONFIG -= app_bundle
+TARGET = tst_qquickiconimage
+
+QT += core gui qml quick testlib
+QT_PRIVATE += quick-private quickcontrols2-private
+qtHaveModule(svg): QT += svg
+
+include (../shared/util.pri)
+
+SOURCES += tst_qquickiconimage.cpp
+
+RESOURCES += resources.qrc
+
+TESTDATA += \
+ $$PWD/data/*.qml \
+ $$PWD/data/icons/*
diff --git a/tests/auto/qquickiconimage/resources.qrc b/tests/auto/qquickiconimage/resources.qrc
new file mode 100644
index 00000000..6558b039
--- /dev/null
+++ b/tests/auto/qquickiconimage/resources.qrc
@@ -0,0 +1,17 @@
+<RCC>
+ <qresource prefix="/">
+ <file>icons/testtheme/16x16/actions/appointment-new.png</file>
+ <file>icons/testtheme/22x22/actions/appointment-new.png</file>
+ <file>icons/testtheme/22x22/actions/appointment-new@2x.png</file>
+ <file>icons/testtheme/22x22@2/actions/appointment-new.png</file>
+ <file>icons/testtheme/22x22/actions/+testselector/appointment-new.png</file>
+ <file>icons/testtheme/22x22/actions/+testselector/appointment-new@2x.png</file>
+ <file>icons/testtheme/22x22@2/actions/+testselector/appointment-new.png</file>
+ <file>icons/testtheme/index.theme</file>
+ <file>icons/testtheme/appointment-new.svg</file>
+ <file>icons/testtheme/22x22/actions/color-test-original.png</file>
+ <file>icons/testtheme/22x22/actions/color-test-tinted.png</file>
+ <file>icons/testtheme/22x22/actions/color-test-original@2x.png</file>
+ <file>icons/testtheme/22x22/actions/color-test-tinted@2x.png</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/qquickiconimage/tst_qquickiconimage.cpp b/tests/auto/qquickiconimage/tst_qquickiconimage.cpp
new file mode 100644
index 00000000..77b860a2
--- /dev/null
+++ b/tests/auto/qquickiconimage/tst_qquickiconimage.cpp
@@ -0,0 +1,532 @@
+/****************************************************************************
+**
+** 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:GPL-EXCEPT$
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QtTest/qsignalspy.h>
+
+#include <QtCore/qmath.h>
+#include <QtQml/qqmlengine.h>
+#include <QtQml/qqmlcomponent.h>
+#include <QtQml/qqmlfileselector.h>
+#include <QtQuick/qquickitem.h>
+#include <QtQuick/qquickview.h>
+#include <QtQuick/qquickimageprovider.h>
+#include <QtQuick/qquickitemgrabresult.h>
+#include <QtQuick/private/qquickimage_p.h>
+#include <QtQuickControls2/private/qquickiconimage_p.h>
+
+#include "../shared/util.h"
+#include "../shared/visualtestutil.h"
+
+using namespace QQuickVisualTestUtil;
+
+class tst_qquickiconimage : public QQmlDataTest
+{
+ Q_OBJECT
+public:
+ tst_qquickiconimage();
+
+private slots:
+ void initTestCase();
+ void defaults();
+ void nameBindingSourceSize();
+ void nameBindingSourceSizeWidthHeight();
+ void nameBindingNoSizes();
+ void sourceBindingNoSizes();
+ void sourceBindingSourceSize();
+ void sourceBindingSourceSizeWidthHeight();
+ void sourceBindingSourceTooLarge();
+ void changeSourceSize();
+ void alignment_data();
+ void alignment();
+ void svgNoSizes();
+ void svgSourceBindingSourceSize();
+ void color();
+ void fileSelectors();
+ void imageProvider();
+
+private:
+ void setTheme();
+
+ qreal dpr;
+ int integerDpr;
+};
+
+static QImage grabItemToImage(QQuickItem *item)
+{
+ QSharedPointer<QQuickItemGrabResult> result = item->grabToImage();
+ QSignalSpy spy(result.data(), SIGNAL(ready()));
+ spy.wait();
+ return result->image();
+}
+
+#define SKIP_IF_DPR_TOO_HIGH() \
+ if (dpr > 2) \
+ QSKIP("Test does not support device pixel ratio greater than 2")
+
+tst_qquickiconimage::tst_qquickiconimage() :
+ dpr(qGuiApp->devicePixelRatio()),
+ integerDpr(qCeil(dpr))
+{
+}
+
+void tst_qquickiconimage::initTestCase()
+{
+ QQmlDataTest::initTestCase();
+ QIcon::setThemeName(QStringLiteral("testtheme"));
+}
+
+void tst_qquickiconimage::defaults()
+{
+ QQuickIconImage iconImage;
+ QCOMPARE(iconImage.fillMode(), QQuickImage::Pad);
+ QCOMPARE(iconImage.name(), QString());
+ QCOMPARE(iconImage.source(), QUrl());
+ QCOMPARE(iconImage.color(), QColor(Qt::transparent));
+}
+
+void tst_qquickiconimage::nameBindingSourceSize()
+{
+ // We can't have images for every DPR.
+ SKIP_IF_DPR_TOO_HIGH();
+
+ QQuickView view(testFileUrl("nameBindingSourceSize.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject()->childItems().at(0));
+ QVERIFY(iconImage);
+
+ QQuickItem *image = view.rootObject()->childItems().at(1);
+ QVERIFY(image);
+
+ QCOMPARE(grabItemToImage(iconImage), grabItemToImage(image));
+ QCOMPARE(iconImage->sourceSize().width(), 22);
+ QCOMPARE(iconImage->sourceSize().height(), 22);
+ QCOMPARE(iconImage->implicitWidth(), 22.0);
+ QCOMPARE(iconImage->implicitHeight(), 22.0);
+ QCOMPARE(iconImage->width(), 22.0);
+ QCOMPARE(iconImage->height(), 22.0);
+
+ // The requested width of 16 is less than the pixmap's size on disk which
+ // is 22x22. Our default fillMode, Pad, would result in the image being clipped,
+ // so instead we change the fillMode to PreserveAspectFit. Doing so causes
+ // QQuickImage::updatePaintedGeometry() to set our implicit size to 22x16 to
+ // ensure that the aspect ratio is respected. Since we have no explicit height,
+ // the height (previously 22) becomes the implicit height (16).
+ iconImage->setWidth(16.0);
+ QCOMPARE(iconImage->fillMode(), QQuickImage::PreserveAspectFit);
+ QCOMPARE(iconImage->sourceSize().width(), 22);
+ QCOMPARE(iconImage->sourceSize().height(), 22);
+ QCOMPARE(iconImage->implicitWidth(), 22.0);
+ QCOMPARE(iconImage->implicitHeight(), 16.0);
+ QCOMPARE(iconImage->width(), 16.0);
+ QCOMPARE(iconImage->height(), 16.0);
+}
+
+void tst_qquickiconimage::nameBindingSourceSizeWidthHeight()
+{
+ SKIP_IF_DPR_TOO_HIGH();
+
+ QQuickView view(testFileUrl("nameBindingSourceSizeWidthHeight.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject());
+ QVERIFY(iconImage);
+ QCOMPARE(iconImage->sourceSize().width(), 22);
+ QCOMPARE(iconImage->sourceSize().height(), 22);
+ QCOMPARE(iconImage->implicitWidth(), 22.0);
+ QCOMPARE(iconImage->implicitHeight(), 22.0);
+ QCOMPARE(iconImage->width(), 16.0);
+ QCOMPARE(iconImage->height(), 16.0);
+}
+
+void tst_qquickiconimage::nameBindingNoSizes()
+{
+ SKIP_IF_DPR_TOO_HIGH();
+
+ QQuickView view(testFileUrl("nameBindingNoSizes.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject());
+ QVERIFY(iconImage);
+ // The smallest available size will be chosen.
+ QCOMPARE(iconImage->sourceSize().width(), 16);
+ QCOMPARE(iconImage->sourceSize().height(), 16);
+ QCOMPARE(iconImage->implicitWidth(), 16.0);
+ QCOMPARE(iconImage->implicitHeight(), 16.0);
+ QCOMPARE(iconImage->width(), 16.0);
+ QCOMPARE(iconImage->height(), 16.0);
+}
+
+void tst_qquickiconimage::sourceBindingNoSizes()
+{
+ SKIP_IF_DPR_TOO_HIGH();
+
+ QQuickView view(testFileUrl("sourceBindingNoSizes.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject()->childItems().at(0));
+ QVERIFY(iconImage);
+
+ QQuickItem *image = view.rootObject()->childItems().at(1);
+ QVERIFY(image);
+
+ QCOMPARE(iconImage->sourceSize().width(), 22 * integerDpr);
+ QCOMPARE(iconImage->sourceSize().height(), 22 * integerDpr);
+ QCOMPARE(iconImage->implicitWidth(), 22.0);
+ QCOMPARE(iconImage->implicitHeight(), 22.0);
+ QCOMPARE(iconImage->width(), 22.0);
+ QCOMPARE(iconImage->height(), 22.0);
+ QCOMPARE(grabItemToImage(iconImage), grabItemToImage(image));
+}
+
+void tst_qquickiconimage::sourceBindingSourceSize()
+{
+ SKIP_IF_DPR_TOO_HIGH();
+
+ QQuickView view(testFileUrl("sourceBindingSourceSize.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject()->childItems().at(0));
+ QVERIFY(iconImage);
+
+ QQuickItem *image = view.rootObject()->childItems().at(1);
+ QVERIFY(image);
+
+ QCOMPARE(iconImage->sourceSize().width(), 22);
+ QCOMPARE(iconImage->sourceSize().height(), 22);
+ QCOMPARE(iconImage->implicitWidth(), 22.0);
+ QCOMPARE(iconImage->implicitHeight(), 22.0);
+ QCOMPARE(iconImage->width(), 22.0);
+ QCOMPARE(iconImage->height(), 22.0);
+ QCOMPARE(grabItemToImage(iconImage), grabItemToImage(image));
+
+ // Changing width and height should not affect sourceSize.
+ iconImage->setWidth(50);
+ QCOMPARE(iconImage->sourceSize().width(), 22);
+ QCOMPARE(iconImage->sourceSize().height(), 22);
+ iconImage->setHeight(50);
+ QCOMPARE(iconImage->sourceSize().width(), 22);
+ QCOMPARE(iconImage->sourceSize().height(), 22);
+}
+
+void tst_qquickiconimage::sourceBindingSourceSizeWidthHeight()
+{
+ SKIP_IF_DPR_TOO_HIGH();
+
+ QQuickView view(testFileUrl("sourceBindingSourceSizeWidthHeight.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject());
+ QVERIFY(iconImage);
+ QCOMPARE(iconImage->sourceSize().width(), 22);
+ QCOMPARE(iconImage->sourceSize().height(), 22);
+ QCOMPARE(iconImage->implicitWidth(), 22.0);
+ QCOMPARE(iconImage->implicitHeight(), 22.0);
+ QCOMPARE(iconImage->width(), 16.0);
+ QCOMPARE(iconImage->height(), 16.0);
+}
+
+void tst_qquickiconimage::sourceBindingSourceTooLarge()
+{
+ SKIP_IF_DPR_TOO_HIGH();
+
+ QQuickView view(testFileUrl("sourceBindingSourceTooLarge.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject());
+ QVERIFY(iconImage);
+ QCOMPARE(iconImage->sourceSize().width(), 32);
+ QCOMPARE(iconImage->sourceSize().height(), 32);
+ QCOMPARE(iconImage->implicitWidth(), 22.0);
+ QCOMPARE(iconImage->implicitHeight(), 22.0);
+ QCOMPARE(iconImage->width(), 22.0);
+ QCOMPARE(iconImage->height(), 22.0);
+}
+
+void tst_qquickiconimage::alignment_data()
+{
+ QTest::addColumn<QQuickImage::HAlignment>("horizontalAlignment");
+ QTest::addColumn<QQuickImage::VAlignment>("verticalAlignment");
+
+ QTest::newRow("AlignLeft,AlignTop") << QQuickImage::AlignLeft << QQuickImage::AlignTop;
+ QTest::newRow("AlignLeft,AlignVCenter") << QQuickImage::AlignLeft << QQuickImage::AlignVCenter;
+ QTest::newRow("AlignLeft,AlignBottom") << QQuickImage::AlignLeft << QQuickImage::AlignBottom;
+ QTest::newRow("AlignHCenter,AlignTop") << QQuickImage::AlignHCenter << QQuickImage::AlignTop;
+ QTest::newRow("AlignHCenter,AlignVCenter") << QQuickImage::AlignHCenter << QQuickImage::AlignVCenter;
+ QTest::newRow("AlignHCenter,AlignBottom") << QQuickImage::AlignHCenter << QQuickImage::AlignBottom;
+ QTest::newRow("AlignRight,AlignTop") << QQuickImage::AlignRight << QQuickImage::AlignTop;
+ QTest::newRow("AlignRight,AlignVCenter") << QQuickImage::AlignRight << QQuickImage::AlignVCenter;
+ QTest::newRow("AlignRight,AlignBottom") << QQuickImage::AlignRight << QQuickImage::AlignBottom;
+}
+
+void tst_qquickiconimage::alignment()
+{
+ SKIP_IF_DPR_TOO_HIGH();
+
+ QFETCH(QQuickImage::HAlignment, horizontalAlignment);
+ QFETCH(QQuickImage::VAlignment, verticalAlignment);
+
+ QQuickView view(testFileUrl("alignment.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject()->childItems().at(0));
+ QVERIFY(iconImage);
+
+ QQuickImage *image = qobject_cast<QQuickImage*>(view.rootObject()->childItems().at(1));
+ QVERIFY(image);
+
+ // The default fillMode for IconImage is Image::Pad, so these two grabs
+ // should only be equal when the device pixel ratio is 1 or 2, as there is no
+ // @3x version of the image, and hence the Image will be upscaled
+ // and therefore blurry when the ratio is higher than 2.
+ if (qGuiApp->devicePixelRatio() <= 2)
+ QCOMPARE(grabItemToImage(iconImage), grabItemToImage(image));
+ else
+ QVERIFY(grabItemToImage(iconImage) != grabItemToImage(image));
+
+ // Check that the images are what we expect in different alignment configurations.
+ iconImage->setWidth(200);
+ iconImage->setHeight(100);
+ iconImage->setHorizontalAlignment(horizontalAlignment);
+ iconImage->setVerticalAlignment(verticalAlignment);
+ iconImage->setFillMode(QQuickImage::Pad);
+ image->setWidth(200);
+ image->setHeight(100);
+ image->setHorizontalAlignment(horizontalAlignment);
+ image->setVerticalAlignment(verticalAlignment);
+ image->setFillMode(QQuickImage::Pad);
+
+ if (qGuiApp->devicePixelRatio() <= 2)
+ QCOMPARE(grabItemToImage(iconImage), grabItemToImage(image));
+ else
+ QVERIFY(grabItemToImage(iconImage) != grabItemToImage(image));
+}
+
+void tst_qquickiconimage::svgNoSizes()
+{
+#ifndef QT_SVG_LIB
+ QSKIP("This test requires qtsvg");
+#else
+ QQuickView view(testFileUrl("svgNoSizes.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject()->childItems().at(0));
+ QVERIFY(iconImage);
+
+ QQuickImage *image = qobject_cast<QQuickImage*>(view.rootObject()->childItems().at(1));
+ QVERIFY(image);
+
+ QCOMPARE(iconImage->sourceSize().width(), 48);
+ QCOMPARE(iconImage->sourceSize().height(), 48);
+ QCOMPARE(iconImage->implicitWidth(), 48.0);
+ QCOMPARE(iconImage->implicitHeight(), 48.0);
+ QCOMPARE(iconImage->width(), 48.0);
+ QCOMPARE(iconImage->height(), 48.0);
+ QCOMPARE(grabItemToImage(iconImage), grabItemToImage(image));
+#endif
+}
+
+void tst_qquickiconimage::svgSourceBindingSourceSize()
+{
+#ifndef QT_SVG_LIB
+ QSKIP("This test requires qtsvg");
+#else
+ QQuickView view(testFileUrl("alignment.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject()->childItems().at(0));
+ QVERIFY(iconImage);
+
+ QQuickImage *image = qobject_cast<QQuickImage*>(view.rootObject()->childItems().at(1));
+ QVERIFY(image);
+
+ QCOMPARE(iconImage->sourceSize().width(), 22);
+ QCOMPARE(iconImage->sourceSize().height(), 22);
+ QCOMPARE(iconImage->implicitWidth(), 22.0);
+ QCOMPARE(iconImage->implicitHeight(), 22.0);
+ QCOMPARE(iconImage->width(), 22.0);
+ QCOMPARE(iconImage->height(), 22.0);
+ QCOMPARE(grabItemToImage(iconImage), grabItemToImage(image));
+#endif
+}
+
+void tst_qquickiconimage::color()
+{
+ SKIP_IF_DPR_TOO_HIGH();
+
+ QQuickView view(testFileUrl("color.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject()->childItems().at(0));
+ QVERIFY(iconImage);
+
+ QQuickImage *image = qobject_cast<QQuickImage*>(view.rootObject()->childItems().at(1));
+ QVERIFY(image);
+
+ QImage iconImageWindowGrab = grabItemToImage(iconImage);
+ QCOMPARE(iconImageWindowGrab, grabItemToImage(image));
+
+ // Transparent pixels should remain transparent.
+ QCOMPARE(iconImageWindowGrab.pixelColor(0, 0), QColor(0, 0, 0, 0));
+
+ // Set a color after component completion.
+ iconImage->setColor(QColor(Qt::green));
+ iconImageWindowGrab = grabItemToImage(iconImage);
+ const QPoint centerPixelPos(11, 11);
+ QCOMPARE(iconImageWindowGrab.pixelColor(centerPixelPos), QColor(Qt::green));
+
+ // Set a semi-transparent color after component completion.
+ iconImage->setColor(QColor(0, 0, 255, 127));
+ iconImageWindowGrab = grabItemToImage(iconImage);
+ QCOMPARE(iconImageWindowGrab.pixelColor(centerPixelPos).red(), 0);
+ QCOMPARE(iconImageWindowGrab.pixelColor(centerPixelPos).green(), 0);
+ QCOMPARE(iconImageWindowGrab.pixelColor(centerPixelPos).blue(), 255);
+ QCOMPARE(iconImageWindowGrab.pixelColor(centerPixelPos).alpha(), 127);
+}
+
+void tst_qquickiconimage::changeSourceSize()
+{
+ QQuickView view(testFileUrl("sourceBindingSourceSize.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject()->childItems().at(0));
+ QVERIFY(iconImage);
+
+ // Ensure that there isn't any infinite recursion when trying to change the sourceSize.
+ QSize sourceSize = iconImage->sourceSize();
+ sourceSize.setWidth(sourceSize.width() - 1);
+ iconImage->setSourceSize(sourceSize);
+}
+
+
+void tst_qquickiconimage::fileSelectors()
+{
+ SKIP_IF_DPR_TOO_HIGH();
+
+ QQuickView view;
+ QQmlFileSelector* fileSelector = new QQmlFileSelector(view.engine());
+ fileSelector->setExtraSelectors(QStringList() << "testselector");
+ view.setSource(testFileUrl("fileSelectors.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject()->childItems().at(0));
+ QVERIFY(iconImage);
+
+ QQuickItem *image = view.rootObject()->childItems().at(1);
+ QVERIFY(image);
+
+ QImage iconImageWindowGrab = grabItemToImage(iconImage);
+ QCOMPARE(iconImageWindowGrab, grabItemToImage(image));
+
+ QCOMPARE(iconImageWindowGrab.pixelColor(iconImageWindowGrab.width() / 2, iconImageWindowGrab.height() / 2), QColor(Qt::blue));
+}
+
+class TestImageProvider : public QQuickImageProvider
+{
+public:
+ TestImageProvider() : QQuickImageProvider(QQuickImageProvider::Pixmap) { }
+
+ QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
+ {
+ QSize defaultSize(32, 32);
+ if (size)
+ *size = defaultSize;
+
+ QPixmap pixmap(requestedSize.width() > 0 ? requestedSize.width() : defaultSize.width(),
+ requestedSize.height() > 0 ? requestedSize.height() : defaultSize.height());
+ pixmap.fill(QColor(id).rgba());
+ return pixmap;
+ }
+};
+
+// don't crash (QTBUG-63959)
+void tst_qquickiconimage::imageProvider()
+{
+ QQuickView view;
+ view.engine()->addImageProvider("provider", new TestImageProvider);
+ view.setSource(testFileUrl("imageProvider.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickIconImage *iconImage = qobject_cast<QQuickIconImage*>(view.rootObject()->findChild<QQuickIconImage *>());
+ QVERIFY(iconImage);
+
+ QImage image = grabItemToImage(iconImage);
+ QVERIFY(!image.isNull());
+ QCOMPARE(image.pixelColor(image.width() / 2, image.height() / 2), QColor(Qt::red));
+}
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+ QGuiApplication app(argc, argv);
+ Q_UNUSED(app);
+ tst_qquickiconimage test;
+ QTEST_SET_MAIN_SOURCE_PATH
+ return QTest::qExec(&test, argc, argv);
+}
+
+#include "tst_qquickiconimage.moc"
diff --git a/tests/auto/qquickiconlabel/data/colorChanges.qml b/tests/auto/qquickiconlabel/data/colorChanges.qml
new file mode 100644
index 00000000..6fc579f8
--- /dev/null
+++ b/tests/auto/qquickiconlabel/data/colorChanges.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
+import QtQuick.Controls.impl 2.3
+
+AbstractButton {
+ id: button
+ width: 200
+ height: 200
+ icon.source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png"
+ icon.color: enabled ? "transparent" : "red"
+
+ IconLabel {
+ icon: button.icon
+ text: button.text
+ }
+}
diff --git a/tests/auto/qquickiconlabel/data/iconlabel.qml b/tests/auto/qquickiconlabel/data/iconlabel.qml
new file mode 100644
index 00000000..97042107
--- /dev/null
+++ b/tests/auto/qquickiconlabel/data/iconlabel.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
+import QtQuick.Controls.impl 2.3
+
+AbstractButton {
+ id: button
+ width: 200
+ height: 200
+ text: "Some text"
+ icon.source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png"
+
+ IconLabel {
+ icon: button.icon
+ text: button.text
+ }
+}
diff --git a/tests/auto/qquickiconlabel/data/spacingWithOnlyIcon.qml b/tests/auto/qquickiconlabel/data/spacingWithOnlyIcon.qml
new file mode 100644
index 00000000..ccdb74e2
--- /dev/null
+++ b/tests/auto/qquickiconlabel/data/spacingWithOnlyIcon.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
+import QtQuick.Controls.impl 2.3
+
+AbstractButton {
+ id: button
+ width: 200
+ height: 200
+ icon.source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png"
+
+ IconLabel {
+ spacing: 10
+ mirrored: true
+ icon: button.icon
+ }
+}
diff --git a/tests/auto/qquickiconlabel/data/spacingWithOnlyText.qml b/tests/auto/qquickiconlabel/data/spacingWithOnlyText.qml
new file mode 100644
index 00000000..9015aa9d
--- /dev/null
+++ b/tests/auto/qquickiconlabel/data/spacingWithOnlyText.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
+import QtQuick.Controls.impl 2.3
+
+Item {
+ width: 200
+ height: 200
+
+ IconLabel {
+ spacing: 10
+ text: "Some text"
+ }
+}
diff --git a/tests/auto/qquickiconlabel/qquickiconlabel.pro b/tests/auto/qquickiconlabel/qquickiconlabel.pro
new file mode 100644
index 00000000..6b0f73b3
--- /dev/null
+++ b/tests/auto/qquickiconlabel/qquickiconlabel.pro
@@ -0,0 +1,13 @@
+CONFIG += testcase
+macos:CONFIG -= app_bundle
+TARGET = tst_qquickiconlabel
+
+QT += core gui qml quick testlib
+QT_PRIVATE += quick-private quickcontrols2-private
+
+include (../shared/util.pri)
+
+SOURCES += tst_qquickiconlabel.cpp
+
+TESTDATA += \
+ $$PWD/data/*.qml
diff --git a/tests/auto/qquickiconlabel/tst_qquickiconlabel.cpp b/tests/auto/qquickiconlabel/tst_qquickiconlabel.cpp
new file mode 100644
index 00000000..a251b471
--- /dev/null
+++ b/tests/auto/qquickiconlabel/tst_qquickiconlabel.cpp
@@ -0,0 +1,326 @@
+/****************************************************************************
+**
+** 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:GPL-EXCEPT$
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qvector.h>
+
+#include <qtest.h>
+
+#include <QtQuick/qquickitem.h>
+#include <QtQuick/qquickview.h>
+#include <QtQuick/qquickitemgrabresult.h>
+#include <QtQuick/private/qquicktext_p.h>
+#include <QtQuickTemplates2/private/qquickicon_p.h>
+#include <QtQuickControls2/private/qquickiconimage_p.h>
+#include <QtQuickControls2/private/qquickiconlabel_p.h>
+
+#include "../shared/util.h"
+#include "../shared/visualtestutil.h"
+
+using namespace QQuickVisualTestUtil;
+
+class tst_qquickiconlabel : public QQmlDataTest
+{
+ Q_OBJECT
+public:
+ tst_qquickiconlabel();
+
+private slots:
+ void display_data();
+ void display();
+ void spacingWithOneDelegate_data();
+ void spacingWithOneDelegate();
+ void emptyIconSource();
+ void colorChanges();
+};
+
+tst_qquickiconlabel::tst_qquickiconlabel()
+{
+}
+
+void tst_qquickiconlabel::display_data()
+{
+ QTest::addColumn<QVector<QQuickIconLabel::Display> >("displayTypes");
+ QTest::addColumn<bool>("mirrored");
+ QTest::addColumn<qreal>("labelWidth");
+ QTest::addColumn<qreal>("labelHeight");
+ QTest::addColumn<qreal>("spacing");
+
+ typedef QVector<QQuickIconLabel::Display> DisplayVector;
+ QQuickIconLabel::Display IconOnly = QQuickIconLabel::IconOnly;
+ QQuickIconLabel::Display TextOnly = QQuickIconLabel::TextOnly;
+ QQuickIconLabel::Display TextUnderIcon = QQuickIconLabel::TextUnderIcon;
+ QQuickIconLabel::Display TextBesideIcon = QQuickIconLabel::TextBesideIcon;
+
+ QTest::addRow("IconOnly") << (DisplayVector() << IconOnly) << false << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextOnly") << (DisplayVector() << TextOnly) << false << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextUnderIcon") << (DisplayVector() << TextUnderIcon) << false << -1.0 << -1.0 << 10.0;
+ QTest::addRow("TextBesideIcon") << (DisplayVector() << TextBesideIcon) << false << -1.0 << -1.0 << 10.0;
+ QTest::addRow("IconOnly, spacing=10") << (DisplayVector() << IconOnly) << false << -1.0 << -1.0 << 10.0;
+ QTest::addRow("TextOnly, spacing=10") << (DisplayVector() << TextOnly) << false << -1.0 << -1.0 << 10.0;
+ QTest::addRow("TextUnderIcon, spacing=10") << (DisplayVector() << TextUnderIcon) << false << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextUnderIcon => IconOnly => TextUnderIcon")
+ << (DisplayVector() << TextUnderIcon << IconOnly << TextUnderIcon) << false << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextUnderIcon => IconOnly => TextUnderIcon, labelWidth=400")
+ << (DisplayVector() << TextUnderIcon << IconOnly << TextUnderIcon) << false << 400.0 << -1.0 << 0.0;
+ QTest::addRow("TextUnderIcon => TextOnly => TextUnderIcon")
+ << (DisplayVector() << TextUnderIcon << TextOnly << TextUnderIcon) << false << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextUnderIcon => TextOnly => TextUnderIcon, labelWidth=400")
+ << (DisplayVector() << TextUnderIcon << TextOnly << TextUnderIcon) << false << 400.0 << -1.0 << 0.0;
+ QTest::addRow("TextBesideIcon, spacing=10") << (DisplayVector() << TextBesideIcon) << false << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextBesideIcon => IconOnly => TextBesideIcon")
+ << (DisplayVector() << TextBesideIcon << IconOnly << TextBesideIcon) << false << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextBesideIcon => IconOnly => TextBesideIcon, labelWidth=400")
+ << (DisplayVector() << TextBesideIcon << IconOnly << TextBesideIcon) << false << 400.0 << -1.0 << 0.0;
+ QTest::addRow("TextBesideIcon => TextOnly => TextBesideIcon")
+ << (DisplayVector() << TextBesideIcon << TextOnly << TextBesideIcon) << false << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextBesideIcon => TextOnly => TextBesideIcon, labelWidth=400")
+ << (DisplayVector() << TextBesideIcon << TextOnly << TextBesideIcon) << false << 400.0 << -1.0 << 0.0;
+ QTest::addRow("IconOnly, mirrored") << (DisplayVector() << IconOnly) << true << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextOnly, mirrored") << (DisplayVector() << TextOnly) << true << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextUnderIcon, mirrored") << (DisplayVector() << TextUnderIcon) << true << -1.0 << -1.0 << 0.0;
+ QTest::addRow("TextBesideIcon, mirrored") << (DisplayVector() << TextBesideIcon) << true << -1.0 << -1.0 << 0.0;
+}
+
+void tst_qquickiconlabel::display()
+{
+ QFETCH(QVector<QQuickIconLabel::Display>, displayTypes);
+ QFETCH(bool, mirrored);
+ QFETCH(qreal, labelWidth);
+ QFETCH(qreal, labelHeight);
+ QFETCH(qreal, spacing);
+
+ QQuickView view(testFileUrl("iconlabel.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+
+ QQuickItem *rootItem = view.rootObject();
+ QVERIFY(rootItem);
+
+ QQuickIconLabel *label = rootItem->findChild<QQuickIconLabel *>();
+ QVERIFY(label);
+ QCOMPARE(label->spacing(), 0.0);
+ QCOMPARE(label->display(), QQuickIconLabel::TextBesideIcon);
+ QCOMPARE(label->isMirrored(), false);
+
+ // Setting labelWidth allows us to test the issue where the icon's
+ // width was not updated after switching between different display types.
+ if (!qFuzzyCompare(labelWidth, -1)) {
+ label->setWidth(labelWidth);
+ QCOMPARE(label->width(), labelWidth);
+ }
+ if (!qFuzzyCompare(labelHeight, -1)) {
+ label->setHeight(labelHeight);
+ QCOMPARE(label->height(), labelHeight);
+ }
+
+ label->setMirrored(mirrored);
+ QCOMPARE(label->isMirrored(), mirrored);
+
+ label->setSpacing(spacing);
+ QCOMPARE(label->spacing(), spacing);
+
+ const qreal horizontalPadding = label->leftPadding() + label->rightPadding();
+ const qreal verticalPadding = label->topPadding() + label->bottomPadding();
+
+ // Test that the icon and text are correctly positioned and sized after
+ // setting several different display types in succession.
+ for (QQuickIconLabel::Display displayType : qAsConst(displayTypes)) {
+ label->setDisplay(displayType);
+ QCOMPARE(label->display(), displayType);
+
+ QQuickIconImage *icon = label->findChild<QQuickIconImage *>();
+ QQuickText *text = label->findChild<QQuickText *>();
+
+ const qreal horizontalCenter = label->width() / 2;
+ const qreal verticalCenter = label->height() / 2;
+
+ switch (displayType) {
+ case QQuickIconLabel::IconOnly:
+ QVERIFY(icon);
+ QVERIFY(!text);
+ QCOMPARE(icon->x(), horizontalCenter - icon->width() / 2);
+ QCOMPARE(icon->y(), verticalCenter - icon->height() / 2);
+ QCOMPARE(icon->width(), icon->implicitWidth());
+ QCOMPARE(icon->height(), icon->implicitHeight());
+ QCOMPARE(label->implicitWidth(), icon->implicitWidth() + horizontalPadding);
+ QCOMPARE(label->implicitHeight(), icon->implicitHeight() + verticalPadding);
+ break;
+ case QQuickIconLabel::TextOnly:
+ QVERIFY(!icon);
+ QVERIFY(text);
+ QCOMPARE(text->x(), horizontalCenter - text->width() / 2);
+ QCOMPARE(text->y(), verticalCenter - text->height() / 2);
+ QCOMPARE(text->width(), text->implicitWidth());
+ QCOMPARE(text->height(), text->implicitHeight());
+ QCOMPARE(label->implicitWidth(), text->implicitWidth() + horizontalPadding);
+ QCOMPARE(label->implicitHeight(), text->implicitHeight() + verticalPadding);
+ break;
+ case QQuickIconLabel::TextUnderIcon: {
+ QVERIFY(icon);
+ QVERIFY(text);
+ const qreal combinedHeight = icon->height() + label->spacing() + text->height();
+ const qreal contentY = verticalCenter - combinedHeight / 2;
+ QCOMPARE(icon->x(), horizontalCenter - icon->width() / 2);
+ QCOMPARE(icon->y(), contentY);
+ QCOMPARE(icon->width(), icon->implicitWidth());
+ QCOMPARE(icon->height(), icon->implicitHeight());
+ QCOMPARE(text->x(), horizontalCenter - text->width() / 2);
+ QCOMPARE(text->y(), contentY + icon->height() + label->spacing());
+ QCOMPARE(text->width(), text->implicitWidth());
+ QCOMPARE(text->height(), text->implicitHeight());
+ QCOMPARE(label->implicitWidth(), qMax(icon->implicitWidth(), text->implicitWidth()) + horizontalPadding);
+ QCOMPARE(label->implicitHeight(), combinedHeight + verticalPadding);
+ break;
+ }
+ case QQuickIconLabel::TextBesideIcon:
+ default:
+ QVERIFY(icon);
+ QVERIFY(text);
+ const qreal combinedWidth = icon->width() + label->spacing() + text->width();
+ const qreal contentX = horizontalCenter - combinedWidth / 2;
+ QCOMPARE(icon->x(), contentX + (label->isMirrored() ? text->width() + label->spacing() : 0));
+ QCOMPARE(icon->y(), verticalCenter - icon->height() / 2);
+ QCOMPARE(icon->width(), icon->implicitWidth());
+ QCOMPARE(icon->height(), icon->implicitHeight());
+ QCOMPARE(text->x(), contentX + (label->isMirrored() ? 0 : icon->width() + label->spacing()));
+ QCOMPARE(text->y(), verticalCenter - text->height() / 2);
+ QCOMPARE(text->width(), text->implicitWidth());
+ QCOMPARE(text->height(), text->implicitHeight());
+ QCOMPARE(label->implicitWidth(), combinedWidth + horizontalPadding);
+ QCOMPARE(label->implicitHeight(), qMax(icon->implicitHeight(), text->implicitHeight()) + verticalPadding);
+ break;
+ }
+ }
+}
+
+void tst_qquickiconlabel::spacingWithOneDelegate_data()
+{
+ QTest::addColumn<QString>("qmlFileName");
+
+ QTest::addRow("spacingWithOnlyIcon") << QStringLiteral("spacingWithOnlyIcon.qml");
+ QTest::addRow("spacingWithOnlyText") << QStringLiteral("spacingWithOnlyText.qml");
+}
+
+void tst_qquickiconlabel::spacingWithOneDelegate()
+{
+ QFETCH(QString, qmlFileName);
+
+ QQuickView view(testFileUrl(qmlFileName));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+
+ QQuickItem *rootItem = view.rootObject();
+ QVERIFY(rootItem);
+
+ QQuickIconLabel *label = rootItem->findChild<QQuickIconLabel *>();
+ QVERIFY(label);
+ QQuickItem *delegate = nullptr;
+ if (!label->icon().isEmpty()) {
+ QVERIFY(!label->findChild<QQuickText *>());
+ delegate = label->findChild<QQuickIconImage *>();
+ } else {
+ QVERIFY(!label->findChild<QQuickIconImage *>());
+ delegate = label->findChild<QQuickText *>();
+ }
+
+ QVERIFY(delegate);
+ QCOMPARE(delegate->x(), 0.0);
+ QCOMPARE(delegate->width(), label->width());
+}
+
+void tst_qquickiconlabel::emptyIconSource()
+{
+ QQuickView view(testFileUrl("iconlabel.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+
+ QQuickItem *rootItem = view.rootObject();
+ QVERIFY(rootItem);
+
+ QQuickIconLabel *label = rootItem->findChild<QQuickIconLabel *>();
+ QVERIFY(label);
+ QCOMPARE(label->spacing(), 0.0);
+ QCOMPARE(label->display(), QQuickIconLabel::TextBesideIcon);
+ QCOMPARE(label->isMirrored(), false);
+
+ QQuickItem *icon = label->findChild<QQuickIconImage *>();
+ QVERIFY(icon);
+
+ QQuickItem *text = label->findChild<QQuickText *>();
+ QVERIFY(text);
+ qreal horizontalCenter = label->width() / 2;
+ const qreal combinedWidth = icon->width() + text->width();
+ const qreal contentX = horizontalCenter - combinedWidth / 2;
+ // The text should be positioned next to an item.
+ QCOMPARE(text->x(), contentX + icon->width() + label->spacing());
+
+ // Now give the label an explicit width large enough so that implicit size
+ // changes in its children don't affect its implicit size.
+ label->setWidth(label->implicitWidth() + 200);
+ label->setHeight(label->implicitWidth() + 100);
+ QVERIFY(icon->property("source").isValid());
+ label->setIcon(QQuickIcon());
+ QVERIFY(!label->findChild<QQuickIconImage *>());
+ horizontalCenter = label->width() / 2;
+ QCOMPARE(text->x(), horizontalCenter - text->width() / 2);
+}
+
+void tst_qquickiconlabel::colorChanges()
+{
+ QQuickView view(testFileUrl("colorChanges.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+
+ QQuickItem *rootItem = view.rootObject();
+ QVERIFY(rootItem);
+
+ QQuickIconLabel *label = rootItem->findChild<QQuickIconLabel *>();
+ QVERIFY(label);
+ QCOMPARE(label->spacing(), 0.0);
+ QCOMPARE(label->display(), QQuickIconLabel::TextBesideIcon);
+ QCOMPARE(label->isMirrored(), false);
+
+ QSharedPointer<QQuickItemGrabResult> grabResult = label->grabToImage();
+ QTRY_VERIFY(!grabResult->image().isNull());
+ const QImage enabledImageGrab = grabResult->image();
+
+ // The color should change to "red" when the item is disabled.
+ rootItem->setEnabled(false);
+
+ grabResult = label->grabToImage();
+ QTRY_VERIFY(!grabResult->image().isNull());
+ QVERIFY(grabResult->image() != enabledImageGrab);
+}
+
+QTEST_MAIN(tst_qquickiconlabel)
+
+#include "tst_qquickiconlabel.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/auto/qquickmaterialstyleconf/qtquickcontrols2.conf b/tests/auto/qquickmaterialstyleconf/qtquickcontrols2.conf
index 78634834..30cee878 100644
--- a/tests/auto/qquickmaterialstyleconf/qtquickcontrols2.conf
+++ b/tests/auto/qquickmaterialstyleconf/qtquickcontrols2.conf
@@ -4,3 +4,7 @@ Style=Material
[Material]
Background=#444444
Foreground=Red
+Font\PixelSize=22
+
+[Material\Font]
+Family=Courier
diff --git a/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp b/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp
index cc81afea..17d1ea6d 100644
--- a/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp
+++ b/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp
@@ -55,16 +55,22 @@ void tst_qquickmaterialstyleconf::conf()
{
QQuickApplicationHelper helper(this, QLatin1String("applicationwindow.qml"));
+ QFont customFont;
+ customFont.setFamily("Courier");
+ customFont.setPixelSize(22);
+
QQuickApplicationWindow *window = helper.appWindow;
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
- // We specified a custom background color, so the window should have it.
+ // We specified a custom background color and font, so the window should have them.
QCOMPARE(window->property("color").value<QColor>(), QColor("#444444"));
+ QCOMPARE(window->property("font").value<QFont>(), customFont);
- // We specified a custom foreground color, so the label should have it.
+ // We specified a custom foreground color and font, so the label should have them.
QQuickItem *label = window->property("label").value<QQuickItem*>();
QVERIFY(label);
QCOMPARE(label->property("color").value<QColor>(), QColor("#F44336"));
+ QCOMPARE(label->property("font").value<QFont>(), customFont);
}
QTEST_MAIN(tst_qquickmaterialstyleconf)
diff --git a/tests/auto/qquickmenu/data/actions.qml b/tests/auto/qquickmenu/data/actions.qml
new file mode 100644
index 00000000..0ec9f36c
--- /dev/null
+++ b/tests/auto/qquickmenu/data/actions.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
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias menu: menu
+
+ Menu {
+ id: menu
+ Action { text: "action1" }
+ MenuItem { text: "menuitem2" }
+ Action { text: "action3" }
+ MenuItem { text: "menuitem4" }
+ }
+}
diff --git a/tests/auto/qquickmenu/data/mnemonics.qml b/tests/auto/qquickmenu/data/mnemonics.qml
new file mode 100644
index 00000000..de4cd215
--- /dev/null
+++ b/tests/auto/qquickmenu/data/mnemonics.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.6
+import QtQuick.Controls 2.3
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias menu: menu
+ property alias action: action
+ property alias menuItem: menuItem
+ property alias subMenu: subMenu
+ property alias subMenuItem: subMenuItem
+
+ Menu {
+ id: menu
+
+ Action {
+ id: action
+ text: "&Action"
+ }
+
+ MenuItem {
+ id: menuItem
+ text: "Menu &Item"
+ }
+
+ Menu {
+ id: subMenu
+ title: "Sub &Menu"
+
+ MenuItem {
+ id: subMenuItem
+ text: "&Sub Menu Item"
+ }
+ }
+ }
+}
diff --git a/tests/auto/qquickmenu/data/popup.qml b/tests/auto/qquickmenu/data/popup.qml
new file mode 100644
index 00000000..6040e8ba
--- /dev/null
+++ b/tests/auto/qquickmenu/data/popup.qml
@@ -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$
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias menu: menu
+ property alias menuItem1: menuItem1
+ property alias menuItem2: menuItem2
+ property alias menuItem3: menuItem3
+ property alias button: button
+
+ function popupAtCursor() {
+ menu.popup()
+ }
+
+ function popupAtPos(pos) {
+ menu.popup(pos)
+ }
+
+ function popupAtCoord(x, y) {
+ menu.popup(x, y)
+ }
+
+ function popupItemAtCursor(item) {
+ menu.popup(item)
+ }
+
+ function popupItemAtPos(pos, item) {
+ menu.popup(pos, item)
+ }
+
+ function popupItemAtCoord(x, y, item) {
+ menu.popup(x, y, item)
+ }
+
+ function popupAtParentCursor(parent) {
+ menu.popup(parent)
+ }
+
+ function popupAtParentPos(parent, pos) {
+ menu.popup(parent, pos)
+ }
+
+ function popupAtParentCoord(parent, x, y) {
+ menu.popup(parent, x, y)
+ }
+
+ function popupItemAtParentCursor(parent, item) {
+ menu.popup(parent, item)
+ }
+
+ function popupItemAtParentPos(parent, pos, item) {
+ menu.popup(parent, pos, item)
+ }
+
+ function popupItemAtParentCoord(parent, x, y, item) {
+ menu.popup(parent, x, y, item)
+ }
+
+ Menu {
+ id: menu
+ MenuItem { id: menuItem1; text: "Foo" }
+ MenuItem { id: menuItem2; text: "Bar" }
+ MenuItem { id: menuItem3; text: "Baz" }
+ }
+
+ Button {
+ id: button
+ text: "Button"
+ anchors.centerIn: parent
+ }
+}
diff --git a/tests/auto/qquickmenu/data/removeTakeItem.qml b/tests/auto/qquickmenu/data/removeTakeItem.qml
new file mode 100644
index 00000000..89090fb6
--- /dev/null
+++ b/tests/auto/qquickmenu/data/removeTakeItem.qml
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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
+
+ApplicationWindow {
+ width: 200
+ height: 200
+
+ property alias menu: menu
+ property alias menuItem1: menuItem1
+ property alias menuItem2: menuItem2
+ property alias menuItem3: menuItem3
+
+ function takeSecondItem() {
+ return menu.takeItem(1)
+ }
+
+ function removeFirstItem() {
+ menu.removeItem(menuItem1)
+ }
+
+ function removeNullItem() {
+ menu.removeItem(null)
+ }
+
+ function removeFirstIndex() {
+ menu.removeItem(0)
+ }
+
+ Menu {
+ id: menu
+ MenuItem {
+ id: menuItem1
+ }
+ MenuItem {
+ id: menuItem2
+ }
+ MenuItem {
+ id: menuItem3
+ }
+ }
+}
diff --git a/tests/auto/qquickmenu/data/subMenus.qml b/tests/auto/qquickmenu/data/subMenus.qml
new file mode 100644
index 00000000..49811bc2
--- /dev/null
+++ b/tests/auto/qquickmenu/data/subMenus.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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
+
+ApplicationWindow {
+ width: 600
+ height: 400
+
+ property alias mainMenu: mainMenu
+ property alias subMenu1: subMenu1
+ property alias subMenu2: subMenu2
+ property alias subSubMenu1: subSubMenu1
+
+ Menu {
+ id: mainMenu
+ MenuItem { id: mainMenuItem1; text: "Main 1" }
+
+ Menu {
+ id: subMenu1
+ title: "Sub Menu 1"
+ MenuItem { id: subMenuItem1; text: "Sub 1" }
+ MenuItem { id: subMenuItem2; text: "Sub 2" }
+
+ Menu {
+ id: subSubMenu1
+ title: "Sub Sub Menu 1"
+ MenuItem { id: subSubMenuItem1; text: "Sub Sub 1" }
+ MenuItem { id: subSubMenuItem2; text: "Sub Sub 2" }
+ }
+ }
+
+ MenuItem { id: mainMenuItem2; text: "Main 2" }
+
+ Menu {
+ id: subMenu2
+ title: "Sub Menu 2"
+ MenuItem { id: subMenuItem3; text: "Sub 3" }
+ MenuItem { id: subMenuItem4; text: "Sub 4" }
+ }
+
+ MenuItem { id: mainMenuItem3; text: "Main 3" }
+ }
+}
diff --git a/tests/auto/qquickmenu/tst_qquickmenu.cpp b/tests/auto/qquickmenu/tst_qquickmenu.cpp
index 717e892b..1202072b 100644
--- a/tests/auto/qquickmenu/tst_qquickmenu.cpp
+++ b/tests/auto/qquickmenu/tst_qquickmenu.cpp
@@ -36,6 +36,7 @@
#include <qtest.h>
#include <QtTest/QSignalSpy>
+#include <QtGui/qcursor.h>
#include <QtGui/qstylehints.h>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
@@ -45,6 +46,7 @@
#include "../shared/util.h"
#include "../shared/visualtestutil.h"
+#include <QtQuickTemplates2/private/qquickaction_p.h>
#include <QtQuickTemplates2/private/qquickapplicationwindow_p.h>
#include <QtQuickTemplates2/private/qquickoverlay_p.h>
#include <QtQuickTemplates2/private/qquickbutton_p.h>
@@ -62,14 +64,26 @@ public:
private slots:
void defaults();
+ void count();
void mouse();
void pressAndHold();
void contextMenuKeyboard();
+ void mnemonics();
void menuButton();
void addItem();
void menuSeparator();
void repeater();
void order();
+ void popup();
+ void actions();
+ void removeTakeItem();
+ void subMenuMouse_data();
+ void subMenuMouse();
+ void subMenuKeyboard_data();
+ void subMenuKeyboard();
+ void subMenuPosition_data();
+ void subMenuPosition();
+ void addRemoveSubMenus();
};
void tst_QQuickMenu::defaults()
@@ -78,16 +92,52 @@ void tst_QQuickMenu::defaults()
QQuickMenu *emptyMenu = helper.appWindow->property("emptyMenu").value<QQuickMenu*>();
QCOMPARE(emptyMenu->isVisible(), false);
+ QCOMPARE(emptyMenu->currentIndex(), -1);
QCOMPARE(emptyMenu->contentItem()->property("currentIndex"), QVariant(-1));
+ QCOMPARE(emptyMenu->count(), 0);
+}
+
+void tst_QQuickMenu::count()
+{
+ QQuickApplicationHelper helper(this, QLatin1String("applicationwindow.qml"));
+
+ QQuickMenu *menu = helper.window->property("emptyMenu").value<QQuickMenu*>();
+ QVERIFY(menu);
+
+ QSignalSpy countSpy(menu, &QQuickMenu::countChanged);
+ QVERIFY(countSpy.isValid());
+
+ menu->addItem(new QQuickItem);
+ QCOMPARE(menu->count(), 1);
+ QCOMPARE(countSpy.count(), 1);
+
+ menu->insertItem(0, new QQuickItem);
+ QCOMPARE(menu->count(), 2);
+ QCOMPARE(countSpy.count(), 2);
+
+ menu->removeItem(menu->itemAt(1));
+ QCOMPARE(menu->count(), 1);
+ QCOMPARE(countSpy.count(), 3);
+
+ QQuickItem *item = menu->takeItem(0);
+ QVERIFY(item);
+ QCOMPARE(menu->count(), 0);
+ QCOMPARE(countSpy.count(), 4);
}
void tst_QQuickMenu::mouse()
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Mouse hovering not functional on offscreen/minimal platforms");
+
QQuickApplicationHelper helper(this, QLatin1String("applicationwindow.qml"));
QQuickApplicationWindow *window = helper.appWindow;
window->show();
QVERIFY(QTest::qWaitForWindowActive(window));
+ centerOnScreen(window);
+ moveMouseAway(window);
QQuickMenu *menu = window->property("menu").value<QQuickMenu*>();
menu->open();
@@ -103,6 +153,7 @@ void tst_QQuickMenu::mouse()
// so that the highlight acts as a way of illustrating press state.
QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(firstItem->width() / 2, firstItem->height() / 2));
QVERIFY(firstItem->hasActiveFocus());
+ QCOMPARE(menu->currentIndex(), 0);
QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(0));
QVERIFY(menu->isVisible());
@@ -112,6 +163,7 @@ void tst_QQuickMenu::mouse()
QCOMPARE(visibleSpy.count(), 1);
QVERIFY(!menu->isVisible());
QVERIFY(!window->overlay()->childItems().contains(menu->contentItem()));
+ QCOMPARE(menu->currentIndex(), -1);
QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(-1));
menu->open();
@@ -133,6 +185,21 @@ void tst_QQuickMenu::mouse()
QVERIFY(menu->isVisible());
QVERIFY(window->overlay()->childItems().contains(menu->contentItem()->parentItem()));
+ // Hover-highlight through the menu items one by one
+ QQuickItem *prevHoverItem = nullptr;
+ QQuickItem *listView = menu->contentItem();
+ for (int y = 0; y < listView->height(); ++y) {
+ QQuickItem *hoverItem = nullptr;
+ QVERIFY(QMetaObject::invokeMethod(listView, "itemAt", Q_RETURN_ARG(QQuickItem *, hoverItem), Q_ARG(qreal, 0), Q_ARG(qreal, listView->property("contentY").toReal() + y)));
+ if (!hoverItem || !hoverItem->isVisible() || hoverItem == prevHoverItem)
+ continue;
+ QTest::mouseMove(window, QPoint(hoverItem->x() + hoverItem->width() / 2, hoverItem->y() + hoverItem->height() / 2));
+ QTRY_VERIFY(hoverItem->property("highlighted").toBool());
+ if (prevHoverItem)
+ QVERIFY(!prevHoverItem->property("highlighted").toBool());
+ prevHoverItem = hoverItem;
+ }
+
// Try pressing within the menu and releasing outside of it; it should close.
// TODO: won't work until QQuickPopup::releasedOutside() actually gets emitted
// QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(firstItem->width() / 2, firstItem->height() / 2));
@@ -183,8 +250,11 @@ void tst_QQuickMenu::contextMenuKeyboard()
window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
+ centerOnScreen(window);
+ moveMouseAway(window);
QQuickMenu *menu = window->property("menu").value<QQuickMenu*>();
+ QCOMPARE(menu->currentIndex(), -1);
QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(-1));
QQuickMenuItem *firstItem = qobject_cast<QQuickMenuItem *>(menu->itemAt(0));
@@ -197,12 +267,16 @@ void tst_QQuickMenu::contextMenuKeyboard()
QVERIFY(menu->isVisible());
QVERIFY(window->overlay()->childItems().contains(menu->contentItem()->parentItem()));
QVERIFY(!firstItem->hasActiveFocus());
+ QVERIFY(!firstItem->property("highlighted").toBool());
+ QCOMPARE(menu->currentIndex(), -1);
QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(-1));
QTest::keyClick(window, Qt::Key_Tab);
QVERIFY(firstItem->hasActiveFocus());
QVERIFY(firstItem->hasVisualFocus());
+ QVERIFY(firstItem->isHighlighted());
QCOMPARE(firstItem->focusReason(), Qt::TabFocusReason);
+ QCOMPARE(menu->currentIndex(), 0);
QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(0));
QQuickMenuItem *secondItem = qobject_cast<QQuickMenuItem *>(menu->itemAt(1));
@@ -210,9 +284,12 @@ void tst_QQuickMenu::contextMenuKeyboard()
QTest::keyClick(window, Qt::Key_Tab);
QVERIFY(!firstItem->hasActiveFocus());
QVERIFY(!firstItem->hasVisualFocus());
+ QVERIFY(!firstItem->isHighlighted());
QVERIFY(secondItem->hasActiveFocus());
QVERIFY(secondItem->hasVisualFocus());
+ QVERIFY(secondItem->isHighlighted());
QCOMPARE(secondItem->focusReason(), Qt::TabFocusReason);
+ QCOMPARE(menu->currentIndex(), 1);
QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(1));
QSignalSpy secondTriggeredSpy(secondItem, SIGNAL(triggered()));
@@ -223,8 +300,11 @@ void tst_QQuickMenu::contextMenuKeyboard()
QVERIFY(!window->overlay()->childItems().contains(menu->contentItem()));
QVERIFY(!firstItem->hasActiveFocus());
QVERIFY(!firstItem->hasVisualFocus());
+ QVERIFY(!firstItem->isHighlighted());
QVERIFY(!secondItem->hasActiveFocus());
QVERIFY(!secondItem->hasVisualFocus());
+ QVERIFY(!secondItem->isHighlighted());
+ QCOMPARE(menu->currentIndex(), -1);
QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(-1));
menu->open();
@@ -233,18 +313,23 @@ void tst_QQuickMenu::contextMenuKeyboard()
QVERIFY(window->overlay()->childItems().contains(menu->contentItem()->parentItem()));
QVERIFY(!firstItem->hasActiveFocus());
QVERIFY(!firstItem->hasVisualFocus());
+ QVERIFY(!firstItem->isHighlighted());
QVERIFY(!secondItem->hasActiveFocus());
QVERIFY(!secondItem->hasVisualFocus());
+ QVERIFY(!secondItem->isHighlighted());
+ QCOMPARE(menu->currentIndex(), -1);
QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(-1));
QTest::keyClick(window, Qt::Key_Down);
QVERIFY(firstItem->hasActiveFocus());
QVERIFY(firstItem->hasVisualFocus());
+ QVERIFY(firstItem->isHighlighted());
QCOMPARE(firstItem->focusReason(), Qt::TabFocusReason);
QTest::keyClick(window, Qt::Key_Down);
QVERIFY(secondItem->hasActiveFocus());
QVERIFY(secondItem->hasVisualFocus());
+ QVERIFY(secondItem->isHighlighted());
QCOMPARE(secondItem->focusReason(), Qt::TabFocusReason);
QTest::keyClick(window, Qt::Key_Down);
@@ -252,45 +337,105 @@ void tst_QQuickMenu::contextMenuKeyboard()
QVERIFY(thirdItem);
QVERIFY(!firstItem->hasActiveFocus());
QVERIFY(!firstItem->hasVisualFocus());
+ QVERIFY(!firstItem->isHighlighted());
QVERIFY(!secondItem->hasActiveFocus());
QVERIFY(!secondItem->hasVisualFocus());
+ QVERIFY(!secondItem->isHighlighted());
QVERIFY(thirdItem->hasActiveFocus());
QVERIFY(thirdItem->hasVisualFocus());
+ QVERIFY(thirdItem->isHighlighted());
QCOMPARE(thirdItem->focusReason(), Qt::TabFocusReason);
// Key navigation shouldn't wrap by default.
QTest::keyClick(window, Qt::Key_Down);
QVERIFY(!firstItem->hasActiveFocus());
QVERIFY(!firstItem->hasVisualFocus());
+ QVERIFY(!firstItem->isHighlighted());
QVERIFY(!secondItem->hasActiveFocus());
QVERIFY(!secondItem->hasVisualFocus());
+ QVERIFY(!secondItem->isHighlighted());
QVERIFY(thirdItem->hasActiveFocus());
QVERIFY(thirdItem->hasVisualFocus());
+ QVERIFY(thirdItem->isHighlighted());
QCOMPARE(thirdItem->focusReason(), Qt::TabFocusReason);
QTest::keyClick(window, Qt::Key_Up);
QVERIFY(!firstItem->hasActiveFocus());
QVERIFY(!firstItem->hasVisualFocus());
+ QVERIFY(!firstItem->isHighlighted());
QVERIFY(secondItem->hasActiveFocus());
QVERIFY(secondItem->hasVisualFocus());
+ QVERIFY(secondItem->isHighlighted());
QCOMPARE(secondItem->focusReason(), Qt::BacktabFocusReason);
QVERIFY(!thirdItem->hasActiveFocus());
QVERIFY(!thirdItem->hasVisualFocus());
+ QVERIFY(!thirdItem->isHighlighted());
QTest::keyClick(window, Qt::Key_Backtab);
QVERIFY(firstItem->hasActiveFocus());
QVERIFY(firstItem->hasVisualFocus());
+ QVERIFY(firstItem->isHighlighted());
QCOMPARE(firstItem->focusReason(), Qt::BacktabFocusReason);
QVERIFY(!secondItem->hasActiveFocus());
QVERIFY(!secondItem->hasVisualFocus());
+ QVERIFY(!secondItem->isHighlighted());
QVERIFY(!thirdItem->hasActiveFocus());
QVERIFY(!thirdItem->hasVisualFocus());
+ QVERIFY(!thirdItem->isHighlighted());
QTest::keyClick(window, Qt::Key_Escape);
QCOMPARE(visibleSpy.count(), 4);
QVERIFY(!menu->isVisible());
}
+void tst_QQuickMenu::mnemonics()
+{
+#ifdef Q_OS_MACOS
+ QSKIP("Mnemonics are not used on macOS");
+#endif
+
+ QQuickApplicationHelper helper(this, QLatin1String("mnemonics.qml"));
+
+ QQuickWindow *window = helper.window;
+ window->show();
+ window->requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+
+ QQuickMenu *menu = window->property("menu").value<QQuickMenu *>();
+ QQuickAction *action = window->property("action").value<QQuickAction *>();
+ QQuickMenuItem *menuItem = window->property("menuItem").value<QQuickMenuItem *>();
+ QQuickMenu *subMenu = window->property("subMenu").value<QQuickMenu *>();
+ QQuickMenuItem *subMenuItem = window->property("subMenuItem").value<QQuickMenuItem *>();
+ QVERIFY(menu && action && menuItem && subMenu && subMenuItem);
+
+ menu->open();
+ QTRY_VERIFY(menu->isOpened());
+
+ QSignalSpy actionSpy(action, &QQuickAction::triggered);
+ QVERIFY(actionSpy.isValid());
+ QTest::keyClick(window, Qt::Key_A, Qt::AltModifier); // "&Action"
+ QCOMPARE(actionSpy.count(), 1);
+
+ menu->open();
+ QTRY_VERIFY(menu->isOpened());
+
+ QSignalSpy menuItemSpy(menuItem, &QQuickMenuItem::triggered);
+ QVERIFY(menuItemSpy.isValid());
+ QTest::keyClick(window, Qt::Key_I, Qt::AltModifier); // "Menu &Item"
+ QCOMPARE(menuItemSpy.count(), 1);
+
+ menu->open();
+ QTRY_VERIFY(menu->isOpened());
+
+ QTest::keyClick(window, Qt::Key_M, Qt::AltModifier); // "Sub &Menu"
+ QTRY_VERIFY(subMenu->isOpened());
+
+ QSignalSpy subMenuItemSpy(subMenuItem, &QQuickMenuItem::triggered);
+ QVERIFY(subMenuItemSpy.isValid());
+ QTest::keyClick(window, Qt::Key_S, Qt::AltModifier); // "&Sub Menu Item"
+ QCOMPARE(subMenuItemSpy.count(), 1);
+}
+
void tst_QQuickMenu::menuButton()
{
if (QGuiApplication::styleHints()->tabFocusBehavior() != Qt::TabFocusAllControls)
@@ -346,6 +491,8 @@ void tst_QQuickMenu::menuSeparator()
QQuickWindow *window = helper.window;
window->show();
QVERIFY(QTest::qWaitForWindowActive(window));
+ centerOnScreen(window);
+ moveMouseAway(window);
QQuickMenu *menu = window->property("menu").value<QQuickMenu*>();
QVERIFY(menu);
@@ -382,6 +529,8 @@ void tst_QQuickMenu::menuSeparator()
saveMenuItem->mapToScene(QPointF(saveMenuItem->width() / 2, saveMenuItem->height() / 2)).toPoint());
QTRY_VERIFY(!menu->isVisible());
+ moveMouseAway(window);
+
menu->open();
QVERIFY(menu->isVisible());
@@ -477,6 +626,689 @@ void tst_QQuickMenu::order()
}
}
+void tst_QQuickMenu::popup()
+{
+ QQuickApplicationHelper helper(this, QLatin1String("popup.qml"));
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+ centerOnScreen(window);
+ moveMouseAway(window);
+
+ QQuickMenu *menu = window->property("menu").value<QQuickMenu *>();
+ QVERIFY(menu);
+
+ QQuickMenuItem *menuItem1 = window->property("menuItem1").value<QQuickMenuItem *>();
+ QVERIFY(menuItem1);
+
+ QQuickMenuItem *menuItem2 = window->property("menuItem2").value<QQuickMenuItem *>();
+ QVERIFY(menuItem2);
+
+ QQuickMenuItem *menuItem3 = window->property("menuItem3").value<QQuickMenuItem *>();
+ QVERIFY(menuItem3);
+
+ QQuickItem *button = window->property("button").value<QQuickItem *>();
+ QVERIFY(button);
+
+#if QT_CONFIG(cursor)
+ QPoint oldCursorPos = QCursor::pos();
+ QPoint cursorPos = window->mapToGlobal(QPoint(11, 22));
+ QCursor::setPos(cursorPos);
+ QTRY_COMPARE(QCursor::pos(), cursorPos);
+
+ QVERIFY(QMetaObject::invokeMethod(window, "popupAtCursor"));
+ QCOMPARE(menu->parentItem(), window->contentItem());
+ QCOMPARE(menu->currentIndex(), -1);
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), -1);
+ QTRY_COMPARE(menu->x(), 11);
+ QTRY_COMPARE(menu->y(), 22);
+ menu->close();
+
+ QVERIFY(QMetaObject::invokeMethod(window, "popupAtPos", Q_ARG(QVariant, QPointF(33, 44))));
+ QCOMPARE(menu->parentItem(), window->contentItem());
+ QCOMPARE(menu->currentIndex(), -1);
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), -1);
+ QTRY_COMPARE(menu->x(), 33);
+ QTRY_COMPARE(menu->y(), 44);
+ menu->close();
+
+ QVERIFY(QMetaObject::invokeMethod(window, "popupAtCoord", Q_ARG(QVariant, 55), Q_ARG(QVariant, 66)));
+ QCOMPARE(menu->parentItem(), window->contentItem());
+ QCOMPARE(menu->currentIndex(), -1);
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), -1);
+ QTRY_COMPARE(menu->x(), 55);
+ QTRY_COMPARE(menu->y(), 66);
+ menu->close();
+
+ menu->setParentItem(nullptr);
+ QVERIFY(QMetaObject::invokeMethod(window, "popupAtParentCursor", Q_ARG(QVariant, QVariant::fromValue(button))));
+ QCOMPARE(menu->parentItem(), button);
+ QCOMPARE(menu->currentIndex(), -1);
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), -1);
+ QTRY_COMPARE(menu->x(), button->mapFromScene(QPointF(11, 22)).x());
+ QTRY_COMPARE(menu->y(), button->mapFromScene(QPointF(11, 22)).y());
+ menu->close();
+
+ menu->setParentItem(nullptr);
+ QVERIFY(QMetaObject::invokeMethod(window, "popupAtParentPos", Q_ARG(QVariant, QVariant::fromValue(button)), Q_ARG(QVariant, QPointF(-11, -22))));
+ QCOMPARE(menu->parentItem(), button);
+ QCOMPARE(menu->currentIndex(), -1);
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), -1);
+ QTRY_COMPARE(menu->x(), -11);
+ QTRY_COMPARE(menu->y(), -22);
+ QCOMPARE(menu->popupItem()->position(), button->mapToScene(QPointF(-11, -22)));
+ menu->close();
+
+ menu->setParentItem(nullptr);
+ QVERIFY(QMetaObject::invokeMethod(window, "popupAtParentCoord", Q_ARG(QVariant, QVariant::fromValue(button)), Q_ARG(QVariant, -33), Q_ARG(QVariant, -44)));
+ QCOMPARE(menu->parentItem(), button);
+ QCOMPARE(menu->currentIndex(), -1);
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), -1);
+ QTRY_COMPARE(menu->x(), -33);
+ QTRY_COMPARE(menu->y(), -44);
+ QCOMPARE(menu->popupItem()->position(), button->mapToScene(QPointF(-33, -44)));
+ menu->close();
+
+ cursorPos = window->mapToGlobal(QPoint(12, window->height() / 2));
+ QCursor::setPos(cursorPos);
+ QTRY_COMPARE(QCursor::pos(), cursorPos);
+
+ const QList<QQuickMenuItem *> menuItems = QList<QQuickMenuItem *>() << menuItem1 << menuItem2 << menuItem3;
+ for (QQuickMenuItem *menuItem : menuItems) {
+ menu->resetParentItem();
+
+ QVERIFY(QMetaObject::invokeMethod(window, "popupItemAtCursor", Q_ARG(QVariant, QVariant::fromValue(menuItem))));
+ QCOMPARE(menu->currentIndex(), menuItems.indexOf(menuItem));
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), menuItems.indexOf(menuItem));
+ QTRY_COMPARE(menu->x(), 12);
+ QTRY_COMPARE(menu->y(), window->height() / 2 + menu->topPadding() - menuItem->y());
+ menu->close();
+
+ QVERIFY(QMetaObject::invokeMethod(window, "popupItemAtPos", Q_ARG(QVariant, QPointF(33, window->height() / 3)), Q_ARG(QVariant, QVariant::fromValue(menuItem))));
+ QCOMPARE(menu->currentIndex(), menuItems.indexOf(menuItem));
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), menuItems.indexOf(menuItem));
+ QTRY_COMPARE(menu->x(), 33);
+ QTRY_COMPARE(menu->y(), window->height() / 3 + menu->topPadding() - menuItem->y());
+ menu->close();
+
+ QVERIFY(QMetaObject::invokeMethod(window, "popupItemAtCoord", Q_ARG(QVariant, 55), Q_ARG(QVariant, window->height() / 3 * 2), Q_ARG(QVariant, QVariant::fromValue(menuItem))));
+ QCOMPARE(menu->currentIndex(), menuItems.indexOf(menuItem));
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), menuItems.indexOf(menuItem));
+ QTRY_COMPARE(menu->x(), 55);
+ QTRY_COMPARE(menu->y(), window->height() / 3 * 2 + menu->topPadding() - menuItem->y());
+ menu->close();
+
+ menu->setParentItem(nullptr);
+ QVERIFY(QMetaObject::invokeMethod(window, "popupItemAtParentCursor", Q_ARG(QVariant, QVariant::fromValue(button)), Q_ARG(QVariant, QVariant::fromValue(menuItem))));
+ QCOMPARE(menu->parentItem(), button);
+ QCOMPARE(menu->currentIndex(), menuItems.indexOf(menuItem));
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), menuItems.indexOf(menuItem));
+ QTRY_COMPARE(menu->x(), button->mapFromScene(QPoint(12, window->height() / 2)).x());
+ QTRY_COMPARE(menu->y(), button->mapFromScene(QPoint(12, window->height() / 2)).y() + menu->topPadding() - menuItem->y());
+ menu->close();
+
+ menu->setParentItem(nullptr);
+ QVERIFY(QMetaObject::invokeMethod(window, "popupItemAtParentPos", Q_ARG(QVariant, QVariant::fromValue(button)), Q_ARG(QVariant, QPointF(-11, -22)), Q_ARG(QVariant, QVariant::fromValue(menuItem))));
+ QCOMPARE(menu->parentItem(), button);
+ QCOMPARE(menu->currentIndex(), menuItems.indexOf(menuItem));
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), menuItems.indexOf(menuItem));
+ QTRY_COMPARE(menu->x(), -11);
+ QTRY_COMPARE(menu->y(), -22 + menu->topPadding() - menuItem->y());
+ QCOMPARE(menu->popupItem()->position(), button->mapToScene(QPointF(-11, -22 + menu->topPadding() - menuItem->y())));
+ menu->close();
+
+ menu->setParentItem(nullptr);
+ QVERIFY(QMetaObject::invokeMethod(window, "popupItemAtParentCoord", Q_ARG(QVariant, QVariant::fromValue(button)), Q_ARG(QVariant, -33), Q_ARG(QVariant, -44), Q_ARG(QVariant, QVariant::fromValue(menuItem))));
+ QCOMPARE(menu->parentItem(), button);
+ QCOMPARE(menu->currentIndex(), menuItems.indexOf(menuItem));
+ QCOMPARE(menu->contentItem()->property("currentIndex").toInt(), menuItems.indexOf(menuItem));
+ QTRY_COMPARE(menu->x(), -33);
+ QTRY_COMPARE(menu->y(), -44 + menu->topPadding() - menuItem->y());
+ QCOMPARE(menu->popupItem()->position(), button->mapToScene(QPointF(-33, -44 + menu->topPadding() - menuItem->y())));
+ menu->close();
+ }
+
+ QCursor::setPos(oldCursorPos);
+ QTRY_COMPARE(QCursor::pos(), oldCursorPos);
+#endif
+}
+
+void tst_QQuickMenu::actions()
+{
+ QQuickApplicationHelper helper(this, QLatin1String("actions.qml"));
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+
+ QQuickMenu *menu = window->property("menu").value<QQuickMenu *>();
+ QVERIFY(menu);
+
+ QPointer<QQuickAction> action1 = menu->actionAt(0);
+ QVERIFY(!action1.isNull());
+
+ QPointer<QQuickAction> action3 = menu->actionAt(2);
+ QVERIFY(!action3.isNull());
+
+ QVERIFY(!menu->actionAt(1));
+ QVERIFY(!menu->actionAt(3));
+
+ QPointer<QQuickMenuItem> menuItem1 = qobject_cast<QQuickMenuItem *>(menu->itemAt(0));
+ QVERIFY(!menuItem1.isNull());
+ QCOMPARE(menuItem1->action(), action1.data());
+ QCOMPARE(menuItem1->text(), "action1");
+
+ QPointer<QQuickMenuItem> menuItem2 = qobject_cast<QQuickMenuItem *>(menu->itemAt(1));
+ QVERIFY(!menuItem2.isNull());
+ QVERIFY(!menuItem2->action());
+ QCOMPARE(menuItem2->text(), "menuitem2");
+
+ QPointer<QQuickMenuItem> menuItem3 = qobject_cast<QQuickMenuItem *>(menu->itemAt(2));
+ QVERIFY(!menuItem3.isNull());
+ QCOMPARE(menuItem3->action(), action3.data());
+ QCOMPARE(menuItem3->text(), "action3");
+
+ QPointer<QQuickMenuItem> menuItem4 = qobject_cast<QQuickMenuItem *>(menu->itemAt(3));
+ QVERIFY(!menuItem4.isNull());
+ QVERIFY(!menuItem4->action());
+ QCOMPARE(menuItem4->text(), "menuitem4");
+
+ // takeAction(int) does not destroy the action, but does destroy the respective item
+ QCOMPARE(menu->takeAction(0), action1.data());
+ QVERIFY(!menu->itemAt(3));
+ QCoreApplication::sendPostedEvents(action1, QEvent::DeferredDelete);
+ QVERIFY(!action1.isNull());
+ QCoreApplication::sendPostedEvents(menuItem1, QEvent::DeferredDelete);
+ QVERIFY(menuItem1.isNull());
+
+ // takeAction(int) does not destroy an item that doesn't have an action
+ QVERIFY(!menuItem2->subMenu());
+ QVERIFY(!menu->takeAction(0));
+ QCoreApplication::sendPostedEvents(menuItem2, QEvent::DeferredDelete);
+ QVERIFY(!menuItem2.isNull());
+
+ // addAction(Action) re-creates the respective item in the menu
+ menu->addAction(action1);
+ menuItem1 = qobject_cast<QQuickMenuItem *>(menu->itemAt(3));
+ QVERIFY(!menuItem1.isNull());
+ QCOMPARE(menuItem1->action(), action1.data());
+
+ // removeAction(Action) destroys both the action and the respective item
+ menu->removeAction(action1);
+ QVERIFY(!menu->itemAt(3));
+ QCoreApplication::sendPostedEvents(action1, QEvent::DeferredDelete);
+ QVERIFY(action1.isNull());
+ QCoreApplication::sendPostedEvents(menuItem1, QEvent::DeferredDelete);
+ QVERIFY(menuItem1.isNull());
+}
+
+void tst_QQuickMenu::removeTakeItem()
+{
+ QQuickApplicationHelper helper(this, QLatin1String("removeTakeItem.qml"));
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+
+ QQuickMenu *menu = window->property("menu").value<QQuickMenu *>();
+ QVERIFY(menu);
+
+ QPointer<QQuickMenuItem> menuItem1 = window->property("menuItem1").value<QQuickMenuItem *>();
+ QVERIFY(!menuItem1.isNull());
+ QCOMPARE(menuItem1->menu(), menu);
+
+ QPointer<QQuickMenuItem> menuItem2 = window->property("menuItem2").value<QQuickMenuItem *>();
+ QVERIFY(!menuItem2.isNull());
+ QCOMPARE(menuItem2->menu(), menu);
+
+ QPointer<QQuickMenuItem> menuItem3 = window->property("menuItem3").value<QQuickMenuItem *>();
+ QVERIFY(!menuItem3.isNull());
+ QCOMPARE(menuItem3->menu(), menu);
+
+ // takeItem(int) does not destroy
+ QVariant ret;
+ QVERIFY(QMetaObject::invokeMethod(window, "takeSecondItem", Q_RETURN_ARG(QVariant, ret)));
+ QCOMPARE(ret.value<QQuickMenuItem *>(), menuItem2);
+ QVERIFY(!menuItem2->menu());
+ QCoreApplication::sendPostedEvents(menuItem2, QEvent::DeferredDelete);
+ QVERIFY(!menuItem2.isNull());
+
+ // removeItem(Item) destroys
+ QVERIFY(QMetaObject::invokeMethod(window, "removeFirstItem"));
+ QVERIFY(!menuItem1->menu());
+ QCoreApplication::sendPostedEvents(menuItem1, QEvent::DeferredDelete);
+ QVERIFY(menuItem1.isNull());
+
+ // removeItem(null) must not call removeItem(0)
+ QVERIFY(QMetaObject::invokeMethod(window, "removeNullItem"));
+ QCOMPARE(menuItem3->menu(), menu);
+ QCoreApplication::sendPostedEvents(menuItem3, QEvent::DeferredDelete);
+ QVERIFY(!menuItem3.isNull());
+
+ // deprecated removeItem(int) does not destroy
+ QVERIFY(QMetaObject::invokeMethod(window, "removeFirstIndex"));
+ QVERIFY(!menuItem3->menu());
+ QCoreApplication::sendPostedEvents(menuItem3, QEvent::DeferredDelete);
+ QVERIFY(!menuItem3.isNull());
+}
+
+void tst_QQuickMenu::subMenuMouse_data()
+{
+ QTest::addColumn<bool>("cascade");
+
+ QTest::newRow("cascading") << true;
+ QTest::newRow("non-cascading") << false;
+}
+
+void tst_QQuickMenu::subMenuMouse()
+{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Mouse hovering not functional on offscreen/minimal platforms");
+
+ QFETCH(bool, cascade);
+
+ QQuickApplicationHelper helper(this, QLatin1String("subMenus.qml"));
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+ centerOnScreen(window);
+ moveMouseAway(window);
+
+ QQuickMenu *mainMenu = window->property("mainMenu").value<QQuickMenu *>();
+ QVERIFY(mainMenu);
+ mainMenu->setCascade(cascade);
+ QCOMPARE(mainMenu->cascade(), cascade);
+
+ QQuickMenu *subMenu1 = window->property("subMenu1").value<QQuickMenu *>();
+ QVERIFY(subMenu1);
+
+ QQuickMenu *subMenu2 = window->property("subMenu2").value<QQuickMenu *>();
+ QVERIFY(subMenu2);
+
+ QQuickMenu *subSubMenu1 = window->property("subSubMenu1").value<QQuickMenu *>();
+ QVERIFY(subSubMenu1);
+
+ mainMenu->open();
+ QVERIFY(mainMenu->isVisible());
+ QVERIFY(!subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+
+ // open the sub-menu with mouse click
+ QQuickMenuItem *subMenu1Item = qobject_cast<QQuickMenuItem *>(mainMenu->itemAt(1));
+ QVERIFY(subMenu1Item);
+ QCOMPARE(subMenu1Item->subMenu(), subMenu1);
+ QTest::mouseClick(window, Qt::LeftButton, Qt::NoModifier, subMenu1Item->mapToScene(QPoint(1, 1)).toPoint());
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QVERIFY(subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+
+ // open the cascading sub-sub-menu with mouse hover
+ QQuickMenuItem *subSubMenu1Item = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(2));
+ QVERIFY(subSubMenu1Item);
+ QCOMPARE(subSubMenu1Item->subMenu(), subSubMenu1);
+ QTest::mouseMove(window, subSubMenu1Item->mapToScene(QPoint(1, 1)).toPoint());
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QVERIFY(subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+ if (cascade)
+ QTRY_VERIFY(subSubMenu1->isVisible());
+
+ // close the sub-sub-menu with mouse hover over another parent menu item
+ QQuickMenuItem *subMenuItem1 = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(0));
+ QVERIFY(subMenuItem1);
+ QVERIFY(!subMenuItem1->subMenu());
+ QTest::mouseMove(window, subMenuItem1->mapToScene(QPoint(1, 1)).toPoint());
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QVERIFY(subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+
+ // re-open the sub-sub-menu with mouse hover
+ QTest::mouseMove(window, subSubMenu1Item->mapToScene(QPoint(1, 1)).toPoint());
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QVERIFY(subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+ if (cascade)
+ QTRY_VERIFY(subSubMenu1->isVisible());
+
+ // close sub-menu and sub-sub-menu with mouse hover in the main menu
+ QQuickMenuItem *mainMenuItem1 = qobject_cast<QQuickMenuItem *>(mainMenu->itemAt(0));
+ QVERIFY(mainMenuItem1);
+ QTest::mouseMove(window, mainMenuItem1->mapToScene(QPoint(1, 1)).toPoint());
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QCOMPARE(subMenu1->isVisible(), !cascade);
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+
+ // close all menus by click triggering an item
+ QQuickMenuItem *subSubMenuItem1 = qobject_cast<QQuickMenuItem *>(subSubMenu1->itemAt(0));
+ QVERIFY(subSubMenuItem1);
+ QTest::mouseClick(window, Qt::LeftButton, Qt::NoModifier, subSubMenuItem1->mapToScene(QPoint(1, 1)).toPoint());
+ QVERIFY(!mainMenu->isVisible());
+ QVERIFY(!subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+}
+
+void tst_QQuickMenu::subMenuKeyboard_data()
+{
+ QTest::addColumn<bool>("cascade");
+ QTest::addColumn<bool>("mirrored");
+
+ QTest::newRow("cascading") << true << false;
+ QTest::newRow("cascading,mirrored") << true << true;
+ QTest::newRow("non-cascading") << false << false;
+ QTest::newRow("non-cascading,mirrored") << false << true;
+}
+
+void tst_QQuickMenu::subMenuKeyboard()
+{
+ QFETCH(bool, cascade);
+ QFETCH(bool, mirrored);
+
+ QQuickApplicationHelper helper(this, QLatin1String("subMenus.qml"));
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+ centerOnScreen(window);
+ moveMouseAway(window);
+
+ if (mirrored)
+ window->setLocale(QLocale("ar_EG"));
+
+ QQuickMenu *mainMenu = window->property("mainMenu").value<QQuickMenu *>();
+ QVERIFY(mainMenu);
+ mainMenu->setCascade(cascade);
+ QCOMPARE(mainMenu->cascade(), cascade);
+
+ QQuickMenu *subMenu1 = window->property("subMenu1").value<QQuickMenu *>();
+ QVERIFY(subMenu1);
+
+ QQuickMenu *subMenu2 = window->property("subMenu2").value<QQuickMenu *>();
+ QVERIFY(subMenu2);
+
+ QQuickMenu *subSubMenu1 = window->property("subSubMenu1").value<QQuickMenu *>();
+ QVERIFY(subSubMenu1);
+
+ mainMenu->open();
+ QVERIFY(mainMenu->isVisible());
+ QVERIFY(!subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+
+ // navigate to the sub-menu item and trigger it
+ QQuickMenuItem *subMenu1Item = qobject_cast<QQuickMenuItem *>(mainMenu->itemAt(1));
+ QVERIFY(subMenu1Item);
+ QVERIFY(!subMenu1Item->isHighlighted());
+ QCOMPARE(subMenu1Item->subMenu(), subMenu1);
+ QTest::keyClick(window, Qt::Key_Down);
+ QTest::keyClick(window, Qt::Key_Down);
+ QVERIFY(subMenu1Item->isHighlighted());
+ QTest::keyClick(window, Qt::Key_Space);
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QVERIFY(subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+
+ // navigate to the sub-sub-menu item and open it with the arrow key
+ QQuickMenuItem *subSubMenu1Item = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(2));
+ QVERIFY(subSubMenu1Item);
+ QVERIFY(!subSubMenu1Item->isHighlighted());
+ QCOMPARE(subSubMenu1Item->subMenu(), subSubMenu1);
+ QTest::keyClick(window, Qt::Key_Down);
+ QTest::keyClick(window, Qt::Key_Down);
+ QTest::keyClick(window, Qt::Key_Down);
+ QVERIFY(subSubMenu1Item->isHighlighted());
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QVERIFY(subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+ QTest::keyClick(window, mirrored ? Qt::Key_Left : Qt::Key_Right);
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QCOMPARE(subMenu1->isVisible(), cascade);
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(subSubMenu1->isVisible());
+
+ // navigate within the sub-sub-menu
+ QQuickMenuItem *subSubMenuItem1 = qobject_cast<QQuickMenuItem *>(subSubMenu1->itemAt(0));
+ QVERIFY(subSubMenuItem1);
+ QQuickMenuItem *subSubMenuItem2 = qobject_cast<QQuickMenuItem *>(subSubMenu1->itemAt(1));
+ QVERIFY(subSubMenuItem2);
+ QVERIFY(subSubMenuItem1->isHighlighted());
+ QVERIFY(!subSubMenuItem2->isHighlighted());
+ QTest::keyClick(window, Qt::Key_Down);
+ QVERIFY(!subSubMenuItem1->isHighlighted());
+ QVERIFY(subSubMenuItem2->isHighlighted());
+
+ // navigate to the parent menu with the arrow key
+ QTest::keyClick(window, mirrored ? Qt::Key_Right : Qt::Key_Left);
+ QVERIFY(subSubMenu1Item->isHighlighted());
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QVERIFY(subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+
+ // navigate within the sub-menu
+ QQuickMenuItem *subMenuItem1 = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(0));
+ QVERIFY(subMenuItem1);
+ QQuickMenuItem *subMenuItem2 = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(1));
+ QVERIFY(subMenuItem2);
+ QVERIFY(!subMenuItem1->isHighlighted());
+ QVERIFY(!subMenuItem2->isHighlighted());
+ QVERIFY(subSubMenu1Item->isHighlighted());
+ QTest::keyClick(window, Qt::Key_Up);
+ QVERIFY(!subMenuItem1->isHighlighted());
+ QVERIFY(subMenuItem2->isHighlighted());
+ QVERIFY(!subSubMenu1Item->isHighlighted());
+
+ // close the menus with esc
+ QTest::keyClick(window, Qt::Key_Escape);
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QVERIFY(!subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+ QTest::keyClick(window, Qt::Key_Escape);
+ QVERIFY(!mainMenu->isVisible());
+ QVERIFY(!subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+}
+
+void tst_QQuickMenu::subMenuPosition_data()
+{
+ QTest::addColumn<bool>("cascade");
+ QTest::addColumn<bool>("flip");
+ QTest::addColumn<bool>("mirrored");
+ QTest::addColumn<qreal>("overlap");
+
+ QTest::newRow("cascading") << true << false << false << 0.0;
+ QTest::newRow("cascading,flip") << true << true << false << 0.0;
+ QTest::newRow("cascading,overlap") << true << false << false << 10.0;
+ QTest::newRow("cascading,flip,overlap") << true << true << false << 10.0;
+ QTest::newRow("cascading,mirrored") << true << false << true << 0.0;
+ QTest::newRow("cascading,mirrored,flip") << true << true << true << 0.0;
+ QTest::newRow("cascading,mirrored,overlap") << true << false << true << 10.0;
+ QTest::newRow("cascading,mirrored,flip,overlap") << true << true << true << 10.0;
+ QTest::newRow("non-cascading") << false << false << false << 0.0;
+}
+
+void tst_QQuickMenu::subMenuPosition()
+{
+ QFETCH(bool, cascade);
+ QFETCH(bool, flip);
+ QFETCH(bool, mirrored);
+ QFETCH(qreal, overlap);
+
+ QQuickApplicationHelper helper(this, QLatin1String("subMenus.qml"));
+ QQuickApplicationWindow *window = helper.appWindow;
+
+ // the default size of the window fits three menus side by side.
+ // when testing flipping, we resize the window so that the first
+ // sub-menu fits, but the second doesn't
+ if (flip)
+ window->setWidth(window->width() - 200);
+
+ window->show();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+ centerOnScreen(window);
+ moveMouseAway(window);
+
+ if (mirrored)
+ window->setLocale(QLocale("ar_EG"));
+
+ QQuickMenu *mainMenu = window->property("mainMenu").value<QQuickMenu *>();
+ QVERIFY(mainMenu);
+ mainMenu->setCascade(cascade);
+ QCOMPARE(mainMenu->cascade(), cascade);
+ mainMenu->setOverlap(overlap);
+ QCOMPARE(mainMenu->overlap(), overlap);
+
+ QQuickMenu *subMenu1 = window->property("subMenu1").value<QQuickMenu *>();
+ QVERIFY(subMenu1);
+ subMenu1->setCascade(cascade);
+ QCOMPARE(subMenu1->cascade(), cascade);
+ subMenu1->setOverlap(overlap);
+ QCOMPARE(subMenu1->overlap(), overlap);
+
+ QQuickMenu *subMenu2 = window->property("subMenu2").value<QQuickMenu *>();
+ QVERIFY(subMenu2);
+ subMenu2->setCascade(cascade);
+ QCOMPARE(subMenu2->cascade(), cascade);
+ subMenu2->setOverlap(overlap);
+ QCOMPARE(subMenu2->overlap(), overlap);
+
+ QQuickMenu *subSubMenu1 = window->property("subSubMenu1").value<QQuickMenu *>();
+ QVERIFY(subSubMenu1);
+ subSubMenu1->setCascade(cascade);
+ QCOMPARE(subSubMenu1->cascade(), cascade);
+ subSubMenu1->setOverlap(overlap);
+ QCOMPARE(subSubMenu1->overlap(), overlap);
+
+ // choose the main menu position so that there's room for the
+ // sub-menus to cascade to the left when mirrored
+ if (mirrored)
+ mainMenu->setX(window->width() - 200);
+
+ mainMenu->open();
+ QVERIFY(mainMenu->isVisible());
+ QVERIFY(!subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+
+ // open the sub-menu (never flips)
+ QQuickMenuItem *subMenu1Item = qobject_cast<QQuickMenuItem *>(mainMenu->itemAt(1));
+ QVERIFY(subMenu1Item);
+ QCOMPARE(subMenu1Item->subMenu(), subMenu1);
+ emit subMenu1Item->triggered();
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QVERIFY(subMenu1->isVisible());
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(!subSubMenu1->isVisible());
+
+ if (cascade) {
+ QCOMPARE(subMenu1->parentItem(), subMenu1Item);
+ // vertically aligned to the parent menu item
+ QCOMPARE(subMenu1->popupItem()->y(), mainMenu->popupItem()->y() + subMenu1Item->y() - subMenu1->topPadding());
+ if (mirrored)
+ QCOMPARE(subMenu1->popupItem()->x(), mainMenu->popupItem()->x() - subMenu1->width() + overlap); // on the left of the parent menu
+ else
+ QCOMPARE(subMenu1->popupItem()->x(), mainMenu->popupItem()->x() + mainMenu->width() - overlap); // on the right of the parent menu
+ } else {
+ QCOMPARE(subMenu1->parentItem(), mainMenu->parentItem());
+ // centered over the parent menu
+ QCOMPARE(subMenu1->popupItem()->x(), mainMenu->popupItem()->x() + (mainMenu->width() - subMenu1->width()) / 2);
+ QCOMPARE(subMenu1->popupItem()->y(), mainMenu->popupItem()->y() + (mainMenu->height() - subMenu1->height()) / 2);
+ }
+
+ // open the sub-sub-menu (can flip)
+ QQuickMenuItem *subSubMenu1Item = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(2));
+ QVERIFY(subSubMenu1Item);
+ QCOMPARE(subSubMenu1Item->subMenu(), subSubMenu1);
+ emit subSubMenu1Item->triggered();
+ QCOMPARE(mainMenu->isVisible(), cascade);
+ QCOMPARE(subMenu1->isVisible(), cascade);
+ QVERIFY(!subMenu2->isVisible());
+ QVERIFY(subSubMenu1->isVisible());
+
+ if (cascade) {
+ QCOMPARE(subSubMenu1->parentItem(), subSubMenu1Item);
+ // vertically aligned to the parent menu item
+ QCOMPARE(subSubMenu1->popupItem()->y(), subMenu1->popupItem()->y() + subSubMenu1Item->y() - subSubMenu1->topPadding());
+ if (mirrored != flip)
+ QCOMPARE(subSubMenu1->popupItem()->x(), subMenu1->popupItem()->x() - subSubMenu1->width() + overlap); // on the left of the parent menu
+ else
+ QCOMPARE(subSubMenu1->popupItem()->x(), subMenu1->popupItem()->x() + subMenu1->width() - overlap); // on the right of the parent menu
+ } else {
+ QCOMPARE(subSubMenu1->parentItem(), subMenu1->parentItem());
+ // centered over the parent menu
+ QCOMPARE(subSubMenu1->popupItem()->x(), subMenu1->popupItem()->x() + (subMenu1->width() - subSubMenu1->width()) / 2);
+ QCOMPARE(subSubMenu1->popupItem()->y(), subMenu1->popupItem()->y() + (subMenu1->height() - subSubMenu1->height()) / 2);
+ }
+}
+
+void tst_QQuickMenu::addRemoveSubMenus()
+{
+ QQuickApplicationHelper helper(this, QLatin1String("subMenus.qml"));
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+
+ QQuickMenu *mainMenu = window->property("mainMenu").value<QQuickMenu *>();
+ QVERIFY(mainMenu);
+
+ QVERIFY(!mainMenu->menuAt(0));
+
+ QPointer<QQuickMenu> subMenu1 = window->property("subMenu1").value<QQuickMenu *>();
+ QVERIFY(!subMenu1.isNull());
+ QCOMPARE(mainMenu->menuAt(1), subMenu1.data());
+
+ QVERIFY(!mainMenu->menuAt(2));
+
+ QPointer<QQuickMenu> subMenu2 = window->property("subMenu2").value<QQuickMenu *>();
+ QVERIFY(!subMenu2.isNull());
+ QCOMPARE(mainMenu->menuAt(3), subMenu2.data());
+
+ QVERIFY(!mainMenu->menuAt(4));
+
+ QPointer<QQuickMenu> subSubMenu1 = window->property("subSubMenu1").value<QQuickMenu *>();
+ QVERIFY(!subSubMenu1.isNull());
+
+ // takeMenu(int) does not destroy the menu, but does destroy the respective item in the parent menu
+ QPointer<QQuickMenuItem> subSubMenu1Item = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(2));
+ QVERIFY(subSubMenu1Item);
+ QCOMPARE(subSubMenu1Item->subMenu(), subSubMenu1.data());
+ QCOMPARE(subMenu1->takeMenu(2), subSubMenu1.data());
+ QVERIFY(!subMenu1->itemAt(2));
+ QCoreApplication::sendPostedEvents(subSubMenu1, QEvent::DeferredDelete);
+ QVERIFY(!subSubMenu1.isNull());
+ QCoreApplication::sendPostedEvents(subSubMenu1Item, QEvent::DeferredDelete);
+ QVERIFY(subSubMenu1Item.isNull());
+
+ // takeMenu(int) does not destroy an item that doesn't present a menu
+ QPointer<QQuickMenuItem> subMenuItem1 = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(0));
+ QVERIFY(subMenuItem1);
+ QVERIFY(!subMenuItem1->subMenu());
+ QVERIFY(!subMenu1->takeMenu(0));
+ QCoreApplication::sendPostedEvents(subMenuItem1, QEvent::DeferredDelete);
+ QVERIFY(!subMenuItem1.isNull());
+
+ // addMenu(Menu) re-creates the respective item in the parent menu
+ subMenu1->addMenu(subSubMenu1);
+ subSubMenu1Item = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(2));
+ QVERIFY(!subSubMenu1Item.isNull());
+
+ // removeMenu(Menu) destroys both the menu and the respective item in the parent menu
+ subMenu1->removeMenu(subSubMenu1);
+ QVERIFY(!subMenu1->itemAt(2));
+ QCoreApplication::sendPostedEvents(subSubMenu1, QEvent::DeferredDelete);
+ QVERIFY(subSubMenu1.isNull());
+ QCoreApplication::sendPostedEvents(subSubMenu1Item, QEvent::DeferredDelete);
+ QVERIFY(subSubMenu1Item.isNull());
+}
+
QTEST_MAIN(tst_QQuickMenu)
#include "tst_qquickmenu.moc"
diff --git a/tests/auto/qquickmenubar/data/empty.qml b/tests/auto/qquickmenubar/data/empty.qml
new file mode 100644
index 00000000..6ed0a141
--- /dev/null
+++ b/tests/auto/qquickmenubar/data/empty.qml
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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
+
+MenuBar { }
diff --git a/tests/auto/qquickmenubar/data/menubar.qml b/tests/auto/qquickmenubar/data/menubar.qml
new file mode 100644
index 00000000..606dd92c
--- /dev/null
+++ b/tests/auto/qquickmenubar/data/menubar.qml
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** 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
+
+ApplicationWindow {
+ width: 400
+ height: 400
+ visible: true
+
+ header: MenuBar {
+ MenuBarItem {
+ menu: Menu {
+ title: "&File"
+ MenuItem { text: "&Open..." }
+ MenuItem { text: "&Save" }
+ MenuItem { text: "Save &As..." }
+ MenuSeparator { }
+ MenuItem { text: "&Quit" }
+ }
+ }
+ MenuBarItem {
+ menu: Menu {
+ title: "&Edit"
+ MenuItem { text: "&Cut" }
+ MenuItem { text: "&Copy" }
+ MenuItem { text: "&Paste" }
+ }
+ }
+ MenuBarItem {
+ menu: Menu {
+ title: "&View"
+ Menu {
+ title: "&Alignment"
+ Menu {
+ title: "&Horizontal"
+ MenuItem { text: "&Left" }
+ MenuItem { text: "&Center" }
+ MenuItem { text: "&Right" }
+ }
+ Menu {
+ title: "&Vertical"
+ MenuItem { text: "&Top" }
+ MenuItem { text: "&Center" }
+ MenuItem { text: "&Bottom" }
+ }
+ }
+ }
+ }
+
+ MenuBarItem {
+ menu: Menu {
+ title: "&Help"
+ MenuItem { text: "&About" }
+ }
+ }
+ }
+}
diff --git a/tests/auto/qquickmenubar/qquickmenubar.pro b/tests/auto/qquickmenubar/qquickmenubar.pro
new file mode 100644
index 00000000..b7d41f0f
--- /dev/null
+++ b/tests/auto/qquickmenubar/qquickmenubar.pro
@@ -0,0 +1,14 @@
+CONFIG += testcase
+TARGET = tst_qquickmenubar
+SOURCES += tst_qquickmenubar.cpp
+
+macos:CONFIG -= app_bundle
+
+QT += core-private gui-private qml-private quick-private testlib quicktemplates2-private
+
+include (../shared/util.pri)
+
+TESTDATA = data/*
+
+OTHER_FILES += \
+ data/*.qml
diff --git a/tests/auto/qquickmenubar/tst_qquickmenubar.cpp b/tests/auto/qquickmenubar/tst_qquickmenubar.cpp
new file mode 100644
index 00000000..19d67eac
--- /dev/null
+++ b/tests/auto/qquickmenubar/tst_qquickmenubar.cpp
@@ -0,0 +1,569 @@
+/****************************************************************************
+**
+** 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 <QtTest>
+#include <QtQml>
+#include "../shared/util.h"
+#include "../shared/visualtestutil.h"
+#include "../shared/qtest_quickcontrols.h"
+
+#include <QtQuickTemplates2/private/qquickapplicationwindow_p.h>
+#include <QtQuickTemplates2/private/qquickmenu_p.h>
+#include <QtQuickTemplates2/private/qquickmenubar_p.h>
+#include <QtQuickTemplates2/private/qquickmenubaritem_p.h>
+#include <QtQuickTemplates2/private/qquickmenuitem_p.h>
+
+using namespace QQuickVisualTestUtil;
+
+class tst_qquickmenubar : public QQmlDataTest
+{
+ Q_OBJECT
+
+public:
+
+private slots:
+ void delegate();
+ void mouse();
+ void keys();
+ void mnemonics();
+ void addRemove();
+};
+
+void tst_qquickmenubar::delegate()
+{
+ QQmlApplicationEngine engine(testFileUrl("empty.qml"));
+ QScopedPointer<QQuickMenuBar> menuBar(qobject_cast<QQuickMenuBar *>(engine.rootObjects().value(0)));
+ QVERIFY(menuBar);
+
+ QQmlComponent *delegate = menuBar->delegate();
+ QVERIFY(delegate);
+
+ QScopedPointer<QQuickMenuBarItem> item(qobject_cast<QQuickMenuBarItem *>(delegate->create()));
+ QVERIFY(item);
+}
+
+void tst_qquickmenubar::mouse()
+{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Mouse highlight not functional on offscreen/minimal platforms");
+
+ QQmlApplicationEngine engine(testFileUrl("menubar.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QVERIFY(QTest::qWaitForWindowActive(window.data()));
+
+ centerOnScreen(window.data());
+ moveMouseAway(window.data());
+
+ QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+
+ QQuickMenu *fileMenuBarMenu = menuBar->menuAt(0);
+ QQuickMenu *editMenuBarMenu = menuBar->menuAt(1);
+ QQuickMenu *viewMenuBarMenu = menuBar->menuAt(2);
+ QQuickMenu *helpMenuBarMenu = menuBar->menuAt(3);
+ QVERIFY(fileMenuBarMenu && editMenuBarMenu && viewMenuBarMenu && helpMenuBarMenu);
+
+ QQuickMenuBarItem *fileMenuBarItem = qobject_cast<QQuickMenuBarItem *>(fileMenuBarMenu->parentItem());
+ QQuickMenuBarItem *editMenuBarItem = qobject_cast<QQuickMenuBarItem *>(editMenuBarMenu->parentItem());
+ QQuickMenuBarItem *viewMenuBarItem = qobject_cast<QQuickMenuBarItem *>(viewMenuBarMenu->parentItem());
+ QQuickMenuBarItem *helpMenuBarItem = qobject_cast<QQuickMenuBarItem *>(helpMenuBarMenu->parentItem());
+ QVERIFY(fileMenuBarItem && editMenuBarItem && viewMenuBarItem && helpMenuBarItem);
+
+ // highlight a menubar item
+ QTest::mouseMove(window.data(), fileMenuBarItem->mapToScene(QPointF(fileMenuBarItem->width() / 2, fileMenuBarItem->height() / 2)).toPoint());
+ QVERIFY(fileMenuBarItem->isHighlighted());
+ QVERIFY(!fileMenuBarMenu->isVisible());
+
+ // highlight another menubar item
+ QTest::mouseMove(window.data(), editMenuBarItem->mapToScene(QPointF(editMenuBarItem->width() / 2, editMenuBarItem->height() / 2)).toPoint());
+ QVERIFY(!fileMenuBarItem->isHighlighted());
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(!fileMenuBarMenu->isVisible());
+ QVERIFY(!editMenuBarMenu->isVisible());
+
+ // trigger a menubar item to open a menu
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, editMenuBarItem->mapToScene(QPointF(editMenuBarItem->width() / 2, editMenuBarItem->height() / 2)).toPoint());
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(editMenuBarMenu->isVisible());
+ QTRY_VERIFY(editMenuBarMenu->isOpened());
+
+ // re-trigger a menubar item to hide the menu
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, editMenuBarItem->mapToScene(QPointF(editMenuBarItem->width() / 2, editMenuBarItem->height() / 2)).toPoint());
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(editMenuBarItem->hasActiveFocus());
+ QTRY_VERIFY(!editMenuBarMenu->isVisible());
+
+ // re-trigger a menubar item to show the menu again
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, editMenuBarItem->mapToScene(QPointF(editMenuBarItem->width() / 2, editMenuBarItem->height() / 2)).toPoint());
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(editMenuBarMenu->isVisible());
+ QTRY_VERIFY(editMenuBarMenu->isOpened());
+
+ // highlight another menubar item to open another menu
+ QTest::mouseMove(window.data(), helpMenuBarItem->mapToScene(QPointF(helpMenuBarItem->width() / 2, helpMenuBarItem->height() / 2)).toPoint());
+ QVERIFY(!fileMenuBarItem->isHighlighted());
+ QVERIFY(!editMenuBarItem->isHighlighted());
+ QVERIFY(!viewMenuBarItem->isHighlighted());
+ QVERIFY(helpMenuBarItem->isHighlighted());
+ QVERIFY(!fileMenuBarMenu->isVisible());
+ QVERIFY(!viewMenuBarMenu->isVisible());
+ QVERIFY(helpMenuBarMenu->isVisible());
+ QTRY_VERIFY(!editMenuBarMenu->isVisible());
+ QTRY_VERIFY(helpMenuBarMenu->isOpened());
+
+ // trigger a menu item to close the menu
+ QQuickMenuItem *aboutMenuItem = qobject_cast<QQuickMenuItem *>(helpMenuBarMenu->itemAt(0));
+ QVERIFY(aboutMenuItem);
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, aboutMenuItem->mapToScene(QPointF(aboutMenuItem->width() / 2, aboutMenuItem->height() / 2)).toPoint());
+ QVERIFY(!helpMenuBarItem->isHighlighted());
+ QTRY_VERIFY(!helpMenuBarMenu->isVisible());
+
+ // highlight a menubar item
+ QTest::mouseMove(window.data(), editMenuBarItem->mapToScene(QPointF(editMenuBarItem->width() / 2, editMenuBarItem->height() / 2)).toPoint());
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(!helpMenuBarItem->isHighlighted());
+ QVERIFY(!editMenuBarMenu->isVisible());
+ QVERIFY(!helpMenuBarMenu->isVisible());
+
+ // trigger a menubar item to open a menu
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, viewMenuBarItem->mapToScene(QPointF(viewMenuBarItem->width() / 2, viewMenuBarItem->height() / 2)).toPoint());
+ QVERIFY(!editMenuBarItem->isHighlighted());
+ QVERIFY(viewMenuBarItem->isHighlighted());
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QTRY_VERIFY(viewMenuBarMenu->isOpened());
+
+ // trigger a menu item to open a sub-menu
+ QQuickMenuItem *alignmentSubMenuItem = qobject_cast<QQuickMenuItem *>(viewMenuBarMenu->itemAt(0));
+ QVERIFY(alignmentSubMenuItem);
+ QQuickMenu *alignmentSubMenu = alignmentSubMenuItem->subMenu();
+ QVERIFY(alignmentSubMenu);
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, alignmentSubMenuItem->mapToScene(QPointF(alignmentSubMenuItem->width() / 2, alignmentSubMenuItem->height() / 2)).toPoint());
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QVERIFY(alignmentSubMenu->isVisible());
+ QTRY_VERIFY(alignmentSubMenu->isOpened());
+
+ // trigger a menu item to open a sub-sub-menu
+ QQuickMenuItem *verticalSubMenuItem = qobject_cast<QQuickMenuItem *>(alignmentSubMenu->itemAt(1));
+ QVERIFY(verticalSubMenuItem);
+ QQuickMenu *verticalSubMenu = verticalSubMenuItem->subMenu();
+ QVERIFY(verticalSubMenu);
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, verticalSubMenuItem->mapToScene(QPointF(verticalSubMenuItem->width() / 2, verticalSubMenuItem->height() / 2)).toPoint());
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QVERIFY(alignmentSubMenu->isVisible());
+ QVERIFY(verticalSubMenu->isVisible());
+ QTRY_VERIFY(verticalSubMenu->isOpened());
+
+ // trigger a menu item to close the whole chain of menus
+ QQuickMenuItem *centerMenuItem = qobject_cast<QQuickMenuItem *>(verticalSubMenu->itemAt(1));
+ QVERIFY(centerMenuItem);
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, centerMenuItem->mapToScene(QPointF(centerMenuItem->width() / 2, centerMenuItem->height() / 2)).toPoint());
+ QVERIFY(!viewMenuBarItem->isHighlighted());
+ QTRY_VERIFY(!viewMenuBarMenu->isVisible());
+ QTRY_VERIFY(!alignmentSubMenu->isVisible());
+ QTRY_VERIFY(!verticalSubMenu->isVisible());
+
+ // re-highlight the same menubar item
+ QTest::mouseMove(window.data(), viewMenuBarItem->mapToScene(QPointF(viewMenuBarItem->width() / 2, viewMenuBarItem->height() / 2)).toPoint());
+ QVERIFY(viewMenuBarItem->isHighlighted());
+
+ // re-open the chain of menus
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, viewMenuBarItem->mapToScene(QPointF(viewMenuBarItem->width() / 2, viewMenuBarItem->height() / 2)).toPoint());
+ QTRY_VERIFY(viewMenuBarMenu->isOpened());
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, alignmentSubMenuItem->mapToScene(QPointF(alignmentSubMenuItem->width() / 2, alignmentSubMenuItem->height() / 2)).toPoint());
+ QTRY_VERIFY(alignmentSubMenu->isOpened());
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, verticalSubMenuItem->mapToScene(QPointF(verticalSubMenuItem->width() / 2, verticalSubMenuItem->height() / 2)).toPoint());
+ QTRY_VERIFY(verticalSubMenu->isOpened());
+
+ // click outside to close the whole chain of menus
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, QPoint(window->width() - 1, window->height() - 1));
+ QVERIFY(!viewMenuBarItem->isHighlighted());
+ QTRY_VERIFY(!viewMenuBarMenu->isVisible());
+ QTRY_VERIFY(!alignmentSubMenu->isVisible());
+ QTRY_VERIFY(!verticalSubMenu->isVisible());
+}
+
+void tst_qquickmenubar::keys()
+{
+ QQmlApplicationEngine engine(testFileUrl("menubar.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QVERIFY(QTest::qWaitForWindowActive(window.data()));
+
+ centerOnScreen(window.data());
+ moveMouseAway(window.data());
+
+ QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+
+ QQuickMenu *fileMenuBarMenu = menuBar->menuAt(0);
+ QQuickMenu *editMenuBarMenu = menuBar->menuAt(1);
+ QQuickMenu *viewMenuBarMenu = menuBar->menuAt(2);
+ QQuickMenu *helpMenuBarMenu = menuBar->menuAt(3);
+ QVERIFY(fileMenuBarMenu && editMenuBarMenu && viewMenuBarMenu && helpMenuBarMenu);
+
+ QQuickMenuBarItem *fileMenuBarItem = qobject_cast<QQuickMenuBarItem *>(fileMenuBarMenu->parentItem());
+ QQuickMenuBarItem *editMenuBarItem = qobject_cast<QQuickMenuBarItem *>(editMenuBarMenu->parentItem());
+ QQuickMenuBarItem *viewMenuBarItem = qobject_cast<QQuickMenuBarItem *>(viewMenuBarMenu->parentItem());
+ QQuickMenuBarItem *helpMenuBarItem = qobject_cast<QQuickMenuBarItem *>(helpMenuBarMenu->parentItem());
+ QVERIFY(fileMenuBarItem && editMenuBarItem && viewMenuBarItem && helpMenuBarItem);
+
+ // trigger a menubar item to open a menu
+ editMenuBarItem->forceActiveFocus();
+ QTest::keyClick(window.data(), Qt::Key_Space);
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(editMenuBarMenu->isVisible());
+ QTRY_VERIFY(editMenuBarMenu->isOpened());
+ QVERIFY(editMenuBarMenu->hasActiveFocus());
+
+ // navigate down to the menu
+ QQuickMenuItem *cutMenuItem = qobject_cast<QQuickMenuItem *>(editMenuBarMenu->itemAt(0));
+ QVERIFY(cutMenuItem);
+ QVERIFY(!cutMenuItem->isHighlighted());
+ QVERIFY(!cutMenuItem->hasActiveFocus());
+ QTest::keyClick(window.data(), Qt::Key_Down);
+ QVERIFY(cutMenuItem->isHighlighted());
+ QVERIFY(cutMenuItem->hasActiveFocus());
+
+ // navigate up, back to the menubar
+ QTest::keyClick(window.data(), Qt::Key_Up);
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(editMenuBarItem->hasActiveFocus());
+ QTRY_VERIFY(!editMenuBarMenu->isVisible());
+ QVERIFY(!cutMenuItem->isHighlighted());
+ QVERIFY(!cutMenuItem->hasActiveFocus());
+
+ // navigate down to re-open the menu
+ QTest::keyClick(window.data(), Qt::Key_Down);
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(!editMenuBarItem->hasActiveFocus());
+ QVERIFY(editMenuBarMenu->isVisible());
+ QTRY_VERIFY(editMenuBarMenu->isOpened());
+ QVERIFY(editMenuBarMenu->hasActiveFocus());
+ QVERIFY(cutMenuItem->isHighlighted());
+ QVERIFY(cutMenuItem->hasActiveFocus());
+
+ // navigate left in popup mode (menu open)
+ QTest::keyClick(window.data(), Qt::Key_Left);
+ QVERIFY(fileMenuBarItem->isHighlighted());
+ QVERIFY(!editMenuBarItem->isHighlighted());
+ QVERIFY(fileMenuBarMenu->isVisible());
+ QTRY_VERIFY(fileMenuBarMenu->isOpened());
+ QTRY_VERIFY(!editMenuBarMenu->isVisible());
+
+ // navigate left in popup mode (wrap)
+ QTest::keyClick(window.data(), Qt::Key_Left);
+ QVERIFY(helpMenuBarItem->isHighlighted());
+ QVERIFY(!fileMenuBarItem->isHighlighted());
+ QVERIFY(helpMenuBarMenu->isVisible());
+ QTRY_VERIFY(helpMenuBarMenu->isOpened());
+ QTRY_VERIFY(!fileMenuBarMenu->isVisible());
+
+ // navigate up to close the menu
+ QTest::keyClick(window.data(), Qt::Key_Up);
+ QVERIFY(helpMenuBarItem->isHighlighted());
+ QTRY_VERIFY(!helpMenuBarMenu->isVisible());
+
+ // navigate right in non-popup mode (wrap)
+ QTest::keyClick(window.data(), Qt::Key_Right);
+ QVERIFY(fileMenuBarItem->isHighlighted());
+ QVERIFY(!helpMenuBarItem->isHighlighted());
+ QVERIFY(!fileMenuBarMenu->isVisible());
+ QVERIFY(!helpMenuBarMenu->isVisible());
+
+ // navigate right in non-popup mode (menu closed)
+ QTest::keyClick(window.data(), Qt::Key_Right);
+ QVERIFY(!fileMenuBarItem->isHighlighted());
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(!fileMenuBarMenu->isVisible());
+ QVERIFY(!editMenuBarMenu->isVisible());
+
+ // open a menu
+ viewMenuBarItem->forceActiveFocus();
+ QTest::keyClick(window.data(), Qt::Key_Space);
+ QVERIFY(viewMenuBarItem->isHighlighted());
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QTRY_VERIFY(viewMenuBarMenu->isOpened());
+ QVERIFY(!viewMenuBarItem->hasActiveFocus());
+ QVERIFY(viewMenuBarMenu->hasActiveFocus());
+
+ // open a sub-menu
+ QQuickMenuItem *alignmentSubMenuItem = qobject_cast<QQuickMenuItem *>(viewMenuBarMenu->itemAt(0));
+ QVERIFY(alignmentSubMenuItem);
+ QQuickMenu *alignmentSubMenu = alignmentSubMenuItem->subMenu();
+ QVERIFY(alignmentSubMenu);
+ QTest::keyClick(window.data(), Qt::Key_Down);
+ QVERIFY(alignmentSubMenuItem->isHighlighted());
+ QVERIFY(!alignmentSubMenu->isVisible());
+ QTest::keyClick(window.data(), Qt::Key_Right);
+ QVERIFY(alignmentSubMenu->isVisible());
+ QTRY_VERIFY(alignmentSubMenu->isOpened());
+
+ // open a sub-sub-menu
+ QQuickMenuItem *horizontalSubMenuItem = qobject_cast<QQuickMenuItem *>(alignmentSubMenu->itemAt(0));
+ QVERIFY(horizontalSubMenuItem);
+ QVERIFY(horizontalSubMenuItem->isHighlighted());
+ QQuickMenu *horizontalSubMenu = horizontalSubMenuItem->subMenu();
+ QVERIFY(horizontalSubMenu);
+ QTest::keyClick(window.data(), Qt::Key_Right);
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QVERIFY(alignmentSubMenu->isVisible());
+ QVERIFY(horizontalSubMenu->isVisible());
+ QTRY_VERIFY(horizontalSubMenu->isOpened());
+
+ // navigate left to close a sub-menu
+ QTest::keyClick(window.data(), Qt::Key_Left);
+ QTRY_VERIFY(!horizontalSubMenu->isVisible());
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QVERIFY(alignmentSubMenu->isVisible());
+
+ // navigate right to re-open the sub-menu
+ QTest::keyClick(window.data(), Qt::Key_Right);
+ QVERIFY(horizontalSubMenuItem->isHighlighted());
+ QVERIFY(horizontalSubMenu->isVisible());
+ QTRY_VERIFY(horizontalSubMenu->isOpened());
+
+ // navigate right to the next menubar menu
+ QTest::keyClick(window.data(), Qt::Key_Right);
+ QVERIFY(!viewMenuBarItem->isHighlighted());
+ QVERIFY(helpMenuBarItem->isHighlighted());
+ QVERIFY(helpMenuBarMenu->isVisible());
+ QTRY_VERIFY(!viewMenuBarMenu->isVisible());
+ QTRY_VERIFY(!alignmentSubMenu->isVisible());
+ QTRY_VERIFY(!horizontalSubMenu->isVisible());
+ QTRY_VERIFY(helpMenuBarMenu->isOpened());
+
+ // navigate back
+ QTest::keyClick(window.data(), Qt::Key_Left);
+ QVERIFY(!helpMenuBarItem->isHighlighted());
+ QVERIFY(viewMenuBarItem->isHighlighted());
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QTRY_VERIFY(!helpMenuBarMenu->isVisible());
+ QTRY_VERIFY(viewMenuBarMenu->isOpened());
+
+ // re-open the chain of menus
+ QTest::keyClick(window.data(), Qt::Key_Down);
+ QVERIFY(alignmentSubMenuItem->isHighlighted());
+ QTest::keyClick(window.data(), Qt::Key_Right);
+ QTRY_VERIFY(alignmentSubMenu->isOpened());
+ QTest::keyClick(window.data(), Qt::Key_Right);
+ QTRY_VERIFY(horizontalSubMenu->isOpened());
+
+ // repeat escape to close the whole chain of menus one by one
+ QTest::keyClick(window.data(), Qt::Key_Escape);
+ QTRY_VERIFY(!horizontalSubMenu->isVisible());
+ QVERIFY(viewMenuBarItem->isHighlighted());
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QVERIFY(alignmentSubMenu->isVisible());
+
+ QTest::keyClick(window.data(), Qt::Key_Escape);
+ QTRY_VERIFY(!alignmentSubMenu->isVisible());
+ QVERIFY(viewMenuBarItem->isHighlighted());
+ QVERIFY(viewMenuBarMenu->isVisible());
+
+ QTest::keyClick(window.data(), Qt::Key_Escape);
+ QVERIFY(!viewMenuBarItem->isHighlighted());
+ QTRY_VERIFY(!viewMenuBarMenu->isVisible());
+}
+
+void tst_qquickmenubar::mnemonics()
+{
+#ifdef Q_OS_MACOS
+ QSKIP("Mnemonics are not used on macOS");
+#endif
+
+ QQmlApplicationEngine engine(testFileUrl("menubar.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QVERIFY(QTest::qWaitForWindowActive(window.data()));
+
+ centerOnScreen(window.data());
+ moveMouseAway(window.data());
+
+ QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+
+ QQuickMenu *fileMenuBarMenu = menuBar->menuAt(0);
+ QQuickMenu *editMenuBarMenu = menuBar->menuAt(1);
+ QQuickMenu *viewMenuBarMenu = menuBar->menuAt(2);
+ QQuickMenu *helpMenuBarMenu = menuBar->menuAt(3);
+ QVERIFY(fileMenuBarMenu && editMenuBarMenu && viewMenuBarMenu && helpMenuBarMenu);
+
+ QQuickMenuBarItem *fileMenuBarItem = qobject_cast<QQuickMenuBarItem *>(fileMenuBarMenu->parentItem());
+ QQuickMenuBarItem *editMenuBarItem = qobject_cast<QQuickMenuBarItem *>(editMenuBarMenu->parentItem());
+ QQuickMenuBarItem *viewMenuBarItem = qobject_cast<QQuickMenuBarItem *>(viewMenuBarMenu->parentItem());
+ QQuickMenuBarItem *helpMenuBarItem = qobject_cast<QQuickMenuBarItem *>(helpMenuBarMenu->parentItem());
+ QVERIFY(fileMenuBarItem && editMenuBarItem && viewMenuBarItem && helpMenuBarItem);
+
+ // trigger a menubar item to open a menu
+ QTest::keyClick(window.data(), Qt::Key_E, Qt::AltModifier); // "&Edit"
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(!editMenuBarItem->hasActiveFocus());
+ QVERIFY(editMenuBarMenu->isVisible());
+ QTRY_VERIFY(editMenuBarMenu->isOpened());
+ QVERIFY(editMenuBarMenu->hasActiveFocus());
+
+ // re-trigger a menubar item to hide the menu
+ QTest::keyClick(window.data(), Qt::Key_E, Qt::AltModifier); // "&Edit"
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(editMenuBarItem->hasActiveFocus());
+ QVERIFY(!editMenuBarMenu->hasActiveFocus());
+ QTRY_VERIFY(!editMenuBarMenu->isVisible());
+
+ // re-trigger a menubar item to show the menu again
+ QTest::keyClick(window.data(), Qt::Key_E, Qt::AltModifier); // "&Edit"
+ QVERIFY(editMenuBarItem->isHighlighted());
+ QVERIFY(editMenuBarMenu->isVisible());
+ QTRY_VERIFY(editMenuBarMenu->isOpened());
+ QVERIFY(editMenuBarMenu->hasActiveFocus());
+ QVERIFY(!editMenuBarItem->hasActiveFocus());
+
+ // trigger another menubar item to open another menu
+ QTest::keyClick(window.data(), Qt::Key_H, Qt::AltModifier); // "&Help"
+ QVERIFY(!editMenuBarItem->isHighlighted());
+ QVERIFY(helpMenuBarItem->isHighlighted());
+ QVERIFY(!viewMenuBarMenu->isVisible());
+ QVERIFY(helpMenuBarMenu->isVisible());
+ QTRY_VERIFY(helpMenuBarMenu->isOpened());
+
+ // trigger a menu item to close the menu
+ QTest::keyClick(window.data(), Qt::Key_A, Qt::AltModifier); // "&About"
+ QVERIFY(!helpMenuBarItem->isHighlighted());
+ QTRY_VERIFY(!helpMenuBarMenu->isVisible());
+
+ // trigger a menubar item to open a menu
+ QTest::keyClick(window.data(), Qt::Key_V, Qt::AltModifier); // "&View"
+ QVERIFY(!editMenuBarItem->isHighlighted());
+ QVERIFY(viewMenuBarItem->isHighlighted());
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QTRY_VERIFY(viewMenuBarMenu->isOpened());
+
+ // trigger a menu item to open a sub-menu
+ QQuickMenuItem *alignmentSubMenuItem = qobject_cast<QQuickMenuItem *>(viewMenuBarMenu->itemAt(0));
+ QVERIFY(alignmentSubMenuItem);
+ QQuickMenu *alignmentSubMenu = alignmentSubMenuItem->subMenu();
+ QVERIFY(alignmentSubMenu);
+ QTest::keyClick(window.data(), Qt::Key_A, Qt::AltModifier); // "&Alignment"
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QVERIFY(alignmentSubMenu->isVisible());
+ QTRY_VERIFY(alignmentSubMenu->isOpened());
+
+ // trigger a menu item to open a sub-sub-menu
+ QQuickMenuItem *verticalSubMenuItem = qobject_cast<QQuickMenuItem *>(alignmentSubMenu->itemAt(1));
+ QVERIFY(verticalSubMenuItem);
+ QQuickMenu *verticalSubMenu = verticalSubMenuItem->subMenu();
+ QVERIFY(verticalSubMenu);
+ QTest::keyClick(window.data(), Qt::Key_V, Qt::AltModifier); // "&Vertical"
+ QVERIFY(viewMenuBarMenu->isVisible());
+ QVERIFY(alignmentSubMenu->isVisible());
+ QVERIFY(verticalSubMenu->isVisible());
+ QTRY_VERIFY(verticalSubMenu->isOpened());
+
+ // trigger a menu item to close the whole chain of menus
+ QTest::keyClick(window.data(), Qt::Key_C, Qt::AltModifier); // "&Center"
+ QVERIFY(!viewMenuBarItem->isHighlighted());
+ QTRY_VERIFY(!viewMenuBarMenu->isVisible());
+ QTRY_VERIFY(!alignmentSubMenu->isVisible());
+ QTRY_VERIFY(!verticalSubMenu->isVisible());
+}
+
+void tst_qquickmenubar::addRemove()
+{
+ QQmlApplicationEngine engine(testFileUrl("empty.qml"));
+
+ QScopedPointer<QQuickMenuBar> menuBar(qobject_cast<QQuickMenuBar *>(engine.rootObjects().value(0)));
+ QVERIFY(menuBar);
+
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick.Controls 2.0; Menu { }", QUrl());
+
+ QPointer<QQuickMenu> menu1(qobject_cast<QQuickMenu *>(component.create()));
+ QVERIFY(!menu1.isNull());
+ menuBar->addMenu(menu1.data());
+ QCOMPARE(menuBar->count(), 1);
+ QCOMPARE(menuBar->menuAt(0), menu1.data());
+
+ QPointer<QQuickMenuBarItem> menuBarItem1(qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(0)));
+ QVERIFY(menuBarItem1);
+ QCOMPARE(menuBarItem1->menu(), menu1.data());
+ QCOMPARE(menuBar->itemAt(0), menuBarItem1.data());
+
+ QScopedPointer<QQuickMenu> menu2(qobject_cast<QQuickMenu *>(component.create()));
+ QVERIFY(!menu2.isNull());
+ menuBar->insertMenu(0, menu2.data());
+ QCOMPARE(menuBar->count(), 2);
+ QCOMPARE(menuBar->menuAt(0), menu2.data());
+ QCOMPARE(menuBar->menuAt(1), menu1.data());
+
+ QPointer<QQuickMenuBarItem> menuBarItem2(qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(0)));
+ QVERIFY(menuBarItem2);
+ QCOMPARE(menuBarItem2->menu(), menu2.data());
+ QCOMPARE(menuBar->itemAt(0), menuBarItem2.data());
+ QCOMPARE(menuBar->itemAt(1), menuBarItem1.data());
+
+ // takeMenu(int) does not destroy the menu, but does destroy the respective item in the menubar
+ QCOMPARE(menuBar->takeMenu(1), menu1.data());
+ QCOMPARE(menuBar->count(), 1);
+ QVERIFY(!menuBar->menuAt(1));
+ QVERIFY(!menuBar->itemAt(1));
+ QCoreApplication::sendPostedEvents(menu1.data(), QEvent::DeferredDelete);
+ QVERIFY(!menu1.isNull());
+ QCoreApplication::sendPostedEvents(menuBarItem1, QEvent::DeferredDelete);
+ QVERIFY(menuBarItem1.isNull());
+
+ // addMenu(Menu) re-creates the respective item in the menubar
+ menuBar->addMenu(menu1.data());
+ QCOMPARE(menuBar->count(), 2);
+ menuBarItem1 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(1));
+ QVERIFY(!menuBarItem1.isNull());
+
+ // removeMenu(Menu) destroys both the menu and the respective item in the menubar
+ menuBar->removeMenu(menu1.data());
+ QCOMPARE(menuBar->count(), 1);
+ QVERIFY(!menuBar->itemAt(1));
+ QCoreApplication::sendPostedEvents(menu1.data(), QEvent::DeferredDelete);
+ QVERIFY(menu1.isNull());
+ QCoreApplication::sendPostedEvents(menuBarItem1, QEvent::DeferredDelete);
+ QVERIFY(menuBarItem1.isNull());
+}
+
+QTEST_QUICKCONTROLS_MAIN(tst_qquickmenubar)
+
+#include "tst_qquickmenubar.moc"
diff --git a/tests/auto/qquickninepatchimage/data/foo.9.png b/tests/auto/qquickninepatchimage/data/foo.9.png
new file mode 100644
index 00000000..51246990
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/foo.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/foo@2x.9.png b/tests/auto/qquickninepatchimage/data/foo@2x.9.png
new file mode 100644
index 00000000..c8dc30a3
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/foo@2x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/foo@3x.9.png b/tests/auto/qquickninepatchimage/data/foo@3x.9.png
new file mode 100644
index 00000000..00ea4e05
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/foo@3x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/foo@4x.9.png b/tests/auto/qquickninepatchimage/data/foo@4x.9.png
new file mode 100644
index 00000000..ea73340a
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/foo@4x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-all.9.png b/tests/auto/qquickninepatchimage/data/inset-all.9.png
new file mode 100644
index 00000000..e08ef9c7
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-all.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-all@2x.9.png b/tests/auto/qquickninepatchimage/data/inset-all@2x.9.png
new file mode 100644
index 00000000..96d1c0e8
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-all@2x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-all@3x.9.png b/tests/auto/qquickninepatchimage/data/inset-all@3x.9.png
new file mode 100644
index 00000000..215ce27e
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-all@3x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-all@4x.9.png b/tests/auto/qquickninepatchimage/data/inset-all@4x.9.png
new file mode 100644
index 00000000..35e53101
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-all@4x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-bottomright.9.png b/tests/auto/qquickninepatchimage/data/inset-bottomright.9.png
new file mode 100644
index 00000000..c4c37dff
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-bottomright.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-bottomright@2x.9.png b/tests/auto/qquickninepatchimage/data/inset-bottomright@2x.9.png
new file mode 100644
index 00000000..3d64036f
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-bottomright@2x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-bottomright@3x.9.png b/tests/auto/qquickninepatchimage/data/inset-bottomright@3x.9.png
new file mode 100644
index 00000000..115184d9
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-bottomright@3x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-bottomright@4x.9.png b/tests/auto/qquickninepatchimage/data/inset-bottomright@4x.9.png
new file mode 100644
index 00000000..2ec7cbef
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-bottomright@4x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-topleft.9.png b/tests/auto/qquickninepatchimage/data/inset-topleft.9.png
new file mode 100644
index 00000000..9cc5f43d
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-topleft.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-topleft@2x.9.png b/tests/auto/qquickninepatchimage/data/inset-topleft@2x.9.png
new file mode 100644
index 00000000..a4ca2b12
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-topleft@2x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-topleft@3x.9.png b/tests/auto/qquickninepatchimage/data/inset-topleft@3x.9.png
new file mode 100644
index 00000000..73f3595a
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-topleft@3x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/inset-topleft@4x.9.png b/tests/auto/qquickninepatchimage/data/inset-topleft@4x.9.png
new file mode 100644
index 00000000..78baa463
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/inset-topleft@4x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/ninepatchimage.qml b/tests/auto/qquickninepatchimage/data/ninepatchimage.qml
new file mode 100644
index 00000000..7ef07a1c
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/ninepatchimage.qml
@@ -0,0 +1,7 @@
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Controls.Imagine 2.3
+import QtQuick.Controls.Imagine.impl 2.3
+
+NinePatchImage {
+}
diff --git a/tests/auto/qquickninepatchimage/data/padding.9.png b/tests/auto/qquickninepatchimage/data/padding.9.png
new file mode 100644
index 00000000..5b4f0960
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/padding.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/padding@2x.9.png b/tests/auto/qquickninepatchimage/data/padding@2x.9.png
new file mode 100644
index 00000000..44eb1943
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/padding@2x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/padding@3x.9.png b/tests/auto/qquickninepatchimage/data/padding@3x.9.png
new file mode 100644
index 00000000..d1563448
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/padding@3x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/data/padding@4x.9.png b/tests/auto/qquickninepatchimage/data/padding@4x.9.png
new file mode 100644
index 00000000..e86cce69
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/data/padding@4x.9.png
Binary files differ
diff --git a/tests/auto/qquickninepatchimage/qquickninepatchimage.pro b/tests/auto/qquickninepatchimage/qquickninepatchimage.pro
new file mode 100644
index 00000000..b40a5f4c
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/qquickninepatchimage.pro
@@ -0,0 +1,14 @@
+CONFIG += testcase
+macos:CONFIG -= app_bundle
+TARGET = tst_qquickninepatchimage
+
+QT += core gui qml quick testlib
+QT_PRIVATE += gui-private quick-private quickcontrols2-private
+
+include (../shared/util.pri)
+
+SOURCES += tst_qquickninepatchimage.cpp
+
+TESTDATA += \
+ $$PWD/data/*.qml \
+ $$PWD/data/*.png
diff --git a/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp b/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp
new file mode 100644
index 00000000..b5dd7f2f
--- /dev/null
+++ b/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp
@@ -0,0 +1,245 @@
+/****************************************************************************
+**
+** 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:GPL-EXCEPT$
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QtTest/qsignalspy.h>
+
+#include <QtCore/qmath.h>
+#include <QtCore/qsize.h>
+#include <QtGui/private/qhighdpiscaling_p.h>
+#include <QtQml/qqmlengine.h>
+#include <QtQuick/qquickitem.h>
+#include <QtQuick/qquickview.h>
+#include <QtQuick/qquickitemgrabresult.h>
+#include <QtQuick/private/qquickimage_p.h>
+
+#include "../shared/util.h"
+#include "../shared/visualtestutil.h"
+
+using namespace QQuickVisualTestUtil;
+
+class tst_qquickninepatchimage : public QQmlDataTest
+{
+ Q_OBJECT
+
+private slots:
+ void ninePatch_data();
+ void ninePatch();
+ void padding_data();
+ void padding();
+ void inset_data();
+ void inset();
+ void implicitSize_data();
+ void implicitSize();
+};
+
+static QImage grabItemToImage(QQuickItem *item)
+{
+ QSharedPointer<QQuickItemGrabResult> result = item->grabToImage();
+ QSignalSpy spy(result.data(), SIGNAL(ready()));
+ spy.wait();
+ return result->image();
+}
+
+void tst_qquickninepatchimage::ninePatch_data()
+{
+ QTest::addColumn<int>("dpr");
+ QTest::addColumn<QSize>("size");
+
+ // original size, downsized, stretched
+ const QList<QSize> sizes = QList<QSize>()
+ << QSize(40, 40) // original
+ << QSize(10, 40) // downsized (h)
+ << QSize(40, 10) // downsized (v)
+ << QSize(10, 10) // downsized (h & v)
+ << QSize(80, 40) // stretched (h)
+ << QSize(40, 80) // stretched (v)
+ << QSize(80, 80) // stretched (h & v)
+ << QSize(8, 8); // minimal (borders only)
+
+ for (const QSize &sz : sizes) {
+ for (int dpr = 1; dpr <= 4; ++dpr)
+ QTest::newRow(qPrintable(QString::fromLatin1("DPR=%1, %2x%3").arg(dpr).arg(sz.width()).arg(sz.height()))) << dpr << sz;
+ }
+}
+
+void tst_qquickninepatchimage::ninePatch()
+{
+ QFETCH(int, dpr);
+ QFETCH(QSize, size);
+
+ QHighDpiScaling::setGlobalFactor(dpr);
+
+ QQuickView view(testFileUrl("ninepatchimage.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickImage *ninePatchImage = qobject_cast<QQuickImage *>(view.rootObject());
+ QVERIFY(ninePatchImage);
+ ninePatchImage->setSource(testFileUrl("foo.9.png"));
+ ninePatchImage->setSize(size);
+
+ const QImage ninePatchImageGrab = grabItemToImage(ninePatchImage).scaled(size * dpr);
+
+ // Generate an image to compare against the actual 9-patch image.
+ QImage generatedImage(size * dpr, ninePatchImageGrab.format());
+ generatedImage.fill(Qt::red);
+
+ QImage blueRect(4 * dpr, 4 * dpr, ninePatchImageGrab.format());
+ blueRect.fill(Qt::blue);
+
+ QPainter painter(&generatedImage);
+ // Top-left
+ painter.drawImage(0, 0, blueRect);
+ // Top-right
+ painter.drawImage(generatedImage.width() - blueRect.width(), 0, blueRect);
+ // Bottom-right
+ painter.drawImage(generatedImage.width() - blueRect.width(), generatedImage.height() - blueRect.height(), blueRect);
+ // Bottom-left
+ painter.drawImage(0, generatedImage.height() - blueRect.height(), blueRect);
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QEXPECT_FAIL("", "Grabbing does not work on offscreen/minimal platforms", Abort);
+
+ QCOMPARE(ninePatchImageGrab, generatedImage);
+}
+
+void tst_qquickninepatchimage::padding_data()
+{
+ QTest::addColumn<int>("dpr");
+
+ for (int dpr = 1; dpr <= 4; ++dpr)
+ QTest::newRow(qPrintable(QString::fromLatin1("DPR=%1").arg(dpr))) << dpr;
+}
+
+void tst_qquickninepatchimage::padding()
+{
+ QFETCH(int, dpr);
+
+ QHighDpiScaling::setGlobalFactor(dpr);
+
+ QQuickView view(testFileUrl("ninepatchimage.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickImage *ninePatchImage = qobject_cast<QQuickImage *>(view.rootObject());
+ QVERIFY(ninePatchImage);
+ ninePatchImage->setSource(testFileUrl("padding.9.png"));
+
+ QCOMPARE(ninePatchImage->property("topPadding").toReal(), 8);
+ QCOMPARE(ninePatchImage->property("leftPadding").toReal(), 18);
+ QCOMPARE(ninePatchImage->property("rightPadding").toReal(), 20);
+ QCOMPARE(ninePatchImage->property("bottomPadding").toReal(), 10);
+}
+
+void tst_qquickninepatchimage::inset_data()
+{
+ QTest::addColumn<int>("dpr");
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QMarginsF>("insets");
+
+ const QStringList files = QStringList() << "inset-all.9.png" << "inset-topleft.9.png" << "inset-bottomright.9.png";
+ const QList<QMarginsF> insets = QList<QMarginsF>() << QMarginsF(2, 1, 3, 4) << QMarginsF(2, 1, 0, 0) << QMarginsF(0, 0, 3, 4);
+
+ for (int i = 0; i < files.count(); ++i) {
+ QString file = files.at(i);
+ for (int dpr = 1; dpr <= 4; ++dpr)
+ QTest::newRow(qPrintable(QString::fromLatin1("%1 DPR=%2").arg(file).arg(dpr))) << dpr << file << insets.at(i);
+ }
+}
+
+Q_DECLARE_METATYPE(QMarginsF)
+
+void tst_qquickninepatchimage::inset()
+{
+ QFETCH(int, dpr);
+ QFETCH(QString, file);
+ QFETCH(QMarginsF, insets);
+
+ QHighDpiScaling::setGlobalFactor(dpr);
+
+ QQuickView view(testFileUrl("ninepatchimage.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickImage *ninePatchImage = qobject_cast<QQuickImage *>(view.rootObject());
+ QVERIFY(ninePatchImage);
+ ninePatchImage->setSource(testFileUrl(file));
+
+ QCOMPARE(ninePatchImage->property("topInset").toReal(), insets.top());
+ QCOMPARE(ninePatchImage->property("leftInset").toReal(), insets.left());
+ QCOMPARE(ninePatchImage->property("rightInset").toReal(), insets.right());
+ QCOMPARE(ninePatchImage->property("bottomInset").toReal(), insets.bottom());
+}
+
+void tst_qquickninepatchimage::implicitSize_data()
+{
+ QTest::addColumn<int>("dpr");
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QSizeF>("implicitSize");
+
+ const QStringList files = QStringList() << "foo.9.png" << "padding.9.png" << "inset-all.9.png" << "inset-topleft.9.png" << "inset-bottomright.9.png";
+
+ for (const QString &file : files) {
+ for (int dpr = 1; dpr <= 4; ++dpr)
+ QTest::newRow(qPrintable(QString::fromLatin1("%1 DPR=%2").arg(file).arg(dpr))) << dpr << file << QSizeF(40, 40);
+ }
+}
+
+void tst_qquickninepatchimage::implicitSize()
+{
+ QFETCH(int, dpr);
+ QFETCH(QString, file);
+ QFETCH(QSizeF, implicitSize);
+
+ QHighDpiScaling::setGlobalFactor(dpr);
+
+ QQuickView view(testFileUrl("ninepatchimage.qml"));
+ QCOMPARE(view.status(), QQuickView::Ready);
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickImage *ninePatchImage = qobject_cast<QQuickImage *>(view.rootObject());
+ QVERIFY(ninePatchImage);
+ ninePatchImage->setSource(testFileUrl(file));
+
+ QCOMPARE(ninePatchImage->implicitWidth(), implicitSize.width());
+ QCOMPARE(ninePatchImage->implicitHeight(), implicitSize.height());
+}
+
+QTEST_MAIN(tst_qquickninepatchimage)
+
+#include "tst_qquickninepatchimage.moc"
diff --git a/tests/auto/qquickpopup/data/closeOnEscapeWithNestedPopups.qml b/tests/auto/qquickpopup/data/closeOnEscapeWithNestedPopups.qml
index 53dae0f9..f41516c8 100644
--- a/tests/auto/qquickpopup/data/closeOnEscapeWithNestedPopups.qml
+++ b/tests/auto/qquickpopup/data/closeOnEscapeWithNestedPopups.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Controls 2.2
ApplicationWindow {
diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp
index 3f4b2d13..a1e5e246 100644
--- a/tests/auto/qquickpopup/tst_qquickpopup.cpp
+++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp
@@ -79,6 +79,7 @@ private slots:
void cursorShape();
void componentComplete();
void closeOnEscapeWithNestedPopups();
+ void enabled();
void orientation_data();
void orientation();
};
@@ -217,6 +218,15 @@ void tst_QQuickPopup::overlay()
QQuickPopup *popup = window->property("popup").value<QQuickPopup*>();
QVERIFY(popup);
+ QQuickOverlayAttached *overlayAttached = qobject_cast<QQuickOverlayAttached *>(qmlAttachedPropertiesObject<QQuickOverlay>(popup));
+ QVERIFY(overlayAttached);
+ QCOMPARE(overlayAttached->overlay(), overlay);
+
+ QSignalSpy overlayAttachedPressedSignal(overlayAttached, SIGNAL(pressed()));
+ QSignalSpy overlayAttachedReleasedSignal(overlayAttached, SIGNAL(released()));
+ QVERIFY(overlayAttachedPressedSignal.isValid());
+ QVERIFY(overlayAttachedReleasedSignal.isValid());
+
QQuickButton *button = window->property("button").value<QQuickButton*>();
QVERIFY(button);
@@ -230,10 +240,14 @@ void tst_QQuickPopup::overlay()
QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(1, 1));
QCOMPARE(overlayPressedSignal.count(), ++overlayPressCount);
QCOMPARE(overlayReleasedSignal.count(), overlayReleaseCount);
+ QCOMPARE(overlayAttachedPressedSignal.count(), overlayPressCount);
+ QCOMPARE(overlayAttachedReleasedSignal.count(), overlayReleaseCount);
QTest::mouseRelease(window, Qt::LeftButton, Qt::NoModifier, QPoint(1, 1));
QCOMPARE(overlayPressedSignal.count(), overlayPressCount);
QCOMPARE(overlayReleasedSignal.count(), overlayReleaseCount); // no modal-popups open
+ QCOMPARE(overlayAttachedPressedSignal.count(), overlayPressCount);
+ QCOMPARE(overlayAttachedReleasedSignal.count(), overlayReleaseCount);
popup->close();
QVERIFY(!popup->isVisible());
@@ -251,10 +265,14 @@ void tst_QQuickPopup::overlay()
QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(1, 1));
QCOMPARE(overlayPressedSignal.count(), ++overlayPressCount);
QCOMPARE(overlayReleasedSignal.count(), overlayReleaseCount);
+ QCOMPARE(overlayAttachedPressedSignal.count(), overlayPressCount);
+ QCOMPARE(overlayAttachedReleasedSignal.count(), overlayReleaseCount);
QTest::mouseRelease(window, Qt::LeftButton, Qt::NoModifier, QPoint(1, 1));
QCOMPARE(overlayPressedSignal.count(), overlayPressCount);
QCOMPARE(overlayReleasedSignal.count(), ++overlayReleaseCount);
+ QCOMPARE(overlayAttachedPressedSignal.count(), overlayPressCount);
+ QCOMPARE(overlayAttachedReleasedSignal.count(), overlayReleaseCount);
QVERIFY(!popup->isVisible());
QCOMPARE(overlay->isVisible(), popup->isVisible());
@@ -280,10 +298,14 @@ void tst_QQuickPopup::overlay()
QTest::touchEvent(window, device.data()).press(0, QPoint(1, 1));
QCOMPARE(overlayPressedSignal.count(), ++overlayPressCount);
QCOMPARE(overlayReleasedSignal.count(), overlayReleaseCount);
+ QCOMPARE(overlayAttachedPressedSignal.count(), overlayPressCount);
+ QCOMPARE(overlayAttachedReleasedSignal.count(), overlayReleaseCount);
QTest::touchEvent(window, device.data()).release(0, QPoint(1, 1));
QCOMPARE(overlayPressedSignal.count(), overlayPressCount);
QCOMPARE(overlayReleasedSignal.count(), ++overlayReleaseCount);
+ QCOMPARE(overlayAttachedPressedSignal.count(), overlayPressCount);
+ QCOMPARE(overlayAttachedReleasedSignal.count(), overlayReleaseCount);
QVERIFY(!popup->isVisible());
QCOMPARE(overlay->isVisible(), popup->isVisible());
@@ -387,6 +409,28 @@ void tst_QQuickPopup::windowChange()
popup.setParentItem(window.contentItem());
QCOMPARE(popup.window(), &window);
QCOMPARE(spy.count(), 3);
+
+ popup.resetParentItem();
+ QVERIFY(!popup.window());
+ QCOMPARE(spy.count(), 4);
+
+ popup.setParent(&window);
+ popup.resetParentItem();
+ QCOMPARE(popup.window(), &window);
+ QCOMPARE(spy.count(), 5);
+
+ popup.setParent(this);
+ popup.resetParentItem();
+ QVERIFY(!popup.window());
+ QCOMPARE(spy.count(), 6);
+
+ item.setParentItem(window.contentItem());
+ popup.setParent(&item);
+ popup.resetParentItem();
+ QCOMPARE(popup.window(), &window);
+ QCOMPARE(spy.count(), 7);
+
+ popup.setParent(nullptr);
}
Q_DECLARE_METATYPE(QQuickPopup::ClosePolicy)
@@ -942,6 +986,26 @@ void tst_QQuickPopup::closeOnEscapeWithNestedPopups()
QCOMPARE(stackView->depth(), 1);
}
+void tst_QQuickPopup::enabled()
+{
+ QQuickPopup popup;
+ QVERIFY(popup.isEnabled());
+ QVERIFY(popup.popupItem()->isEnabled());
+
+ QSignalSpy enabledSpy(&popup, &QQuickPopup::enabledChanged);
+ QVERIFY(enabledSpy.isValid());
+
+ popup.setEnabled(false);
+ QVERIFY(!popup.isEnabled());
+ QVERIFY(!popup.popupItem()->isEnabled());
+ QCOMPARE(enabledSpy.count(), 1);
+
+ popup.popupItem()->setEnabled(true);
+ QVERIFY(popup.isEnabled());
+ QVERIFY(popup.popupItem()->isEnabled());
+ QCOMPARE(enabledSpy.count(), 2);
+}
+
void tst_QQuickPopup::orientation_data()
{
QTest::addColumn<Qt::ScreenOrientation>("orientation");
diff --git a/tests/auto/qquickstyleselector/data/PlatformStyle/+linux/Button.qml b/tests/auto/qquickstyleselector/data/PlatformStyle/+linux/Button.qml
new file mode 100644
index 00000000..ee17c230
--- /dev/null
+++ b/tests/auto/qquickstyleselector/data/PlatformStyle/+linux/Button.qml
@@ -0,0 +1,2 @@
+import QtQuick.Templates 2.1 as T
+T.Button { }
diff --git a/tests/auto/qquickstyleselector/data/PlatformStyle/+macos/Button.qml b/tests/auto/qquickstyleselector/data/PlatformStyle/+macos/Button.qml
new file mode 100644
index 00000000..ee17c230
--- /dev/null
+++ b/tests/auto/qquickstyleselector/data/PlatformStyle/+macos/Button.qml
@@ -0,0 +1,2 @@
+import QtQuick.Templates 2.1 as T
+T.Button { }
diff --git a/tests/auto/qquickstyleselector/data/PlatformStyle/+windows/Button.qml b/tests/auto/qquickstyleselector/data/PlatformStyle/+windows/Button.qml
new file mode 100644
index 00000000..ee17c230
--- /dev/null
+++ b/tests/auto/qquickstyleselector/data/PlatformStyle/+windows/Button.qml
@@ -0,0 +1,2 @@
+import QtQuick.Templates 2.1 as T
+T.Button { }
diff --git a/tests/auto/qquickstyleselector/data/PlatformStyle/Button.qml b/tests/auto/qquickstyleselector/data/PlatformStyle/Button.qml
new file mode 100644
index 00000000..ee17c230
--- /dev/null
+++ b/tests/auto/qquickstyleselector/data/PlatformStyle/Button.qml
@@ -0,0 +1,2 @@
+import QtQuick.Templates 2.1 as T
+T.Button { }
diff --git a/tests/auto/qquickstyleselector/tst_qquickstyleselector.cpp b/tests/auto/qquickstyleselector/tst_qquickstyleselector.cpp
index 598320d2..e90a8bd9 100644
--- a/tests/auto/qquickstyleselector/tst_qquickstyleselector.cpp
+++ b/tests/auto/qquickstyleselector/tst_qquickstyleselector.cpp
@@ -49,6 +49,8 @@ private slots:
void select_data();
void select();
+
+ void platformSelectors();
};
void tst_QQuickStyleSelector::initTestCase()
@@ -139,6 +141,24 @@ void tst_QQuickStyleSelector::select()
QCOMPARE(selector.select(file), expected);
}
+void tst_QQuickStyleSelector::platformSelectors()
+{
+ QQuickStyle::setStyle(QDir(dataDirectory()).filePath("PlatformStyle"));
+
+ QQuickStyleSelector selector;
+ selector.setBaseUrl(dataDirectoryUrl());
+
+#if defined(Q_OS_LINUX)
+ QCOMPARE(selector.select("Button.qml"), testFileUrl("PlatformStyle/+linux/Button.qml").toString());
+#elif defined(Q_OS_MACOS)
+ QCOMPARE(selector.select("Button.qml"), testFileUrl("PlatformStyle/+macos/Button.qml").toString());
+#elif defined(Q_OS_WIN)
+ QCOMPARE(selector.select("Button.qml"), testFileUrl("PlatformStyle/+windows/Button.qml").toString());
+#else
+ QCOMPARE(selector.select("Button.qml"), testFileUrl("PlatformStyle/Button.qml").toString());
+#endif
+}
+
QTEST_MAIN(tst_QQuickStyleSelector)
#include "tst_qquickstyleselector.moc"
diff --git a/tests/auto/qquickuniversalstyleconf/qtquickcontrols2.conf b/tests/auto/qquickuniversalstyleconf/qtquickcontrols2.conf
index 836372c9..0ec13258 100644
--- a/tests/auto/qquickuniversalstyleconf/qtquickcontrols2.conf
+++ b/tests/auto/qquickuniversalstyleconf/qtquickcontrols2.conf
@@ -4,3 +4,7 @@ Style=Universal
[Universal]
Background=#444444
Foreground=Red
+Font\PixelSize=22
+
+[Universal\Font]
+Family=Courier
diff --git a/tests/auto/qquickuniversalstyleconf/tst_qquickuniversalstyleconf.cpp b/tests/auto/qquickuniversalstyleconf/tst_qquickuniversalstyleconf.cpp
index c6b28be3..51cc5883 100644
--- a/tests/auto/qquickuniversalstyleconf/tst_qquickuniversalstyleconf.cpp
+++ b/tests/auto/qquickuniversalstyleconf/tst_qquickuniversalstyleconf.cpp
@@ -55,16 +55,22 @@ void tst_qquickuniversalstyleconf::conf()
{
QQuickApplicationHelper helper(this, QLatin1String("applicationwindow.qml"));
+ QFont customFont;
+ customFont.setFamily("Courier");
+ customFont.setPixelSize(22);
+
QQuickApplicationWindow *window = helper.appWindow;
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
- // We specified a custom background color, so the window should have it.
+ // We specified a custom background color and font, so the window should have them.
QCOMPARE(window->property("color").value<QColor>(), QColor("#444444"));
+ QCOMPARE(window->property("font").value<QFont>(), customFont);
- // We specified a custom foreground color, so the label should have it.
+ // We specified a custom foreground color and font, so the label should have them.
QQuickItem *label = window->property("label").value<QQuickItem*>();
QVERIFY(label);
QCOMPARE(label->property("color").value<QColor>(), QColor("#E51400"));
+ QCOMPARE(label->property("font").value<QFont>(), customFont);
}
QTEST_MAIN(tst_qquickuniversalstyleconf)
diff --git a/tests/auto/sanity/tst_sanity.cpp b/tests/auto/sanity/tst_sanity.cpp
index 2988c96c..f6e1c78b 100644
--- a/tests/auto/sanity/tst_sanity.cpp
+++ b/tests/auto/sanity/tst_sanity.cpp
@@ -139,7 +139,7 @@ private:
void tst_Sanity::initTestCase()
{
QDirIterator it(QQC2_IMPORT_PATH, QStringList() << "*.qml" << "*.js", QDir::Files, QDirIterator::Subdirectories);
- const QStringList excludeDirs = QStringList() << QStringLiteral("snippets") << QStringLiteral("designer");
+ const QStringList excludeDirs = QStringList() << QStringLiteral("snippets") << QStringLiteral("designer") << QStringLiteral("Sketch");
while (it.hasNext()) {
it.next();
QFileInfo info = it.fileInfo();
@@ -280,9 +280,12 @@ static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QSt
if (QFile::exists(filePath)) {
QTest::newRow(qPrintable(name)) << QUrl::fromLocalFile(filePath);
break;
- } else if (QFile::exists(QQmlFile::urlToLocalFileOrQrc(filePath))) {
- QTest::newRow(qPrintable(name)) << QUrl(filePath);
- break;
+ } else {
+ filePath = QQmlFile::urlToLocalFileOrQrc(filePath);
+ if (!filePath.isEmpty() && QFile::exists(filePath)) {
+ QTest::newRow(qPrintable(name)) << QUrl(filePath);
+ break;
+ }
}
}
}
@@ -313,7 +316,8 @@ void tst_Sanity::attachedObjects_data()
{
QTest::addColumn<QUrl>("url");
addTestRows(&engine, "calendar", "Qt/labs/calendar");
- addTestRows(&engine, "controls", "QtQuick/Controls.2", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
+ addTestRows(&engine, "controls", "QtQuick/Controls.2");
+ addTestRows(&engine, "controls/fusion", "QtQuick/Controls.2", QStringList() << "CheckIndicator" << "RadioIndicator" << "SliderGroove" << "SliderHandle" << "SwitchIndicator");
addTestRows(&engine, "controls/material", "QtQuick/Controls.2/Material", QStringList() << "Ripple" << "SliderHandle" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator" << "BoxShadow" << "ElevationEffect" << "CursorDelegate");
addTestRows(&engine, "controls/universal", "QtQuick/Controls.2/Universal", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
}
diff --git a/tests/auto/shared/qtest_quickcontrols.h b/tests/auto/shared/qtest_quickcontrols.h
new file mode 100644
index 00000000..d1fe08f6
--- /dev/null
+++ b/tests/auto/shared/qtest_quickcontrols.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#ifndef QTEST_QUICKCONTROLS_H
+#define QTEST_QUICKCONTROLS_H
+
+#include <QtTest/qtest.h>
+#include <QtTest/private/qtestresult_p.h>
+#include <QtGui/qguiapplication.h>
+#include <QtQml/qqml.h>
+#include <QtQuickControls2/qquickstyle.h>
+
+static QStringList testStyles()
+{
+ if (QQuickStyle::name().isEmpty())
+ return QQuickStyle::availableStyles();
+ return QStringList(QQuickStyle::name());
+}
+
+static int runTests(QObject *testObject, int argc, char *argv[])
+{
+ int res = 0;
+ QTest::qInit(testObject, argc, argv);
+ const QByteArray testObjectName = QTestResult::currentTestObjectName();
+ const QStringList styles = testStyles();
+ for (const QString &style : styles) {
+ qmlClearTypeRegistrations();
+ QQuickStyle::setStyle(style);
+ const QByteArray testName = testObjectName + "::" + style.toLocal8Bit();
+ QTestResult::setCurrentTestObject(testName);
+ res += QTest::qRun();
+ }
+ QTestResult::setCurrentTestObject(testObjectName);
+ QTest::qCleanup();
+ return res;
+}
+
+#define QTEST_QUICKCONTROLS_MAIN(TestCase) \
+QT_BEGIN_NAMESPACE \
+QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS \
+QT_END_NAMESPACE \
+int main(int argc, char *argv[]) \
+{ \
+ qputenv("QML_NO_TOUCH_COMPRESSION", "1"); \
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); \
+ QGuiApplication app(argc, argv); \
+ QTEST_ADD_GPU_BLACKLIST_SUPPORT \
+ TestCase tc; \
+ QTEST_SET_MAIN_SOURCE_PATH \
+ return runTests(&tc, argc, argv); \
+}
+
+#endif // QTEST_QUICKCONTROLS_H
diff --git a/tests/auto/shared/util.pri b/tests/auto/shared/util.pri
index 03191511..77c2cc59 100644
--- a/tests/auto/shared/util.pri
+++ b/tests/auto/shared/util.pri
@@ -1,7 +1,8 @@
-QT += core-private gui-private qml-private quick-private quicktemplates2-private
+QT += testlib-private core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2
HEADERS += $$PWD/visualtestutil.h \
- $$PWD/util.h
+ $$PWD/util.h \
+ $$PWD/qtest_quickcontrols.h
SOURCES += $$PWD/visualtestutil.cpp \
$$PWD/util.cpp
diff --git a/tests/auto/shared/visualtestutil.cpp b/tests/auto/shared/visualtestutil.cpp
index 60b8790d..c5e69812 100644
--- a/tests/auto/shared/visualtestutil.cpp
+++ b/tests/auto/shared/visualtestutil.cpp
@@ -38,6 +38,8 @@
#include <QtQuick/QQuickItem>
#include <QtCore/QDebug>
+#include <QtGui/QCursor>
+#include <QtCore/QCoreApplication>
bool QQuickVisualTestUtil::delegateVisible(QQuickItem *item)
{
@@ -69,3 +71,24 @@ void QQuickVisualTestUtil::dumpTree(QQuickItem *parent, int depth)
}
}
+void QQuickVisualTestUtil::moveMouseAway(QQuickWindow *window)
+{
+#if QT_CONFIG(cursor) // Get the cursor out of the way.
+ // Using "bottomRight() + QPoint(100, 100)" was causing issues on Ubuntu,
+ // where the window was positioned at the bottom right corner of the window
+ // (even after centering the window on the screen), so we use another position.
+ QCursor::setPos(window->geometry().bottomLeft() + QPoint(0, 10));
+#endif
+
+ // make sure hover events from QQuickWindowPrivate::flushFrameSynchronousEvents()
+ // do not interfere with the tests
+ QEvent leave(QEvent::Leave);
+ QCoreApplication::sendEvent(window, &leave);
+}
+
+void QQuickVisualTestUtil::centerOnScreen(QQuickWindow *window)
+{
+ const QRect screenGeometry = window->screen()->availableGeometry();
+ const QPoint offset = QPoint(window->width() / 2, window->height() / 2);
+ window->setFramePosition(screenGeometry.center() - offset);
+}
diff --git a/tests/auto/shared/visualtestutil.h b/tests/auto/shared/visualtestutil.h
index 12f955ea..a6b52fef 100644
--- a/tests/auto/shared/visualtestutil.h
+++ b/tests/auto/shared/visualtestutil.h
@@ -54,6 +54,10 @@ namespace QQuickVisualTestUtil
bool delegateVisible(QQuickItem *item);
+ void centerOnScreen(QQuickWindow *window);
+
+ void moveMouseAway(QQuickWindow *window);
+
/*
Find an item with the specified objectName. If index is supplied then the
item must also evaluate the {index} expression equal to index
diff --git a/tests/auto/snippets/tst_snippets.cpp b/tests/auto/snippets/tst_snippets.cpp
index 852c98e9..107759ce 100644
--- a/tests/auto/snippets/tst_snippets.cpp
+++ b/tests/auto/snippets/tst_snippets.cpp
@@ -103,8 +103,8 @@ void tst_Snippets::verify()
QUrl url = QUrl::fromLocalFile(input);
component.loadUrl(url);
- QObject *root = component.create();
- QVERIFY(root);
+ QScopedPointer<QObject> root(component.create());
+ QVERIFY2(!root.isNull(), qPrintable(component.errorString()));
QCOMPARE(component.status(), QQmlComponent::Ready);
QVERIFY(component.errors().isEmpty());
@@ -132,10 +132,10 @@ void tst_Snippets::verify()
output.insert(index, "-" + applicationStyle.toLower());
}
- QQuickWindow *window = qobject_cast<QQuickWindow *>(root);
+ QQuickWindow *window = qobject_cast<QQuickWindow *>(root.data());
if (!window) {
QQuickView *view = new QQuickView;
- view->setContent(url, &component, root);
+ view->setContent(url, &component, root.data());
window = view;
}
diff --git a/tests/benchmarks/creationtime/data/dependencies.qml b/tests/benchmarks/creationtime/data/dependencies.qml
index 6b6d951b..c284d94c 100644
--- a/tests/benchmarks/creationtime/data/dependencies.qml
+++ b/tests/benchmarks/creationtime/data/dependencies.qml
@@ -1,5 +1,7 @@
import QtQuick 2.6
import QtQuick.Controls 2.1
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Imagine 2.3
import QtQuick.Controls.Material 2.1
import QtQuick.Controls.Universal 2.1
import Qt.labs.calendar 1.0
diff --git a/tests/benchmarks/creationtime/tst_creationtime.cpp b/tests/benchmarks/creationtime/tst_creationtime.cpp
index 4909f080..1d300b1c 100644
--- a/tests/benchmarks/creationtime/tst_creationtime.cpp
+++ b/tests/benchmarks/creationtime/tst_creationtime.cpp
@@ -47,6 +47,12 @@ private slots:
void controls();
void controls_data();
+ void fusion();
+ void fusion_data();
+
+ void imagine();
+ void imagine_data();
+
void material();
void material_data();
@@ -89,9 +95,12 @@ static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QSt
if (QFile::exists(filePath)) {
QTest::newRow(qPrintable(name)) << QUrl::fromLocalFile(filePath);
break;
- } else if (QFile::exists(QQmlFile::urlToLocalFileOrQrc(filePath))) {
- QTest::newRow(qPrintable(name)) << QUrl(filePath);
- break;
+ } else {
+ filePath = QQmlFile::urlToLocalFileOrQrc(filePath);
+ if (!filePath.isEmpty() && QFile::exists(filePath)) {
+ QTest::newRow(qPrintable(name)) << QUrl(filePath);
+ break;
+ }
}
}
}
@@ -122,7 +131,31 @@ void tst_CreationTime::controls()
void tst_CreationTime::controls_data()
{
QTest::addColumn<QUrl>("url");
- addTestRows(&engine, "controls", "QtQuick/Controls.2", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
+ addTestRows(&engine, "controls", "QtQuick/Controls.2", QStringList() << "ApplicationWindow");
+}
+
+void tst_CreationTime::fusion()
+{
+ QFETCH(QUrl, url);
+ doBenchmark(&engine, url);
+}
+
+void tst_CreationTime::fusion_data()
+{
+ QTest::addColumn<QUrl>("url");
+ addTestRows(&engine, "controls/fusion", "QtQuick/Controls.2/Fusion", QStringList() << "ApplicationWindow" << "ButtonPanel" << "CheckIndicator" << "RadioIndicator" << "SliderGroove" << "SliderHandle" << "SwitchIndicator");
+}
+
+void tst_CreationTime::imagine()
+{
+ QFETCH(QUrl, url);
+ doBenchmark(&engine, url);
+}
+
+void tst_CreationTime::imagine_data()
+{
+ QTest::addColumn<QUrl>("url");
+ addTestRows(&engine, "controls/imagine", "QtQuick/Controls.2/Imagine", QStringList() << "ApplicationWindow");
}
void tst_CreationTime::material()
@@ -134,7 +167,7 @@ void tst_CreationTime::material()
void tst_CreationTime::material_data()
{
QTest::addColumn<QUrl>("url");
- addTestRows(&engine, "controls/material", "QtQuick/Controls.2/Material", QStringList() << "Ripple" << "SliderHandle" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator" << "BoxShadow" << "ElevationEffect" << "CursorDelegate");
+ addTestRows(&engine, "controls/material", "QtQuick/Controls.2/Material", QStringList() << "ApplicationWindow" << "Ripple" << "SliderHandle" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator" << "BoxShadow" << "ElevationEffect" << "CursorDelegate");
}
void tst_CreationTime::universal()
@@ -146,7 +179,7 @@ void tst_CreationTime::universal()
void tst_CreationTime::universal_data()
{
QTest::addColumn<QUrl>("url");
- addTestRows(&engine, "controls/universal", "QtQuick/Controls.2/Universal", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
+ addTestRows(&engine, "controls/universal", "QtQuick/Controls.2/Universal", QStringList() << "ApplicationWindow" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
}
void tst_CreationTime::calendar()
diff --git a/tests/benchmarks/objectcount/data/dependencies.qml b/tests/benchmarks/objectcount/data/dependencies.qml
index 6b6d951b..c284d94c 100644
--- a/tests/benchmarks/objectcount/data/dependencies.qml
+++ b/tests/benchmarks/objectcount/data/dependencies.qml
@@ -1,5 +1,7 @@
import QtQuick 2.6
import QtQuick.Controls 2.1
+import QtQuick.Controls.Fusion 2.3
+import QtQuick.Controls.Imagine 2.3
import QtQuick.Controls.Material 2.1
import QtQuick.Controls.Universal 2.1
import Qt.labs.calendar 1.0
diff --git a/tests/benchmarks/objectcount/tst_objectcount.cpp b/tests/benchmarks/objectcount/tst_objectcount.cpp
index d12f3293..fcb6be5b 100644
--- a/tests/benchmarks/objectcount/tst_objectcount.cpp
+++ b/tests/benchmarks/objectcount/tst_objectcount.cpp
@@ -112,9 +112,12 @@ static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QSt
if (QFile::exists(filePath)) {
QTest::newRow(qPrintable(name)) << QUrl::fromLocalFile(filePath);
break;
- } else if (QFile::exists(QQmlFile::urlToLocalFileOrQrc(filePath))) {
- QTest::newRow(qPrintable(name)) << QUrl(filePath);
- break;
+ } else {
+ filePath = QQmlFile::urlToLocalFileOrQrc(filePath);
+ if (!filePath.isEmpty() && QFile::exists(filePath)) {
+ QTest::newRow(qPrintable(name)) << QUrl(filePath);
+ break;
+ }
}
}
}
@@ -123,7 +126,9 @@ static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QSt
static void initTestRows(QQmlEngine *engine)
{
- addTestRows(engine, "controls", "QtQuick/Controls.2", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
+ addTestRows(engine, "controls", "QtQuick/Controls.2");
+ addTestRows(engine, "controls/fusion", "QtQuick/Controls.2/Fusion", QStringList() << "ButtonPanel" << "CheckIndicator" << "RadioIndicator" << "SliderGroove" << "SliderHandle" << "SwitchIndicator");
+ addTestRows(engine, "controls/imagine", "QtQuick/Controls.2/Imagine");
addTestRows(engine, "controls/material", "QtQuick/Controls.2/Material", QStringList() << "Ripple" << "SliderHandle" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator" << "BoxShadow" << "ElevationEffect" << "CursorDelegate");
addTestRows(engine, "controls/universal", "QtQuick/Controls.2/Universal", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator");
}
diff --git a/tests/manual/buttons/ButtonLoader.qml b/tests/manual/buttons/ButtonLoader.qml
index 38ca4fc3..47b265ec 100644
--- a/tests/manual/buttons/ButtonLoader.qml
+++ b/tests/manual/buttons/ButtonLoader.qml
@@ -92,7 +92,7 @@ Item {
Label {
text: root.text
- font.pixelSize: roundButton.contentItem.font.pixelSize * 0.5
+ font.pixelSize: roundButton.font.pixelSize * 0.5
anchors.top: parent.bottom
anchors.topMargin: 2
anchors.horizontalCenter: parent.horizontalCenter
diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro
index d81ea32f..d23b4494 100644
--- a/tests/manual/manual.pro
+++ b/tests/manual/manual.pro
@@ -7,4 +7,6 @@ SUBDIRS += \
styles \
testbench
+qtConfig(systemtrayicon): SUBDIRS += systemtrayicon
+
qtHaveModule(widgets): SUBDIRS += viewinqwidget
diff --git a/tests/manual/styles-cover-flow/CoverFlowDelegate.qml b/tests/manual/styles-cover-flow/CoverFlowDelegate.qml
new file mode 100644
index 00000000..8b220269
--- /dev/null
+++ b/tests/manual/styles-cover-flow/CoverFlowDelegate.qml
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** 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 QtGraphicalEffects 1.0
+import QtQuick 2.10
+
+Item {
+ id: root
+ width: PathView.view.delegateSize
+ height: width
+ z: PathView.zOrder
+
+ transform: [
+ Rotation {
+ angle: root.PathView.rotateY
+ origin.x: sourceImage.width / 2
+ origin.y: sourceImage.height * 0.3
+ axis.x: 0
+ axis.y: 1
+ axis.z: 0
+ },
+ Scale {
+ xScale: 1.0
+ yScale: root.PathView.scale
+ origin.x: sourceImage.width / 2
+ origin.y: sourceImage.height * 0.4
+ }
+ ]
+
+ Image {
+ id: sourceImage
+ width: root.PathView.view.delegateSize
+ height: width
+ fillMode: Image.PreserveAspectFit
+ source: "file:/" + docImagesDir + model.source
+
+ Rectangle {
+ x: (sourceImage.width - sourceImage.paintedWidth) / 2
+ width: sourceImage.paintedWidth + (index == 6 ? 2 : 1)
+ height: sourceImage.height
+ color: "transparent"
+ border.color: "#f4f4f4"
+ antialiasing: true
+ visible: !model.dark
+ }
+ }
+
+ ShaderEffectSource {
+ id: reflection
+ sourceItem: sourceImage
+ y: sourceItem.height
+ width: sourceItem.width
+ height: sourceItem.height
+
+ transform: [
+ Rotation {
+ origin.x: reflection.width / 2
+ origin.y: reflection.height / 2
+ axis.x: 1
+ axis.y: 0
+ axis.z: 0
+ angle: 180
+ }
+ ]
+ }
+
+ Rectangle {
+ objectName: sourceImage.source.toString().slice(-20)
+ x: (parent.width - sourceImage.paintedWidth) / 2// + (paintedWidthDiff > 0 ? 1.0 - paintedWidthDiff : 0)
+ y: reflection.y
+ width: sourceImage.paintedWidth + (index == 6 ? 2 : 1)
+ height: sourceImage.paintedHeight
+
+ // TODO: figure out how to get perfect x/width without using the current width hack
+// readonly property real paintedWidthDiff: sourceImage.paintedWidth - Math.floor(sourceImage.paintedWidth)
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: Qt.rgba(backgroundColor.r, backgroundColor.g, backgroundColor.b, 0.33)
+ }
+ GradientStop {
+ // This determines the point at which the reflection fades out.
+ position: 1.0
+ color: backgroundColor
+ }
+ }
+ }
+}
diff --git a/tests/manual/styles-cover-flow/CoverFlowPath.qml b/tests/manual/styles-cover-flow/CoverFlowPath.qml
new file mode 100644
index 00000000..f50cf31d
--- /dev/null
+++ b/tests/manual/styles-cover-flow/CoverFlowPath.qml
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** 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
+
+Path {
+ // Point 1
+ property PathView pathView
+
+ startX: 0
+ startY: pathView.centerY
+
+ PathAttribute {
+ name: "rotateY"
+ value: 50.0
+ }
+ PathAttribute {
+ name: "scale"
+ value: 0.7
+ }
+ PathAttribute {
+ name: "zOrder"
+ value: 1.0
+ }
+
+ // Line to point 2
+ PathLine {
+ x: pathView.centerX - pathView.delegateSize * 0.4
+ y: pathView.centerY
+ }
+ PathPercent {
+ value: 0.44
+ }
+ PathAttribute {
+ name: "rotateY"
+ value: 50.0
+ }
+ PathAttribute {
+ name: "scale"
+ value: 0.7
+ }
+ PathAttribute {
+ name: "zOrder"
+ value: 10.0
+ }
+
+ // Quad to point 3
+ PathQuad {
+ x: pathView.centerX
+ y: pathView.centerY + pathView.delegateSize * 0.04
+ controlX: pathView.centerX - pathView.delegateSize * 0.2
+ controlY: pathView.centerY + pathView.delegateSize * 0.04
+ }
+ PathPercent {
+ value: 0.5
+ }
+ PathAttribute {
+ name: "rotateY"
+ value: 0.0
+ }
+ PathAttribute {
+ name: "scale"
+ value: 1.0
+ }
+ PathAttribute {
+ name: "zOrder"
+ value: 50.0
+ }
+
+ // Quad to point 4
+ PathQuad {
+ x: pathView.centerX + pathView.delegateSize * 0.4
+ y: pathView.centerY
+ controlX: pathView.centerX + pathView.delegateSize * 0.2
+ controlY: pathView.centerY + pathView.delegateSize * 0.04
+ }
+ PathPercent {
+ value: 0.56
+ }
+ PathAttribute {
+ name: "rotateY"
+ value: -50.0
+ }
+ PathAttribute {
+ name: "scale"
+ value: 0.7
+ }
+ PathAttribute {
+ name: "zOrder"
+ value: 10.0
+ }
+
+ // Line to point 5
+ PathLine {
+ x: pathView.width
+ y: pathView.centerY
+ }
+ PathAttribute {
+ name: "rotateY"
+ value: -50.0
+ }
+ PathAttribute {
+ name: "scale"
+ value: 0.7
+ }
+ PathAttribute {
+ name: "zOrder"
+ value: 1.0
+ }
+}
diff --git a/tests/manual/styles-cover-flow/styles-cover-flow.cpp b/tests/manual/styles-cover-flow/styles-cover-flow.cpp
new file mode 100644
index 00000000..d665d613
--- /dev/null
+++ b/tests/manual/styles-cover-flow/styles-cover-flow.cpp
@@ -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$
+**
+****************************************************************************/
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+#include <QQmlContext>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QQmlApplicationEngine engine;
+ engine.rootContext()->setContextProperty("docImagesDir", QString(DOC_IMAGES_DIR));
+ engine.load(QUrl("qrc:/styles-cover-flow.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
+
+ return app.exec();
+}
diff --git a/tests/manual/styles-cover-flow/styles-cover-flow.pro b/tests/manual/styles-cover-flow/styles-cover-flow.pro
new file mode 100644
index 00000000..2faa9fba
--- /dev/null
+++ b/tests/manual/styles-cover-flow/styles-cover-flow.pro
@@ -0,0 +1,11 @@
+TEMPLATE = app
+TARGET = stylescoverflow
+QT += quick quickcontrols2
+
+SOURCES += \
+ styles-cover-flow.cpp
+
+RESOURCES += \
+ $$files(*.qml, true)
+
+DEFINES += DOC_IMAGES_DIR=\\\"$$PWD/../../../src/imports/controls/doc/images/\\\"
diff --git a/tests/manual/styles-cover-flow/styles-cover-flow.qml b/tests/manual/styles-cover-flow/styles-cover-flow.qml
new file mode 100644
index 00000000..3d8aea0f
--- /dev/null
+++ b/tests/manual/styles-cover-flow/styles-cover-flow.qml
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** 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.Window 2.3
+
+Window {
+ // Different delegate positions and widths and window background colors
+ // can cause some unwanted "rogue pixels", so an easy way to get it perfect
+ // is to mess with the width.
+ width: 814
+ height: 512
+ visible: true
+ color: backgroundColor
+ flags: Qt.FramelessWindowHint
+
+ readonly property color backgroundColor: "#ffffff"
+
+ Shortcut {
+ sequence: "Ctrl+Q"
+ onActivated: Qt.quit()
+ }
+
+ PathView {
+ id: view
+ anchors.fill: parent
+ anchors.leftMargin: 130
+ anchors.rightMargin: 130
+ model: ListModel {
+ ListElement { source: "qtquickcontrols2-default.png"; dark: false }
+ ListElement { source: "qtquickcontrols2-fusion.png"; dark: false }
+ ListElement { source: "qtquickcontrols2-universal-light.png"; dark: false }
+ ListElement { source: "qtquickcontrols2-universal-dark.png"; dark: true }
+ ListElement { source: "qtquickcontrols2-material-dark.png"; dark: true }
+ ListElement { source: "qtquickcontrols2-imagine.png"; dark: false }
+ ListElement { source: "qtquickcontrols2-material-light.png"; dark: false }
+ }
+
+ highlightRangeMode: PathView.StrictlyEnforceRange
+ preferredHighlightBegin: 0.5
+ preferredHighlightEnd: 0.5
+ pathItemCount: 9
+
+ property real centerX: width / 2
+ property real centerY: height * 0.4
+ property real delegateSize: 393 / 2
+
+ path: CoverFlowPath {
+ pathView: view
+ }
+ delegate: CoverFlowDelegate {}
+ }
+}
diff --git a/tests/manual/systemtrayicon/images/qt_logo_green_256.png b/tests/manual/systemtrayicon/images/qt_logo_green_256.png
new file mode 100644
index 00000000..92243fd5
--- /dev/null
+++ b/tests/manual/systemtrayicon/images/qt_logo_green_256.png
Binary files differ
diff --git a/tests/manual/systemtrayicon/systemtrayicon.cpp b/tests/manual/systemtrayicon/systemtrayicon.cpp
new file mode 100644
index 00000000..1866a269
--- /dev/null
+++ b/tests/manual/systemtrayicon/systemtrayicon.cpp
@@ -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$
+**
+****************************************************************************/
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QQmlApplicationEngine engine;
+ engine.load(QUrl("qrc:/files/systemtrayicon.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
+
+ return app.exec();
+}
diff --git a/tests/manual/systemtrayicon/systemtrayicon.pro b/tests/manual/systemtrayicon/systemtrayicon.pro
new file mode 100644
index 00000000..24b9caa0
--- /dev/null
+++ b/tests/manual/systemtrayicon/systemtrayicon.pro
@@ -0,0 +1,9 @@
+TEMPLATE = app
+TARGET = systemtrayicon
+QT += quick quickcontrols2
+
+SOURCES += \
+ systemtrayicon.cpp
+
+RESOURCES += \
+ systemtrayicon.qrc
diff --git a/tests/manual/systemtrayicon/systemtrayicon.qml b/tests/manual/systemtrayicon/systemtrayicon.qml
new file mode 100644
index 00000000..8431ab30
--- /dev/null
+++ b/tests/manual/systemtrayicon/systemtrayicon.qml
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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 Qt.labs.platform 1.0
+
+ApplicationWindow {
+ id: window
+
+ visible: true
+ title: "Qt Quick Controls 2 - System Tray Icon"
+
+ MenuBar {
+ id: menuBar
+
+ Menu {
+ id: fileMenu
+ title: qsTr("File")
+
+ MenuItem {
+ id : quitItem
+ text : "Quit"
+ onTriggered: Qt.quit()
+ }
+ }
+ }
+
+ SystemTrayIcon {
+ visible: true
+ iconSource: "qrc:/files/images/qt_logo_green_256.png"
+
+ menu: Menu {
+ MenuItem {
+ text: qsTr("Quit")
+ onTriggered: Qt.quit()
+ }
+ }
+
+ onActivated: console.log("Activated")
+ }
+}
diff --git a/tests/manual/systemtrayicon/systemtrayicon.qrc b/tests/manual/systemtrayicon/systemtrayicon.qrc
new file mode 100644
index 00000000..656476d9
--- /dev/null
+++ b/tests/manual/systemtrayicon/systemtrayicon.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/files">
+ <file>systemtrayicon.qml</file>
+ <file>images/qt_logo_green_256.png</file>
+ </qresource>
+</RCC>
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..bd434de6
--- /dev/null
+++ b/tests/manual/testbench/README.md
@@ -0,0 +1,35 @@
+# 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. |
+| Fix Custom Assets | Ctrl+Shift+X | ⌘+Shift+X | If using the Imagine style, manually fixes the assets. This is done automatically when "Automatically Fix Custom Assets" checkbox is checked. |
+| Reload Assets | Ctrl+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..ef38c496
--- /dev/null
+++ b/tests/manual/testbench/SettingsDialog.qml
@@ -0,0 +1,453 @@
+/****************************************************************************
+**
+** 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 autoFixImagineAssetsCheckBox: autoFixImagineAssetsCheckBox
+
+ onAboutToShow: {
+ styleComboBox.currentIndex = styleComboBox.styleIndex
+ customImagineStyleCheckBox.checked = settings.useCustomImaginePath
+ imaginePathTextField.text = settings.imaginePath
+ autoFixImagineAssetsCheckBox.checked = settings.autoFixImagineAssets
+
+ updatePaletteSettingsControls(paletteSettings)
+ }
+
+ onAccepted: {
+ settings.style = styleComboBox.displayText
+ settings.useCustomImaginePath = customImagineStyleCheckBox.checked
+ settings.imaginePath = imaginePathTextField.text
+ settings.autoFixImagineAssets = autoFixImagineAssetsCheckBox.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: contentLayout.implicitHeight
+ flickableDirection: Qt.Vertical
+ clip: true
+
+ ColumnLayout {
+ id: contentLayout
+ anchors.fill: parent
+
+ GroupBox {
+ title: qsTr("General")
+ Layout.fillWidth: true
+
+ GridLayout {
+ columns: 2
+
+ 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
+ }
+ }
+ }
+
+ GroupBox {
+ title: qsTr("Imagine Style")
+ visible: usingImagineStyle
+ Layout.fillWidth: true
+ Layout.columnSpan: 2
+
+ GridLayout {
+ columns: 2
+ anchors.fill: parent
+
+ CheckBox {
+ id: customImagineStyleCheckBox
+ text: qsTr("Use Custom Assets")
+ enabled: usingImagineStyle
+
+ Layout.columnSpan: 2
+ }
+
+ Label {
+ text: "Asset 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: autoFixImagineAssetsCheckBox
+ text: "Automatically Fix Custom Assets"
+ enabled: usingImagineStyle && customImagineStyleCheckBox.checked
+
+ Layout.columnSpan: 2
+
+ ToolTip {
+ text: "If set, custom Imagine style assets will be modified to be compliant whenever they have changed on disk"
+ visible: autoFixImagineAssetsCheckBox.hovered
+ delay: 500
+ parent: imaginePathTextField
+
+ Imagine.path: defaultImaginePath
+ }
+ }
+ }
+ }
+
+ GroupBox {
+ title: qsTr("Palette")
+ Layout.fillWidth: true
+
+ GridLayout {
+ columns: 2
+ anchors.fill: parent
+
+ CheckBox {
+ id: useCustomPaletteCheckBox
+ text: qsTr("Use Custom Palette")
+ }
+
+ 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")
+ enabled: useCustomPaletteCheckBox.checked
+ onClicked: clipboard.copy(paletteSettingsMap())
+
+ Layout.columnSpan: 2
+ Layout.alignment: Qt.AlignRight
+ }
+
+ Button {
+ text: qsTr("Import Palette Settings From Clipboard")
+ enabled: useCustomPaletteCheckBox.checked
+ 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..4813dac5
--- /dev/null
+++ b/tests/manual/testbench/assetfixer.cpp
@@ -0,0 +1,564 @@
+/****************************************************************************
+**
+** 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.
+ qCDebug(lcAssetFixer) << "Calling QQuickWindow::releaseResources() to clear pixmap cache";
+ window->releaseResources();
+}
+
+void AssetFixer::fixAssets()
+{
+ if (!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..b742b170
--- /dev/null
+++ b/tests/manual/testbench/controls/CheckDelegate.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
+
+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
+ focusPolicy: Qt.StrongFocus
+ }
+
+ property Component exampleComponent: ListView {
+ implicitWidth: 200
+ implicitHeight: 200
+ clip: true
+ model: 20
+ delegate: CheckDelegate {
+ width: parent.width
+ text: "CheckDelegate"
+ focusPolicy: Qt.StrongFocus
+ }
+ }
+}
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..7b8eb720
--- /dev/null
+++ b/tests/manual/testbench/controls/Dialog.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("Dialog")
+
+ property var supportedStates: [
+ [],
+ ["modal"],
+ ["dim"]
+ ]
+
+ 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
+ modal: is("modal")
+ dim: is("dim") || is("modal")
+
+ 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..44882df9
--- /dev/null
+++ b/tests/manual/testbench/controls/ItemDelegate.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"]
+ ]
+
+ 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")
+ focusPolicy: Qt.StrongFocus
+ }
+
+ property Component exampleComponent: ListView {
+ implicitWidth: 200
+ implicitHeight: 200
+ clip: true
+ model: 20
+ delegate: ItemDelegate {
+ width: parent.width
+ text: "ItemDelegate"
+ focusPolicy: Qt.StrongFocus
+ }
+ }
+}
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/MenuBar.qml b/tests/manual/testbench/controls/MenuBar.qml
new file mode 100644
index 00000000..00db9af1
--- /dev/null
+++ b/tests/manual/testbench/controls/MenuBar.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.10
+import QtQuick.Controls 2.3
+
+// TODO
+QtObject {
+ property string customControlName: qsTr("MenuBar & MenuBarItem")
+
+ property var supportedStates: [
+ []
+ ]
+
+ property Component component: MenuBar {
+ MenuBarItem {
+ text: qsTr("Normal")
+ }
+ MenuBarItem {
+ text: qsTr("Pressed")
+ down: true
+ }
+ MenuBarItem {
+ text: qsTr("Highlighted")
+ highlighted: true
+ }
+ MenuBarItem {
+ text: qsTr("Disabled")
+ 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..fcae84f7
--- /dev/null
+++ b/tests/manual/testbench/controls/RadioDelegate.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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
+ focusPolicy: Qt.StrongFocus
+ }
+ }
+
+ property Component exampleComponent: ListView {
+ implicitWidth: 200
+ implicitHeight: 200
+ clip: true
+ model: 20
+ delegate: RadioDelegate {
+ width: parent.width
+ text: "RadioDelegate"
+ focusPolicy: Qt.StrongFocus
+ }
+ }
+}
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..f59796d2
--- /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.Horizontal
+ 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..32c66aad
--- /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.Horizontal
+ 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..77094dc0
--- /dev/null
+++ b/tests/manual/testbench/controls/SpinBox.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** 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: [
+ [],
+ ["pressed"],
+ ["disabled"],
+ ["mirrored"],
+ ["mirrored", "pressed"],
+ ["mirrored", "disabled"],
+ ["editable"],
+ ["editable", "pressed"],
+ ["editable", "disabled"],
+ ["editable", "mirrored"],
+ ["editable", "mirrored", "pressed"],
+ ["editable", "mirrored", "disabled"]
+ ]
+
+ 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..6143a50f
--- /dev/null
+++ b/tests/manual/testbench/controls/SwipeDelegate.qml
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** 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")
+ focusPolicy: Qt.StrongFocus
+
+ 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"
+ focusPolicy: Qt.StrongFocus
+
+ 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..63051a50
--- /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: "Switch"
+ 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..4cb42105
--- /dev/null
+++ b/tests/manual/testbench/controls/SwitchDelegate.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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")
+ focusPolicy: Qt.StrongFocus
+
+ LayoutMirroring.enabled: is("mirrored")
+ }
+
+ property Component exampleComponent: ListView {
+ implicitWidth: 200
+ implicitHeight: 200
+ clip: true
+ model: 20
+ delegate: SwitchDelegate {
+ width: parent.width
+ text: "SwitchDelegate"
+ focusPolicy: Qt.StrongFocus
+ }
+ }
+}
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..8f2493f4
--- /dev/null
+++ b/tests/manual/testbench/controls/TextArea.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"],
+ ]
+
+ property Component component: Column {
+ spacing: 10
+
+ TextArea {
+ text: "TextArea\nwith\ntext"
+ enabled: !is("disabled")
+ }
+
+ TextArea {
+ placeholderText: "TextArea with placeholderText"
+ enabled: !is("disabled")
+ }
+ }
+}
diff --git a/tests/manual/testbench/controls/TextField.qml b/tests/manual/testbench/controls/TextField.qml
new file mode 100644
index 00000000..7ecd21b2
--- /dev/null
+++ b/tests/manual/testbench/controls/TextField.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"],
+ ]
+
+ property Component component: Column {
+ spacing: 10
+
+ TextField {
+ text: "TextField with text"
+ enabled: !is("disabled")
+ }
+
+ TextField {
+ placeholderText: "TextField with placeholderText"
+ 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..a0927f35 100644
--- a/tests/manual/testbench/qml.qrc
+++ b/tests/manual/testbench/qml.qrc
@@ -1,5 +1,44 @@
<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>
+ <file>controls/MenuBar.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 2ebb9923..5b051460 100644
--- a/tests/manual/testbench/testbench.qml
+++ b/tests/manual/testbench/testbench.qml
@@ -48,872 +48,498 @@
**
****************************************************************************/
-import QtQuick 2.6
-import QtQuick.Window 2.2
-import QtQuick.Layouts 1.0
-import QtQuick.Controls 2.1
-import QtQuick.Controls.Material 2.1
-import QtQuick.Controls.Universal 2.1
+import QtQuick 2.10
+import QtQuick.Window 2.3
+import QtQuick.Layouts 1.2
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Imagine 2.3
+import Qt.labs.folderlistmodel 2.2
+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"
}
- Material.theme: themeSwitch.checked ? Material.Dark : Material.Light
- Universal.theme: themeSwitch.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
-
- RowLayout {
- anchors.fill: parent
-
- ToolButton {
- text: "Normal"
- hoverEnabled: true
- ToolTip.text: text
- ToolTip.delay: 1000
- ToolTip.visible: hovered
- onClicked: menu.visible ? menu.close() : menu.open()
+ Action {
+ id: fixAssetsAction
+ text: qsTr("Fix Custom Assets")
+ shortcut: "Ctrl+Shift+X"
+ enabled: usingImagineStyle
+ onTriggered: assetFixer.manualFix()
+ }
- Menu {
- id: menu
- x: 1
- y: 1 + parent.height
+ Action {
+ id: useCustomAssetsAction
+ text: qsTr("Use Custom Assets")
+ shortcut: "Ctrl+Shift+C"
+ enabled: usingImagineStyle
+ checkable: true
+ checked: settings.useCustomImaginePath
+ onTriggered: settings.useCustomImaginePath = !settings.useCustomImaginePath
+ }
- MenuItem {
- text: "Option 1"
- checkable: true
- }
- MenuItem {
- text: "Option 2"
- checkable: true
- }
- MenuItem {
- text: "Option 3"
- checkable: true
- }
+ Action {
+ id: reloadAssetsAction
+ text: qsTr("Reload Assets")
+ shortcut: "Ctrl+R"
+ enabled: usingImagineStyle
+ onTriggered: assetFixer.reloadAssets()
+ }
- MenuSeparator {}
+ FontMetrics {
+ id: fontMetrics
+ }
- MenuItem {
- text: "Option A"
- }
- }
- }
- ToolButton {
- text: "Pressed"
- down: true
- hoverEnabled: true
- ToolTip.text: text
- ToolTip.delay: 1000
- ToolTip.visible: hovered
- }
- ToolButton {
- text: "Checked"
- checkable: true
- checked: true
- hoverEnabled: true
- ToolTip.text: text
- ToolTip.delay: 1000
- ToolTip.visible: hovered
- }
- ToolButton {
- text: "Highlighted"
- highlighted: true
- hoverEnabled: true
- ToolTip.text: text
- ToolTip.delay: 1000
- ToolTip.visible: hovered
- }
- ToolButton {
- text: "Disabled"
- enabled: false
- }
+ 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: "1"
- }
- ToolButton {
- text: "2"
- }
+ property string style: "Imagine"
- ToolSeparator {}
+ property bool useCustomImaginePath
+ property string imaginePath
+ property bool autoFixImagineAssets
+ property alias imagineDirLastModified: assetFixer.assetDirectoryLastModified
- Item {
- Layout.fillWidth: true
- }
- Label {
- text: "Light/Dark"
- }
- Switch {
- id: themeSwitch
- }
- }
+ Component.onCompleted: settingsLoaded = true
}
- footer: TabBar {
- TabButton {
- text: "Normal"
- }
- TabButton {
- text: "Pressed"
- down: true
- }
- TabButton {
- 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
}
- Pane {
- anchors.fill: parent
+ 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
- Flickable {
+ RowLayout {
anchors.fill: parent
- contentHeight: flow.height
-
- Flow {
- id: flow
- width: parent.width
- spacing: 30
-
- RowLayout {
- spacing: window.controlSpacing
-
- Button {
- text: "Normal"
- }
- 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
+ ToolButton {
+ text: "\uf0c9"
+ font.family: "fontawesome"
+ font.pixelSize: Qt.application.font.pixelSize * 1.6
+ onClicked: drawer.open()
+ }
- 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
- }
- }
+ ToolSeparator {}
- RowLayout {
- spacing: window.controlSpacing * 2
+ TextField {
+ id: searchTextField
+ placeholderText: "Search"
+ }
- Button {
- text: "Normal"
- }
- 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
- }
- }
+ Item {
+ Layout.fillWidth: true
+ }
- RowLayout {
- spacing: window.controlSpacing * 2
+ ToolButton {
+ id: optionsMenuButton
+ text: "\ue800"
+ font.family: "FontAwesome"
+ font.pixelSize: Qt.application.font.pixelSize * 1.6
+ checked: optionsMenu.visible
+ checkable: true
- 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
- }
- }
- }
+ onClicked: optionsMenu.open()
- RowLayout {
- CheckBox {
- text: "Normal"
- }
- 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
- }
- }
+ Menu {
+ id: optionsMenu
+ x: 1
+ y: 1 + parent.height
+ visible: optionsMenuButton.checked
+ closePolicy: Popup.CloseOnPressOutsideParent
- RowLayout {
- RadioButton {
- text: "Normal"
- }
- 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
- }
- }
+ Imagine.path: defaultImaginePath
- RowLayout {
- Switch {
- text: "Normal"
- }
- Switch {
- text: "Pressed"
- down: true
- }
- Switch {
- text: "Checked"
- checked: true
- }
- Switch {
- text: "CH + PR"
- checked: true
- down: true
- }
- Switch {
- text: "Disabled"
- enabled: false
+ MenuItem {
+ text: qsTr("Open Asset Directory")
+ onClicked: Qt.openUrlExternally(assetFixer.assetDirectoryUrl)
+ enabled: usingImagineStyle
}
- }
- RowLayout {
- ProgressBar {
- value: 0.5
- }
- ProgressBar {
- value: 0.5
- indeterminate: true
- }
- ProgressBar {
- value: 0.5
- enabled: false
+ MenuItem {
+ action: reloadAssetsAction
}
- }
- RowLayout {
- Slider {
- value: 0.5
- }
- Slider {
- value: 0.5
- pressed: true
- }
- Slider {
- value: 0.5
- enabled: false
+ MenuItem {
+ action: useCustomAssetsAction
}
- }
- 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
+ MenuItem {
+ action: fixAssetsAction
}
- }
- RowLayout {
- Item {
- implicitWidth: normalGroupBox.width
- implicitHeight: normalTextArea.implicitHeight
+ MenuSeparator {}
- TextArea {
- id: normalTextArea
- text: "Normal"
- }
+ MenuItem {
+ id: settingsMenuItem
+ text: qsTr("Settings")
+ onTriggered: settingsDialog.open()
}
- Item {
- implicitWidth: normalGroupBox.width
- implicitHeight: normalTextArea.implicitHeight
- TextArea {
- placeholderText: "Placeholder"
- }
- }
- Item {
- implicitWidth: normalGroupBox.width
- implicitHeight: normalTextArea.implicitHeight
+ MenuSeparator {}
- TextArea {
- text: "Disabled"
- enabled: false
- }
+ MenuItem {
+ text: qsTr("Quit")
+ onTriggered: Qt.quit()
}
}
+ }
+ }
+ }
- RowLayout {
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalTextField.implicitHeight
+ SettingsDialog {
+ id: settingsDialog
- TextField {
- id: normalTextField
- text: "Normal"
- }
- }
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalTextField.implicitHeight
-
- TextField {
- placeholderText: "Placeholder"
- }
- }
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalTextField.implicitHeight
-
- TextField {
- text: "Disabled"
- enabled: false
- }
- }
- }
+ Imagine.path: defaultImaginePath
+ }
- RowLayout {
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalSpinBox.implicitHeight
+ Drawer {
+ id: drawer
+ width: parent.width * 0.33
+ height: window.height
+ focus: false
+ modal: false
- SpinBox {
- id: normalSpinBox
- }
- }
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalSpinBox.implicitHeight
+ Label {
+ text: "Drawer contents go here"
+ anchors.centerIn: parent
+ }
+ }
- SpinBox {
- up.pressed: true
- }
- }
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalSpinBox.implicitHeight
+ 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.autoFixImagineAssets) || manuallyFixing
+
+ onFixSuggested: autoFix()
+ onDelayedFixSuggested: assetFixerFileSystemDelayTimer.restart()
+ onReloadSuggested: reloadAssets()
+
+ property bool manuallyFixing: false
+
+ function reloadAssets() {
+ console.log(brief, "Reloading assets...")
+ // Clear the model, otherwise ListView will keep the old items around
+ // with the old assets, even after clearing the pixmap cache
+ listView.resettingModel = true
+ listView.model = null
+ window.Imagine.path = ""
+ assetReloadNextFrameTimer.start()
+ }
- SpinBox {
- enabled: false
- }
- }
- }
+ function autoFix() {
+ // 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.autoFixImagineAssets 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.autoFixImagineAssets;
+ if (shouldWatch && effectiveShouldFix && assetDirectory.length > 0) {
+ fixEmUp();
+ }
+ }
- RowLayout {
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalComboBox.implicitHeight
+ function manualFix() {
+ fixEmUp(true);
+ }
- ComboBox {
- id: normalComboBox
- model: 5
- }
- }
+ function fixEmUp(manually) {
+ assetFixer.manuallyFixing = !!manually
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalComboBox.implicitHeight
+ // Disable image caching if it hasn't already been done.
+ assetFixer.clearImageCache()
- ComboBox {
- pressed: true
- model: ListModel {
- ListElement { text: "Pressed" }
- }
- }
- }
+ busyIndicatorRow.visible = true
+ assetFixerAnimationDelayTimer.start()
+ }
+ }
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalComboBox.implicitHeight
+ // 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
+ })
- ComboBox {
- enabled: false
- model: ["Disabled"]
- }
- }
- }
+ infoToolTip.text = "Reloaded assets"
+ infoToolTip.timeout = 1500
+ infoToolTip.open()
- RowLayout {
- GroupBox {
- id: normalGroupBox
- title: "Normal"
+ listView.model = controlFolderListModel
+ listView.resettingModel = false
- Item {
- implicitWidth: 200
- implicitHeight: 100
+ console.log(brief, "... reloaded assets.")
+ }
+ }
- BusyIndicator {
- anchors.centerIn: parent
- }
- }
- }
- GroupBox {
- enabled: false
- title: "Disabled"
+ // 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.autoFix()
+ }
- Item {
- implicitWidth: 200
- implicitHeight: 100
+ // Gives the BusyIndicator animation a chance to start.
+ Timer {
+ id: assetFixerAnimationDelayTimer
+ interval: 100
+ onTriggered: {
+ assetFixer.fixAssets()
+ busyIndicatorRow.visible = false
+ assetFixer.manuallyFixing = false
+ }
+ }
- BusyIndicator {
- anchors.centerIn: parent
- }
- }
- }
- GroupBox {
- enabled: false
- title: "."
- label.visible: false
-
- Item {
- implicitWidth: 200
- implicitHeight: 100
-
- PageIndicator {
- count: 5
- enabled: false
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- }
- }
+ // Gives the UI a chance to render before the initial fixup.
+ Timer {
+ id: initialUiRenderDelayTimer
+ interval: 300
+ running: true
+ onTriggered: hasRun = true
- RowLayout {
- Frame {
- id: scrollBarFrame
+ property bool hasRun: false
+ }
- Item {
- implicitWidth: 200
- implicitHeight: 100
+ function getControlElements(control) {
+ var props = [];
+ for (var p in control) {
+ if (p !== "component" && typeof control[p] === 'object')
+ props.push(p);
+ }
+ return props;
+ }
- Label {
- text: "Normal"
- anchors.centerIn: parent
- }
+ Pane {
+ id: contentPane
+ anchors.fill: parent
- ScrollBar {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- }
- }
- }
+ 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
+ }
- Frame {
- Item {
- implicitWidth: 200
- implicitHeight: 100
+ FolderListModel {
+ id: controlFolderListModel
+ folder: "qrc:/controls"
+ showDirs: false
+ nameFilters: searchTextField.text.length > 0 ? ["*" + searchTextField.text + "*.qml"] : []
+ caseSensitive: false
+ }
- Label {
- text: "Pressed"
- anchors.centerIn: parent
- }
+ ListView {
+ id: listView
+ anchors.fill: parent
+ spacing: 30
+ visible: !busyIndicatorRow.visible && !resettingModel
- ScrollBar {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- pressed: true
- }
- }
- }
+ property bool resettingModel: false
- Frame {
- Item {
- implicitWidth: 200
- implicitHeight: 100
- enabled: false
+ ScrollBar.vertical: ScrollBar {
+ parent: contentPane
+ anchors.top: parent.top
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ }
- Label {
- text: "Disabled"
- anchors.centerIn: parent
- }
+ model: controlFolderListModel
+ delegate: ColumnLayout {
+ id: rootDelegate
+ width: parent.width
- ScrollBar {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- }
- }
- }
+ MenuSeparator {
+ Layout.fillWidth: true
+ visible: index !== 0
}
- RowLayout {
- Frame {
- Layout.preferredWidth: 100
- Layout.preferredHeight: 100
-
- ScrollIndicator {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- }
- }
-
- Frame {
- Layout.preferredWidth: 100
- Layout.preferredHeight: 100
-
- ScrollIndicator {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- enabled: false
- }
- }
+ Label {
+ text: customControlName.length === 0 ? model.fileBaseName : customControlName
+ font.pixelSize: Qt.application.font.pixelSize * 2
}
- RowLayout {
- Frame {
- Tumbler {
- model: 5
- implicitWidth: 80
- implicitHeight: 100
- }
- }
- Frame {
- Tumbler {
- model: 5
- implicitWidth: 80
- implicitHeight: 100
- enabled: false
- }
- }
+ 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;
}
- RowLayout {
- Dial {
- implicitWidth: 100
- implicitHeight: 100
- }
- Dial {
- implicitWidth: 100
- implicitHeight: 100
- enabled: false
- }
+ Loader {
+ id: controlMetaObjectLoader
+ source: "qrc" + model.filePath
}
- ListModel {
- id: checkableDelegateModel
- ListElement { label: "Normal" }
- ListElement { label: "Pressed"; press: true }
- ListElement { label: "Checked"; check: true }
- ListElement { label: "CH + PR"; check: true; press: true }
- ListElement { label: "Disabled"; disabled: true }
- }
+ Flow {
+ spacing: 10
- RowLayout {
- Frame {
- Column {
- width: 200
-
- Repeater {
- model: checkableDelegateModel
- delegate: CheckDelegate {
- text: label
- width: parent.width
- down: press
- checked: check
- enabled: !disabled
- ButtonGroup.group: radioButtonGroup
- }
- }
- }
- }
+ Layout.fillWidth: true
- ButtonGroup {
- id: radioButtonGroup
- }
+ Repeater {
+ id: stateRepeater
+ model: rootDelegate.supportedStates
+
+ ColumnLayout {
+ id: labelWithDelegatesColumn
+ spacing: 4
+
+ readonly property var states: modelData
+ readonly property string statesAsString: states.join("\n")
- Frame {
- Column {
- width: 200
-
- Repeater {
- model: checkableDelegateModel
- delegate: RadioDelegate {
- text: label
- down: press
- width: parent.width
- checked: check
- enabled: !disabled
- ButtonGroup.group: radioButtonGroup
- }
+ Label {
+ text: statesAsString.length > 0 ? statesAsString : "normal"
+
+ // 4 is the most states for any element (Button)
+ Layout.preferredHeight: (fontMetrics.lineSpacing) * (rootDelegate.maxStateCombinations + 1)
}
- }
- }
- Frame {
- Column {
- width: 200
-
- Repeater {
- model: checkableDelegateModel
- delegate: SwitchDelegate {
- text: label
- width: parent.width
- checked: check
- down: press
- enabled: !disabled
- }
+ ControlContainer {
+ id: controlContainer
+ objectName: controlName + "ControlContainer"
+ controlMetaObject: rootDelegate.controlMetaObject
+ states: labelWithDelegatesColumn.states
+
+ Layout.alignment: Qt.AlignHCenter
}
}
}
}
- ListModel {
- id: regularDelegateModel
- ListElement { label: "Normal" }
- ListElement { label: "Pressed"; press: true }
- ListElement { label: "Disabled"; disabled: true }
- }
+ ExampleContainer {
+ id: exampleContainer
+ controlMetaObject: rootDelegate.controlMetaObject
+ visible: !!controlMetaObject.exampleComponent
- RowLayout {
- Frame {
- Column {
- width: 200
-
- Repeater {
- model: regularDelegateModel
- delegate: ItemDelegate {
- text: label
- width: parent.width
- down: press
- enabled: !disabled
- }
- }
- }
- }
- Frame {
- Column {
- id: listView
- width: 200
- clip: true
-
- Repeater {
- model: regularDelegateModel
- delegate: SwipeDelegate {
- id: swipeDelegate
- text: label
- width: parent.width
- down: press
- enabled: !disabled
-
- Component {
- id: removeComponent
-
- Rectangle {
- color: swipeDelegate.swipe.complete && swipeDelegate.pressed ? "#333" : "#444"
- width: parent.width
- height: parent.height
- clip: true
-
- Label {
- font.pixelSize: swipeDelegate.font.pixelSize
- text: "Boop"
- color: "white"
- anchors.centerIn: parent
- }
- }
- }
-
- swipe.left: removeComponent
- swipe.right: removeComponent
- }
- }
- }
- }
+ Layout.alignment: Qt.AlignHCenter
+ Layout.topMargin: visible ? 14 : 0
+ Layout.fillWidth: true
+ Layout.preferredHeight: visible ? implicitHeight : 0
}
}
}
}
+
+ RowLayout {
+ id: busyIndicatorRow
+ anchors.centerIn: parent
+ visible: false
+
+ BusyIndicator {
+ id: busyIndicator
+ running: visible
+ }
+
+ 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
+ }
}