From 54a2a35f17d5e5d1793af63b76993a583e10ab41 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 11 Mar 2016 13:40:45 +0100 Subject: 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 --- tests/auto/universal/data/tst_universal.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/auto/universal') diff --git a/tests/auto/universal/data/tst_universal.qml b/tests/auto/universal/data/tst_universal.qml index c232e7c1..82c07b23 100644 --- a/tests/auto/universal/data/tst_universal.qml +++ b/tests/auto/universal/data/tst_universal.qml @@ -96,7 +96,7 @@ TestCase { Component { id: menu - Item { + ApplicationWindow { Universal.accent: Universal.Red property alias menu: popup Menu { @@ -256,6 +256,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.Universal.theme, Universal.Light) -- cgit v1.2.3