Welcome: Fix compilation with QQuickWidget

Use the background color property in the QML code instead of relying on
QQuickView::setColor

Change-Id: I556515a42d9483f88500fa5a5c56ea21f48fa685
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Eike Ziller
2014-12-17 17:04:43 +01:00
parent 4cf7742fed
commit 196e0d76e6
3 changed files with 5 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ Item {
Rectangle { Rectangle {
id: splitter id: splitter
color: creatorTheme.Welcome_DividerColor; // divider between left and right pane color: creatorTheme.Welcome_DividerColor // divider between left and right pane
width: 1 width: 1
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
@@ -66,5 +66,7 @@ Item {
anchors.left: splitter.right anchors.left: splitter.right
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
color: creatorTheme.BackgroundColorNormal
} }
} }

View File

@@ -30,7 +30,7 @@
import QtQuick 2.1 import QtQuick 2.1
Item { Rectangle {
id: pageLoader id: pageLoader
property alias model: repeater.model property alias model: repeater.model

View File

@@ -132,7 +132,7 @@ WelcomeMode::WelcomeMode()
layout->setSpacing(0); layout->setSpacing(0);
m_welcomePage = new QuickContainer(); m_welcomePage = new QuickContainer();
onThemeChanged(); //initialize background color onThemeChanged(); // initialize background color and theme properties
m_welcomePage->setResizeMode(QuickContainer::SizeRootObjectToView); m_welcomePage->setResizeMode(QuickContainer::SizeRootObjectToView);
m_welcomePage->setObjectName(QLatin1String("WelcomePage")); m_welcomePage->setObjectName(QLatin1String("WelcomePage"));
@@ -161,7 +161,6 @@ WelcomeMode::WelcomeMode()
void WelcomeMode::onThemeChanged() void WelcomeMode::onThemeChanged()
{ {
m_welcomePage->setColor(creatorTheme()->color(Theme::BackgroundColorNormal));
const QVariantHash creatorTheme = Utils::creatorTheme()->values(); const QVariantHash creatorTheme = Utils::creatorTheme()->values();
QVariantHash::const_iterator it; QVariantHash::const_iterator it;
for (it = creatorTheme.constBegin(); it != creatorTheme.constEnd(); ++it) for (it = creatorTheme.constBegin(); it != creatorTheme.constEnd(); ++it)