Closed kojix2 closed 2 years ago
Yes, I noticed this behavior on Linux only. On the Mac and Windows, the selected example under Basic remains selected when I switch to the Advanced tab, without anything selected under Advanced, so it is not confusing to the user.
Thank you for reporting. Unfortunately, this is not a Glimmer DSL for LibUI issue, yet a C libui issue; specifically, the auto-selection of the first radio button in a radio_buttons
control in Linux, even if I explicitly set its selected
value to -1 (I do that in the meta-example code). Furthermore, C libui does not currently support setting a listener for the tab
switching event, so I could not for example auto-switch the code to the first Advanced example on Linux (given its quirk of auto-selection) upon moving from the Basic tab to the Advanced tab.
Perhaps, you could report this issue at C libui instead and link back here just for reference.
Thanks.
I understand your intended behavior on macOS and Windows. The expected behavior is that the radio button is not selected when the tab is switched. So it is a problem with c libui that the radio buttons are selected from the beginning. Also, I have confirmed that there is no function to detect that the tab has been switched.
I thought about checking the tab number when the launch button is pressed, but that would be useless if the code displayed in the text area is not updated when the tab is switched. I see, it is not an easy fix.
By the way, you might be wondering why I'm running meta_example today. Actually, I wrote a small post on Qiita to introduce glimmer-dsl-libui to Rubyists in Japan. This is a website equivalent to dev.to in Japanese. I hope it will help more people in Japan to discover glimmer-dsl-libui.
Take care again.
Today I tried meta_xeample.rb with glimmer-dsl-libui.
I found a very small unexpected behavior.
After launching
meta_example.rb
, open the Advanced tab ①, and you will see "Area Gallery (4 versions)" selected. Now, Click on the Launch button ②. The "Basic Area" will be launched. This was an unexpected behavior for me.For practical use, there is no problem at all, but I would like to report it. Have a good day.