NiGui icon indicating copy to clipboard operation
NiGui copied to clipboard

Unwanted padding depending on order of widget addition

Open drygdryg opened this issue 3 years ago • 1 comments

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()

Screenshot_2 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()

Screenshot_1

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

drygdryg avatar Jan 14 '21 06:01 drygdryg

I see this the first time and consider it as a bug. Thanks for reporting.

simonkrauter avatar Jan 14 '21 15:01 simonkrauter