Skip to content

Commit

Permalink
Fix RTL language causes history indicator to flip, #4906 (#4907)
Browse files Browse the repository at this point in the history
This commit will add an awakeFromNib method to the
HistoryProgressCellView class that sets the progress indicator property
userInterfaceLayoutDirection to be leftToRight. This prevents the
indicator from reversing direction when a RTL language is configured.
  • Loading branch information
low-batt committed May 24, 2024
1 parent d20ab93 commit 864ea37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions iina/HistoryWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -349,4 +349,10 @@ class HistoryProgressCellView: NSTableCellView {

@IBOutlet var indicator: NSProgressIndicator!

/// Prepares the receiver for service after it has been loaded from an Interface Builder archive, or nib file.
/// - Important: As per Apple's [Internationalization and Localization Guide](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/SupportingRight-To-LeftLanguages/SupportingRight-To-LeftLanguages.html)
/// timeline indicators should not flip in a right-to-left language. This can not be set in the XIB.
override func awakeFromNib() {
indicator.userInterfaceLayoutDirection = .leftToRight
}
}

0 comments on commit 864ea37

Please sign in to comment.