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
|
|
@ -368,21 +368,18 @@ class IconExtractorWindow(QMainWindow):
|
|||
|
||||
layout.addWidget(desc_widget)
|
||||
|
||||
# Main splitter
|
||||
splitter = QSplitter(Qt.Orientation.Horizontal)
|
||||
|
||||
# Left panel - Settings
|
||||
left_panel = QWidget()
|
||||
left_layout = QVBoxLayout(left_panel)
|
||||
left_layout.setContentsMargins(0, 0, 0, 0)
|
||||
left_layout.setSpacing(10)
|
||||
# Cache and Output side by side
|
||||
top_row = QWidget()
|
||||
top_row_layout = QHBoxLayout(top_row)
|
||||
top_row_layout.setContentsMargins(0, 0, 0, 0)
|
||||
top_row_layout.setSpacing(15)
|
||||
|
||||
# Cache folder
|
||||
cache_group = QGroupBox("📂 Cache Source")
|
||||
cache_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; }")
|
||||
cache_layout = QVBoxLayout(cache_group)
|
||||
cache_layout.setContentsMargins(10, 15, 10, 10)
|
||||
cache_layout.setSpacing(8)
|
||||
cache_layout.setContentsMargins(12, 18, 12, 12)
|
||||
cache_layout.setSpacing(10)
|
||||
|
||||
# Base path (hardcoded) - show just the end part
|
||||
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.setStyleSheet(
|
||||
"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)
|
||||
cache_layout.addWidget(self.cache_label)
|
||||
|
||||
# Subfolder selector in one row
|
||||
# Subfolder selector
|
||||
subfolder_layout = QHBoxLayout()
|
||||
subfolder_layout.setSpacing(8)
|
||||
|
||||
|
|
@ -416,25 +413,25 @@ class IconExtractorWindow(QMainWindow):
|
|||
subfolder_layout.addWidget(refresh_btn)
|
||||
|
||||
cache_layout.addLayout(subfolder_layout)
|
||||
|
||||
left_layout.addWidget(cache_group)
|
||||
top_row_layout.addWidget(cache_group, 1)
|
||||
|
||||
# Output folder
|
||||
output_group = QGroupBox("💾 Output Location")
|
||||
output_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; }")
|
||||
output_layout = QVBoxLayout(output_group)
|
||||
output_layout.setContentsMargins(10, 15, 10, 10)
|
||||
output_layout.setSpacing(8)
|
||||
output_layout.setContentsMargins(12, 18, 12, 12)
|
||||
output_layout.setSpacing(10)
|
||||
|
||||
output_info = QLabel("📁 Icons saved to your Documents folder (same location as chat.log)")
|
||||
output_info.setStyleSheet("color: #aaaaaa; font-size: 12px;")
|
||||
output_info.setWordWrap(True)
|
||||
output_layout.addWidget(output_info)
|
||||
|
||||
rel_path = "Documents\\Entropia Universe\\Icons\\"
|
||||
self.output_label = QLabel(f"📂 {rel_path}")
|
||||
self.output_label.setStyleSheet(
|
||||
"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)
|
||||
|
||||
|
|
@ -443,86 +440,15 @@ class IconExtractorWindow(QMainWindow):
|
|||
change_btn.clicked.connect(self._browse_output)
|
||||
output_layout.addWidget(change_btn)
|
||||
|
||||
left_layout.addWidget(output_group)
|
||||
|
||||
# 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)
|
||||
top_row_layout.addWidget(output_group, 1)
|
||||
layout.addWidget(top_row)
|
||||
|
||||
# Available Icons (full width below)
|
||||
files_group = QGroupBox("📄 Available Icons")
|
||||
files_group.setStyleSheet("QGroupBox { font-size: 13px; font-weight: bold; }")
|
||||
files_layout = QVBoxLayout(files_group)
|
||||
files_layout.setContentsMargins(10, 15, 10, 10)
|
||||
files_layout.setSpacing(8)
|
||||
files_layout.setContentsMargins(12, 18, 12, 12)
|
||||
files_layout.setSpacing(10)
|
||||
|
||||
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;")
|
||||
|
|
@ -538,37 +464,66 @@ class IconExtractorWindow(QMainWindow):
|
|||
self.files_list.doubleClicked.connect(self._on_file_double_clicked)
|
||||
files_layout.addWidget(self.files_list, 1)
|
||||
|
||||
# Selection buttons
|
||||
sel_layout = QHBoxLayout()
|
||||
sel_layout.setSpacing(8)
|
||||
layout.addWidget(files_group, 1)
|
||||
|
||||
# Bottom buttons row
|
||||
bottom_layout = QHBoxLayout()
|
||||
bottom_layout.setSpacing(15)
|
||||
|
||||
# Select buttons
|
||||
select_all_btn = QPushButton("☑️ Select All")
|
||||
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)
|
||||
sel_layout.addWidget(select_all_btn)
|
||||
bottom_layout.addWidget(select_all_btn)
|
||||
|
||||
select_none_btn = QPushButton("⬜ Select None")
|
||||
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)
|
||||
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.setMaximumWidth(140)
|
||||
open_folder_btn.setStyleSheet("font-size: 11px; padding: 4px;")
|
||||
open_folder_btn.setMaximumWidth(150)
|
||||
open_folder_btn.setStyleSheet("font-size: 11px; padding: 5px;")
|
||||
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)
|
||||
right_layout.addWidget(files_group)
|
||||
# Main action button
|
||||
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)
|
||||
splitter.setSizes([420, 400])
|
||||
layout.addLayout(bottom_layout)
|
||||
|
||||
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)
|
||||
notice_group = QGroupBox("⚠️ Important Information")
|
||||
|
|
|
|||
Loading…
Reference in New Issue