Skip to content

Conversation

gabefair
Copy link

This setting is found by hovering over the VM's preview window in the VM library. It is a per VM setting so the user can decide which VM's can have the preview screenshots. This hover over menu also allows the user to save the screenshot, which can be helpful for debugging.
This feature does not need the VM to be off to implement.

/// If this VM was imported from some other app, contains the name of the ``VMImporter`` that was used.
public var importedFromAppName: String? = nil
/// Controls whether screenshots and thumbnails are automatically generated for this VM
@DecodableDefault.True
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added for backwards compatibility

.foregroundStyle(.secondary)
.lineLimit(nil)
.font(.caption)
ZStack {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zstack is used to add layers ontop of the views (z-axis layers). In this case I am adding a hover over menu that needs to cover the entire VM preview area without changing it.

@insidegui
Copy link
Owner

Thank you for the contribution @gabefair!

I'm not ready to accept this pull request as-is though, since it introduces a change that will conflict with future enhancements that I'm already working on.

I would accept a pull request that simply adds a new global on/off toggle for virtual machine screenshots (accessible from the app's settings window), as that would remain useful even after I ship the aforementioned changes.

I'm sorry I can't merge this, as it seems like you did a great job. I'm working on introducing contribution guidelines that will prevent this sort of thing from happening in the future.

@gabefair
Copy link
Author

No worries, I will refactor and update the PR once your changes are mainlined.

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.

2 participants