Numeric spin in angle picker now wraps around#1440
Conversation
|
The interesting thing I noticed is that this happens only in one direction: pressing the I think this is from interactions between the wrapping in |
|
The way I originally interpreted the bug report was that the user wanted to be able to directly enter in a value like |
|
I haven't had the time to look at this in detail yet, but I see why you interpreted the message that way. What you suggested (expanding the range to -360) clearly would get the job done. I will give it some thought over the next day or two. |
|
You are right @cameronwhite, setting the lower bound to -360 works pretty well and (at least from my testing) when navigating with the buttons to -1, it becomes 359. I haven't had the time to see exactly why that happens, but it works for most practical purposes (almost nobody is going to go all the way to the bounds using the up/down buttons). There might be some cleaner or more 'canonical' way to do it but I don't think we should spend too long on this right now. |
|
Thanks, yeah the behaviour seems good to me. |
Fixes #1142
The only catch that I see is that the range includes 360 itself. It's annoying but not a huge problem, because the
Valueexposed by the widget is always a valid angle.I think (but I'm not sure) that the value of 360 could be excluded through coercion by creating the
Gtk.SpinButtonwith aGtk.Adjustmentand playing a bit with itsOnValueChangedsignal.