这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@fkorotkov
Copy link
Contributor

Before the window was too big and scaling was too little. This PR introduces display settings with some meaningful defaults.

Also cleared out the toolbar to not include standard Undo/Redo/etc options. And propagated VM name into title so it's easier to distinguish VMs from each other.

@fkorotkov fkorotkov requested a review from edigaryev April 12, 2022 20:14
VMView(vm: vm!).onAppear {
NSWindow.allowsAutomaticWindowTabbing = false
}
}.frame(width: CGFloat(vm!.config.display.width), height: CGFloat(vm!.config.display.height))
Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM, but this one is a bit problematic: when the VM's display size is larger than the host's display size, the scaling would be badly needed, but this frame() makes it not possible.

Perhaps we can only enable this if the VM resolution is lower than host display resolution?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't think it's a big concern since the default 1024x728 will fit in most of the screens. Your use case is only possible if someone will overwrite it to some obscure value, in that case a window will be still created and will be just cropped out. Person will need to close the window and set a proper display size for the host.

I decided to introduce the display config because before it was created the same size as the host's main screen and there was something odd with DPI which made it not quite freezable to use on my Retina MBP. Needed a magnifier! 😅

@edigaryev edigaryev self-requested a review April 13, 2022 20:41
@fkorotkov fkorotkov merged commit 75b5d63 into main Apr 13, 2022
@fkorotkov fkorotkov deleted the refactor-ui branch April 13, 2022 20:42
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.

3 participants