mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 23:42:51 -05:00
Refactor pre-commit hooks to use prek (#976)
* ci: change to prek for pre-commit * refactor: fix shellcheck warnings for the scripts * chore: unify whitespace formatting * nix: add prek to dev shell
This commit is contained in:
@@ -210,4 +210,4 @@ Flow {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,4 +76,4 @@ Rectangle {
|
||||
font.weight: Font.Bold
|
||||
color: Theme.surfaceVariantText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import qs.Common
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
|
||||
property alias name: icon.text
|
||||
property alias size: icon.font.pixelSize
|
||||
property alias color: icon.color
|
||||
@@ -11,22 +11,22 @@ Item {
|
||||
property real fill: filled ? 1.0 : 0.0
|
||||
property int grade: Theme.isLightMode ? 0 : -25
|
||||
property int weight: filled ? 500 : 400
|
||||
|
||||
|
||||
implicitWidth: icon.implicitWidth
|
||||
implicitHeight: icon.implicitHeight
|
||||
|
||||
|
||||
signal rotationCompleted()
|
||||
|
||||
|
||||
FontLoader {
|
||||
id: materialSymbolsFont
|
||||
source: Qt.resolvedUrl("../assets/fonts/material-design-icons/variablefont/MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf")
|
||||
}
|
||||
|
||||
|
||||
StyledText {
|
||||
id: icon
|
||||
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
|
||||
font.family: materialSymbolsFont.name
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: root.weight
|
||||
@@ -40,7 +40,7 @@ Item {
|
||||
"opsz": 24,
|
||||
"wght": root.weight
|
||||
}
|
||||
|
||||
|
||||
Behavior on font.weight {
|
||||
NumberAnimation {
|
||||
duration: Theme.shortDuration
|
||||
@@ -48,22 +48,22 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Behavior on fill {
|
||||
NumberAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Timer {
|
||||
id: rotationTimer
|
||||
interval: 16
|
||||
repeat: false
|
||||
onTriggered: root.rotationCompleted()
|
||||
}
|
||||
|
||||
|
||||
onRotationChanged: {
|
||||
rotationTimer.restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,4 +179,4 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,4 +202,4 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,4 +251,4 @@ FocusScope {
|
||||
Qt.callLater(updateIndicator)
|
||||
}
|
||||
onWidthChanged: Qt.callLater(updateIndicator)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ StyledRect {
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.IBeamCursor
|
||||
acceptedButtons: Qt.NoButton
|
||||
}
|
||||
|
||||
@@ -89,4 +89,4 @@ PanelWindow {
|
||||
width: Math.min(implicitWidth, 300 - Theme.spacingM * 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user