quickshell-toki-night/modules/osd/Wrapper.qml
Kiana Sheibani e45f412930
feat!: support exponential brightness curve
I don't need most of the fluff for handling other types of displays, and getting rid of it lets me do something a lot nicer: add an exponential-gamma brightness display.
2026-01-28 13:59:09 -05:00

64 lines
1.2 KiB
QML

import qs.config
import qs.custom
import qs.services
import Quickshell
import QtQuick
Item {
id: root
required property var uiState
visible: width > 0
implicitWidth: 0
implicitHeight: content.implicitHeight
states: State {
name: "visible"
when: root.uiState.osd
PropertyChanges {
root.implicitWidth: content.implicitWidth
}
}
transitions: [
Transition {
from: ""
to: "visible"
Anim {
target: root
property: "implicitWidth"
easing.bezierCurve: Config.anim.curves.expressiveDefaultSpatial
}
},
Transition {
from: "visible"
to: ""
Anim {
target: root
property: "implicitWidth"
easing.bezierCurve: Config.anim.curves.emphasized
}
}
]
Background {
id: background
visible: false
wrapper: root
}
GlowEffect {
source: background
glowColor: Config.colors.osd
}
Content {
id: content
uiState: root.uiState
}
}