[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: use basic style for qt quick

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Jun 28 11:31:39 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
e5924dc6 by Fatih Uzunoglu at 2024-06-28T10:27:25+00:00
qt: use basic style for qt quick

Windows style requires Fusion and
they together increase the binary
size.

We have only a few controls that
are not customized. The most
notable one, scroll bar, looks
quite weird natively.

Use basic style instead.

- - - - -
4122407e by Fatih Uzunoglu at 2024-06-28T10:27:25+00:00
contrib: qtdeclarative: disable fusion and windows styles

- - - - -


3 changed files:

- contrib/src/qtdeclarative/rules.mak
- modules/gui/qt/plugins.hpp
- modules/gui/qt/qt.cpp


Changes:

=====================================
contrib/src/qtdeclarative/rules.mak
=====================================
@@ -63,6 +63,8 @@ QT_DECLARATIVE_COMMON_CONFIG := \
 	-DFEATURE_quickcontrols2_universal=OFF \
 	-DFEATURE_quickcontrols2_macos=OFF \
 	-DFEATURE_quickcontrols2_ios=OFF \
+	-DFEATURE_quickcontrols2_fusion=OFF \
+	-DFEATURE_quickcontrols2_windows=OFF \
 	-DFEATURE_qml_network=OFF \
 	-DFEATURE_quick_animatedimage=OFF \
 	-DFEATURE_quick_flipable=OFF \


=====================================
modules/gui/qt/plugins.hpp
=====================================
@@ -47,8 +47,6 @@
     Q_IMPORT_QML_PLUGIN(QtQuickControls2Plugin)
     Q_IMPORT_QML_PLUGIN(QtQuickControls2BasicStylePlugin)
     Q_IMPORT_QML_PLUGIN(QtQuickControls2BasicStyleImplPlugin)
-    Q_IMPORT_QML_PLUGIN(QtQuickControls2FusionStylePlugin)
-    Q_IMPORT_QML_PLUGIN(QtQuickControls2FusionStyleImplPlugin)
     Q_IMPORT_QML_PLUGIN(QtQuickControls2ImplPlugin)
     Q_IMPORT_QML_PLUGIN(QtQuickLayoutsPlugin)
     Q_IMPORT_QML_PLUGIN(QtQuick_WindowPlugin)
@@ -67,8 +65,6 @@
     Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin)
 #endif
     Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
-    Q_IMPORT_QML_PLUGIN(QtQuickControls2WindowsStylePlugin)
-    Q_IMPORT_QML_PLUGIN(QtQuickControls2NativeStylePlugin)
     // Q_IMPORT_PLUGIN(QWindowsDirect2DIntegrationPlugin)
 #elif defined(Q_OS_MACOS)
     Q_IMPORT_PLUGIN(QMacStylePlugin)


=====================================
modules/gui/qt/qt.cpp
=====================================
@@ -826,27 +826,13 @@ static void *Thread( void *obj )
     Q_INIT_RESOURCE( qmake_QtQuick_Controls_impl );
     Q_INIT_RESOURCE( qmake_QtQuick_Controls_Basic );
     Q_INIT_RESOURCE( qmake_QtQuick_Controls_Basic_impl );
-    Q_INIT_RESOURCE( qmake_QtQuick_Controls_Fusion );
-    Q_INIT_RESOURCE( qmake_QtQuick_Controls_Fusion_impl );
-#ifdef _WIN32
-    Q_INIT_RESOURCE( qmake_QtQuick_Controls_Windows );
-    Q_INIT_RESOURCE( qmake_QtQuick_NativeStyle );
-    Q_INIT_RESOURCE( qtquickcontrols2windowsstyleplugin_raw_qml_0 );
-    Q_INIT_RESOURCE( qtquickcontrols2nativestyleplugin_raw_qml_0 );
-#endif
     Q_INIT_RESOURCE( qmake_QtQuick_Layouts );
     Q_INIT_RESOURCE( qmake_QtQuick_Templates );
 
 #if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
-    Q_INIT_RESOURCE( QuickControls2FusionStyleImpl_raw_qml_0 );
-    Q_INIT_RESOURCE( QuickControls2Fusion_raw_qml_0 );
-    Q_INIT_RESOURCE( qtquickcontrols2fusionstyle );
     Q_INIT_RESOURCE( QuickControls2Basic_raw_qml_0 );
     Q_INIT_RESOURCE( qtquickcontrols2basicstyle );
 #else
-    Q_INIT_RESOURCE( qtquickcontrols2fusionstyleimplplugin_raw_qml_0 );
-    Q_INIT_RESOURCE( qtquickcontrols2fusionstyleplugin_raw_qml_0 );
-    Q_INIT_RESOURCE( qtquickcontrols2fusionstyle );
     Q_INIT_RESOURCE( qtquickcontrols2basicstyleplugin_raw_qml_0 );
     Q_INIT_RESOURCE( qtquickcontrols2basicstyleplugin );
 #endif
@@ -866,12 +852,7 @@ static void *Thread( void *obj )
     QQuickWindow::setDefaultAlphaBuffer(true);
 
 #ifdef QT_STATIC
-#ifdef _WIN32
-    QQuickStyle::setStyle(QLatin1String("Windows"));
-#else
-    QQuickStyle::setStyle(QLatin1String("Fusion"));
-#endif
-    QQuickStyle::setFallbackStyle(QLatin1String("Fusion"));
+    QQuickStyle::setStyle(QLatin1String("Basic"));
 #endif
 
     /* Start the QApplication here */



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9d8a7b9ab89b0f8b03d2822e4d5c693cf202c71b...4122407e20d24018575662319d9768540240530a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9d8a7b9ab89b0f8b03d2822e4d5c693cf202c71b...4122407e20d24018575662319d9768540240530a
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list