viewers: vnc: use set_keep_aspect_ratio(True)

Maintains aspect ratio when scaling.

Added by v1.2.0 in March 2021

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson
2024-09-25 11:07:16 -04:00
parent 3ee677c2de
commit 70861c507e

View File

@ -301,6 +301,9 @@ class VNCViewer(Viewer):
self._display.set_force_size(False)
self._display.set_pointer_grab(True)
if _gtkvnc_check_display_support("set_keep_aspect_ratio"):
self._display.set_keep_aspect_ratio(True)
self.emit("add-display-widget", self._display)
self._display.realize()