fix: improve UI scaling and layout

- Increased minimum window size (1000x800)
- Removed maximumHeight from notice text box (auto-sizes)
- Better spacing and margins in group boxes
- Shorter, wrapped text for paths and labels
- Fixed footer to have proper height and multi-line layout
- Better button sizing and constraints
- Files list now expands to fill available space
This commit is contained in:
LemonNexus 2026-02-11 18:17:09 +00:00
parent a30515bf1e
commit 6bf90e5230
1 changed files with 62 additions and 39 deletions

View File

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