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

Weird resizing of previews on Media Recording screen #691

Open
gonzonia opened this issue Jan 2, 2025 · 12 comments
Open

Weird resizing of previews on Media Recording screen #691

gonzonia opened this issue Jan 2, 2025 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@gonzonia
Copy link
Collaborator

gonzonia commented Jan 2, 2025

On MacOS
If the app isn't set to full screen, when you click over to the media recording screen the preview half of the screen resized very slowly.

To Reproduce
Steps to reproduce the behavior:

  1. Open App
  2. Make sure it's not fullscreen
  3. Click Media Rcording

Expected behavior
It should resize quicker and smoother.

Video of issue attached. Sorry it's fuzzy, I had to export as 480p to get under file size limit

Screen.Recording.Trimmed480.mov
  • OS: MacOS 15.1.1
@syd711
Copy link
Owner

syd711 commented Jan 2, 2025

No problem, got it!

@syd711 syd711 self-assigned this Jan 2, 2025
@syd711 syd711 added the bug Something isn't working label Jan 2, 2025
@syd711
Copy link
Owner

syd711 commented Jan 24, 2025

Is this still happening? I only tried a blind fix.

@gonzonia
Copy link
Collaborator Author

It is still happening in 3.12.3

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 4, 2025

Now that I have the IDE set up on my Mac I thought I'd look into this. I see where you attempted to fix it with the overrides but when I try to debug those are never entered.

@syd711
Copy link
Owner

syd711 commented Feb 4, 2025

Right, that would be awesome. So much easier when you are on the actual operating system :)

@syd711 syd711 assigned gonzonia and unassigned syd711 Feb 4, 2025
@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 4, 2025

Any suggestions on how to approach? I see what you tried to do but I'm not sure why the overrides you put in aren't working?

@syd711
Copy link
Owner

syd711 commented Feb 4, 2025

Let's go the cheap way: disable the responsive preview panel and use a fix width. Worst case is is that the user needs to scroll horizontal.

  • Remove the width listeners from the panel
  • Apply a fix min/max with for the preview panel in the fxml file

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 4, 2025

Okay, this is odd. I unchecked "Cache Shape" in scenebuilder for the highest level border pane on the screen-recorder-panel.fmxl. It seemed to fix it, but I wanted to verify so I got the latest on everything. Before I unchecked it again, it doesn't seem to be happening anymore. I'm going to wait until the next build to see if I can replicate again.

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 6, 2025

I found the problem. In the refresh method of the ScreenRecorderPanelController.

I narrowed it down to here.
imageView.setFitWidth(width); imageView.setFitHeight(height);

With those commented out, it works great but the image from the server is small and doesn't resize. So, the issue is definitely in how those are resizing.

I've tried a bunch of ways to fix it, but I think I'm missing a piece about how it's working because my fixes aren't having an impact.

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 7, 2025

Just leaving this as a note to look into more as an option - https://www.reddit.com/r/JavaFX/s/Q4vyETVx3A

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 7, 2025

Okay, I'm not sure how to fix this. The issue is in the refresh method.
Here's some logging I did for testing and some notes where you can see the pattern of what's going on. Part of the issue is the way the Mac is handling it. It's drawing it over and over instead of waiting until it all hits a point where it stabilizes because of the screen size. That's causing a weird jerkiness in the screen as it resizes. I'm struggling to wrap my head around how to fix it. I've tried lots of ways and some make an impact, but not necessarily for the better.

07-02 16:44:49.436 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------BEGIN START-------------------------------------
07-02 16:44:49.436 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview Start Size- w:3846.0 h:2184.0
07-02 16:44:49.436 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview PrefStart Size:0.0, 0.0
07-02 16:44:49.436 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ImageView Start Size:-12.0, -6.75
07-02 16:44:49.436 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------END START-------------------------------------


07-02 16:44:49.436 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------BEGIN END-------------------------------------
07-02 16:44:49.436 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview End Size- w:500.0 h:281.25 	CHANGED
07-02 16:44:49.436 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview PrefEnd Size:500.0, 140.625 	CHANGED
07-02 16:44:49.436 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ImageView End Size:488.0, 274.5 	CHANGED
07-02 16:44:49.436 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------END END-------------------------------------


07-02 16:44:50.441 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------BEGIN START-------------------------------------
07-02 16:44:50.441 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview Start Size- w:494.0 h:298.5	CHANGED
07-02 16:44:50.441 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview PrefStart Size:500.0, 140.625 	SAME 
07-02 16:44:50.441 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ImageView Start Size:488.0, 274.5	SAME
07-02 16:44:50.442 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------END START-------------------------------------

07-02 16:44:50.442 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------BEGIN END-------------------------------------
07-02 16:44:50.442 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview End Size- w:494.0 h:298.5	SAME
07-02 16:44:50.442 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview PrefEnd Size:494.0, 149.25	CHANGED
07-02 16:44:50.442 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ImageView End Size:482.0, 271.125	CHANGED
07-02 16:44:50.442 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------END END-------------------------------------

07-02 16:44:51.445 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------BEGIN START-------------------------------------
07-02 16:44:51.446 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview Start Size- w:488.0 h:295.5	CHANGED
07-02 16:44:51.446 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview PrefStart Size:494.0, 149.25	SAME
07-02 16:44:51.446 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ImageView Start Size:482.0, 271.125	SAME
07-02 16:44:51.446 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------END START-------------------------------------
07-02 16:44:51.689 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------BEGIN END-------------------------------------
07-02 16:44:51.689 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview End Size- w:488.0 h:295.5	SAME
07-02 16:44:51.689 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview PrefEnd Size:488.0, 147.75	CHANGED
07-02 16:44:51.689 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ImageView End Size:476.0, 267.75	CHANGED
07-02 16:44:51.689 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------END END-------------------------------------
07-02 16:44:52.448 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------BEGIN START-------------------------------------
07-02 16:44:52.448 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview Start Size- w:482.0 h:292.0 	CHANGED
07-02 16:44:52.448 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview PrefStart Size:488.0, 147.75	SAME	
07-02 16:44:52.448 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ImageView Start Size:476.0, 267.75	SAME
07-02 16:44:52.448 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------END START-------------------------------------
07-02 16:44:52.448 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------BEGIN END-------------------------------------
07-02 16:44:52.448 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview End Size- w:482.0 h:292.0	SAME
07-02 16:44:52.449 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview PrefEnd Size:482.0, 146.0	CHANGED
07-02 16:44:52.449 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ImageView End Size:470.0, 264.375	CHANGED
07-02 16:44:52.449 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------END END-------------------------------------
07-02 16:44:53.453 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------BEGIN START-------------------------------------
07-02 16:44:53.453 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview Start Size- w:476.0 h:288.5 	CHANGED
07-02 16:44:53.453 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview PrefStart Size:482.0, 146.0 	SAME	
07-02 16:44:53.454 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ImageView Start Size:470.0, 264.375	SAME
07-02 16:44:53.454 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------END START-------------------------------------
07-02 16:44:53.454 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------BEGIN END-------------------------------------
07-02 16:44:53.454 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview End Size- w:476.0 h:288.5	SAME
07-02 16:44:53.454 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - Preview PrefEnd Size:476.0, 144.25	CHANGED
07-02 16:44:53.454 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ImageView End Size:464.0, 261.0	CHANGED
07-02 16:44:53.454 INFO  [JavaFX Application Thread] d.m.v.u.r.p.ScreenRecorderPanelController - ----------------------END END-------------------------------------

@gonzonia gonzonia assigned syd711 and gonzonia and unassigned gonzonia Feb 8, 2025
@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 8, 2025

Saw your release note, it's still there. I think maybe just putting it in an AnchorPane will help I tested that and it seemed to work. I did the edits on my dev environment for your main repository but my repository is all screwed up so I can't make a pull request.

gonzonia added a commit to gonzonia/vpin-studio that referenced this issue Feb 8, 2025
syd711 added a commit that referenced this issue Feb 8, 2025
Anchorpane added for issue #691
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants