mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-29 12:18:44 +01:00
feat: ambient scene system + unlock-screen banner (reduced-motion aware)
Reusable SceneWidget (QQuickWidget host) loads scene.qml — dusk sky, tiled grass, running doge, bouncing WOW coins (slowed per feedback), drifting money — and feeds it Config::reducedMotion so it freezes to a still when that's set. First placement: a banner atop the unlock form. Scene rendered & verified at banner + screensaver aspects via local qml6 harness. Assets from wow-lite-wallet (friend's). Home banner / idle screensaver / per-tab idle to follow on the same SceneWidget.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// SPDX-FileCopyrightText: The Monero Project
|
||||
|
||||
#include "SceneWidget.h"
|
||||
|
||||
#include <QQmlContext>
|
||||
|
||||
#include "utils/config.h"
|
||||
|
||||
SceneWidget::SceneWidget(QWidget *parent)
|
||||
: QQuickWidget(parent)
|
||||
, m_backend(new SceneBackend(this))
|
||||
{
|
||||
m_backend->setReducedMotion(conf()->get(Config::reducedMotion).toBool());
|
||||
this->rootContext()->setContextProperty("sceneCtx", m_backend);
|
||||
this->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
this->setSource(QUrl("qrc:/qml/scene.qml"));
|
||||
}
|
||||
|
||||
void SceneWidget::refreshReducedMotion() {
|
||||
m_backend->setReducedMotion(conf()->get(Config::reducedMotion).toBool());
|
||||
}
|
||||
Reference in New Issue
Block a user