feat: major UI redesign - vertical layout
New layout structure: 1. Top row: Cache Source | Output Location (side by side) - More vertical space allocated - Both sections have equal width 2. Middle: Available Icons (full width) - Takes remaining vertical space - Expands to fill available area 3. Bottom: Action buttons - Select All / Select None on left - Open Output Folder in middle - Start Extracting Icons (main action) on right Removed: - Export Settings box (hardcoded settings) - EntropiaNexus.com box (already explained in top text) - Splitter layout (now vertical flow) Simplified, cleaner UI with all essential elements visible.
This commit is contained in:
parent
ed98f073c7
commit
5832bdd282
|
|
@ -35,7 +35,7 @@ try:
|
||||||
QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout,
|
QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout,
|
||||||
QLabel, QPushButton, QComboBox, QListWidget, QListWidgetItem,
|
QLabel, QPushButton, QComboBox, QListWidget, QListWidgetItem,
|
||||||
QFileDialog, QProgressBar, QGroupBox, QMessageBox, QCheckBox,
|
QFileDialog, QProgressBar, QGroupBox, QMessageBox, QCheckBox,
|
||||||
QSplitter, QTextEdit, QDialog, QScrollArea, QFrame
|
QSplitter, QTextEdit, QDialog, QScrollArea, QFrame
|
||||||
)
|
)
|
||||||
from PyQt6.QtCore import Qt, QThread, pyqtSignal, QSettings, QSize
|
from PyQt6.QtCore import Qt, QThread, pyqtSignal, QSettings, QSize
|
||||||
from PyQt6.QtGui import QIcon, QPixmap, QFont, QImage
|
from PyQt6.QtGui import QIcon, QPixmap, QFont, QImage
|
||||||
|
|
@ -368,21 +368,18 @@ class IconExtractorWindow(QMainWindow):
|
||||||
|
|
||||||
layout.addWidget(desc_widget)
|
layout.addWidget(desc_widget)
|
||||||
|
|
||||||
# Main splitter
|
# Cache and Output side by side
|
||||||
splitter = QSplitter(Qt.Orientation.Horizontal)
|
top_row = QWidget()
|
||||||
|
top_row_layout = QHBoxLayout(top_row)
|
||||||
# Left panel - Settings
|
top_row_layout.setContentsMargins(0, 0, 0, 0)
|
||||||
left_panel = QWidget()
|
top_row_layout.setSpacing(15)
|
||||||
left_layout = QVBoxLayout(left_panel)
|
|
||||||
left_layout.setContentsMargins(0, 0, 0, 0)
|
|
||||||
left_layout.setSpacing(10)
|
|
||||||
|
|
||||||
# Cache folder
|
# Cache folder
|
||||||
cache_group = QGroupBox("📂 Cache Source")
|
cache_group = QGroupBox("📂 Cache Source")
|
||||||
cache_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; }")
|
cache_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; }")
|
||||||
cache_layout = QVBoxLayout(cache_group)
|
cache_layout = QVBoxLayout(cache_group)
|
||||||
cache_layout.setContentsMargins(10, 15, 10, 10)
|
cache_layout.setContentsMargins(12, 18, 12, 12)
|
||||||
cache_layout.setSpacing(8)
|
cache_layout.setSpacing(10)
|
||||||
|
|
||||||
# Base path (hardcoded) - show just the end part
|
# Base path (hardcoded) - show just the end part
|
||||||
path_display = "...\\Entropia Universe\\public_users_data\\cache\\icon"
|
path_display = "...\\Entropia Universe\\public_users_data\\cache\\icon"
|
||||||
|
|
@ -390,12 +387,12 @@ class IconExtractorWindow(QMainWindow):
|
||||||
self.cache_label = QLabel(path_display)
|
self.cache_label = QLabel(path_display)
|
||||||
self.cache_label.setStyleSheet(
|
self.cache_label.setStyleSheet(
|
||||||
"font-family: Consolas; font-size: 10px; color: #aaa; "
|
"font-family: Consolas; font-size: 10px; color: #aaa; "
|
||||||
"padding: 5px 8px; background: #252525; border-radius: 3px;"
|
"padding: 6px 8px; background: #252525; border-radius: 3px;"
|
||||||
)
|
)
|
||||||
self.cache_label.setToolTip(self.cache_path_full)
|
self.cache_label.setToolTip(self.cache_path_full)
|
||||||
cache_layout.addWidget(self.cache_label)
|
cache_layout.addWidget(self.cache_label)
|
||||||
|
|
||||||
# Subfolder selector in one row
|
# Subfolder selector
|
||||||
subfolder_layout = QHBoxLayout()
|
subfolder_layout = QHBoxLayout()
|
||||||
subfolder_layout.setSpacing(8)
|
subfolder_layout.setSpacing(8)
|
||||||
|
|
||||||
|
|
@ -416,25 +413,25 @@ class IconExtractorWindow(QMainWindow):
|
||||||
subfolder_layout.addWidget(refresh_btn)
|
subfolder_layout.addWidget(refresh_btn)
|
||||||
|
|
||||||
cache_layout.addLayout(subfolder_layout)
|
cache_layout.addLayout(subfolder_layout)
|
||||||
|
top_row_layout.addWidget(cache_group, 1)
|
||||||
left_layout.addWidget(cache_group)
|
|
||||||
|
|
||||||
# Output folder
|
# Output folder
|
||||||
output_group = QGroupBox("💾 Output Location")
|
output_group = QGroupBox("💾 Output Location")
|
||||||
output_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; }")
|
output_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; }")
|
||||||
output_layout = QVBoxLayout(output_group)
|
output_layout = QVBoxLayout(output_group)
|
||||||
output_layout.setContentsMargins(10, 15, 10, 10)
|
output_layout.setContentsMargins(12, 18, 12, 12)
|
||||||
output_layout.setSpacing(8)
|
output_layout.setSpacing(10)
|
||||||
|
|
||||||
output_info = QLabel("📁 Icons saved to your Documents folder (same location as chat.log)")
|
output_info = QLabel("📁 Icons saved to your Documents folder (same location as chat.log)")
|
||||||
output_info.setStyleSheet("color: #aaaaaa; font-size: 12px;")
|
output_info.setStyleSheet("color: #aaaaaa; font-size: 12px;")
|
||||||
|
output_info.setWordWrap(True)
|
||||||
output_layout.addWidget(output_info)
|
output_layout.addWidget(output_info)
|
||||||
|
|
||||||
rel_path = "Documents\\Entropia Universe\\Icons\\"
|
rel_path = "Documents\\Entropia Universe\\Icons\\"
|
||||||
self.output_label = QLabel(f"📂 {rel_path}")
|
self.output_label = QLabel(f"📂 {rel_path}")
|
||||||
self.output_label.setStyleSheet(
|
self.output_label.setStyleSheet(
|
||||||
"font-family: Consolas; font-size: 10px; color: #aaa; "
|
"font-family: Consolas; font-size: 10px; color: #aaa; "
|
||||||
"padding: 5px 8px; background: #252525; border-radius: 3px;"
|
"padding: 6px 8px; background: #252525; border-radius: 3px;"
|
||||||
)
|
)
|
||||||
output_layout.addWidget(self.output_label)
|
output_layout.addWidget(self.output_label)
|
||||||
|
|
||||||
|
|
@ -443,86 +440,15 @@ class IconExtractorWindow(QMainWindow):
|
||||||
change_btn.clicked.connect(self._browse_output)
|
change_btn.clicked.connect(self._browse_output)
|
||||||
output_layout.addWidget(change_btn)
|
output_layout.addWidget(change_btn)
|
||||||
|
|
||||||
left_layout.addWidget(output_group)
|
top_row_layout.addWidget(output_group, 1)
|
||||||
|
layout.addWidget(top_row)
|
||||||
# Settings (simplified - just 320x320)
|
|
||||||
settings_group = QGroupBox("⚙️ Export Settings")
|
|
||||||
settings_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; }")
|
|
||||||
settings_layout = QVBoxLayout(settings_group)
|
|
||||||
settings_layout.setContentsMargins(10, 15, 10, 10)
|
|
||||||
|
|
||||||
settings_info = QLabel(
|
|
||||||
"🖼️ Format: PNG with transparency\n"
|
|
||||||
"📐 Canvas: 320x320 pixels (centered)\n"
|
|
||||||
"📏 Size: Original icon size (no upscaling)"
|
|
||||||
)
|
|
||||||
settings_info.setStyleSheet("color: #aaaaaa; font-size: 12px; line-height: 1.4;")
|
|
||||||
settings_layout.addWidget(settings_info)
|
|
||||||
|
|
||||||
left_layout.addWidget(settings_group)
|
|
||||||
|
|
||||||
# Nexus link
|
|
||||||
nexus_group = QGroupBox("🌐 EntropiaNexus.com")
|
|
||||||
nexus_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; color: #4caf50; }")
|
|
||||||
nexus_layout = QVBoxLayout(nexus_group)
|
|
||||||
nexus_layout.setContentsMargins(10, 15, 10, 10)
|
|
||||||
|
|
||||||
nexus_info = QLabel("📤 Submit icons to help complete the item database")
|
|
||||||
nexus_info.setStyleSheet("color: #cccccc; font-size: 12px;")
|
|
||||||
nexus_layout.addWidget(nexus_info)
|
|
||||||
|
|
||||||
nexus_btn = QPushButton("🌐 Open EntropiaNexus.com")
|
|
||||||
nexus_btn.setMinimumHeight(28)
|
|
||||||
nexus_btn.setStyleSheet("font-size: 11px; padding: 5px;")
|
|
||||||
nexus_btn.clicked.connect(lambda: self._open_url(WEBSITE))
|
|
||||||
nexus_layout.addWidget(nexus_btn)
|
|
||||||
|
|
||||||
left_layout.addWidget(nexus_group)
|
|
||||||
|
|
||||||
# Convert button
|
|
||||||
self.convert_btn = QPushButton("▶️ Start Extracting Icons")
|
|
||||||
self.convert_btn.setMinimumHeight(50)
|
|
||||||
self.convert_btn.setStyleSheet("""
|
|
||||||
QPushButton {
|
|
||||||
background-color: #1565c0;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 14px;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 10px;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
QPushButton:hover { background-color: #1976d2; }
|
|
||||||
QPushButton:disabled { background-color: #424242; color: #888; }
|
|
||||||
""")
|
|
||||||
self.convert_btn.clicked.connect(self._start_conversion)
|
|
||||||
left_layout.addWidget(self.convert_btn)
|
|
||||||
|
|
||||||
# Progress
|
|
||||||
self.progress_bar = QProgressBar()
|
|
||||||
self.progress_bar.setTextVisible(True)
|
|
||||||
self.progress_bar.setStyleSheet("font-size: 11px;")
|
|
||||||
self.progress_bar.setVisible(False)
|
|
||||||
left_layout.addWidget(self.progress_bar)
|
|
||||||
|
|
||||||
self.status_label = QLabel("✅ Ready")
|
|
||||||
self.status_label.setStyleSheet("color: #888; font-size: 12px; padding: 5px;")
|
|
||||||
self.status_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
||||||
left_layout.addWidget(self.status_label)
|
|
||||||
|
|
||||||
left_layout.addStretch()
|
|
||||||
|
|
||||||
splitter.addWidget(left_panel)
|
|
||||||
|
|
||||||
# Right panel - File list
|
|
||||||
right_panel = QWidget()
|
|
||||||
right_layout = QVBoxLayout(right_panel)
|
|
||||||
right_layout.setContentsMargins(0, 0, 0, 0)
|
|
||||||
|
|
||||||
|
# Available Icons (full width below)
|
||||||
files_group = QGroupBox("📄 Available Icons")
|
files_group = QGroupBox("📄 Available Icons")
|
||||||
files_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; }")
|
files_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; }")
|
||||||
files_layout = QVBoxLayout(files_group)
|
files_layout = QVBoxLayout(files_group)
|
||||||
files_layout.setContentsMargins(10, 15, 10, 10)
|
files_layout.setContentsMargins(12, 18, 12, 12)
|
||||||
files_layout.setSpacing(8)
|
files_layout.setSpacing(10)
|
||||||
|
|
||||||
files_info = QLabel("💡 Double-click an icon to preview. Select icons to extract (or leave blank for all).")
|
files_info = QLabel("💡 Double-click an icon to preview. Select icons to extract (or leave blank for all).")
|
||||||
files_info.setStyleSheet("color: #aaaaaa; font-size: 12px;")
|
files_info.setStyleSheet("color: #aaaaaa; font-size: 12px;")
|
||||||
|
|
@ -538,37 +464,66 @@ class IconExtractorWindow(QMainWindow):
|
||||||
self.files_list.doubleClicked.connect(self._on_file_double_clicked)
|
self.files_list.doubleClicked.connect(self._on_file_double_clicked)
|
||||||
files_layout.addWidget(self.files_list, 1)
|
files_layout.addWidget(self.files_list, 1)
|
||||||
|
|
||||||
# Selection buttons
|
layout.addWidget(files_group, 1)
|
||||||
sel_layout = QHBoxLayout()
|
|
||||||
sel_layout.setSpacing(8)
|
|
||||||
|
|
||||||
|
# Bottom buttons row
|
||||||
|
bottom_layout = QHBoxLayout()
|
||||||
|
bottom_layout.setSpacing(15)
|
||||||
|
|
||||||
|
# Select buttons
|
||||||
select_all_btn = QPushButton("☑️ Select All")
|
select_all_btn = QPushButton("☑️ Select All")
|
||||||
select_all_btn.setMaximumWidth(100)
|
select_all_btn.setMaximumWidth(100)
|
||||||
select_all_btn.setStyleSheet("font-size: 11px; padding: 4px;")
|
select_all_btn.setStyleSheet("font-size: 11px; padding: 5px;")
|
||||||
select_all_btn.clicked.connect(self.files_list.selectAll)
|
select_all_btn.clicked.connect(self.files_list.selectAll)
|
||||||
sel_layout.addWidget(select_all_btn)
|
bottom_layout.addWidget(select_all_btn)
|
||||||
|
|
||||||
select_none_btn = QPushButton("⬜ Select None")
|
select_none_btn = QPushButton("⬜ Select None")
|
||||||
select_none_btn.setMaximumWidth(100)
|
select_none_btn.setMaximumWidth(100)
|
||||||
select_none_btn.setStyleSheet("font-size: 11px; padding: 4px;")
|
select_none_btn.setStyleSheet("font-size: 11px; padding: 5px;")
|
||||||
select_none_btn.clicked.connect(self.files_list.clearSelection)
|
select_none_btn.clicked.connect(self.files_list.clearSelection)
|
||||||
sel_layout.addWidget(select_none_btn)
|
bottom_layout.addWidget(select_none_btn)
|
||||||
|
|
||||||
sel_layout.addStretch()
|
bottom_layout.addStretch()
|
||||||
|
|
||||||
|
# Open Output Folder button
|
||||||
open_folder_btn = QPushButton("📂 Open Output Folder")
|
open_folder_btn = QPushButton("📂 Open Output Folder")
|
||||||
open_folder_btn.setMaximumWidth(140)
|
open_folder_btn.setMaximumWidth(150)
|
||||||
open_folder_btn.setStyleSheet("font-size: 11px; padding: 4px;")
|
open_folder_btn.setStyleSheet("font-size: 11px; padding: 5px;")
|
||||||
open_folder_btn.clicked.connect(self._open_output_folder)
|
open_folder_btn.clicked.connect(self._open_output_folder)
|
||||||
sel_layout.addWidget(open_folder_btn)
|
bottom_layout.addWidget(open_folder_btn)
|
||||||
|
|
||||||
files_layout.addLayout(sel_layout)
|
# Main action button
|
||||||
right_layout.addWidget(files_group)
|
self.convert_btn = QPushButton("▶️ Start Extracting Icons")
|
||||||
|
self.convert_btn.setMinimumHeight(55)
|
||||||
|
self.convert_btn.setMinimumWidth(200)
|
||||||
|
self.convert_btn.setStyleSheet("""
|
||||||
|
QPushButton {
|
||||||
|
background-color: #1565c0;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 12px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
QPushButton:hover { background-color: #1976d2; }
|
||||||
|
QPushButton:disabled { background-color: #424242; color: #888; }
|
||||||
|
""")
|
||||||
|
self.convert_btn.clicked.connect(self._start_conversion)
|
||||||
|
bottom_layout.addWidget(self.convert_btn)
|
||||||
|
|
||||||
splitter.addWidget(right_panel)
|
layout.addLayout(bottom_layout)
|
||||||
splitter.setSizes([420, 400])
|
|
||||||
|
|
||||||
layout.addWidget(splitter, 1)
|
# Progress
|
||||||
|
self.progress_bar = QProgressBar()
|
||||||
|
self.progress_bar.setTextVisible(True)
|
||||||
|
self.progress_bar.setStyleSheet("font-size: 11px;")
|
||||||
|
self.progress_bar.setVisible(False)
|
||||||
|
layout.addWidget(self.progress_bar)
|
||||||
|
|
||||||
|
self.status_label = QLabel("✅ Ready")
|
||||||
|
self.status_label.setStyleSheet("color: #888; font-size: 12px; padding: 5px;")
|
||||||
|
self.status_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||||
|
layout.addWidget(self.status_label)
|
||||||
|
|
||||||
# Important Information (moved to bottom)
|
# Important Information (moved to bottom)
|
||||||
notice_group = QGroupBox("⚠️ Important Information")
|
notice_group = QGroupBox("⚠️ Important Information")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue