NiGui
NiGui copied to clipboard
Unwanted padding depending on order of widget addition
When I add the main container to the window at the very beginning (after creating the container), the interface is displayed correctly.
import nigui
app.init()
let window = newWindow()
let main_container = newLayoutContainer(Layout_Vertical)
window.add(main_container)
let test_checkbox = newCheckbox(
"Test checkbox")
let test_textarea = newTextArea()
test_textarea.editable = false
let progressBar = newProgressBar()
main_container.add(test_checkbox)
main_container.add(test_textarea)
main_container.add(progressBar)
window.show()
app.run()
But as soon as I add a container at the end (before showing the window), the interface does not display correctly (you can see the unwanted padding at the bottom and right).
import nigui
app.init()
let window = newWindow()
let main_container = newLayoutContainer(Layout_Vertical)
let test_checkbox = newCheckbox(
"Test checkbox")
let test_textarea = newTextArea()
test_textarea.editable = false
let progressBar = newProgressBar()
main_container.add(test_checkbox)
main_container.add(test_textarea)
main_container.add(progressBar)
window.add(main_container)
window.show()
app.run()
Question: is this behavior normal? This does not show up on Linux, but does show up on all versions of Windows (7, 8, 10). Thanks
I see this the first time and consider it as a bug. Thanks for reporting.