[Backend] Set window icon.
This commit is contained in:
parent
999344c9df
commit
56564c0247
|
@ -159,6 +159,7 @@ DirectMpvPlayerBackend::sync()
|
|||
{
|
||||
|
||||
if (!renderer) {
|
||||
window()->setIcon(QIcon(":/icon.png"));
|
||||
renderer = new MpvRenderer(mpv, mpv_gl);
|
||||
connect(window(),
|
||||
&QQuickWindow::beforeRendering,
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -102,7 +102,7 @@ main(int argc, char* argv[])
|
|||
app.setOrganizationName("KittehPlayer");
|
||||
app.setOrganizationDomain("namedkitten.pw");
|
||||
app.setApplicationName("KittehPlayer");
|
||||
|
||||
|
||||
QSettings settings;
|
||||
QString backendSetting = settings.value("Backend/backend", "").toString();
|
||||
if (backendSetting.length() == 0) {
|
||||
|
|
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>
|
||||
<qresource prefix="/">
|
||||
<file>icon.png</file>
|
||||
<file>main.qml</file>
|
||||
<file>CustomMenu.qml</file>
|
||||
<file>ControlsBar.qml</file>
|
||||
|
|
Loading…
Reference in a new issue