1
0
Fork 0

[Backend] Set window icon.

This commit is contained in:
NamedKitten 2018-12-01 17:26:04 +00:00
parent 999344c9df
commit 56564c0247
5 changed files with 4 additions and 1 deletions

View file

@ -159,6 +159,7 @@ DirectMpvPlayerBackend::sync()
{
if (!renderer) {
window()->setIcon(QIcon(":/icon.png"));
renderer = new MpvRenderer(mpv, mpv_gl);
connect(window(),
&QQuickWindow::beforeRendering,

View file

@ -601,6 +601,7 @@ MpvPlayerBackend::handle_mpv_event(mpv_event* event)
QQuickFramebufferObject::Renderer*
MpvPlayerBackend::createRenderer() const
{
window()->setIcon(QIcon(":/icon.png"));
window()->setPersistentOpenGLContext(true);
window()->setPersistentSceneGraph(true);
return new MpvRenderer(const_cast<MpvPlayerBackend*>(this));

BIN
src/qml/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

View file

@ -1,5 +1,6 @@
<RCC>
<qresource prefix="/">
<file>icon.png</file>
<file>main.qml</file>
<file>CustomMenu.qml</file>
<file>ControlsBar.qml</file>