Closed danielwerg closed 2 hours ago
Can't repro, binding tooltipText
works as expected
import App from "astal/gtk3/app"
import Variable from "astal/variable"
import Astal from "gi://Astal?version=3.0"
App.start({
instanceName: "test",
main() {
const test = Variable(0).poll(1000, () => Math.random())
return <window keymode={Astal.Keymode.ON_DEMAND}>
<button tooltipText={test(String)} onClicked={() => App.quit()}>
<icon icon="window-close-symbolic" />
</button>
</window>
}
})
I'm assuming you are doing something like this
import App from "astal/gtk3/app"
import Variable from "astal/variable"
import Astal from "gi://Astal?version=3.0"
App.start({
instanceName: "t",
main() {
const test = Variable(0).poll(1000, () => Math.random())
return <window keymode={Astal.Keymode.ON_DEMAND}>
{test(test => (
// the whole button is rerendered, expect tooltip to go away
<button tooltipText={String(test)} onClicked={() => App.quit()}>
<icon icon="window-close-symbolic" />
</button>
))}
</window>
}
})
Have you read through the documentation?
Describe your question
I have
Variable
that updates every5000
ms withpool
and then being display as tooltip usingtooltipText
.https://github.com/user-attachments/assets/fba337c9-e620-4bb8-8e50-e014e297cb1c
On every update tooltip closes, is there way to prevent this?
https://aylur.github.io/astal/guide/ags/faq returns 404