Hello,
Is this a bug or do I have to update each canvas manually when the dialog is refreshed?
It also seems to me that the Text widget color does not update automatically when
the theme changes and the dialog is visible.
I wanted to take advantage of the fact that I can work with themes and
do not want to use custom colors.
The background is one canvas and the other widgets are also canvases but my class is “RotaryWidget”.
I also tried using renoise.app().theme_observable and updating all Canvas widgets automatically when the window is redisplayed, but it doesn’t work
this is my widget gui:
function RotaryWidget:create_gui()
local gui = self.vb:stack{
size={self.size, self.size + 20},
background="invisible",
views={
self.vb:canvas{
id="main_canvas",
size={self.size, self.size},
mouse_events={"drag", "down", "up"},
mouse_handler=function(event) self:mouse_handler(event) end,
render=function(ctx) self:render(ctx) end,
},
self.vb:text{
id="textval",
width=self.size,
origin={0, math.floor(self.size * 0.5) - 10},
text=tostring(self.value),
color= "main_font",
align="center",
font="bold",
style="strong",
},
self.vb:text{
id="label",
width=self.size,
origin={0, self.size},
text=self.idx,
color="main_font",
align="center",
font="bold",
style="normal",
},
},
}
return gui
end