update: updated custom resolution popup

This commit is contained in:
John 2026-02-27 22:31:13 +01:00
parent 97b2ac5d0b
commit d085b3204c
2 changed files with 19 additions and 5 deletions

View file

@ -4444,10 +4444,17 @@ class ScreenPage(Page):
host_w = self.custom_window.host_screen_width
host_h = self.custom_window.host_screen_height
if width > host_w or height > host_h:
QMessageBox.warning(
dialog, "Invalid Resolution", f"Resolution cannot be larger than your screen size ({host_w}x{host_h}).")
return
adjusted = False
if width > host_w:
width = host_w - 50
adjusted = True
if height > host_h:
height = host_h - 50
adjusted = True
if adjusted:
QMessageBox.information(
dialog, "Notice", "Adjusted to fit host size")
if width > 10000 or height > 10000:
QMessageBox.warning(
@ -10038,10 +10045,17 @@ class FastRegistrationPage(Page):
return
host_w = self.update_status.host_screen_width
host_h = self.update_status.host_screen_height
adjusted = False
if width > host_w:
width = host_w - 50
adjusted = True
if height > host_h:
height = host_h - 50
adjusted = True
if adjusted:
QMessageBox.information(
dialog, "Notice", "Adjusted to fit host size")
self.selected_values['resolution'] = f"{width}x{height}"
self.create_interface_elements()
dialog.accept()

View file

@ -1,6 +1,6 @@
[project]
name = "sp-hydra-veil-gui"
version = "2.2.2"
version = "2.2.3"
authors = [
{ name = "Simplified Privacy" },
]