diff --git a/standalone_icon_extractor.py b/standalone_icon_extractor.py index 871c3f9..4f0944e 100644 --- a/standalone_icon_extractor.py +++ b/standalone_icon_extractor.py @@ -224,7 +224,8 @@ class IconExtractorWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle(APP_NAME) - self.setMinimumSize(950, 750) + self.setMinimumSize(1000, 800) + self.resize(1100, 850) self.converter = TGAConverter() self.worker: Optional[ConversionWorker] = None @@ -254,8 +255,8 @@ class IconExtractorWindow(QMainWindow): # Description desc = QLabel( - "Extract item icons from Entropia Universe game cache and convert them to PNG format.\n" - "These icons can be submitted to EntropiaNexus.com to help complete the item database." + "Extract item icons from Entropia Universe cache and convert them to PNG. " + "Submit these to EntropiaNexus.com to help complete the item database." ) desc.setStyleSheet("color: #aaaaaa; padding: 5px;") desc.setWordWrap(True) @@ -264,10 +265,10 @@ class IconExtractorWindow(QMainWindow): # Important notice notice_group = QGroupBox("Important Information") notice_layout = QVBoxLayout(notice_group) + notice_layout.setContentsMargins(10, 15, 10, 10) notice_text = QTextEdit() notice_text.setReadOnly(True) - notice_text.setMaximumHeight(120) notice_text.setStyleSheet(""" QTextEdit { background-color: #2a2520; @@ -275,13 +276,13 @@ class IconExtractorWindow(QMainWindow): border: 1px solid #5d4037; border-radius: 3px; font-size: 12px; + padding: 5px; } """) notice_text.setText( "REQUIREMENT: Items must be seen/rendered in-game before they appear in the cache!\n" - "If an item icon is missing, you need to view the item in your inventory or see it dropped as loot first.\n\n" - f"Output Location: Icons are saved to your Documents folder ({self.converter.output_dir})\n" - "in the same location where Entropia Universe normally stores your chat.log file." + "If an item icon is missing, view it in your inventory or see it dropped as loot first.\n\n" + f"Output: Documents/Entropia Universe/Icons/ (same folder as chat.log)" ) notice_layout.addWidget(notice_text) layout.addWidget(notice_group) @@ -297,28 +298,34 @@ class IconExtractorWindow(QMainWindow): # Cache folder cache_group = QGroupBox("Cache Source") cache_layout = QVBoxLayout(cache_group) + cache_layout.setContentsMargins(10, 15, 10, 10) + cache_layout.setSpacing(8) - # Base path (hardcoded) - base_label = QLabel("Game Cache Location:") - cache_layout.addWidget(base_label) - - self.cache_label = QLabel(str(self.base_cache_path)) - self.cache_label.setStyleSheet("font-family: Consolas; font-size: 11px; color: #888; padding: 5px; background: #1a1a1a; border-radius: 3px;") + # Base path (hardcoded) - use a shorter display + path_display = str(self.base_cache_path).replace("/", "\\") + self.cache_label = QLabel(path_display) + self.cache_label.setStyleSheet( + "font-family: Consolas; font-size: 10px; color: #888; " + "padding: 8px; background: #1a1a1a; border-radius: 3px;" + ) + self.cache_label.setWordWrap(True) + self.cache_label.setMinimumHeight(40) cache_layout.addWidget(self.cache_label) # Subfolder selector subfolder_layout = QHBoxLayout() - subfolder_layout.addWidget(QLabel("Version Folder:")) + subfolder_layout.setSpacing(8) + subfolder_layout.addWidget(QLabel("Version:")) self.subfolder_combo = QComboBox() - self.subfolder_combo.setMinimumWidth(200) + self.subfolder_combo.setMinimumWidth(180) self.subfolder_combo.currentIndexChanged.connect(self._on_subfolder_changed) - subfolder_layout.addWidget(self.subfolder_combo) + subfolder_layout.addWidget(self.subfolder_combo, 1) refresh_btn = QPushButton("Refresh") + refresh_btn.setMaximumWidth(70) refresh_btn.clicked.connect(self._detect_subfolders) subfolder_layout.addWidget(refresh_btn) - subfolder_layout.addStretch() cache_layout.addLayout(subfolder_layout) # All subfolders checkbox @@ -332,17 +339,21 @@ class IconExtractorWindow(QMainWindow): # Output folder output_group = QGroupBox("Output Location") output_layout = QVBoxLayout(output_group) + output_layout.setContentsMargins(10, 15, 10, 10) + output_layout.setSpacing(8) - output_info = QLabel( - "Icons will be saved to your Documents folder:\n" - "(Same location as chat.log)" - ) + output_info = QLabel("Icons saved to your Documents folder (same as chat.log)") output_info.setStyleSheet("color: #888; font-size: 11px;") + output_info.setWordWrap(True) output_layout.addWidget(output_info) - self.output_label = QLabel(str(self.converter.output_dir)) - self.output_label.setStyleSheet("font-family: Consolas; font-size: 11px; color: #888; padding: 5px; background: #1a1a1a; border-radius: 3px;") - self.output_label.setWordWrap(True) + # Show relative path instead of full path + rel_path = "Documents/Entropia Universe/Icons/" + self.output_label = QLabel(rel_path) + self.output_label.setStyleSheet( + "font-family: Consolas; font-size: 10px; color: #888; " + "padding: 8px; background: #1a1a1a; border-radius: 3px;" + ) output_layout.addWidget(self.output_label) change_btn = QPushButton("Change Output Folder...") @@ -354,11 +365,12 @@ class IconExtractorWindow(QMainWindow): # Settings (simplified - just 320x320) settings_group = QGroupBox("Export Settings") settings_layout = QVBoxLayout(settings_group) + settings_layout.setContentsMargins(10, 15, 10, 10) settings_info = QLabel( - "Export Format: PNG with transparent background\n" - "Canvas Size: 320x320 pixels (centered)\n" - "Upscaling: None (original icon size)" + "Format: PNG with transparency\n" + "Canvas: 320x320 pixels (centered)\n" + "Size: Original icon size (no upscaling)" ) settings_info.setStyleSheet("color: #888; font-size: 11px;") settings_layout.addWidget(settings_info) @@ -368,15 +380,15 @@ class IconExtractorWindow(QMainWindow): # Nexus link nexus_group = QGroupBox("EntropiaNexus.com") nexus_layout = QVBoxLayout(nexus_group) + nexus_layout.setContentsMargins(10, 15, 10, 10) - nexus_info = QLabel( - "Submit extracted icons to help complete the\n" - "Entropia Universe item database and wiki!" - ) - nexus_info.setStyleSheet("color: #4caf50;") + nexus_info = QLabel("Submit icons to help complete the item database!") + nexus_info.setStyleSheet("color: #4caf50; font-size: 11px;") + nexus_info.setWordWrap(True) nexus_layout.addWidget(nexus_info) nexus_btn = QPushButton("Open EntropiaNexus.com") + nexus_btn.setMaximumHeight(30) nexus_btn.clicked.connect(lambda: self._open_url(WEBSITE)) nexus_layout.addWidget(nexus_btn) @@ -384,13 +396,14 @@ class IconExtractorWindow(QMainWindow): # Convert button self.convert_btn = QPushButton("Start Extracting Icons") - self.convert_btn.setMinimumHeight(60) + self.convert_btn.setMinimumHeight(50) self.convert_btn.setStyleSheet(""" QPushButton { background-color: #0d47a1; font-weight: bold; - font-size: 16px; + font-size: 14px; border-radius: 5px; + padding: 10px; } QPushButton:hover { background-color: #1565c0; } QPushButton:disabled { background-color: #333; color: #666; } @@ -400,11 +413,13 @@ class IconExtractorWindow(QMainWindow): # Progress self.progress_bar = QProgressBar() + self.progress_bar.setTextVisible(True) self.progress_bar.setVisible(False) left_layout.addWidget(self.progress_bar) self.status_label = QLabel("Ready") self.status_label.setStyleSheet("color: #888; padding: 5px;") + self.status_label.setAlignment(Qt.AlignmentFlag.AlignCenter) left_layout.addWidget(self.status_label) left_layout.addStretch() @@ -418,32 +433,38 @@ class IconExtractorWindow(QMainWindow): files_group = QGroupBox("Available Icons") files_layout = QVBoxLayout(files_group) + files_layout.setContentsMargins(10, 15, 10, 10) - files_info = QLabel("Select icons to extract (or leave unselected to extract all)") + files_info = QLabel("Select icons to extract (or leave blank for all)") files_info.setStyleSheet("color: #888; font-size: 11px;") files_layout.addWidget(files_info) self.files_count_label = QLabel("No files found") + self.files_count_label.setStyleSheet("font-weight: bold; padding: 5px 0;") files_layout.addWidget(self.files_count_label) self.files_list = QListWidget() self.files_list.setSelectionMode(QListWidget.SelectionMode.ExtendedSelection) - files_layout.addWidget(self.files_list) + files_layout.addWidget(self.files_list, 1) # Selection buttons sel_layout = QHBoxLayout() + sel_layout.setSpacing(8) select_all_btn = QPushButton("Select All") + select_all_btn.setMaximumWidth(100) select_all_btn.clicked.connect(self.files_list.selectAll) sel_layout.addWidget(select_all_btn) select_none_btn = QPushButton("Select None") + select_none_btn.setMaximumWidth(100) select_none_btn.clicked.connect(self.files_list.clearSelection) sel_layout.addWidget(select_none_btn) sel_layout.addStretch() open_folder_btn = QPushButton("Open Output Folder") + open_folder_btn.setMaximumWidth(130) open_folder_btn.clicked.connect(self._open_output_folder) sel_layout.addWidget(open_folder_btn) @@ -451,19 +472,21 @@ class IconExtractorWindow(QMainWindow): right_layout.addWidget(files_group) splitter.addWidget(right_panel) - splitter.setSizes([380, 520]) + splitter.setSizes([350, 550]) layout.addWidget(splitter, 1) # Footer footer = QLabel( - f"Developed by {DEVELOPER} | Discord: {DISCORD} | {WEBSITE}\n" + f"Developed by {DEVELOPER} | Discord: {DISCORD}\n" + f"{WEBSITE}\n" "Entropia Nexus is a fan-made resource and is not affiliated with MindArk PE AB. " "Entropia Universe is a trademark of MindArk PE AB." ) - footer.setStyleSheet("color: #555; font-size: 10px; padding: 5px;") + footer.setStyleSheet("color: #555; font-size: 9px; padding: 8px;") footer.setAlignment(Qt.AlignmentFlag.AlignCenter) footer.setWordWrap(True) + footer.setMinimumHeight(60) layout.addWidget(footer) def _open_url(self, url: str):