Closed iCultureBud closed 5 days ago
In Gtk3 your only option is using windows
function Bar() {
function openPopup() {
App.get_window("some-popup")!.show()
}
return <window>
<box>
<button onClicked={openPopup} />
</box>
</window>
}
function SomePopup() {
return <window name="some-popup" application={App}>
</window>
}
App.start({
main() {
Bar()
SomePopup()
}
})
You can enhance the popup with click away to close, or press ESC to close
In Gtk4 (not yet documented, and no JSX support yet) you can use the above window technique or you can also use Gtk.Popover
Have you read through the documentation?
Describe what have you tried so far I already set up a waybar-like widget (based on the bar example). Now I want to add more widgets to the screen (e.g. a controlcenter, mediaplayer, etc.) and they should align under the bar.
Describe your question Reading through the source code and docs didn't get me an answer. If I use a
window
for each widget I get aGTK Warning
, but if I only usebox
the alignment is always center.So what's the correct way to handle multiple widgets in one "app"? Just wrap all widgets into one
window
asboxes
or each in just onewindow
?Thank you!