shoes / shoes3

a tiny graphical app kit for ruby

Home Page:http://walkabout.mvmanila.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Radio points element visual misbehave

dredknight opened this issue · comments

Shoes build: 3.3.7 - 3302
All radio points in the cluster are shown as pressed.
Functional wise it is working properly when clicked.
Visually they are always all pressed.

image

Shoes 3.3.7 chnage radio and tightened the rules. There is no default for a Radio cluster (group). On Gtk it is often is the first radio but that can not be assumed, particularly for OSX. The rules for radios that are not in a group is that they have a 'hidden' group of one radio (so it is often on) and can't be unset by the user. If you think about it deeply, that makes sense - In a group, there is always one that has to be set. You would want checkbox for that situation.

I can't tell how your radio's are grouped. You might want to make sure the group name is a symbol - :symbol.

@ccoupe those radios were made quite some versions behind (3.3.2 ~3.3.3) so I assume the code should be reiterated to follow the new rules. I will check and let you know.

The rule should be "a group name" is required for radio buttons". I thought about enforcing that but it's not backwards compatible. Then again the old system was broken. It just happened to work for some people, some of the time.

I tried the following error but it breaks the stack. did I do something wrong?

Shoes.app do

radio(group: "one", left: 10, top: 10)
radio(group: "one", left: 10, top: 30)
radio(group: "one", left: 10, top: 50)
radio(group: "one", left: 10, top: 70)

end

image

My bad the syntax is wrong. This one works:

Shoes.app do

radio(:one, left: 10, top: 10)
radio(:one, left: 10, top: 30)
radio(:one, left: 10, top: 50)
radio(:one, left: 10, top: 70)

end

I will do some changes to the manual description.

P.S.

Made a mess... incidentally pushed to the master instead of the fork. I do reverted the change though. Sorry.

The change is pushed in pull request.