Comments (4)
This is the code in PlaylistView
that changes the cursor:
override func resetCursorRects() {
let rect = NSRect(x: frame.origin.x - 4, y: frame.origin.y, width: 4, height: frame.height)
addCursorRect(rect, cursor: .resizeLeftRight)
}
This code is working under macOS Catalina, but not under macOS Ventura
In this case I do not think this is a macOS defect. I believe that code is violating the following requirement specified in the documentation for addCursorRect:
You should explicitly confine a cursor rectangle to the view's visible rectangle to prevent improper behavior.
The "- 4" puts the rectangle outside of the view's frame. I suspect this is the source of the problem.
from iina.
Not directly related to this issue, but I think a range of -2 ~ 2 instead of -4 ~ 0 would be better
from iina.
Remember I'm not a GUI programmer, so always question my understanding of AppKit…
The suggestion is to have the resizing area span the border. That makes logical sense and might be what users expect. The downside is that it doubles the implementation required if the approach uses resetCursorRects
as it would span views.
I've been searching the net for best practices and so far I've not found a discussion of this. My guess would be that the normal way this is handled is that the area would be fully inside the view. If you think about resizing a window you would have to have the area poke outside of the window. Is that easy to do?
Today I remembered the PR #4472 by @svobs that attempts to address the cursor issue. I don't think it was noticed that IINA has code to do this that works in macOS 10.15.7. The approach taken by this PR is probably better than what I was experimenting with. Need to check in with @svobs on this, however this issue is not as important as getting some of the other PRs updated and merged.
from iina.
Today I remembered the PR #4472 by @svobs that attempts to address the cursor issue. I don't think it was noticed that IINA has code to do this that works in macOS 10.15.7.
Yes I've found that using NSPointInRect
is a much better approach than using a cursor rect or mouse tracking areas, which could have been the first solutions some developer scribbled on the whiteboard when the mouse was being invented. It won't work outside the window's bounds though. I haven't yet found a way to do that.
from iina.
Related Issues (20)
- Numbers on the sliders in QuickSettingView not centered HOT 1
- The content in Log Window is right to left in Hebrew HOT 3
- The right time label shows xx:xx- instead of -xx:xx when in `.remaining` mode in Hebrew HOT 2
- m3u playlists exported from Apple Music cannot be read HOT 1
- Automatic subtitle translation
- RTL: Incorrect arrow icon direction in browser extensions reference HOT 6
- Text clipping in the audio delay slider
- Enable Screensaver While Playing Audio Files in IINA Media Player HOT 4
- Incorrect text alignment in the battery icon of the OSD in RTL HOT 2
- Some feature requests HOT 2
- Can't change color for built-in subtitles HOT 4
- How to use localized IINA HOT 4
- "Check for update" does not detect new version HOT 1
- The compilation date in the debug build in RTL languages seems not rendered correctly HOT 7
- Unauthorized link to crowdin contributors in IINA's About window HOT 3
- If a NAS share cannot be reached, iina fails to start HOT 5
- Feature: Copy current timestamp + keybind HOT 1
- Yes! The grey is almost transparent now!
- Incorrect direction arrows in About window in RTL
- HDR dimming external display when turned on. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iina.