aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-05-13 18:25:02 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-05-13 18:25:02 +0200
commit5ea11aaed096e610b52b242b768b3569284f2ce0 (patch)
treeba3df1c96dad915129fb60e72a064cd6a776ae29
parent41822c6eaf9e3a8522af809f33c257947a40a1e9 (diff)
downloadsynthpod-5ea11aaed096e610b52b242b768b3569284f2ce0.tar.xz
nk: more icons.
-rw-r--r--VERSION2
-rw-r--r--data/CMakeLists.txt5
-rw-r--r--data/pix/COPYING1
-rw-r--r--data/pix/automaton.pngbin0 -> 2667 bytes
-rw-r--r--data/png/COPYING6
-rw-r--r--data/png/bell.pngbin0 -> 3254 bytes
-rw-r--r--data/png/cancel-1.pngbin0 -> 3804 bytes
-rw-r--r--data/png/cancel.pngbin0 -> 2827 bytes
-rw-r--r--data/png/checked.pngbin0 -> 3186 bytes
-rw-r--r--data/png/download.pngbin0 -> 2699 bytes
-rw-r--r--data/png/envelope.pngbin0 -> 2847 bytes
-rw-r--r--data/png/house.pngbin0 -> 2914 bytes
-rw-r--r--data/png/layers.pngbin0 -> 3788 bytes
-rw-r--r--data/png/menu.pngbin0 -> 2478 bytes
-rw-r--r--data/png/next.pngbin0 -> 2548 bytes
-rw-r--r--data/png/pencil.pngbin0 -> 2663 bytes
-rw-r--r--data/png/plus.pngbin0 -> 2421 bytes
-rw-r--r--data/png/question.pngbin0 -> 3339 bytes
-rw-r--r--data/png/reload.pngbin0 -> 3653 bytes
-rw-r--r--data/png/screen.pngbin0 -> 2506 bytes
-rw-r--r--data/png/settings.pngbin0 -> 3570 bytes
-rw-r--r--data/png/sort.pngbin0 -> 2648 bytes
-rw-r--r--data/png/upload.pngbin0 -> 2716 bytes
-rw-r--r--data/png/user.pngbin0 -> 3636 bytes
-rw-r--r--plugins/synthpod_common_nk.c62
25 files changed, 49 insertions, 27 deletions
diff --git a/VERSION b/VERSION
index c7b512b8..f426ca4c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.4953
+0.1.4955
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 5bccb5d8..b9d83c8d 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -11,3 +11,8 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/osc.png DESTINATION ${SYNTHPOD_DAT
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/time.png DESTINATION ${SYNTHPOD_DATA_DIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/patch.png DESTINATION ${SYNTHPOD_DATA_DIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/xpress.png DESTINATION ${SYNTHPOD_DATA_DIR})
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/automaton.png DESTINATION ${SYNTHPOD_DATA_DIR})
+
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/plus.png DESTINATION ${SYNTHPOD_DATA_DIR})
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/download.png DESTINATION ${SYNTHPOD_DATA_DIR})
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/cancel.png DESTINATION ${SYNTHPOD_DATA_DIR})
diff --git a/data/pix/COPYING b/data/pix/COPYING
new file mode 100644
index 00000000..3af757f6
--- /dev/null
+++ b/data/pix/COPYING
@@ -0,0 +1 @@
+automaton.png: CC-By-SA 3.0 (http://www.flaticon.com/authors/plainicon)
diff --git a/data/pix/automaton.png b/data/pix/automaton.png
new file mode 100644
index 00000000..4bb82a56
--- /dev/null
+++ b/data/pix/automaton.png
Binary files differ
diff --git a/data/png/COPYING b/data/png/COPYING
new file mode 100644
index 00000000..31532023
--- /dev/null
+++ b/data/png/COPYING
@@ -0,0 +1,6 @@
+Icons made by http://www.flaticon.com/authors/eleonor-wang
+Released under http://creativecommons.org/licenses/by/3.0/
+Downloaded from http://www.flaticon.com/packs/flat-lines-circled
+
+Modified with ImageMagick:
+for file in *.png; do mogrify -negate -modulate 70 -resize 25% $file; done
diff --git a/data/png/bell.png b/data/png/bell.png
new file mode 100644
index 00000000..970fd187
--- /dev/null
+++ b/data/png/bell.png
Binary files differ
diff --git a/data/png/cancel-1.png b/data/png/cancel-1.png
new file mode 100644
index 00000000..dacf8cc9
--- /dev/null
+++ b/data/png/cancel-1.png
Binary files differ
diff --git a/data/png/cancel.png b/data/png/cancel.png
new file mode 100644
index 00000000..cdc27655
--- /dev/null
+++ b/data/png/cancel.png
Binary files differ
diff --git a/data/png/checked.png b/data/png/checked.png
new file mode 100644
index 00000000..50a2a72e
--- /dev/null
+++ b/data/png/checked.png
Binary files differ
diff --git a/data/png/download.png b/data/png/download.png
new file mode 100644
index 00000000..9f803494
--- /dev/null
+++ b/data/png/download.png
Binary files differ
diff --git a/data/png/envelope.png b/data/png/envelope.png
new file mode 100644
index 00000000..c2793582
--- /dev/null
+++ b/data/png/envelope.png
Binary files differ
diff --git a/data/png/house.png b/data/png/house.png
new file mode 100644
index 00000000..32a4fa41
--- /dev/null
+++ b/data/png/house.png
Binary files differ
diff --git a/data/png/layers.png b/data/png/layers.png
new file mode 100644
index 00000000..17587da1
--- /dev/null
+++ b/data/png/layers.png
Binary files differ
diff --git a/data/png/menu.png b/data/png/menu.png
new file mode 100644
index 00000000..bbf13521
--- /dev/null
+++ b/data/png/menu.png
Binary files differ
diff --git a/data/png/next.png b/data/png/next.png
new file mode 100644
index 00000000..4be0f6ff
--- /dev/null
+++ b/data/png/next.png
Binary files differ
diff --git a/data/png/pencil.png b/data/png/pencil.png
new file mode 100644
index 00000000..f0c60741
--- /dev/null
+++ b/data/png/pencil.png
Binary files differ
diff --git a/data/png/plus.png b/data/png/plus.png
new file mode 100644
index 00000000..f42d879f
--- /dev/null
+++ b/data/png/plus.png
Binary files differ
diff --git a/data/png/question.png b/data/png/question.png
new file mode 100644
index 00000000..be695537
--- /dev/null
+++ b/data/png/question.png
Binary files differ
diff --git a/data/png/reload.png b/data/png/reload.png
new file mode 100644
index 00000000..45030455
--- /dev/null
+++ b/data/png/reload.png
Binary files differ
diff --git a/data/png/screen.png b/data/png/screen.png
new file mode 100644
index 00000000..196653cb
--- /dev/null
+++ b/data/png/screen.png
Binary files differ
diff --git a/data/png/settings.png b/data/png/settings.png
new file mode 100644
index 00000000..df46f118
--- /dev/null
+++ b/data/png/settings.png
Binary files differ
diff --git a/data/png/sort.png b/data/png/sort.png
new file mode 100644
index 00000000..9ea8bd03
--- /dev/null
+++ b/data/png/sort.png
Binary files differ
diff --git a/data/png/upload.png b/data/png/upload.png
new file mode 100644
index 00000000..847d906f
--- /dev/null
+++ b/data/png/upload.png
Binary files differ
diff --git a/data/png/user.png b/data/png/user.png
new file mode 100644
index 00000000..4aff5947
--- /dev/null
+++ b/data/png/user.png
Binary files differ
diff --git a/plugins/synthpod_common_nk.c b/plugins/synthpod_common_nk.c
index c361a7c8..60f27507 100644
--- a/plugins/synthpod_common_nk.c
+++ b/plugins/synthpod_common_nk.c
@@ -410,6 +410,11 @@ struct _plughandle_t {
struct nk_image patch;
struct nk_image time;
struct nk_image xpress;
+ struct nk_image automaton;
+
+ struct nk_image plus;
+ struct nk_image download;
+ struct nk_image cancel;
} icon;
};
@@ -2774,7 +2779,7 @@ _expose_main_header(plughandle_t *handle, struct nk_context *ctx, float dy)
{
if(_tooltip_visible(ctx))
nk_tooltip(ctx, "Ctrl-N");
- if(nk_button_label(ctx, "N") && handle->self_urn)
+ if(nk_button_image_label(ctx, handle->icon.plus, "", NK_TEXT_RIGHT))
{
if( _message_request(handle)
&& synthpod_patcher_copy(&handle->regs, &handle->forge,
@@ -2786,7 +2791,7 @@ _expose_main_header(plughandle_t *handle, struct nk_context *ctx, float dy)
if(_tooltip_visible(ctx))
nk_tooltip(ctx, "Ctrl-S");
- if(nk_button_label(ctx, "S") && handle->bundle_urn)
+ if(nk_button_image_label(ctx, handle->icon.download, "", NK_TEXT_RIGHT))
{
if( _message_request(handle)
&& synthpod_patcher_copy(&handle->regs, &handle->forge,
@@ -2798,7 +2803,7 @@ _expose_main_header(plughandle_t *handle, struct nk_context *ctx, float dy)
if(_tooltip_visible(ctx))
nk_tooltip(ctx, "Ctrl-Q");
- if(nk_button_label(ctx, "Q"))
+ if(nk_button_image_label(ctx, handle->icon.cancel, "", NK_TEXT_RIGHT))
{
handle->done = true;
}
@@ -2881,7 +2886,7 @@ _expose_main_header(plughandle_t *handle, struct nk_context *ctx, float dy)
if(is_automation)
nk_style_push_color(ctx, &style->button.border_color, hilight_color);
- if(nk_button_label(ctx, "A"))
+ if(nk_button_image_label(ctx, handle->icon.automaton, "", NK_TEXT_RIGHT))
handle->type = PROPERTY_TYPE_AUTOMATION;
if(is_automation)
nk_style_pop_color(ctx);
@@ -3619,33 +3624,30 @@ _expose_atom_port(struct nk_context *ctx, mod_t *mod, port_t *port,
const bool has_time = port->type & PROPERTY_TYPE_TIME;
const bool has_patch = port->type & PROPERTY_TYPE_PATCH;
const bool has_xpress = port->type & PROPERTY_TYPE_XPRESS;
+ const bool has_automation = port->type & PROPERTY_TYPE_AUTOMATION;
- const bool is_automation = port->type == PROPERTY_TYPE_AUTOMATION;
+ const unsigned n = has_midi + has_osc + has_time + has_patch + has_xpress + has_automation;
nk_layout_row_dynamic(ctx, dy, 1);
nk_label(ctx, name_str, NK_TEXT_LEFT);
- nk_layout_row_static(ctx, dy, dy, 6);
-
- if(has_midi) nk_image(ctx, handle->icon.midi);
- else nk_spacing(ctx, 1);
-
- if(has_osc) nk_image(ctx, handle->icon.osc);
- else nk_spacing(ctx, 1);
-
- if(has_time) nk_image(ctx, handle->icon.time);
- else nk_spacing(ctx, 1);
-
- if(has_patch) nk_image(ctx, handle->icon.patch);
- else nk_spacing(ctx, 1);
-
- if(has_xpress) nk_image(ctx, handle->icon.xpress);
- else nk_spacing(ctx, 1);
-
- /*FIXME
- if(is_automation) nk_image(ctx, handle->icon.automation);
- else nk_spacing(ctx, 1);
- */
+ if(n)
+ {
+ nk_layout_row_static(ctx, dy, dy, n);
+
+ if(has_midi)
+ nk_image(ctx, handle->icon.midi);
+ if(has_osc)
+ nk_image(ctx, handle->icon.osc);
+ if(has_time)
+ nk_image(ctx, handle->icon.time);
+ if(has_patch)
+ nk_image(ctx, handle->icon.patch);
+ if(has_xpress)
+ nk_image(ctx, handle->icon.xpress);
+ if(has_automation)
+ nk_image(ctx, handle->icon.automaton);
+ }
nk_group_end(ctx);
}
@@ -5673,6 +5675,10 @@ instantiate(const LV2UI_Descriptor *descriptor, const char *plugin_uri,
handle->icon.patch = _icon_load(handle, "patch.png");
handle->icon.time = _icon_load(handle, "time.png");
handle->icon.xpress = _icon_load(handle, "xpress.png");
+ handle->icon.automaton = _icon_load(handle, "automaton.png");
+ handle->icon.plus = _icon_load(handle, "plus.png");
+ handle->icon.download = _icon_load(handle, "download.png");
+ handle->icon.cancel = _icon_load(handle, "cancel.png");
return handle;
}
@@ -5691,6 +5697,10 @@ cleanup(LV2UI_Handle instance)
_icon_unload(handle, handle->icon.patch);
_icon_unload(handle, handle->icon.time);
_icon_unload(handle, handle->icon.xpress);
+ _icon_unload(handle, handle->icon.automaton);
+ _icon_unload(handle, handle->icon.plus);
+ _icon_unload(handle, handle->icon.download);
+ _icon_unload(handle, handle->icon.cancel);
if(handle->win.cfg.font.face)
free(handle->win.cfg.font.face);