Skip to content
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

this is a common issue with gtk, as listed here in wiki

\n

The window won't show up when it has initially no size, so when you initialize it with no children you have to force it to have a size, which can be achieved using css.

\n
const Nw = Widget.Window({\n    name:\"notify-win\",\n    child: Widget.Box({\n        vertical: true,\n        css: \"padding: 1px;\", //window has now a minimum size of 2x2 px and therefore show up.\n        children: []\n    })\n})
","upvoteCount":1,"url":"https://github.com/Aylur/ags/discussions/431#discussioncomment-9566589"}}}

window only display if initial children is not empty #431

Answered by kotontrion
deng232 asked this question in Q&A
Discussion options

You must be logged in to vote

this is a common issue with gtk, as listed here in wiki

The window won't show up when it has initially no size, so when you initialize it with no children you have to force it to have a size, which can be achieved using css.

const Nw = Widget.Window({
    name:"notify-win",
    child: Widget.Box({
        vertical: true,
        css: "padding: 1px;", //window has now a minimum size of 2x2 px and therefore show up.
        children: []
    })
})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by deng232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants