fix: UI improvements - drag, scroll, no emojis

This commit is contained in:
LemonNexus 2026-02-13 16:01:45 +00:00
parent 2e8e17b2a5
commit 5b127cf99e
13 changed files with 106 additions and 59 deletions

View File

@ -105,8 +105,9 @@ class OverlayWindow(QMainWindow):
container_layout.setContentsMargins(0, 0, 0, 0) container_layout.setContentsMargins(0, 0, 0, 0)
container_layout.setSpacing(0) container_layout.setSpacing(0)
# Header with centered title like EU windows # Header with centered title - CLEAN (no weird lines)
header = QWidget() header = QWidget()
header.setObjectName("header")
header.setStyleSheet(f""" header.setStyleSheet(f"""
QWidget {{ QWidget {{
background-color: {EU_COLORS['bg_header']}; background-color: {EU_COLORS['bg_header']};
@ -119,12 +120,6 @@ class OverlayWindow(QMainWindow):
header_layout.setContentsMargins(15, 12, 15, 12) header_layout.setContentsMargins(15, 12, 15, 12)
header_layout.setSpacing(10) header_layout.setSpacing(10)
# Left line (decorative)
left_line = QLabel()
left_line.setFixedHeight(2)
left_line.setStyleSheet(f"background-color: {EU_COLORS['border_medium']};")
header_layout.addWidget(left_line, 1)
# App icon # App icon
app_icon = QLabel() app_icon = QLabel()
app_icon_pixmap = self.icon_manager.get_pixmap("target", size=20) app_icon_pixmap = self.icon_manager.get_pixmap("target", size=20)
@ -132,22 +127,17 @@ class OverlayWindow(QMainWindow):
app_icon.setFixedSize(20, 20) app_icon.setFixedSize(20, 20)
header_layout.addWidget(app_icon) header_layout.addWidget(app_icon)
# Centered title like "SKILLS" in game # Centered title
title = QLabel("EU-UTILITY") title = QLabel("EU-UTILITY")
title.setStyleSheet(f""" title.setStyleSheet(f"""
color: {EU_COLORS['text_primary']}; color: {EU_COLORS['text_primary']};
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
letter-spacing: 2px; letter-spacing: 2px;
padding: 0 10px;
""") """)
header_layout.addWidget(title) header_layout.addWidget(title)
# Right line (decorative) header_layout.addStretch()
right_line = QLabel()
right_line.setFixedHeight(2)
right_line.setStyleSheet(f"background-color: {EU_COLORS['border_medium']};")
header_layout.addWidget(right_line, 1)
# View toggle buttons # View toggle buttons
view_group = QButtonGroup(self) view_group = QButtonGroup(self)
@ -191,6 +181,10 @@ class OverlayWindow(QMainWindow):
close_btn.clicked.connect(self.hide_overlay) close_btn.clicked.connect(self.hide_overlay)
header_layout.addWidget(close_btn) header_layout.addWidget(close_btn)
# Make header draggable
header.mousePressEvent = self._header_mouse_press
header.mouseMoveEvent = self._header_mouse_move
container_layout.addWidget(header) container_layout.addWidget(header)
# Content area with sidebar and main content # Content area with sidebar and main content
@ -232,12 +226,38 @@ class OverlayWindow(QMainWindow):
self._load_plugins() self._load_plugins()
def _setup_sidebar(self): def _setup_sidebar(self):
"""Setup sidebar with plugin selector - EU style with orange left border.""" """Setup sidebar with scroll area to prevent expanding out of screen."""
sidebar_layout = QVBoxLayout(self.sidebar) from PyQt6.QtWidgets import QScrollArea
# Create scroll area
scroll = QScrollArea()
scroll.setWidgetResizable(True)
scroll.setFrameShape(QFrame.Shape.NoFrame)
scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
scroll.setStyleSheet(f"""
QScrollArea {{
background: transparent;
border: none;
}}
QScrollBar:vertical {{
background: rgba(0, 0, 0, 50);
width: 8px;
border-radius: 4px;
}}
QScrollBar::handle:vertical {{
background: rgba(255, 255, 255, 30);
border-radius: 4px;
min-height: 30px;
}}
""")
# Create container widget for scroll area
container = QWidget()
sidebar_layout = QVBoxLayout(container)
sidebar_layout.setContentsMargins(0, 0, 0, 0) sidebar_layout.setContentsMargins(0, 0, 0, 0)
sidebar_layout.setSpacing(0) sidebar_layout.setSpacing(0)
# Category label like "ALL CATEGORIES" in Skills window # Category label
plugins_label = QLabel("PLUGINS") plugins_label = QLabel("PLUGINS")
plugins_label.setStyleSheet(f""" plugins_label.setStyleSheet(f"""
color: {EU_COLORS['text_muted']}; color: {EU_COLORS['text_muted']};
@ -248,7 +268,7 @@ class OverlayWindow(QMainWindow):
""") """)
sidebar_layout.addWidget(plugins_label) sidebar_layout.addWidget(plugins_label)
# Plugin list (for list view) - EU style with orange left border # Plugin list (for list view)
self.plugin_list = QListWidget() self.plugin_list = QListWidget()
self.plugin_list.setFrameShape(QFrame.Shape.NoFrame) self.plugin_list.setFrameShape(QFrame.Shape.NoFrame)
self.plugin_list.setStyleSheet(f""" self.plugin_list.setStyleSheet(f"""
@ -284,6 +304,14 @@ class OverlayWindow(QMainWindow):
self.icon_grid_layout.setContentsMargins(0, 0, 0, 0) self.icon_grid_layout.setContentsMargins(0, 0, 0, 0)
sidebar_layout.addWidget(self.icon_grid) sidebar_layout.addWidget(self.icon_grid)
# Set container as scroll widget
scroll.setWidget(container)
# Add scroll to sidebar layout
main_layout = QVBoxLayout(self.sidebar)
main_layout.setContentsMargins(0, 0, 0, 0)
main_layout.addWidget(scroll)
# Initially show icon grid # Initially show icon grid
self.plugin_list.hide() self.plugin_list.hide()
@ -460,6 +488,25 @@ class OverlayWindow(QMainWindow):
if reason == QSystemTrayIcon.ActivationReason.DoubleClick: if reason == QSystemTrayIcon.ActivationReason.DoubleClick:
self.toggle_overlay() self.toggle_overlay()
# Drag functionality
def _header_mouse_press(self, event):
"""Start dragging from header."""
if event.button() == Qt.MouseButton.LeftButton:
self._dragging = True
self._drag_position = event.globalPosition().toPoint() - self.frameGeometry().topLeft()
event.accept()
def _header_mouse_move(self, event):
"""Drag window."""
if hasattr(self, '_dragging') and self._dragging:
self.move(event.globalPosition().toPoint() - self._drag_position)
event.accept()
def mouseReleaseEvent(self, event):
"""Stop dragging."""
self._dragging = False
super().mouseReleaseEvent(event)
def show_overlay(self): def show_overlay(self):
"""Show overlay.""" """Show overlay."""
self.show() self.show()

View File

@ -124,7 +124,7 @@ class AuctionTrackerPlugin(BasePlugin):
layout.addWidget(self.price_table) layout.addWidget(self.price_table)
# Quick scan # Quick scan
scan_btn = QPushButton("📸 Scan Auction Window") scan_btn = QPushButton("Scan Auction Window")
scan_btn.setStyleSheet(""" scan_btn.setStyleSheet("""
QPushButton { QPushButton {
background-color: #ffc107; background-color: #ffc107;

View File

@ -98,7 +98,7 @@ class CodexTrackerPlugin(BasePlugin):
layout.addLayout(summary) layout.addLayout(summary)
# Scan button # Scan button
scan_btn = QPushButton("📸 Scan Codex Window") scan_btn = QPushButton("Scan Codex Window")
scan_btn.setStyleSheet(""" scan_btn.setStyleSheet("""
QPushButton { QPushButton {
background-color: #ff8c42; background-color: #ff8c42;

View File

@ -59,7 +59,7 @@ class DashboardPlugin(BasePlugin):
layout.setContentsMargins(0, 0, 0, 0) layout.setContentsMargins(0, 0, 0, 0)
# Welcome # Welcome
welcome = QLabel(" Welcome to EU-Utility") welcome = QLabel(" Welcome to EU-Utility")
welcome.setStyleSheet(f""" welcome.setStyleSheet(f"""
color: {EU_COLORS['accent_orange']}; color: {EU_COLORS['accent_orange']};
font-size: 18px; font-size: 18px;
@ -77,8 +77,8 @@ class DashboardPlugin(BasePlugin):
stats = [ stats = [
("💰 PED", "26.02", "Balance"), ("💰 PED", "26.02", "Balance"),
("📊 Skills", "12", "Tracked"), ("Skills", "12", "Tracked"),
("🎁 Items", "98", "In Inventory"), ("Items", "98", "In Inventory"),
("🎯 DPP", "3.45", "Current"), ("🎯 DPP", "3.45", "Current"),
] ]
@ -97,10 +97,10 @@ class DashboardPlugin(BasePlugin):
actions_grid.setSpacing(10) actions_grid.setSpacing(10)
actions = [ actions = [
("🔍 Search", "Search items, mobs, locations"), ("Search", "Search items, mobs, locations"),
("📸 Scan", "OCR scan game windows"), ("Scan", "OCR scan game windows"),
("📊 Skills", "Track skill gains"), ("Skills", "Track skill gains"),
("🎁 Loot", "Track hunting loot"), ("Loot", "Track hunting loot"),
("⛏️ Mine", "Track mining finds"), ("⛏️ Mine", "Track mining finds"),
("📈 Market", "Auction price tracking"), ("📈 Market", "Auction price tracking"),
] ]
@ -127,9 +127,9 @@ class DashboardPlugin(BasePlugin):
activity_layout = QVBoxLayout(activity_frame) activity_layout = QVBoxLayout(activity_frame)
activities = [ activities = [
"Scanned inventory - 26.02 PED", "Scanned inventory - 26.02 PED",
"Tracked skill gain: +5.2 Aim", "Tracked skill gain: +5.2 Aim",
"Recorded loot: Animal Hide (0.03 PED)", "Recorded loot: Animal Hide (0.03 PED)",
"→ Mission progress: 12/100 Oratan", "→ Mission progress: 12/100 Oratan",
] ]
@ -151,7 +151,7 @@ class DashboardPlugin(BasePlugin):
""") """)
tips_layout = QVBoxLayout(tips_frame) tips_layout = QVBoxLayout(tips_frame)
tip_title = QLabel("💡 Pro Tip") tip_title = QLabel("Pro Tip")
tip_title.setStyleSheet(f"color: {EU_COLORS['accent_orange']}; font-weight: bold; font-size: 11px;") tip_title.setStyleSheet(f"color: {EU_COLORS['accent_orange']}; font-weight: bold; font-size: 11px;")
tips_layout.addWidget(tip_title) tips_layout.addWidget(tip_title)

View File

@ -43,7 +43,7 @@ class EnhancerCalculatorPlugin(BasePlugin):
layout.setContentsMargins(0, 0, 0, 0) layout.setContentsMargins(0, 0, 0, 0)
# Title # Title
title = QLabel(" Enhancer Calculator") title = QLabel(" Enhancer Calculator")
title.setStyleSheet("color: white; font-size: 16px; font-weight: bold;") title.setStyleSheet("color: white; font-size: 16px; font-weight: bold;")
layout.addWidget(title) layout.addWidget(title)

View File

@ -131,7 +131,7 @@ class GameReaderPlugin(BasePlugin):
layout.addWidget(info) layout.addWidget(info)
# Scan button # Scan button
scan_btn = QPushButton("📸 Capture Screen") scan_btn = QPushButton("Capture Screen")
scan_btn.setStyleSheet(""" scan_btn.setStyleSheet("""
QPushButton { QPushButton {
background-color: #4a9eff; background-color: #4a9eff;
@ -170,7 +170,7 @@ class GameReaderPlugin(BasePlugin):
results_layout = QVBoxLayout(results_frame) results_layout = QVBoxLayout(results_frame)
results_layout.setContentsMargins(10, 10, 10, 10) results_layout.setContentsMargins(10, 10, 10, 10)
results_label = QLabel("📄 Captured Text:") results_label = QLabel("Captured Text:")
results_label.setStyleSheet("color: rgba(255, 255, 255, 150); font-size: 12px;") results_label.setStyleSheet("color: rgba(255, 255, 255, 150); font-size: 12px;")
results_layout.addWidget(results_label) results_layout.addWidget(results_label)
@ -209,7 +209,7 @@ class GameReaderPlugin(BasePlugin):
layout.addWidget(results_frame) layout.addWidget(results_frame)
# Common uses # Common uses
uses_label = QLabel("💡 Common Uses:") uses_label = QLabel("Common Uses:")
uses_label.setStyleSheet("color: rgba(255, 255, 255, 150); font-size: 11px; margin-top: 10px;") uses_label.setStyleSheet("color: rgba(255, 255, 255, 150); font-size: 11px; margin-top: 10px;")
layout.addWidget(uses_label) layout.addWidget(uses_label)
@ -228,7 +228,7 @@ class GameReaderPlugin(BasePlugin):
def _capture_screen(self): def _capture_screen(self):
"""Capture screen and perform OCR.""" """Capture screen and perform OCR."""
self.status_label.setText("📸 Capturing...") self.status_label.setText("Capturing...")
self.status_label.setStyleSheet("color: #4a9eff;") self.status_label.setStyleSheet("color: #4a9eff;")
# Start scan thread # Start scan thread

View File

@ -162,7 +162,7 @@ class InventoryManagerPlugin(BasePlugin):
self._refresh_items() self._refresh_items()
# Scan button # Scan button
scan_btn = QPushButton("📸 Scan Inventory") scan_btn = QPushButton("Scan Inventory")
scan_btn.setStyleSheet(""" scan_btn.setStyleSheet("""
QPushButton { QPushButton {
background-color: #ff8c42; background-color: #ff8c42;

View File

@ -69,7 +69,7 @@ class LootTrackerPlugin(BasePlugin):
layout.setContentsMargins(0, 0, 0, 0) layout.setContentsMargins(0, 0, 0, 0)
# Title # Title
title = QLabel("🎁 Loot Tracker") title = QLabel("Loot Tracker")
title.setStyleSheet("color: white; font-size: 16px; font-weight: bold;") title.setStyleSheet("color: white; font-size: 16px; font-weight: bold;")
layout.addWidget(title) layout.addWidget(title)

View File

@ -168,7 +168,7 @@ class NexusSearchPlugin(BasePlugin):
layout = QVBoxLayout(widget) layout = QVBoxLayout(widget)
# Title # Title
title = QLabel("🔍 EntropiaNexus") title = QLabel("EntropiaNexus")
title.setStyleSheet("color: #4a9eff; font-size: 18px; font-weight: bold;") title.setStyleSheet("color: #4a9eff; font-size: 18px; font-weight: bold;")
layout.addWidget(title) layout.addWidget(title)
@ -272,7 +272,7 @@ class NexusSearchPlugin(BasePlugin):
# Action buttons # Action buttons
btn_layout = QHBoxLayout() btn_layout = QHBoxLayout()
open_btn = QPushButton("🔗 Open on Nexus") open_btn = QPushButton("Open on Nexus")
open_btn.setStyleSheet(""" open_btn.setStyleSheet("""
QPushButton { QPushButton {
background-color: #333; background-color: #333;

View File

@ -148,7 +148,7 @@ class SkillScannerThread(QThread):
def run(self): def run(self):
"""Capture screen and extract skill data.""" """Capture screen and extract skill data."""
try: try:
self.progress_update.emit("📸 Capturing screen...") self.progress_update.emit("Capturing screen...")
# Capture screen # Capture screen
screenshot = self._capture_screen() screenshot = self._capture_screen()
@ -156,7 +156,7 @@ class SkillScannerThread(QThread):
self.error_occurred.emit("Failed to capture screen") self.error_occurred.emit("Failed to capture screen")
return return
self.progress_update.emit("🔍 Analyzing skills window...") self.progress_update.emit("Analyzing skills window...")
# Extract skill data # Extract skill data
skills_data = self._extract_skills(screenshot) skills_data = self._extract_skills(screenshot)
@ -334,7 +334,7 @@ class SkillScannerPlugin(BasePlugin):
layout.setContentsMargins(0, 0, 0, 0) layout.setContentsMargins(0, 0, 0, 0)
# Title # Title
title = QLabel("📊 Skill Scanner") title = QLabel("Skill Scanner")
title.setStyleSheet("color: white; font-size: 16px; font-weight: bold;") title.setStyleSheet("color: white; font-size: 16px; font-weight: bold;")
layout.addWidget(title) layout.addWidget(title)
@ -389,7 +389,7 @@ class SkillScannerPlugin(BasePlugin):
layout.setContentsMargins(10, 10, 10, 10) layout.setContentsMargins(10, 10, 10, 10)
# Scan button # Scan button
scan_btn = QPushButton("📸 Scan Skills Window") scan_btn = QPushButton("Scan Skills Window")
scan_btn.setStyleSheet(""" scan_btn.setStyleSheet("""
QPushButton { QPushButton {
background-color: #4a9eff; background-color: #4a9eff;
@ -518,7 +518,7 @@ class SkillScannerPlugin(BasePlugin):
layout.addWidget(export_btn) layout.addWidget(export_btn)
# View raw data # View raw data
view_btn = QPushButton("📄 View Raw JSON") view_btn = QPushButton("View Raw JSON")
view_btn.setStyleSheet(""" view_btn.setStyleSheet("""
QPushButton { QPushButton {
background-color: rgba(255, 255, 255, 20); background-color: rgba(255, 255, 255, 20);
@ -539,7 +539,7 @@ class SkillScannerPlugin(BasePlugin):
def _scan_skills(self): def _scan_skills(self):
"""Start skills scan.""" """Start skills scan."""
self.status_label.setText("📸 Capturing...") self.status_label.setText("Capturing...")
self.status_label.setStyleSheet("color: #4a9eff;") self.status_label.setStyleSheet("color: #4a9eff;")
self.scan_thread = SkillScannerThread() self.scan_thread = SkillScannerThread()
@ -591,7 +591,7 @@ class SkillScannerPlugin(BasePlugin):
# Display results # Display results
text = f""" text = f"""
🎯 Skill Target: {esi_data['skill_target'] or 'Unknown'} 🎯 Skill Target: {esi_data['skill_target'] or 'Unknown'}
📊 Points to Add: {esi_data['points_to_add']} Points to Add: {esi_data['points_to_add']}
💰 TT Value: {esi_data['tt_value']:.2f} PED 💰 TT Value: {esi_data['tt_value']:.2f} PED
Raw Text Preview: Raw Text Preview:
@ -607,7 +607,7 @@ Raw Text Preview:
gain_count = len(self.data_store.load_gain_history()) gain_count = len(self.data_store.load_gain_history())
self.stats_label.setText( self.stats_label.setText(
f"📊 Data Points: {skill_count} skill scans | " f"Data Points: {skill_count} skill scans | "
f"{esi_count} ESI scans | " f"{esi_count} ESI scans | "
f"{gain_count} chat gains" f"{gain_count} chat gains"
) )

View File

@ -129,7 +129,7 @@ class SpotifyControllerPlugin(BasePlugin):
layout.setSpacing(12) layout.setSpacing(12)
# Title # Title
title = QLabel("🎵 Spotify") title = QLabel("Spotify")
title.setStyleSheet("color: #1DB954; font-size: 18px; font-weight: bold;") title.setStyleSheet("color: #1DB954; font-size: 18px; font-weight: bold;")
layout.addWidget(title) layout.addWidget(title)

View File

@ -170,7 +170,7 @@ class TPRunnerPlugin(BasePlugin):
item = QTreeWidgetItem() item = QTreeWidgetItem()
item.setText(0, tp) item.setText(0, tp)
if tp in self.unlocked_tps: if tp in self.unlocked_tps:
item.setText(1, "Unlocked") item.setText(1, "Unlocked")
item.setForeground(1, Qt.GlobalColor.green) item.setForeground(1, Qt.GlobalColor.green)
else: else:
item.setText(1, "Locked") item.setText(1, "Locked")
@ -180,7 +180,7 @@ class TPRunnerPlugin(BasePlugin):
layout.addWidget(self.tp_tree) layout.addWidget(self.tp_tree)
# Mark as unlocked button # Mark as unlocked button
unlock_btn = QPushButton("Mark Selected as Unlocked") unlock_btn = QPushButton("Mark Unlocked")
unlock_btn.setStyleSheet(""" unlock_btn.setStyleSheet("""
QPushButton { QPushButton {
background-color: #4caf50; background-color: #4caf50;
@ -214,6 +214,6 @@ class TPRunnerPlugin(BasePlugin):
if item: if item:
tp_name = item.text(0) tp_name = item.text(0)
self.unlocked_tps.add(tp_name) self.unlocked_tps.add(tp_name)
item.setText(1, "Unlocked") item.setText(1, "Unlocked")
item.setForeground(1, Qt.GlobalColor.green) item.setForeground(1, Qt.GlobalColor.green)
self._save_data() self._save_data()

View File

@ -192,8 +192,8 @@ class UniversalSearchPlugin(BasePlugin):
layout = QVBoxLayout(widget) layout = QVBoxLayout(widget)
layout.setSpacing(10) layout.setSpacing(10)
# Title # Title - NO EMOJI
title = QLabel("🔍 Universal Search") title = QLabel("Universal Search")
title.setStyleSheet("color: #4a9eff; font-size: 18px; font-weight: bold;") title.setStyleSheet("color: #4a9eff; font-size: 18px; font-weight: bold;")
layout.addWidget(title) layout.addWidget(title)
@ -202,7 +202,7 @@ class UniversalSearchPlugin(BasePlugin):
mode_layout.addWidget(QLabel("Mode:")) mode_layout.addWidget(QLabel("Mode:"))
self.search_mode = QComboBox() self.search_mode = QComboBox()
self.search_mode.addItem("🔍 Universal (All Types)", "Universal") self.search_mode.addItem("Universal (All Types)", "Universal")
self.search_mode.addItem("──────────────────", "separator") self.search_mode.addItem("──────────────────", "separator")
# Add all entity types # Add all entity types
@ -275,7 +275,7 @@ class UniversalSearchPlugin(BasePlugin):
self.search_input.returnPressed.connect(self._do_search) self.search_input.returnPressed.connect(self._do_search)
search_layout.addWidget(self.search_input, 1) search_layout.addWidget(self.search_input, 1)
search_btn = QPushButton("🔍 Search") search_btn = QPushButton("Search")
search_btn.setStyleSheet(""" search_btn.setStyleSheet("""
QPushButton { QPushButton {
background-color: #4a9eff; background-color: #4a9eff;
@ -347,7 +347,7 @@ class UniversalSearchPlugin(BasePlugin):
# Action buttons # Action buttons
action_layout = QHBoxLayout() action_layout = QHBoxLayout()
self.open_btn = QPushButton("🔗 Open Selected") self.open_btn = QPushButton("Open Selected")
self.open_btn.setEnabled(False) self.open_btn.setEnabled(False)
self.open_btn.setStyleSheet(""" self.open_btn.setStyleSheet("""
QPushButton { QPushButton {
@ -396,7 +396,7 @@ class UniversalSearchPlugin(BasePlugin):
layout.addLayout(action_layout) layout.addLayout(action_layout)
# Tips # Tips
tips = QLabel("💡 Tip: Double-click result to open on Nexus website") tips = QLabel("Tip: Double-click result to open on Nexus website")
tips.setStyleSheet("color: #555; font-size: 10px;") tips.setStyleSheet("color: #555; font-size: 10px;")
layout.addWidget(tips) layout.addWidget(tips)
@ -429,7 +429,7 @@ class UniversalSearchPlugin(BasePlugin):
self.results_table.setRowCount(0) self.results_table.setRowCount(0)
self.current_results = [] self.current_results = []
self.open_btn.setEnabled(False) self.open_btn.setEnabled(False)
self.status_label.setText(f"🔍 Searching for '{query}'...") self.status_label.setText(f"Searching for '{query}'...")
# Start search thread # Start search thread
self.search_thread = UniversalSearchThread(query, entity_type, universal) self.search_thread = UniversalSearchThread(query, entity_type, universal)