Skip to content
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

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

low-batt
Copy link
Contributor

@low-batt low-batt commented Apr 23, 2024

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.


Description:

@low-batt low-batt linked an issue Apr 23, 2024 that may be closed by this pull request
1 task
@low-batt
Copy link
Contributor Author

See issue #4776 for a screenshot of the RTL overlaps.

IINA 1.3.4:
released

With the changes in this PR…
fixed-en
fixed-he

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.
@low-batt low-batt marked this pull request as draft April 25, 2024 21:47
@low-batt
Copy link
Contributor Author

The issue with the malformed color wells in RTL has been fixed:
he-sub-settings

But the mirroring applied by AppKit to the battery icon results in a blurry image:
he-battery

@lhc70000 will be generating a reversed battery image. I will then add it to the existing battery icon image set as a Right to Left image.

I have set this to be a draft until the blurry battery problem is corrected.

@ShlomoCode
Copy link

It seems to me that a perfect inversion is like this:
CleanShot 2024-04-26 at 03 17 33
Instead of:
CleanShot 2024-04-26 at 03 24 37@2x

@ShlomoCode
Copy link

ShlomoCode commented Apr 26, 2024

@lhc70000 will be generating a reversed battery image. I will then add it to the existing battery icon image set as a Right to Left image.

I mirrored the PDF from here simply using Apple Preview, it seems to keep full quality.
battery.pdf
CleanShot 2024-04-26 at 04 47 27

@low-batt
Copy link
Contributor Author

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?

@ShlomoCode
Copy link

ShlomoCode commented Apr 26, 2024

Yes, it looks like you're right :(
BTW recreating the file with ImageMagick helps, but I couldn't find the exact command to keep the file at full quality

@low-batt
Copy link
Contributor Author

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.

@ShlomoCode
Copy link

@low-batt What do you think about this?

@low-batt
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RTL language causes overlapping in subtitle settings
2 participants