diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-03-11 13:40:45 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-03-15 20:04:58 +0000 |
commit | 54a2a35f17d5e5d1793af63b76993a583e10ab41 (patch) | |
tree | 4608034b8431148367d2fef0f26be014427721e6 /tests/auto/material | |
parent | 28ce9872fd83e82c8ece0c70624c45ea2be5c58d (diff) |
Change style inheritance for popups
The decision to make popups inherit theme & accent from its parent item
was driven by ComboBox. However, in many cases it has an undesired side
effect, so we've changed Popup to inherit its style attributes from the
parent window instead, just like we did for fonts. The only exception
to this is ComboBox, where the popup is an integral part of the control.
This special case is now handled in the respective style implementation.
A concrete example is that we can now specify dark theme by default for
Material style ToolBar to get a better matching light text against the
colorful background. In Gallery, this won't effect the options menu,
which is a child of a ToolButton. The menu retains light theme along the
rest of the application.
Change-Id: Ibdc8fcf5b5fa258d853410a9b40368472424a8c6
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/material')
-rw-r--r-- | tests/auto/material/data/tst_material.qml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/material/data/tst_material.qml b/tests/auto/material/data/tst_material.qml index 2636bec0..e8ee47ca 100644 --- a/tests/auto/material/data/tst_material.qml +++ b/tests/auto/material/data/tst_material.qml @@ -98,7 +98,7 @@ TestCase { Component { id: menu - Item { + ApplicationWindow { Material.primary: Material.Blue Material.accent: Material.Red property alias menu: popup @@ -281,6 +281,8 @@ TestCase { var container = menu.createObject(testCase) verify(container) verify(container.menu) + container.menu.open() + verify(container.menu.visible) var child = container.menu.itemAt(0) verify(child) compare(container.Material.theme, Material.Light) |