update: updated location page
This commit is contained in:
parent
245043d5af
commit
3ba910f69b
3 changed files with 5 additions and 16 deletions
|
|
@ -3854,15 +3854,8 @@ class LocationPage(Page):
|
||||||
def show_location(self, location):
|
def show_location(self, location):
|
||||||
self.initial_display.hide()
|
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)
|
max_size = QtCore.QSize(300, 300)
|
||||||
target_size = self.display.size().boundedTo(max_size)
|
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.setPixmap(QPixmap(os.path.join(self.btn_path, f"icon_{location}.png")).scaled(
|
||||||
target_size, Qt.AspectRatioMode.KeepAspectRatio))
|
target_size, Qt.AspectRatioMode.KeepAspectRatio))
|
||||||
|
|
@ -5766,7 +5759,7 @@ class LocationVerificationPage(Page):
|
||||||
|
|
||||||
def setup_ui(self):
|
def setup_ui(self):
|
||||||
location_display = QLabel(self)
|
location_display = QLabel(self)
|
||||||
location_display.setGeometry(10, 0, 390, 520)
|
location_display.setGeometry(0, 0, 390, 520)
|
||||||
location_display.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
location_display.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||||
|
|
||||||
icon_path = os.path.join(
|
icon_path = os.path.join(
|
||||||
|
|
@ -5783,11 +5776,8 @@ class LocationVerificationPage(Page):
|
||||||
operator_name = locations.operator.name if locations and hasattr(
|
operator_name = locations.operator.name if locations and hasattr(
|
||||||
locations, 'operator') else ""
|
locations, 'operator') else ""
|
||||||
|
|
||||||
if operator_name != 'Simplified Privacy':
|
max_size = QtCore.QSize(300, 300)
|
||||||
max_size = QtCore.QSize(250, 300)
|
|
||||||
target_size = location_display.size().boundedTo(max_size)
|
target_size = location_display.size().boundedTo(max_size)
|
||||||
else:
|
|
||||||
target_size = location_display.size()
|
|
||||||
|
|
||||||
location_display.setPixmap(location_pixmap.scaled(
|
location_display.setPixmap(location_pixmap.scaled(
|
||||||
target_size, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation))
|
target_size, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation))
|
||||||
|
|
@ -7248,7 +7238,6 @@ class Settings(Page):
|
||||||
"Error saving verification settings")
|
"Error saving verification settings")
|
||||||
|
|
||||||
def copy_verification_value(self, key):
|
def copy_verification_value(self, key):
|
||||||
"""Copy the full verification value (not truncated) to clipboard."""
|
|
||||||
full_value = self.verification_full_values.get(key, "")
|
full_value = self.verification_full_values.get(key, "")
|
||||||
if full_value and full_value != "N/A":
|
if full_value and full_value != "N/A":
|
||||||
clipboard = QApplication.clipboard()
|
clipboard = QApplication.clipboard()
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 8.8 KiB |
Loading…
Reference in a new issue