From 654edb763fbb56c9cdf2f0ab23612a409e90f5ed Mon Sep 17 00:00:00 2001 From: Prince Gupta Date: Wed, 18 Nov 2020 19:31:23 +0530 Subject: [PATCH] qml: force "Segoe UI" as default font on windows Signed-off-by: Pierre Lamot --- modules/gui/qt/Makefile.am | 23 ++++++++++++++++++----- modules/gui/qt/pixmaps/windows-theme.conf | 2 ++ modules/gui/qt/windows.qrc | 5 +++++ 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100755 modules/gui/qt/pixmaps/windows-theme.conf create mode 100644 modules/gui/qt/windows.qrc diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am index 8a92b51680..ca4fc8756d 100644 --- a/modules/gui/qt/Makefile.am +++ b/modules/gui/qt/Makefile.am @@ -610,6 +610,10 @@ libqt_plugin_la_RES = \ gui/qt/pixmaps/back.svg \ gui/qt/pixmaps/time.svg +if HAVE_WIN32 +libqt_plugin_la_RES += gui/qt/pixmaps/windows-theme.conf +endif + #QML and JS resources libqt_plugin_la_QML = \ gui/qt/dialogs/dialogs/qml/CustomDialog.qml \ @@ -753,7 +757,13 @@ libqt_plugin_la_QML = \ gui/qt/widgets/qml/FrostedGlassEffect.qml \ gui/qt/widgets/qml/OverlayMenu.qml -EXTRA_DIST += gui/qt/vlc.qrc $(libqt_plugin_la_RES) +lib_qt_plugin_la_QRC = gui/qt/vlc.qrc + +if HAVE_WIN32 +lib_qt_plugin_la_QRC += gui/qt/windows.qrc +endif + +EXTRA_DIST += $(lib_qt_plugin_la_QRC) $(libqt_plugin_la_RES) nodist_libqt_plugin_la_SOURCES += gui/qt/resources.cpp @@ -778,8 +788,11 @@ libqt_plugin_la_SOURCES += $(libqt_plugin_la_QML) qml_cache.qrc: gui/qt/vlc.qrc $(AM_V_GEN)$(QMLCACHE) --filter-resource-file -o $@ $< -gui/qt/resources.cpp: qml_cache.qrc $(libqt_plugin_la_RES) - $(AM_V_GEN)$(RCC) --name qml_cache -o $@ $< +QRCS_EXCEPT_VLC_QRC = $(filter-out gui/qt/vlc.qrc, $(lib_qt_plugin_la_QRC)) +QRCS_EXCEPT_VLC_QRC += qml_cache.qrc + +gui/qt/resources.cpp: $(QRCS_EXCEPT_VLC_QRC) $(libqt_plugin_la_RES) + $(AM_V_GEN)$(RCC) --name qml_cache -o $@ $(filter %.qrc, $^) #output name matters here gui/qt/qmlcache_loader.cpp: gui/qt/vlc.qrc qml_cache.qrc $(libqt_plugin_la_QML) @@ -789,8 +802,8 @@ else EXTRA_DIST += $(libqt_plugin_la_QML) -gui/qt/resources.cpp: gui/qt/vlc.qrc $(libqt_plugin_la_RES) $(libqt_plugin_la_QML) - $(AM_V_GEN)$(RCC) --name vlc -o $@ $< +gui/qt/resources.cpp: $(lib_qt_plugin_la_QRC) $(libqt_plugin_la_RES) $(libqt_plugin_la_QML) + $(AM_V_GEN)$(RCC) --name vlc -o $@ $(filter %.qrc, $^) endif diff --git a/modules/gui/qt/pixmaps/windows-theme.conf b/modules/gui/qt/pixmaps/windows-theme.conf new file mode 100755 index 0000000000..fe75612e90 --- /dev/null +++ b/modules/gui/qt/pixmaps/windows-theme.conf @@ -0,0 +1,2 @@ +[Default] +Font\Family=Segoe UI diff --git a/modules/gui/qt/windows.qrc b/modules/gui/qt/windows.qrc new file mode 100644 index 0000000000..962dd444c6 --- /dev/null +++ b/modules/gui/qt/windows.qrc @@ -0,0 +1,5 @@ + + + pixmaps/windows-theme.conf + + -- 2.11.4.GIT