diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2018-06-08 12:00:50 +0200 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2018-06-08 12:00:50 +0200 |
commit | d4c2aa6c54dd1784e63992c1a53bd7f68d4db6a7 (patch) | |
tree | d5cb516102e0c117c2d4d03c4320bf3dbee52cf7 | |
parent | eddf7369fc1fdcc5732371d0e8a0754b9857cd9a (diff) | |
download | sherlock.lv2-d4c2aa6c54dd1784e63992c1a53bd7f68d4db6a7.tar.xz |
fix strobing shadowing when in non-following mode.
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | atom_inspector_nk.c | 6 | ||||
-rw-r--r-- | midi_inspector_nk.c | 8 | ||||
-rw-r--r-- | osc_inspector_nk.c | 6 |
4 files changed, 20 insertions, 2 deletions
@@ -1 +1 @@ -0.17.161 +0.17.167 diff --git a/atom_inspector_nk.c b/atom_inspector_nk.c index f614fe4..2a70fe2 100644 --- a/atom_inspector_nk.c +++ b/atom_inspector_nk.c @@ -195,7 +195,13 @@ _atom_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *dat nk_layout_row_dynamic(ctx, content_h, 1); nk_flags flags = NK_WINDOW_BORDER; if(handle->state.follow) + { flags |= NK_WINDOW_NO_SCROLLBAR; + } + else + { + handle->shadow = false; + } struct nk_list_view lview; if(nk_list_view_begin(ctx, &lview, "Events", flags, widget_h, NK_MIN(handle->n_item, MAX_LINES))) { diff --git a/midi_inspector_nk.c b/midi_inspector_nk.c index 93cd18d..e65a38c 100644 --- a/midi_inspector_nk.c +++ b/midi_inspector_nk.c @@ -209,7 +209,7 @@ _shadow(struct nk_context *ctx, bool *shadow) struct nk_rect b = nk_widget_bounds(ctx); b.x -= group_padding.x; b.w *= 10; - b.w += 8*group_padding.x; + b.w += 5*group_padding.x; nk_fill_rect(canvas, b, 0.f, nk_rgb(0x28, 0x28, 0x28)); } @@ -237,7 +237,13 @@ _midi_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *dat nk_layout_row_dynamic(ctx, body_h, 1); nk_flags flags = NK_WINDOW_BORDER; if(handle->state.follow) + { flags |= NK_WINDOW_NO_SCROLLBAR; + } + else + { + handle->shadow = false; + } struct nk_list_view lview; if(nk_list_view_begin(ctx, &lview, "Events", flags, widget_h, NK_MIN(handle->n_item, MAX_LINES))) { diff --git a/osc_inspector_nk.c b/osc_inspector_nk.c index 23843d0..eaaea03 100644 --- a/osc_inspector_nk.c +++ b/osc_inspector_nk.c @@ -342,7 +342,13 @@ _osc_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *data nk_layout_row_dynamic(ctx, body_h, 1); nk_flags flags = NK_WINDOW_BORDER; if(handle->state.follow) + { flags |= NK_WINDOW_NO_SCROLLBAR; + } + else + { + handle->shadow = false; + } struct nk_list_view lview; if(nk_list_view_begin(ctx, &lview, "Events", flags, widget_h, NK_MIN(handle->n_item, MAX_LINES))) { |