Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
76405643 by Fatih Uzunoglu at 2021-07-30T08:25:22+00:00
qml: make VLCStyle QtObject
- - - - -
d6556e3e by Fatih Uzunoglu at 2021-07-30T08:25:22+00:00
qml: make VLCIcons QtObject in VLCIcons generator
- - - - -
0badc830 by Fatih Uzunoglu at 2021-07-30T08:25:22+00:00
qml: regenerate VLCIcons.qml
- - - - -
3 changed files:
- modules/gui/qt/pixmaps/makeIconFont.py
- modules/gui/qt/style/VLCIcons.qml
- modules/gui/qt/style/VLCStyle.qml
Changes:
=====================================
modules/gui/qt/pixmaps/makeIconFont.py
=====================================
@@ -49,8 +49,8 @@ QML_TEMPLATE=u"""
pragma Singleton
import QtQuick 2.0
-Item {
- FontLoader {
+QtObject {
+ readonly property FontLoader fontLoader : FontLoader {
source: "{{qml_file_prefix}}{{font_file}}"
}
@@ -64,6 +64,7 @@ Item {
{% for f in glyphs %} property string {{f.key}} : "{{f.charcode}}"
{% endfor %}
}
+
"""
UTF8_AREA = 0xE000
=====================================
modules/gui/qt/style/VLCIcons.qml
=====================================
@@ -5,8 +5,8 @@
pragma Singleton
import QtQuick 2.0
-Item {
- FontLoader {
+QtObject {
+ readonly property FontLoader fontLoader : FontLoader {
source: "qrc:///VLCIcons.ttf"
}
@@ -177,4 +177,4 @@ Item {
property string check : "\ue09d"
property string visualization : "\ue09e"
-}
\ No newline at end of file
+}
=====================================
modules/gui/qt/style/VLCStyle.qml
=====================================
@@ -18,19 +18,19 @@
pragma Singleton
import QtQuick 2.11
-Item {
+QtObject {
id: vlc_style
readonly property real scale: mainInterface.intfScaleFactor
- FontMetrics { id: fontMetrics_xxsmall; font.pixelSize: dp(6, scale); }
- FontMetrics { id: fontMetrics_xsmall; font.pixelSize: dp(8, scale); }
- FontMetrics { id: fontMetrics_small; font.pixelSize: dp(10, scale); }
- FontMetrics { id: fontMetrics_normal; font.pixelSize: dp(12, scale); }
- FontMetrics { id: fontMetrics_large; font.pixelSize: dp(14, scale); }
- FontMetrics { id: fontMetrics_xlarge; font.pixelSize: dp(16, scale); }
- FontMetrics { id: fontMetrics_xxlarge; font.pixelSize: dp(20, scale); }
- FontMetrics { id: fontMetrics_xxxlarge; font.pixelSize: dp(24, scale); }
+ readonly property FontMetrics fontMetrics_xxsmall : FontMetrics {
font.pixelSize: dp(6, scale); }
+ readonly property FontMetrics fontMetrics_xsmall : FontMetrics {
font.pixelSize: dp(8, scale); }
+ readonly property FontMetrics fontMetrics_small : FontMetrics {
font.pixelSize: dp(10, scale); }
+ readonly property FontMetrics fontMetrics_normal : FontMetrics {
font.pixelSize: dp(12, scale); }
+ readonly property FontMetrics fontMetrics_large : FontMetrics {
font.pixelSize: dp(14, scale); }
+ readonly property FontMetrics fontMetrics_xlarge : FontMetrics {
font.pixelSize: dp(16, scale); }
+ readonly property FontMetrics fontMetrics_xxlarge : FontMetrics {
font.pixelSize: dp(20, scale); }
+ readonly property FontMetrics fontMetrics_xxxlarge : FontMetrics {
font.pixelSize: dp(24, scale); }
property alias self: vlc_style
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/fe12285fa6378fff640599043a7f187e09feb988...0badc8307617f3d9710a5d49861182a6f33502f0
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/fe12285fa6378fff640599043a7f187e09feb988...0badc8307617f3d9710a5d49861182a6f33502f0
You're receiving this email because of your account on code.videolan.org.
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits