Bug: Toggle Action
When you have a Toggle Action Button and add a text to both states (Only tried with two states) Both texts are showing. Not checked with Icon yet if it also stacks on top.

40 Replies
Can't reproduce this by just adding it quickly, anything else you did?
I just created the toggle action, added two run command actions with the same command (mute my audio) and then changed the inage and added a text bottom aligned. Then pressed the button.
If you want I can send you the Profile @ninjadev64
I have found the "Problem" I think. You need to use a picture with the bottom part, where the text is, is transparent. (Or with the format of the image, so that down there is no picture anymore)
It doesn't override the button but puts the "active state" in front of the other which then produces above problem.
Interesting
Just checked with a friend, it is also reproducible via opendeck flatpak.
I think it just takes the current canvas and draws over it vs clear then draw
That would be the logical thing after my testing.
Not really
context.clearRect(0, 0, canvas.width, canvas.height);
https://github.com/ninjadev64/OpenDeck/blob/337f012a0a6bc2714ee04df98bd5ddbbe3da4ef0/src/lib/rendererHelper.ts#L46GitHub
OpenDeck/src/lib/rendererHelper.ts at 337f012a0a6bc2714ee04df98bd5d...
Linux software for your Elgato Stream Deck. Contribute to ninjadev64/OpenDeck development by creating an account on GitHub.
So it's not that straightforward it seems
Can confirm this bug, getting it as well
Does a github issue exist for this? Happy to make one if not
No Github issue. Its tracked here because its not clear if its an Opendeck issue or and Starterpack issue.
Had no time yet to dive into the code for it.
Yeah looking at the network tab of the debugger there is definitely something funky going on
Also the Graphics tab shows the images combined into one canvas, though I guess that's not surprise because that's how it shows on the deck itself
Last comment until someone technical takes a look. My state1 image has a background, and that background is still there when it doubles up the icons.
My icons where 200x200, so I modified them down to 144x144, so it's not related to the scaling code at all 🤷♂️
You can import this into the graphics tab of the web inspector, upper right is the import button, if I can provide anything else, let me know
Clear rectangle is on frame 1, frame 3, frame 4, and not again until frame 7
Frame 5 draws the first state icon, frame 6 draws the second state icon
So it really seems like a callback order/timing issue?
I bet this isn't caught, because I'm using icons with transparent backgrounds 🤦
If I stuck all black backgrounds on them it would be a non issue, lol, so one more thing to help reproduce


thanks. Its already reproducible on multiple machines with mutliple setups. Its only searching through the code to find why its caused.
I'd pitch in but I fsking hate callback based languages 🤣
for exactly this reason
I think this is caused by renderImage being called twice at the same time, with the second call starting after the first one clears the canvas, so that both the texts (and images if the second one starts early enough) are drawn onto the canvas
so we need some kind of lock on a canvas
@everyone @Hosaki
https://github.com/nekename/OpenDeck/commit/aa22f0c61202cc3c7e7795f08cba426da2273372 should fix this :)
give it a try
I'll try it when i get home, thank you!
Just tried it with my Button. It works perfectly
very cool
if you could test the multi obs plugin as well that would be nice
as well as making sure i didn't break anything else you use
When I get time for that, I will.
thanks
alright im home. Im gonna figure out how to get this commit onto my PC. Never done this before
what OS are you using?
Nobara
do you know what the base ob nobara is?
don't worry
i'll send u an rpm
ty ❤️
based on Fedora, if thats what your asking
thanks
it's a couple commits behind cause i built it for my fedora friend a couple hours ago
lmk how it goes
then i can run an upgrade command and point it at that file right?
yea
testing it now
lots of learning today
seems to be working. Ill let you know if it happens again. Thanks for the fix!
awesome
@Hosaki could you also just check that you can't remove the Starter Pack in the plugin manager?
Looks good!

nice
that was the other bug, the one with the RPM file that i fixed in tauri
Oh yeah! I forgot about that. This software has been working pretty well for me recently, so I havnt thought much of it. Relying on the starter pack and a bunch of scripts seems to be reliable