-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 overlapping in settings, #4888 #4889
Conversation
See issue #4776 for a screenshot of the RTL overlaps. |
This commit will: - Correct the constraints in PrefSubViewController.xib - Change the Mirror setting to Never on the color wells in the XIB - Change the language-direction of the battery icon from Fixed to Left to Right, Mirrors This corrects a problem with color wells overlapping their labels on the Subtitle tab of IINA's settings. This also changes the battery icon shown in full screen mode to flip in a RTL language correcting another overlapping problem.
3dc0a26
to
56f5d04
Compare
The issue with the malformed color wells in RTL has been fixed: But the mirroring applied by AppKit to the battery icon results in a blurry image: @lhc70000 will be generating a reversed battery image. I will then add it to the existing battery icon image set as a I have set this to be a draft until the blurry battery problem is corrected. |
I mirrored the PDF from here simply using Apple Preview, it seems to keep full quality. |
Thanks! But… been there, done that. It all looked good in Preview and in Xcode, but at runtime the flipped battery looks just like the original battery. It faces the wrong direction. This is because Apple Preview does not remake the PDF, it adds a rotate tag to it. Seems AppKit does not support the tag. At least I think that is what was happening. Did I miss something? |
Yes, it looks like you're right :( |
Took me a while to figure out what was happening. Since Xcode showed the reversed PDF correctly I was thinking the code was not picking the RTL version of the battery. @lhc70000 created the battery icon. He will be able to provide a flipped one that matches the existing one. |
Oh. I missed that detail. My thoughts are that IINA should not try to change this. This is the behavior Apple supplies for an AppKit NSColorWell. If this is incorrect then Apple needs to fix it. Just to be sure I ran the little test program I wrote while working on this and confirmed this is the Apple supplied RTL behavior for this component. |
Added the mirrored battery icon. |
Thanks! The new icon looks good. However I am going to simplify the change. There is no need for the code in |
This commit will: - Correct the constraints in PrefSubViewController.xib - Change the Mirror setting to Never on the color wells in the XIB - Change the direction of the battery icon from Fixed to Both - Add a reversed image to the battery icon - Add a additionalInfoLabelXConstraint outlet to MainWindowController - Add code to MainWindowController.windowDidLoad to adjust additionalInfoLabelXConstraint to center the label that provides the charge state when the battery icon is reversed This corrects a problem with color wells overlapping their labels on the Subtitle tab of IINA's settings. This also changes the battery icon shown in full screen mode to flip in a RTL language correcting another overlapping problem.
@low-batt Good job! |
I had noticed the alignment seemed just a bit off. On the fuzzy aspect I see this:
The sharp image is 38K bytes. The fuzzy reversed image is only 2.9K bytes. We need @lhc70000 to generate a sharper image. This seems like the same problem I was having generating a reversed image. The tools I tried all shrank the file and made it fuzzy. I don't know how the original file was created. |
BTW, I did the alignment test I uploaded using the free app Shottr |
|
This commit will:
PrefSubViewController.xib
Mirror
setting toNever
on the color wells in the XIBFixed
toLeft to Right, Mirrors
This corrects a problem with color wells overlapping their labels on the Subtitle tab of IINA's settings. This also changes the battery icon shown in full screen mode to flip in a RTL language correcting another overlapping problem.
Description: