Makie menu and toggle color do not update when observable is changed

bjarthur
Wed, 08 Apr 2026 19:13:53 +0000
Visualization

in the MWE below, the slider and checkbox both change from red to blue, but the menu only does so if you then subsequently hover over it, and the toggle only if you toggle back and forth. i would’ve expected this to just work. i imagine there is some implementation detail that prevents it from doing so. is there a work around? i’ve tried notifying various things to no avail. thanks!

using GLMakie

color = Observable(GLMakie.RGB{Float32}(1, 0, 0))

f = Figure()
m = Menu(f[1,1], options=['a','b'], selection_cell_color_inactive = color)
t = Toggle(f[2,1], framecolor_inactive  = color)
s = Slider(f[3,1], color_inactive = color)
c = Checkbox(f[4,1], checkboxcolor_unchecked = color)

color[] = GLMakie.RGB{Float32}(0, 0, 1)

2 posts - 1 participant