simonkrauter / NiGui

Cross-platform desktop GUI toolkit written in Nim
MIT License
724 stars 49 forks source link

scrollToBottom not working on linux #120

Closed Wh1teDuke closed 3 years ago

Wh1teDuke commented 3 years ago

gtk debug output prints _gtk_text_view_scroll_to_iter: assertion 'xalign >= 0.0 && xalign <= 1.0' failed

simonkrauter commented 3 years ago

For me (Manjaro with Xfce) it works, can you provide more details please?

Wh1teDuke commented 3 years ago

For me (Manjaro with Xfce) it works, can you provide more details please?

lxde libgtk-3-0:i386 3.24.24-1

import nigui

app.init()
var window = newWindow("NiGui Example")
var container = newLayoutContainer(Layout_Vertical)
window.add(container)

var textArea = newTextArea()
container.add(textArea)

discard startRepeatingTimer(300, proc(event: TimerEvent) =
  textArea.addLine($len(textArea.text))
  scrollToBottom(textArea)
)

window.show()
app.run()

This snippet doesn't work as expected for me.

nigui

simonkrauter commented 3 years ago

I guess it is fixed by https://github.com/trustable-code/NiGui/commit/5db6f02cadaa522caf2814c360669ba94fb9c57a . The wrong data type affected only 32-bit systems and not 64-bit systems.

Wh1teDuke commented 3 years ago

I guess it is fixed by 5db6f02 . The wrong data type affected only 32-bit systems and not 64-bit systems.

Yes, that was it. Thank you for fixing my issue.