this is a common issue with gtk, as listed here in wiki
\nThe 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.
\nconst 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})
-
I'm try to write my own notification window and I found that the window only display when the initial Box children is not empty. Looking at the inspector, the children Box have created successfully whenever a notification was being sent, it just nothing displayed nothing whenever the Box children was initially empty.
|
Beta Was this translation helpful? Give feedback.
-
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: []
})
}) |
Beta Was this translation helpful? Give feedback.
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.