nimx
nimx copied to clipboard
Some issues with scrollbars
import nimx.window,
nimx.text_field,
nimx.scroll_view,
nimx.system_logger,
strutils
runApplication:
let wnd = newWindow newRect(40, 40, 640, 480)
let tv = TextField.new newRect(40, 40, 100, 100)
tv.resizingMask = "wh"
tv.text = "abcdefgi\n".repeat(20)
tv.multiline = true
let scroll = newScrollView tv
wnd.addSubView scroll
The scrollbars are incorrect initially. It appears correct after I select some text, minimize the window and then bring up the window. Is my code correct?
Your code looks correct. Thats a bug.
Another issue in regards to scrolling: on macOS "natural scrolling" is assumed even though I have it disabled :)
@dom96, yeah, unfortunately sdl2 is in the way here...
@dom96 I've looked at your issue once again and see it has likely been fixed in SDL 2.0.4.
@yglukhov awesome, thanks for letting me know.