From 17f4bc0c5fdddc2fa5be71096acc76425a5ebbe0 Mon Sep 17 00:00:00 2001 From: jknapp Date: Tue, 6 Jan 2026 11:33:14 -0800 Subject: [PATCH] Make URL clickable to copy instead of separate button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- gui/main_window.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/gui/main_window.py b/gui/main_window.py index 01b3d4a..52d06be 100644 --- a/gui/main_window.py +++ b/gui/main_window.py @@ -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"""