Fix icons on Windows
KirigamiApp currently calls KIconTheme::initTheme too late for Windows,
as a workaround we can go back to calling it ourselves.
(cherry picked from commit a02a04d966)
This commit is contained in:
@@ -10,6 +10,7 @@ Dependencies:
|
|||||||
'frameworks/ki18n': '@latest-kf6'
|
'frameworks/ki18n': '@latest-kf6'
|
||||||
'frameworks/kconfig': '@latest-kf6'
|
'frameworks/kconfig': '@latest-kf6'
|
||||||
'frameworks/syntax-highlighting': '@latest-kf6'
|
'frameworks/syntax-highlighting': '@latest-kf6'
|
||||||
|
'frameworks/kiconthemes': '@latest-kf6'
|
||||||
'frameworks/kitemmodels': '@latest-kf6'
|
'frameworks/kitemmodels': '@latest-kf6'
|
||||||
'frameworks/kquickcharts': '@latest-kf6'
|
'frameworks/kquickcharts': '@latest-kf6'
|
||||||
'frameworks/knotifications': '@latest-kf6'
|
'frameworks/knotifications': '@latest-kf6'
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ if (QT_KNOWN_POLICY_QTP0004)
|
|||||||
qt_policy(SET QTP0004 NEW)
|
qt_policy(SET QTP0004 NEW)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
find_package(KF6 ${KF_MIN_VERSION} COMPONENTS Kirigami I18n Notifications Config CoreAddons Sonnet ItemModels ColorScheme)
|
find_package(KF6 ${KF_MIN_VERSION} COMPONENTS Kirigami I18n Notifications Config CoreAddons Sonnet ItemModels ColorScheme IconThemes)
|
||||||
set_package_properties(KF6 PROPERTIES
|
set_package_properties(KF6 PROPERTIES
|
||||||
TYPE REQUIRED
|
TYPE REQUIRED
|
||||||
PURPOSE "Basic application components"
|
PURPOSE "Basic application components"
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ target_include_directories(neochat-app PRIVATE ${CMAKE_BINARY_DIR})
|
|||||||
|
|
||||||
target_link_libraries(neochat-app PRIVATE
|
target_link_libraries(neochat-app PRIVATE
|
||||||
neochat
|
neochat
|
||||||
|
KF6::IconThemes
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png)
|
ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png)
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include <KWindowSystem>
|
#include <KWindowSystem>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <KIconTheme>
|
||||||
#include <KLocalizedQmlContext>
|
#include <KLocalizedQmlContext>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
#include <KirigamiApp>
|
#include <KirigamiApp>
|
||||||
@@ -102,6 +103,10 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||||
|
|
||||||
|
// We currently need to do this ourselves,
|
||||||
|
// KirigamiApp currently called this after constructing the app which breaks icons on Windows.
|
||||||
|
KIconTheme::initTheme();
|
||||||
|
|
||||||
#ifdef HAVE_WEBVIEW
|
#ifdef HAVE_WEBVIEW
|
||||||
QtWebView::initialize();
|
QtWebView::initialize();
|
||||||
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||||||
|
|||||||
Reference in New Issue
Block a user