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

Filter names truncated when adding filter #4894

Open
1 task done
low-batt opened this issue Apr 26, 2024 · 3 comments
Open
1 task done

Filter names truncated when adding filter #4894

low-batt opened this issue Apr 26, 2024 · 3 comments

Comments

@low-batt
Copy link
Contributor

low-batt commented Apr 26, 2024

System and IINA version:

Expected behavior:
Filter names are not truncated.

Actual behavior:
PR #4922 enables Hebrew. If you build IINA with that pull request and set Hebrew as the language then the filter name for a custom FFmpeg filter is truncated in the sheet for adding a filter:
he-filter

The table of filters should be automatically resized to adapt to the size of the filter names in other languages.

NOTE that this problem can also be reproduced using the develop branch and English. In Xcode open FilterWindowController.xib. Built and run IINA. The Custom (FFmpeg) filter name is now truncated:
en-filter

Digging through all the changes to the XIB Xcode helpfully adds even if you only open the file in the editor and don't make any changes I see:

- <tableColumn width="477" minWidth="40" maxWidth="1000" id="TbO-kN-XQm">
+ <tableColumn width="468" minWidth="40" maxWidth="1000" id="TbO-kN-XQm">

Xcode is messing with the width of table columns.

There are warning in the build log regarding layout problems:

/* com.apple.ibtool.document.notices */
/Users/low-batt/Documents/builds/iina-official/iina/iina/Base.lproj/FilterWindowController.xib:MAd-sY-Hvg: note: NSTextField's height does not match its intrinsic content size, use "Size to Fit Content" to correct [22]
/Users/low-batt/Documents/builds/iina-official/iina/iina/Base.lproj/FilterWindowController.xib:cLl-pZ-KNW: note: View is clipping its content [13]
/Users/low-batt/Documents/builds/iina-official/iina/iina/Base.lproj/FilterWindowController.xib:ZJo-ef-lfp: note: View is clipping its content [13]
/Users/low-batt/Documents/builds/iina-official/iina/iina/Base.lproj/FilterWindowController.xib:56K-2H-lTw: note: View is clipping its content [13]

This problem was reported by @ShlomoCode in issue #4776. As that issue reports quite a few RTL related problems I have created this issue to focus just on this particular problem.

Steps to reproduce:

  • Pull PR feat: enable hebrew locale #4922

  • Open the IINA project in Xcode

  • Under the Product menu open the Scheme menu and select Edit Scheme…

  • Click on the Options tab

  • Scroll down to the App Language setting

  • In the pull down select Hebrew

  • Start IINA running under Xcode

  • Click on Video Filters… under the Video menu

  • The Video Filters window appears

  • Click on the + button

  • The sheet for adding a filter appears

  • Notice the last filter in the list is truncated

  • MPV does not have this problem.

mpv does not support localization.

How often does this happen?
Every time.

@low-batt
Copy link
Contributor Author

@svobs Would you be able to take this one?

@svobs
Copy link
Contributor

svobs commented May 2, 2024

@low-batt Sure. Funny, I just refactored this dialog on my fork. I needed to rework most of the layout just to get the window to resize sanely. Should be straightforward to cut a PR.

@low-batt
Copy link
Contributor Author

low-batt commented May 3, 2024

Thanks! That would be great!

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

No branches or pull requests

2 participants