-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix RTL language causes OSC to malfunction, #4878 #4879
Conversation
Found another problem. Dragging the floating OSC is messed up. Putting this in draft mode until I can fix that. |
This commit will: - Add initializers to TimeLabelOverflowedStackView, TimeLabelOverflowedView and TouchBarPlaySliderCell that set userInterfaceLayoutDirection to be leftToRight - Change MainWindowController.windowDidLoad to set the userInterfaceLayoutDirection property of fragControlView and oscFloatingTopView to be leftToRight - Change constraints from leading/trailing to left/right for several OSC components to prevent them from moving when a RTL language is used - Change MainWindowController methods mouseDown and mouseDragged to take into account the userInterfaceLayoutDirection setting during playlist resizing - Change ControlBarView.mouseDragged to take into account the userInterfaceLayoutDirection setting when repositioning the floating OSC - Rename the play property in the Constants struct to be blackRightPointingTriangle - Add a blackLeftPointingTriangle property to the Constants struct - Change PlaylistViewController.tableView to use a right or left arrow based on the userInterfaceLayoutDirection setting - Change the language-direction of the pip and volume related icons and the playlist icon from Fixed to Left to Right, Mirrors This adjusts IINA's behavior to match Apple's guidance that video controls and timeline indicators should not flip in a right-to-left language. Other controls, such as the volume control and the pip and playlist buttons are flipped for RTL languages. This also corrects problems dragging the floating OSC and resizing the playlist when a right to left language is configured.
The changes look harmless. If @ShlomoCode agrees to all the changes, then we can merge. |
I've actually been using a local build of these changes for a few weeks now, and it's working great. One thing I feel uncomfortable with is the order of the custom buttons, discussed in this comment and below and was not decided: #4878 (comment)
|
🤔 |
@ShlomoCode Please try the latest version on The custom buttons are on the left now. As for the PIP button direction problem, please file another issue for that, thank you! |
Should close as resolved |
This commit will:
TimeLabelOverflowedStackView
,TimeLabelOverflowedView
andTouchBarPlaySliderCell
that setuserInterfaceLayoutDirection
to beleftToRight
MainWindowController.windowDidLoad
to set theuserInterfaceLayoutDirection
property offragControlView
andoscFloatingTopView
to beleftToRight
MainWindowController
methodsmouseDown
andmouseDragged
to take into account theuserInterfaceLayoutDirection
setting during playlist resizingControlBarView.mouseDragged
to take into account theuserInterfaceLayoutDirection
setting when repositioning the floating OSCConstants
struct to beblackRightPointingTriangle
blackLeftPointingTriangle
property to theConstants
structPlaylistViewController.tableView
to use a right or left arrow based on theuserInterfaceLayoutDirection
settingplaylist
icon fromFixed
toLeft to Right, Mirrors
This adjusts IINA's behavior to match Apple's guidance that video controls and timeline indicators should not flip in a right-to-left language. Other controls, such as the volume control and the pip and playlist buttons are flipped for RTL languages.
This also corrects problems dragging the floating OSC and resizing the playlist when a right to left language is configured.
Description: