fix: UI improvements - drag, scroll, no emojis
This commit is contained in:
parent
2e8e17b2a5
commit
5b127cf99e
|
|
@ -105,8 +105,9 @@ class OverlayWindow(QMainWindow):
|
|||
container_layout.setContentsMargins(0, 0, 0, 0)
|
||||
container_layout.setSpacing(0)
|
||||
|
||||
# Header with centered title like EU windows
|
||||
# Header with centered title - CLEAN (no weird lines)
|
||||
header = QWidget()
|
||||
header.setObjectName("header")
|
||||
header.setStyleSheet(f"""
|
||||
QWidget {{
|
||||
background-color: {EU_COLORS['bg_header']};
|
||||
|
|
@ -119,12 +120,6 @@ class OverlayWindow(QMainWindow):
|
|||
header_layout.setContentsMargins(15, 12, 15, 12)
|
||||
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 = QLabel()
|
||||
app_icon_pixmap = self.icon_manager.get_pixmap("target", size=20)
|
||||
|
|
@ -132,22 +127,17 @@ class OverlayWindow(QMainWindow):
|
|||
app_icon.setFixedSize(20, 20)
|
||||
header_layout.addWidget(app_icon)
|
||||
|
||||
# Centered title like "SKILLS" in game
|
||||
# Centered title
|
||||
title = QLabel("EU-UTILITY")
|
||||
title.setStyleSheet(f"""
|
||||
color: {EU_COLORS['text_primary']};
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 2px;
|
||||
padding: 0 10px;
|
||||
""")
|
||||
header_layout.addWidget(title)
|
||||
|
||||
# Right line (decorative)
|
||||
right_line = QLabel()
|
||||
right_line.setFixedHeight(2)
|
||||
right_line.setStyleSheet(f"background-color: {EU_COLORS['border_medium']};")
|
||||
header_layout.addWidget(right_line, 1)
|
||||
header_layout.addStretch()
|
||||
|
||||
# View toggle buttons
|
||||
view_group = QButtonGroup(self)
|
||||
|
|
@ -191,6 +181,10 @@ class OverlayWindow(QMainWindow):
|
|||
close_btn.clicked.connect(self.hide_overlay)
|
||||
header_layout.addWidget(close_btn)
|
||||
|
||||
# Make header draggable
|
||||
header.mousePressEvent = self._header_mouse_press
|
||||
header.mouseMoveEvent = self._header_mouse_move
|
||||
|
||||
container_layout.addWidget(header)
|
||||
|
||||
# Content area with sidebar and main content
|
||||
|
|
@ -232,12 +226,38 @@ class OverlayWindow(QMainWindow):
|
|||
self._load_plugins()
|
||||
|
||||
def _setup_sidebar(self):
|
||||
"""Setup sidebar with plugin selector - EU style with orange left border."""
|
||||
sidebar_layout = QVBoxLayout(self.sidebar)
|
||||
"""Setup sidebar with scroll area to prevent expanding out of screen."""
|
||||
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.setSpacing(0)
|
||||
|
||||
# Category label like "ALL CATEGORIES" in Skills window
|
||||
# Category label
|
||||
plugins_label = QLabel("PLUGINS")
|
||||
plugins_label.setStyleSheet(f"""
|
||||
color: {EU_COLORS['text_muted']};
|
||||
|
|
@ -248,7 +268,7 @@ class OverlayWindow(QMainWindow):
|
|||
""")
|
||||
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.setFrameShape(QFrame.Shape.NoFrame)
|
||||
self.plugin_list.setStyleSheet(f"""
|
||||
|
|
@ -284,6 +304,14 @@ class OverlayWindow(QMainWindow):
|
|||
self.icon_grid_layout.setContentsMargins(0, 0, 0, 0)
|
||||
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
|
||||
self.plugin_list.hide()
|
||||
|
||||
|
|
@ -460,6 +488,25 @@ class OverlayWindow(QMainWindow):
|
|||
if reason == QSystemTrayIcon.ActivationReason.DoubleClick:
|
||||
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):
|
||||
"""Show overlay."""
|
||||
self.show()
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class AuctionTrackerPlugin(BasePlugin):
|
|||
layout.addWidget(self.price_table)
|
||||
|
||||
# Quick scan
|
||||
scan_btn = QPushButton("📸 Scan Auction Window")
|
||||
scan_btn = QPushButton("Scan Auction Window")
|
||||
scan_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
background-color: #ffc107;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class CodexTrackerPlugin(BasePlugin):
|
|||
layout.addLayout(summary)
|
||||
|
||||
# Scan button
|
||||
scan_btn = QPushButton("📸 Scan Codex Window")
|
||||
scan_btn = QPushButton("Scan Codex Window")
|
||||
scan_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
background-color: #ff8c42;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class DashboardPlugin(BasePlugin):
|
|||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
# Welcome
|
||||
welcome = QLabel("⚡ Welcome to EU-Utility")
|
||||
welcome = QLabel(" Welcome to EU-Utility")
|
||||
welcome.setStyleSheet(f"""
|
||||
color: {EU_COLORS['accent_orange']};
|
||||
font-size: 18px;
|
||||
|
|
@ -77,8 +77,8 @@ class DashboardPlugin(BasePlugin):
|
|||
|
||||
stats = [
|
||||
("💰 PED", "26.02", "Balance"),
|
||||
("📊 Skills", "12", "Tracked"),
|
||||
("🎁 Items", "98", "In Inventory"),
|
||||
("Skills", "12", "Tracked"),
|
||||
("Items", "98", "In Inventory"),
|
||||
("🎯 DPP", "3.45", "Current"),
|
||||
]
|
||||
|
||||
|
|
@ -97,10 +97,10 @@ class DashboardPlugin(BasePlugin):
|
|||
actions_grid.setSpacing(10)
|
||||
|
||||
actions = [
|
||||
("🔍 Search", "Search items, mobs, locations"),
|
||||
("📸 Scan", "OCR scan game windows"),
|
||||
("📊 Skills", "Track skill gains"),
|
||||
("🎁 Loot", "Track hunting loot"),
|
||||
("Search", "Search items, mobs, locations"),
|
||||
("Scan", "OCR scan game windows"),
|
||||
("Skills", "Track skill gains"),
|
||||
("Loot", "Track hunting loot"),
|
||||
("⛏️ Mine", "Track mining finds"),
|
||||
("📈 Market", "Auction price tracking"),
|
||||
]
|
||||
|
|
@ -127,9 +127,9 @@ class DashboardPlugin(BasePlugin):
|
|||
activity_layout = QVBoxLayout(activity_frame)
|
||||
|
||||
activities = [
|
||||
"✓ Scanned inventory - 26.02 PED",
|
||||
"✓ Tracked skill gain: +5.2 Aim",
|
||||
"✓ Recorded loot: Animal Hide (0.03 PED)",
|
||||
"Scanned inventory - 26.02 PED",
|
||||
"Tracked skill gain: +5.2 Aim",
|
||||
"Recorded loot: Animal Hide (0.03 PED)",
|
||||
"→ Mission progress: 12/100 Oratan",
|
||||
]
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ class DashboardPlugin(BasePlugin):
|
|||
""")
|
||||
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;")
|
||||
tips_layout.addWidget(tip_title)
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class EnhancerCalculatorPlugin(BasePlugin):
|
|||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
# Title
|
||||
title = QLabel("⚡ Enhancer Calculator")
|
||||
title = QLabel(" Enhancer Calculator")
|
||||
title.setStyleSheet("color: white; font-size: 16px; font-weight: bold;")
|
||||
layout.addWidget(title)
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class GameReaderPlugin(BasePlugin):
|
|||
layout.addWidget(info)
|
||||
|
||||
# Scan button
|
||||
scan_btn = QPushButton("📸 Capture Screen")
|
||||
scan_btn = QPushButton("Capture Screen")
|
||||
scan_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
background-color: #4a9eff;
|
||||
|
|
@ -170,7 +170,7 @@ class GameReaderPlugin(BasePlugin):
|
|||
results_layout = QVBoxLayout(results_frame)
|
||||
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_layout.addWidget(results_label)
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ class GameReaderPlugin(BasePlugin):
|
|||
layout.addWidget(results_frame)
|
||||
|
||||
# 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;")
|
||||
layout.addWidget(uses_label)
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ class GameReaderPlugin(BasePlugin):
|
|||
|
||||
def _capture_screen(self):
|
||||
"""Capture screen and perform OCR."""
|
||||
self.status_label.setText("📸 Capturing...")
|
||||
self.status_label.setText("Capturing...")
|
||||
self.status_label.setStyleSheet("color: #4a9eff;")
|
||||
|
||||
# Start scan thread
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class InventoryManagerPlugin(BasePlugin):
|
|||
self._refresh_items()
|
||||
|
||||
# Scan button
|
||||
scan_btn = QPushButton("📸 Scan Inventory")
|
||||
scan_btn = QPushButton("Scan Inventory")
|
||||
scan_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
background-color: #ff8c42;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class LootTrackerPlugin(BasePlugin):
|
|||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
# Title
|
||||
title = QLabel("🎁 Loot Tracker")
|
||||
title = QLabel("Loot Tracker")
|
||||
title.setStyleSheet("color: white; font-size: 16px; font-weight: bold;")
|
||||
layout.addWidget(title)
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ class NexusSearchPlugin(BasePlugin):
|
|||
layout = QVBoxLayout(widget)
|
||||
|
||||
# Title
|
||||
title = QLabel("🔍 EntropiaNexus")
|
||||
title = QLabel("EntropiaNexus")
|
||||
title.setStyleSheet("color: #4a9eff; font-size: 18px; font-weight: bold;")
|
||||
layout.addWidget(title)
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ class NexusSearchPlugin(BasePlugin):
|
|||
# Action buttons
|
||||
btn_layout = QHBoxLayout()
|
||||
|
||||
open_btn = QPushButton("🔗 Open on Nexus")
|
||||
open_btn = QPushButton("Open on Nexus")
|
||||
open_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
background-color: #333;
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ class SkillScannerThread(QThread):
|
|||
def run(self):
|
||||
"""Capture screen and extract skill data."""
|
||||
try:
|
||||
self.progress_update.emit("📸 Capturing screen...")
|
||||
self.progress_update.emit("Capturing screen...")
|
||||
|
||||
# Capture screen
|
||||
screenshot = self._capture_screen()
|
||||
|
|
@ -156,7 +156,7 @@ class SkillScannerThread(QThread):
|
|||
self.error_occurred.emit("Failed to capture screen")
|
||||
return
|
||||
|
||||
self.progress_update.emit("🔍 Analyzing skills window...")
|
||||
self.progress_update.emit("Analyzing skills window...")
|
||||
|
||||
# Extract skill data
|
||||
skills_data = self._extract_skills(screenshot)
|
||||
|
|
@ -334,7 +334,7 @@ class SkillScannerPlugin(BasePlugin):
|
|||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
# Title
|
||||
title = QLabel("📊 Skill Scanner")
|
||||
title = QLabel("Skill Scanner")
|
||||
title.setStyleSheet("color: white; font-size: 16px; font-weight: bold;")
|
||||
layout.addWidget(title)
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ class SkillScannerPlugin(BasePlugin):
|
|||
layout.setContentsMargins(10, 10, 10, 10)
|
||||
|
||||
# Scan button
|
||||
scan_btn = QPushButton("📸 Scan Skills Window")
|
||||
scan_btn = QPushButton("Scan Skills Window")
|
||||
scan_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
background-color: #4a9eff;
|
||||
|
|
@ -518,7 +518,7 @@ class SkillScannerPlugin(BasePlugin):
|
|||
layout.addWidget(export_btn)
|
||||
|
||||
# View raw data
|
||||
view_btn = QPushButton("📄 View Raw JSON")
|
||||
view_btn = QPushButton("View Raw JSON")
|
||||
view_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
background-color: rgba(255, 255, 255, 20);
|
||||
|
|
@ -539,7 +539,7 @@ class SkillScannerPlugin(BasePlugin):
|
|||
|
||||
def _scan_skills(self):
|
||||
"""Start skills scan."""
|
||||
self.status_label.setText("📸 Capturing...")
|
||||
self.status_label.setText("Capturing...")
|
||||
self.status_label.setStyleSheet("color: #4a9eff;")
|
||||
|
||||
self.scan_thread = SkillScannerThread()
|
||||
|
|
@ -591,7 +591,7 @@ class SkillScannerPlugin(BasePlugin):
|
|||
# Display results
|
||||
text = f"""
|
||||
🎯 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
|
||||
|
||||
Raw Text Preview:
|
||||
|
|
@ -607,7 +607,7 @@ Raw Text Preview:
|
|||
gain_count = len(self.data_store.load_gain_history())
|
||||
|
||||
self.stats_label.setText(
|
||||
f"📊 Data Points: {skill_count} skill scans | "
|
||||
f"Data Points: {skill_count} skill scans | "
|
||||
f"{esi_count} ESI scans | "
|
||||
f"{gain_count} chat gains"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class SpotifyControllerPlugin(BasePlugin):
|
|||
layout.setSpacing(12)
|
||||
|
||||
# Title
|
||||
title = QLabel("🎵 Spotify")
|
||||
title = QLabel("Spotify")
|
||||
title.setStyleSheet("color: #1DB954; font-size: 18px; font-weight: bold;")
|
||||
layout.addWidget(title)
|
||||
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ class TPRunnerPlugin(BasePlugin):
|
|||
item = QTreeWidgetItem()
|
||||
item.setText(0, tp)
|
||||
if tp in self.unlocked_tps:
|
||||
item.setText(1, "✓ Unlocked")
|
||||
item.setText(1, "Unlocked")
|
||||
item.setForeground(1, Qt.GlobalColor.green)
|
||||
else:
|
||||
item.setText(1, "Locked")
|
||||
|
|
@ -180,7 +180,7 @@ class TPRunnerPlugin(BasePlugin):
|
|||
layout.addWidget(self.tp_tree)
|
||||
|
||||
# Mark as unlocked button
|
||||
unlock_btn = QPushButton("✓ Mark Selected as Unlocked")
|
||||
unlock_btn = QPushButton("Mark Unlocked")
|
||||
unlock_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
background-color: #4caf50;
|
||||
|
|
@ -214,6 +214,6 @@ class TPRunnerPlugin(BasePlugin):
|
|||
if item:
|
||||
tp_name = item.text(0)
|
||||
self.unlocked_tps.add(tp_name)
|
||||
item.setText(1, "✓ Unlocked")
|
||||
item.setText(1, "Unlocked")
|
||||
item.setForeground(1, Qt.GlobalColor.green)
|
||||
self._save_data()
|
||||
|
|
|
|||
|
|
@ -192,8 +192,8 @@ class UniversalSearchPlugin(BasePlugin):
|
|||
layout = QVBoxLayout(widget)
|
||||
layout.setSpacing(10)
|
||||
|
||||
# Title
|
||||
title = QLabel("🔍 Universal Search")
|
||||
# Title - NO EMOJI
|
||||
title = QLabel("Universal Search")
|
||||
title.setStyleSheet("color: #4a9eff; font-size: 18px; font-weight: bold;")
|
||||
layout.addWidget(title)
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ class UniversalSearchPlugin(BasePlugin):
|
|||
mode_layout.addWidget(QLabel("Mode:"))
|
||||
|
||||
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")
|
||||
|
||||
# Add all entity types
|
||||
|
|
@ -275,7 +275,7 @@ class UniversalSearchPlugin(BasePlugin):
|
|||
self.search_input.returnPressed.connect(self._do_search)
|
||||
search_layout.addWidget(self.search_input, 1)
|
||||
|
||||
search_btn = QPushButton("🔍 Search")
|
||||
search_btn = QPushButton("Search")
|
||||
search_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
background-color: #4a9eff;
|
||||
|
|
@ -347,7 +347,7 @@ class UniversalSearchPlugin(BasePlugin):
|
|||
# Action buttons
|
||||
action_layout = QHBoxLayout()
|
||||
|
||||
self.open_btn = QPushButton("🔗 Open Selected")
|
||||
self.open_btn = QPushButton("Open Selected")
|
||||
self.open_btn.setEnabled(False)
|
||||
self.open_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
|
|
@ -396,7 +396,7 @@ class UniversalSearchPlugin(BasePlugin):
|
|||
layout.addLayout(action_layout)
|
||||
|
||||
# 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;")
|
||||
layout.addWidget(tips)
|
||||
|
||||
|
|
@ -429,7 +429,7 @@ class UniversalSearchPlugin(BasePlugin):
|
|||
self.results_table.setRowCount(0)
|
||||
self.current_results = []
|
||||
self.open_btn.setEnabled(False)
|
||||
self.status_label.setText(f"🔍 Searching for '{query}'...")
|
||||
self.status_label.setText(f"Searching for '{query}'...")
|
||||
|
||||
# Start search thread
|
||||
self.search_thread = UniversalSearchThread(query, entity_type, universal)
|
||||
|
|
|
|||
Loading…
Reference in New Issue