forked from Shinonome/dots-hyprland
material symbols: support filling
This commit is contained in:
@@ -19,5 +19,6 @@ Item {
|
||||
}
|
||||
return root.source
|
||||
}
|
||||
implicitSize: root.height
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,27 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
Text {
|
||||
id: root
|
||||
property real iconSize: Appearance.font.pixelSize.small
|
||||
property real fill: 0
|
||||
renderType: Text.NativeRendering
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.family: Appearance.font.family.iconMaterial
|
||||
font.pixelSize: Appearance.font.pixelSize.small
|
||||
font.pixelSize: iconSize
|
||||
color: Appearance.m3colors.m3onBackground
|
||||
|
||||
Behavior on fill {
|
||||
NumberAnimation {
|
||||
duration: Appearance.animation.elementMoveFast.duration
|
||||
easing.type: Appearance.animation.elementMoveFast.type
|
||||
easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve
|
||||
}
|
||||
}
|
||||
|
||||
font.variableAxes: {
|
||||
"FILL": fill,
|
||||
// "wght": font.weight,
|
||||
// "GRAD": 0,
|
||||
"opsz": iconSize,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ Button {
|
||||
spacing: 5
|
||||
Rectangle {
|
||||
width: 62
|
||||
implicitHeight: navRailButtonIcon.height + 2*2
|
||||
implicitHeight: navRailButtonIcon.height + 2 * 2
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
radius: Appearance.rounding.full
|
||||
color: toggled ?
|
||||
@@ -42,7 +42,8 @@ Button {
|
||||
MaterialSymbol {
|
||||
id: navRailButtonIcon
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: Appearance.font.pixelSize.hugeass
|
||||
iconSize: Appearance.font.pixelSize.hugeass
|
||||
fill: toggled ? 1 : 0
|
||||
text: buttonIcon
|
||||
color: toggled ? Appearance.m3colors.m3onSecondaryContainer : Appearance.colors.colOnLayer1
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ Item {
|
||||
color: (notificationObject.urgency == NotificationUrgency.Critical) ?
|
||||
Appearance.mix(Appearance.m3colors.m3onSecondary, Appearance.m3colors.m3onSecondaryContainer, 0.1) :
|
||||
Appearance.m3colors.m3onSecondaryContainer
|
||||
font.pixelSize: 27
|
||||
iconSize: 27
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
@@ -419,7 +419,7 @@ Item {
|
||||
text: "keyboard_arrow_down"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
iconSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOnLayer2
|
||||
rotation: expanded ? 180 : 0
|
||||
Behavior on rotation {
|
||||
@@ -554,7 +554,7 @@ Item {
|
||||
|
||||
contentItem: MaterialSymbol {
|
||||
id: copyIcon
|
||||
font.pixelSize: Appearance.font.pixelSize.large
|
||||
iconSize: Appearance.font.pixelSize.large
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: (notificationObject.urgency == NotificationUrgency.Critical) ?
|
||||
Appearance.m3colors.m3onSurfaceVariant : Appearance.m3colors.m3onSurface
|
||||
@@ -574,7 +574,7 @@ Item {
|
||||
}
|
||||
|
||||
contentItem: MaterialSymbol {
|
||||
font.pixelSize: Appearance.font.pixelSize.large
|
||||
iconSize: Appearance.font.pixelSize.large
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: (notificationObject.urgency == NotificationUrgency.Critical) ?
|
||||
Appearance.m3colors.m3onSurfaceVariant : Appearance.m3colors.m3onSurface
|
||||
|
||||
@@ -40,7 +40,8 @@ TabButton {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: buttonIcon
|
||||
font.pixelSize: 24
|
||||
iconSize: Appearance.font.pixelSize.hugeass
|
||||
fill: selected ? 1 : 0
|
||||
color: selected ? Appearance.m3colors.m3primary : Appearance.colors.colOnLayer1
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
|
||||
@@ -40,7 +40,8 @@ TabButton {
|
||||
Layout.rightMargin: 5
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: buttonIcon
|
||||
font.pixelSize: Appearance.font.pixelSize.huge
|
||||
iconSize: Appearance.font.pixelSize.huge
|
||||
fill: selected ? 1 : 0
|
||||
color: selected ? Appearance.m3colors.m3primary : Appearance.colors.colOnLayer1
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
|
||||
Reference in New Issue
Block a user