You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the pure x11 demo, after enabling stb_image and loading your images via the nk_xsurf_load_image_from_file function
You then use that loaded image later on in for example nk_button_image_label(ctx, icon, "text1", NK_TEXT_CENTERED);
However if any content in that window is scrollable it causes weird rendering/clipping issues.
Here it is when there is scrolling
And when there is no scrolling
This issue goes away if I forgo the image/icon by doing nk_button_label(ctx, "text1"); instead, but that kinda defeats the whole point of having image loading support.
To reproduce my examples add the following to demo/x11/main.c
line 17: #define NK_XLIB_INCLUDE_STB_IMAGE #define NK_XLIB_IMPLEMENT_STB_IMAGE
line 154:
// Make sure the is a image file named 'image.png' in the directory you launch the demo
struct nk_image icon = nk_xsurf_load_image_from_file("image.png");
In the pure x11 demo, after enabling stb_image and loading your images via the
nk_xsurf_load_image_from_file
functionYou then use that loaded image later on in for example
nk_button_image_label(ctx, icon, "text1", NK_TEXT_CENTERED);
However if any content in that window is scrollable it causes weird rendering/clipping issues.
Here it is when there is scrolling
And when there is no scrolling
This issue goes away if I forgo the image/icon by doing
nk_button_label(ctx, "text1");
instead, but that kinda defeats the whole point of having image loading support.To reproduce my examples add the following to
demo/x11/main.c
line 17:
#define NK_XLIB_INCLUDE_STB_IMAGE
#define NK_XLIB_IMPLEMENT_STB_IMAGE
line 154:
line 177:
I believe I also had change the makefile to use C99 instead of C89 so that stb_image would compile.
Please let me know if I'm doing anything, wrong or if you guys need more info.
The text was updated successfully, but these errors were encountered: