on xenial help sign in
Set background color of scene as black (aka glClear colour), can remove a black rectangle from the qml scene
e49ffc0Gerry Boland
qml/Shell.qml−6
@@ -100,12 +100,6 @@ FocusScope {
100 // through the translucent parts of the shell surface.
100 // through the translucent parts of the shell surface.
101 visible: !fullyCovered
101 visible: !fullyCovered
102
102
103− Rectangle {
104− anchors.fill: parent
105− color: "black"
106− opacity: dash.disappearingAnimationProgress
107− }
108−
109 Image {
103 Image {
110 anchors.fill: dash
104 anchors.fill: dash
111 source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
105 source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
src/main.cpp+1
@@ -110,6 +110,7 @@ Load the testability driver");
110
110
111 QQuickView* view = new QQuickView();
111 QQuickView* view = new QQuickView();
112 view->setResizeMode(QQuickView::SizeRootObjectToView);
112 view->setResizeMode(QQuickView::SizeRootObjectToView);
113+ view->setColor("black");
113 view->setTitle("Unity8 Shell");
114 view->setTitle("Unity8 Shell");
114 view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory()));
115 view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory()));
115 view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);
116 view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);