[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: CSDWindowsButton: Removing font fallback for CSD Icons

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Apr 25 13:08:13 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
c92889d0 by darshan jain at 2024-04-25T12:15:22+00:00
qml: CSDWindowsButton: Removing font fallback for CSD Icons

Font fallback is not supported in Qt.
By this MR the issue gets resolved and CSD icons display wrt Windows
Version independently.

- - - - -
b06ef34a by darshan jain at 2024-04-25T12:15:22+00:00
qml: CSDWindowsButtonSet: adding useWinIcons for rendering CSD Icons

- - - - -


2 changed files:

- modules/gui/qt/widgets/qml/CSDWindowButton.qml
- modules/gui/qt/widgets/qml/CSDWindowButtonSet.qml


Changes:

=====================================
modules/gui/qt/widgets/qml/CSDWindowButton.qml
=====================================
@@ -35,8 +35,6 @@ T.Button {
     property bool showHovered: false
     property bool isThemeDark: false
 
-    readonly property bool useWinIcons: ((MainCtx.osName === MainCtx.Windows)&&(MainCtx.osVersion >= 10))
-
     readonly property bool _paintHovered: control.hovered || showHovered
 
     padding: 0
@@ -71,9 +69,15 @@ T.Button {
             text: control.iconTxt
 
             font.family:{
-                if (useWinIcons)
-                 return "Segoe Fluent Icons, Segoe MDL2 Assets"
-
+                if (MainCtx.osName === MainCtx.Windows)
+                {
+                    if(MainCtx.osVersion === 10)
+                        return "Segoe MDL2 Assets"
+
+                    else if(MainCtx.osVersion >= 11)
+                        return "Segoe Fluent Icons"
+                }
+     
                 return VLCIcons.fontFamily
             }
 


=====================================
modules/gui/qt/widgets/qml/CSDWindowButtonSet.qml
=====================================
@@ -33,6 +33,8 @@ Row {
     property color color: theme.fg.primary
     property color hoverColor: VLCStyle.setColorAlpha(theme.bg.primary, 0.5)
 
+    readonly property bool useWinIcons: ((MainCtx.osName === MainCtx.Windows)&&(MainCtx.osVersion >= 10))
+
     readonly property bool buttonHovered: {
         let h = false
         for (let i = 0; i < repeater.count; ++i) {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ac178ac8e3132b40330c1344fe3700b38ad0b552...b06ef34af64f589c5dc5d8fce6799613588448ac

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ac178ac8e3132b40330c1344fe3700b38ad0b552...b06ef34af64f589c5dc5d8fce6799613588448ac
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