[vlc-commits] qml: force "Segoe UI" as default font on windows
Prince Gupta
git at videolan.org
Wed Jan 27 09:25:33 UTC 2021
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Wed Nov 18 19:49:23 2020 +0530| [654edb763fbb56c9cdf2f0ab23612a409e90f5ed] | committer: Pierre Lamot
qml: force "Segoe UI" as default font on windows
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=654edb763fbb56c9cdf2f0ab23612a409e90f5ed
---
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(-)
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 @@
+<RCC>
+ <qresource prefix="/">
+ <file alias="qtquickcontrols2.conf">pixmaps/windows-theme.conf</file>
+ </qresource>
+</RCC>
More information about the vlc-commits
mailing list