mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-11 16:22:09 -04:00
@@ -864,10 +864,12 @@ func (p *NiriWritableProvider) formatRule(rule windowrules.WindowRule) string {
|
|||||||
|
|
||||||
func formatSizeProperty(name, value string) string {
|
func formatSizeProperty(name, value string) string {
|
||||||
parts := strings.SplitN(value, " ", 2)
|
parts := strings.SplitN(value, " ", 2)
|
||||||
if len(parts) != 2 {
|
if len(parts) == 2 {
|
||||||
return fmt.Sprintf(" %s { }", name)
|
return fmt.Sprintf(" %s { %s %s; }", name, parts[0], parts[1])
|
||||||
}
|
}
|
||||||
sizeType := parts[0]
|
// Bare number without type prefix — default to "fixed"
|
||||||
sizeValue := parts[1]
|
if _, err := strconv.Atoi(value); err == nil {
|
||||||
return fmt.Sprintf(" %s { %s %s; }", name, sizeType, sizeValue)
|
return fmt.Sprintf(" %s { fixed %s; }", name, value)
|
||||||
|
}
|
||||||
|
return fmt.Sprintf(" %s { }", name)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -631,7 +631,7 @@ FloatingWindow {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
textColor: Theme.surfaceText
|
textColor: Theme.surfaceText
|
||||||
placeholderText: "fixed 800"
|
placeholderText: "800"
|
||||||
backgroundColor: "transparent"
|
backgroundColor: "transparent"
|
||||||
enabled: root.visible
|
enabled: root.visible
|
||||||
}
|
}
|
||||||
@@ -658,7 +658,7 @@ FloatingWindow {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
textColor: Theme.surfaceText
|
textColor: Theme.surfaceText
|
||||||
placeholderText: "fixed 600"
|
placeholderText: "600"
|
||||||
backgroundColor: "transparent"
|
backgroundColor: "transparent"
|
||||||
enabled: root.visible
|
enabled: root.visible
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user