Remove version from title bar, improve copy feedback
- Remove version number from window title (still shown in About) - Show "Copied!" over URL text with dimmed style instead of status bar message 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -176,7 +176,7 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
def setup_ui(self):
|
def setup_ui(self):
|
||||||
"""Setup the main UI components."""
|
"""Setup the main UI components."""
|
||||||
self.setWindowTitle(f"MacroPad Server v{VERSION}")
|
self.setWindowTitle("MacroPad Server")
|
||||||
self.setMinimumSize(600, 400)
|
self.setMinimumSize(600, 400)
|
||||||
self.setStyleSheet(f"background-color: {THEME['bg_color']};")
|
self.setStyleSheet(f"background-color: {THEME['bg_color']};")
|
||||||
|
|
||||||
@@ -472,9 +472,40 @@ class MainWindow(QMainWindow):
|
|||||||
def copy_url_to_clipboard(self):
|
def copy_url_to_clipboard(self):
|
||||||
"""Copy the web interface URL to clipboard."""
|
"""Copy the web interface URL to clipboard."""
|
||||||
url = self.ip_label.text()
|
url = self.ip_label.text()
|
||||||
|
if url == "Copied!":
|
||||||
|
return # Already showing copied feedback
|
||||||
clipboard = QApplication.clipboard()
|
clipboard = QApplication.clipboard()
|
||||||
clipboard.setText(url)
|
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):
|
def refresh_tabs(self):
|
||||||
"""Refresh the tab widget."""
|
"""Refresh the tab widget."""
|
||||||
|
|||||||
Reference in New Issue
Block a user