Make URL clickable to copy instead of separate button

Cleaner interface - URL text now highlights on hover and copies to
clipboard when clicked.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-06 11:33:14 -08:00
parent 44c21e68d8
commit 17f4bc0c5f

View File

@@ -212,27 +212,24 @@ class MainWindow(QMainWindow):
toolbar_layout.addStretch()
# IP address label with copy button
self.ip_label = QLabel()
self.ip_label.setStyleSheet(f"color: {THEME['fg_color']};")
self.update_ip_label()
toolbar_layout.addWidget(self.ip_label)
copy_btn = QPushButton("Copy")
copy_btn.setStyleSheet(f"""
# Clickable IP address label (click to copy)
self.ip_label = QPushButton()
self.ip_label.setCursor(Qt.PointingHandCursor)
self.ip_label.setStyleSheet(f"""
QPushButton {{
background-color: {THEME['button_bg']};
color: white;
background-color: transparent;
color: {THEME['fg_color']};
border: none;
padding: 8px 12px;
border-radius: 4px;
padding: 4px 8px;
}}
QPushButton:hover {{
background-color: {THEME['highlight_color']};
color: {THEME['accent_color']};
text-decoration: underline;
}}
""")
copy_btn.clicked.connect(self.copy_url_to_clipboard)
toolbar_layout.addWidget(copy_btn)
self.ip_label.clicked.connect(self.copy_url_to_clipboard)
self.update_ip_label()
toolbar_layout.addWidget(self.ip_label)
qr_btn = QPushButton("QR Code")
qr_btn.setStyleSheet(f"""