mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-06 10:39:53 +02:00
Add windows app icon
This commit is contained in:
parent
045cefae56
commit
a5b84b2eef
@ -61,14 +61,19 @@ set(headers app.h
|
|||||||
qt5_add_big_resources(resources resources.qrc)
|
qt5_add_big_resources(resources resources.qrc)
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
set(qml qml.qrc)
|
qt5_add_resources(qml qml.qrc)
|
||||||
else()
|
else()
|
||||||
qtquick_compiler_add_resources(qml qml.qrc )
|
qtquick_compiler_add_resources(qml qml.qrc )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${src} ${headers} ${resources} ${qml})
|
add_executable(${PROJECT_NAME} ${src} ${headers} ${resources} ${qml})
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
# Icon
|
||||||
|
target_sources(${PROJECT_NAME} PRIVATE ScreenPlay.rc)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Disable console window on Windows
|
# Disable console window on Windows
|
||||||
# https://stackoverflow.com/questions/8249028/how-do-i-keep-my-qt-c-program-from-opening-a-console-in-windows
|
# https://stackoverflow.com/questions/8249028/how-do-i-keep-my-qt-c-program-from-opening-a-console-in-windows
|
||||||
set_property(TARGET ${PROJECT_NAME} PROPERTY WIN32_EXECUTABLE true)
|
set_property(TARGET ${PROJECT_NAME} PROPERTY WIN32_EXECUTABLE true)
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
<file>assets/fonts/NotoSans-Medium.ttf</file>
|
<file>assets/fonts/NotoSans-Medium.ttf</file>
|
||||||
<file>assets/fonts/NotoSans-Regular.ttf</file>
|
<file>assets/fonts/NotoSans-Regular.ttf</file>
|
||||||
<file>assets/fonts/NotoSans-Thin.ttf</file>
|
<file>assets/fonts/NotoSans-Thin.ttf</file>
|
||||||
<file>assets/icons/favicon.ico</file>
|
|
||||||
<file>assets/icons/font-awsome/close.svg</file>
|
<file>assets/icons/font-awsome/close.svg</file>
|
||||||
<file>assets/icons/font-awsome/frown-o.svg</file>
|
<file>assets/icons/font-awsome/frown-o.svg</file>
|
||||||
<file>assets/icons/icon_arrow_left.svg</file>
|
<file>assets/icons/icon_arrow_left.svg</file>
|
||||||
@ -101,5 +100,6 @@
|
|||||||
<file>legal/gpl-3.0.txt</file>
|
<file>legal/gpl-3.0.txt</file>
|
||||||
<file>legal/lgpl-2.1.txt</file>
|
<file>legal/lgpl-2.1.txt</file>
|
||||||
<file>assets/icons/icon_delete.svg</file>
|
<file>assets/icons/icon_delete.svg</file>
|
||||||
|
<file>assets/icons/app.ico</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -43,7 +43,7 @@ namespace ScreenPlay {
|
|||||||
App::App()
|
App::App()
|
||||||
: QObject(nullptr)
|
: QObject(nullptr)
|
||||||
{
|
{
|
||||||
QGuiApplication::setWindowIcon(QIcon(":/assets/icons/favicon.ico"));
|
QGuiApplication::setWindowIcon(QIcon(":/assets/icons/app.ico"));
|
||||||
QGuiApplication::setOrganizationName("ScreenPlay");
|
QGuiApplication::setOrganizationName("ScreenPlay");
|
||||||
QGuiApplication::setOrganizationDomain("screen-play.app");
|
QGuiApplication::setOrganizationDomain("screen-play.app");
|
||||||
QGuiApplication::setApplicationName("ScreenPlay");
|
QGuiApplication::setApplicationName("ScreenPlay");
|
||||||
|
Before Width: | Height: | Size: 271 KiB After Width: | Height: | Size: 271 KiB |
Binary file not shown.
Before Width: | Height: | Size: 271 KiB |
@ -154,7 +154,7 @@ ApplicationWindow {
|
|||||||
SystemTrayIcon {
|
SystemTrayIcon {
|
||||||
id: sti
|
id: sti
|
||||||
visible: true
|
visible: true
|
||||||
iconSource: "qrc:/assets/icons/favicon.ico"
|
iconSource: "qrc:/assets/icons/app.ico"
|
||||||
tooltip: qsTr("ScreenPlay - Double click to change you settings.")
|
tooltip: qsTr("ScreenPlay - Double click to change you settings.")
|
||||||
onActivated: {
|
onActivated: {
|
||||||
switch (reason) {
|
switch (reason) {
|
||||||
|
Loading…
Reference in New Issue
Block a user