qtdeclarative/tests/manual/quickcontrols2/testbench
Mitch Curtis f865f4b76d Restructure tests in preparation for merging into qtdeclarative
Task-number: QTBUG-95173
Change-Id: I541dc26cf2cdd6f2640824f693f7d059445367d9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-07-22 09:56:47 +02:00
..
+Imagine Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
controls Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
fonts Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
.gitignore Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
ApplicationWindow.qml Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
CMakeLists.txt Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
ColorEditor.qml Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
ContentPane.qml Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
ControlContainer.qml Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
Dialog.qml Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
ExampleContainer.qml Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
Menu.qml Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
README.md Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
SettingsDialog.qml Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
ToolBar.qml Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
assetfixer.cpp Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
assetfixer.h Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
clipboard.cpp Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
clipboard.h Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
deployment.pri Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
directoryvalidator.cpp Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
directoryvalidator.h Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
fonts.qrc Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
main.cpp Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
qml.qrc Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
testbench.pro Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00
testbench.qml Restructure tests in preparation for merging into qtdeclarative 2021-07-22 09:56:47 +02:00

README.md

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.