NIconButton support for custom font family
This commit is contained in:
parent
41d93128b8
commit
f92ac9f0b0
1 changed files with 2 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ Rectangle {
|
||||||
property var onExited: function () {}
|
property var onExited: function () {}
|
||||||
property var onClicked: function () {}
|
property var onClicked: function () {}
|
||||||
property real fontPointSize: Style.fontSizeMedium
|
property real fontPointSize: Style.fontSizeMedium
|
||||||
|
property string fontFamily: "Material Symbols Outlined"
|
||||||
|
|
||||||
implicitWidth: size
|
implicitWidth: size
|
||||||
implicitHeight: size
|
implicitHeight: size
|
||||||
|
|
@ -30,7 +31,7 @@ Rectangle {
|
||||||
anchors.horizontalCenterOffset: 0
|
anchors.horizontalCenterOffset: 0
|
||||||
anchors.verticalCenterOffset: 0
|
anchors.verticalCenterOffset: 0
|
||||||
text: root.icon
|
text: root.icon
|
||||||
font.family: "Material Symbols Outlined"
|
font.family: fontFamily
|
||||||
font.pointSize: root.fontPointSize * scaling
|
font.pointSize: root.fontPointSize * scaling
|
||||||
color: root.hovering ? Colors.onAccent : Colors.textPrimary
|
color: root.hovering ? Colors.onAccent : Colors.textPrimary
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue