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