diff --git a/gui/__main__.py b/gui/__main__.py index 2a38393..274a078 100755 --- a/gui/__main__.py +++ b/gui/__main__.py @@ -3822,8 +3822,19 @@ class LocationPage(Page): def show_location(self, location): self.initial_display.hide() + + locations = self.connection_manager.get_location_info(location) + operator_name = locations.operator.name if locations and hasattr( + locations, 'operator') else "" + + if operator_name != 'Simplified Privacy': + max_size = QtCore.QSize(300, 300) + target_size = self.display.size().boundedTo(max_size) + else: + target_size = self.display.size() + self.display.setPixmap(QPixmap(os.path.join(self.btn_path, f"icon_{location}.png")).scaled( - self.display.size(), Qt.AspectRatioMode.KeepAspectRatio)) + target_size, Qt.AspectRatioMode.KeepAspectRatio)) self.selected_location_icon = location self.button_next.setVisible(True) self.button_next.clicked.connect(self.go_selected) @@ -4620,8 +4631,9 @@ class ResumePage(Page): self.btn_path, "default_location_button.png") if location_pixmap.isNull(): if locations and hasattr(locations, 'country_name'): + location_name = locations.country_name base_image = LocationPage.create_location_button_image( - f'{locations.country_code}_{locations.code}', fallback_path, provider) + location_name, fallback_path, provider) parent_label.setIcon(QIcon(base_image)) else: base_image = LocationPage.create_location_button_image( @@ -5107,8 +5119,9 @@ class EditorPage(Page): self.btn_path, "default_location_button.png") if base_image.isNull(): if locations and hasattr(locations, 'country_name'): + location_name = locations.country_name base_image = LocationPage.create_location_button_image( - f'{locations.country_code}_{locations.code}', fallback_path, provider) + location_name, fallback_path, provider) else: base_image = LocationPage.create_location_button_image( current_value, fallback_path, provider) @@ -5520,8 +5533,19 @@ class LocationVerificationPage(Page): if location_pixmap.isNull(): location_pixmap = QPixmap(fallback_path) + locations = self.connection_manager.get_location_info( + self.location_icon_name) + operator_name = locations.operator.name if locations and hasattr( + locations, 'operator') else "" + + if operator_name != 'Simplified Privacy': + max_size = QtCore.QSize(250, 300) + target_size = location_display.size().boundedTo(max_size) + else: + target_size = location_display.size() + location_display.setPixmap(location_pixmap.scaled( - 390, 520, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation)) + target_size, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation)) location_display.show() title = QLabel("Operator Information", self)