diff --git a/sw/lib/ocaml/papget_renderer.ml b/sw/lib/ocaml/papget_renderer.ml index 2c9af22248..6dfdf25411 100644 --- a/sw/lib/ocaml/papget_renderer.ml +++ b/sw/lib/ocaml/papget_renderer.ml @@ -73,14 +73,18 @@ class canvas_text = fun ?(config=[]) canvas_group x y -> (* Initialize the entries *) text_editor#entry_format#set_text format; text_editor#spinbutton_size#set_value size; + text_editor#comboboxentry_color#set_active 0; (* Connect the entries *) let callback = fun () -> format <- text_editor#entry_format#text in ignore (text_editor#entry_format#connect#activate ~callback); let callback = fun () -> - size <- text_editor#spinbutton_size#value in + size <- text_editor#spinbutton_size#value in ignore (text_editor#spinbutton_size#connect#value_changed ~callback); + let callback = fun () -> + color <- text_editor#comboboxentry_color#entry#text in + ignore (text_editor#comboboxentry_color#connect#changed ~callback); end diff --git a/sw/lib/ocaml/widgets.glade b/sw/lib/ocaml/widgets.glade index 2346c68756..3d3e9bbf25 100644 --- a/sw/lib/ocaml/widgets.glade +++ b/sw/lib/ocaml/widgets.glade @@ -9,7 +9,7 @@ True - 2 + 3 2 @@ -36,6 +36,20 @@ + + + True + 0 + Color + right + + + 2 + 3 + GTK_FILL + + + True @@ -63,6 +77,26 @@ + + + True + True + Colors defined in X11 rgb.txt + green +red +blue +yellow +orange +white + + + 1 + 2 + 2 + 3 + + +