Kylin/Fluent/qml/Icon.qml
2024-08-23 00:04:16 +08:00

20 lines
542 B
QML

import QtQuick
Text {
property int iconSource
property int iconSize: 20
property color iconColor: FluTheme.dark ? "#FFFFFF" : "#000000"
id:control
font.family: font_loader.name
font.pixelSize: iconSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: iconColor
text: (String.fromCharCode(iconSource).toString(16))
opacity: iconSource>0
FontLoader{
id: font_loader
source: "qrc:/qt/qml/FluentUI/Font/FluentIcons.ttf"
}
}