diff --git a/gui/main_window.py b/gui/main_window.py index 52d06be..16dab76 100644 --- a/gui/main_window.py +++ b/gui/main_window.py @@ -176,7 +176,7 @@ class MainWindow(QMainWindow): def setup_ui(self): """Setup the main UI components.""" - self.setWindowTitle(f"MacroPad Server v{VERSION}") + self.setWindowTitle("MacroPad Server") self.setMinimumSize(600, 400) self.setStyleSheet(f"background-color: {THEME['bg_color']};") @@ -472,9 +472,40 @@ class MainWindow(QMainWindow): def copy_url_to_clipboard(self): """Copy the web interface URL to clipboard.""" url = self.ip_label.text() + if url == "Copied!": + return # Already showing copied feedback clipboard = QApplication.clipboard() clipboard.setText(url) - self.status_bar.showMessage("URL copied to clipboard", 2000) + + # Show "Copied!" feedback with dimmed style + self.ip_label.setText("Copied!") + self.ip_label.setStyleSheet(f""" + QPushButton {{ + background-color: transparent; + color: {THEME['highlight_color']}; + border: none; + padding: 4px 8px; + }} + """) + + # Restore original URL after delay + QTimer.singleShot(1500, self._restore_url_label) + + def _restore_url_label(self): + """Restore URL label after copy feedback.""" + self.ip_label.setStyleSheet(f""" + QPushButton {{ + background-color: transparent; + color: {THEME['fg_color']}; + border: none; + padding: 4px 8px; + }} + QPushButton:hover {{ + color: {THEME['accent_color']}; + text-decoration: underline; + }} + """) + self.update_ip_label() def refresh_tabs(self): """Refresh the tab widget."""