aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2015-12-04 17:13:29 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2015-12-04 17:13:29 +0100
commitf26779047c8e2e4f86258b32c0b83c9cdd0918e2 (patch)
tree05c28fd91341c2e8e178b83174e422b94c6e6c53
parent3ccb82d131b7a5373ee73badf6ea146a71214359 (diff)
downloadsherlock.lv2-f26779047c8e2e4f86258b32c0b83c9cdd0918e2.tar.xz
beautify UIs a bit.
-rw-r--r--atom_inspector_ui.c14
-rw-r--r--midi_inspector_ui.c4
-rw-r--r--osc_inspector_ui.c6
3 files changed, 17 insertions, 7 deletions
diff --git a/atom_inspector_ui.c b/atom_inspector_ui.c
index 5948bb0..37b2d26 100644
--- a/atom_inspector_ui.c
+++ b/atom_inspector_ui.c
@@ -92,11 +92,14 @@ _is_expandable(UI *ui, const uint32_t type)
|| (type == ui->forge.Sequence);
}
-#define HIL_PRE(VAL) ("<color=#bbb font=Mono style=plain><b>"VAL"</b></color> <color=#b00 font=Mono style=plain>")
+#define CODE_PRE "<style=shadow,bottom>"
+#define CODE_POST "</style>"
+
+#define HIL_PRE(VAL) ("<color=#bbb font=Mono><b>"VAL"</b></color> <color=#b00 font=Mono>")
#define HIL_POST ("</color>")
-#define URI(VAL,TYP) ("<color=#bbb font=Mono style=plain><b>"VAL"</b></color> <color=#fff style=plain>"TYP"</color>")
-#define HIL(VAL,TYP) ("<color=#bbb font=Mono style=plain><b>"VAL"</b></color> <color=#b00 font=Mono style=plain>"TYP"</color>")
+#define URI(VAL,TYP) ("<color=#bbb font=Mono><b>"VAL"</b></color> <color=#fff font=Default>"TYP"</color>")
+#define HIL(VAL,TYP) ("<color=#bbb font=Mono><b>"VAL"</b></color> <color=#b00 font=Mono>"TYP"</color>")
static void
_hash_del(void *data)
@@ -134,6 +137,8 @@ static char *
_atom_stringify(UI *ui, char *ptr, char *end, int newline, const LV2_Atom *atom)
{
//FIXME check for buffer overflows!!!
+ sprintf(ptr, CODE_PRE);
+ ptr += strlen(ptr);
const char *type = _hash_get(ui, atom->type);
sprintf(ptr, URI("type ", "%s (%"PRIu32")"), type, atom->type);
@@ -375,6 +380,9 @@ _atom_stringify(UI *ui, char *ptr, char *end, int newline, const LV2_Atom *atom)
sprintf(ptr, "</br>");
}
+ ptr += strlen(ptr);
+
+ sprintf(ptr, CODE_POST);
return ptr + strlen(ptr);
}
diff --git a/midi_inspector_ui.c b/midi_inspector_ui.c
index 696211d..13578af 100644
--- a/midi_inspector_ui.c
+++ b/midi_inspector_ui.c
@@ -189,7 +189,7 @@ _search_controller(uint8_t type)
return bsearch(&type, controllers, CONTROLLERS_NUM, sizeof(midi_msg_t), _cmp_search);
}
-#define CODE_PRE "<font=Mono style=plain>"
+#define CODE_PRE "<font=Mono style=shadow,bottom>"
#define CODE_POST "</font>"
#define RAW_PRE "<color=#b0b><b>"
@@ -729,7 +729,7 @@ port_event(LV2UI_Handle handle, uint32_t i, uint32_t size, uint32_t urid,
break;
Elm_Object_Item *itm2 = elm_genlist_item_append(ui->list, ui->itc_midi,
- ev, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ ev, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
elm_genlist_item_select_mode_set(itm2, ELM_OBJECT_SELECT_MODE_DEFAULT);
// scroll to last item
diff --git a/osc_inspector_ui.c b/osc_inspector_ui.c
index cab4f49..b7d2188 100644
--- a/osc_inspector_ui.c
+++ b/osc_inspector_ui.c
@@ -64,11 +64,11 @@ struct _UI {
(iter) = lv2_atom_tuple_next(iter))
#endif
-#define CODE_PRE ("<font=Mono style=plain>")
+#define CODE_PRE ("<font=Mono style=shadow,bottom>")
#define CODE_POST ("</font>")
#define PATH(VAL) ("<color=#b0b><b>"VAL"</b></color>")
-#define BUNDLE(VAL) ("<color=#888><b>"VAL"</b></color>")
+#define BUNDLE(VAL) ("<color=#b0b><b>"VAL"</b></color>")
#define TYPE(TYP, VAL) ("<color=#0b0><b>"TYP"</b></color><color=#fff>"VAL"</color>")
#define TYPE_PRE(TYP, VAL) ("<color=#0b0><b>"TYP"</b></color><color=#fff>"VAL)
@@ -798,8 +798,10 @@ port_event(LV2UI_Handle handle, uint32_t i, uint32_t size, uint32_t urid,
Elm_Object_Item *itm2 = elm_genlist_item_append(ui->list, ui->itc_packet,
ev, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
elm_genlist_item_select_mode_set(itm2, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ /*
if(osc_atom_is_bundle(&ui->oforge, obj))
elm_genlist_item_expanded_set(itm2, EINA_TRUE);
+ */
// scroll to last item
//elm_genlist_item_show(itm, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);