[Backend] Set window icon.
This commit is contained in:
parent
999344c9df
commit
56564c0247
|
@ -159,6 +159,7 @@ DirectMpvPlayerBackend::sync()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!renderer) {
|
if (!renderer) {
|
||||||
|
window()->setIcon(QIcon(":/icon.png"));
|
||||||
renderer = new MpvRenderer(mpv, mpv_gl);
|
renderer = new MpvRenderer(mpv, mpv_gl);
|
||||||
connect(window(),
|
connect(window(),
|
||||||
&QQuickWindow::beforeRendering,
|
&QQuickWindow::beforeRendering,
|
||||||
|
|
|
@ -601,6 +601,7 @@ MpvPlayerBackend::handle_mpv_event(mpv_event* event)
|
||||||
QQuickFramebufferObject::Renderer*
|
QQuickFramebufferObject::Renderer*
|
||||||
MpvPlayerBackend::createRenderer() const
|
MpvPlayerBackend::createRenderer() const
|
||||||
{
|
{
|
||||||
|
window()->setIcon(QIcon(":/icon.png"));
|
||||||
window()->setPersistentOpenGLContext(true);
|
window()->setPersistentOpenGLContext(true);
|
||||||
window()->setPersistentSceneGraph(true);
|
window()->setPersistentSceneGraph(true);
|
||||||
return new MpvRenderer(const_cast<MpvPlayerBackend*>(this));
|
return new MpvRenderer(const_cast<MpvPlayerBackend*>(this));
|
||||||
|
|
BIN
src/qml/icon.png
Normal file
BIN
src/qml/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 235 KiB |
|
@ -1,5 +1,6 @@
|
||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
|
<file>icon.png</file>
|
||||||
<file>main.qml</file>
|
<file>main.qml</file>
|
||||||
<file>CustomMenu.qml</file>
|
<file>CustomMenu.qml</file>
|
||||||
<file>ControlsBar.qml</file>
|
<file>ControlsBar.qml</file>
|
||||||
|
|
Loading…
Reference in a new issue