Closed dabear closed 8 months ago
applying .flipsForRightToLeftLayoutDirection(true) on the slidebutton seems to fix the logic of the slidebutton for RTL languages, but it also flips the text in the slidebutton (which is probably unwanted behavior). @mikakruschel @cameronshemilt any thoughts?
I think there would be two options:
I think the first option would be better, but I'm not sure how the 'swipe-to-unlock' gesture should work in RTL languages.
the system level slider (used by iOS for confirming to a user to turn off the phone) swipes right to left for RTL languages. We should probably mimic that b havior. Btw I've also posted reproduction instructions in the linked Loop issue.
Trying to fix the math as indicated in 2). Will publish a PR once I'v cleaned it up and tested it a bit more: https://github.com/no-comment/SlideButton/compare/main...dabear:SlideButton:fixes?expand=1
SlideButton does not appear to be working with apps that use right to left wording. The Indicator appears right aligned instead of left aligned in its default state, making it impossible to slide the button correctly.
First reported it here: https://github.com/LoopKit/Loop/issues/2105
We've found a workaround, but it might not be the best solution, by adding this to a view containing a slidebutton: