From fd2e57ffb328163a514ecd4e7e5735783742d234 Mon Sep 17 00:00:00 2001 From: Nix <75538775+nixietab@users.noreply.github.com> Date: Mon, 6 Jan 2025 06:38:11 -0300 Subject: [PATCH] Update picodulce.py --- picodulce.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/picodulce.py b/picodulce.py index affe7d8..c8d4efb 100644 --- a/picodulce.py +++ b/picodulce.py @@ -491,25 +491,25 @@ class PicomcVersionSelector(QWidget): def download_themes_window(self): dialog = QDialog(self) dialog.setWindowTitle("Themes Repository") - dialog.setGeometry(100, 100, 600, 500) # Adjust width for side-by-side layout + dialog.setGeometry(100, 100, 800, 600) - main_layout = QHBoxLayout(dialog) # Horizontal layout for splitting left and right + main_layout = QHBoxLayout(dialog) - # Left side: Theme list self.theme_list = QListWidget(dialog) self.theme_list.setSelectionMode(QListWidget.SingleSelection) self.theme_list.clicked.connect(self.on_theme_click) main_layout.addWidget(self.theme_list) - # Right side: Theme details, image, and download button right_layout = QVBoxLayout() self.details_label = QLabel(dialog) - self.details_label.setWordWrap(True) # Enable word wrap for better formatting + self.details_label.setWordWrap(True) + self.details_label.setStyleSheet("padding: 10px;") right_layout.addWidget(self.details_label) self.image_label = QLabel(dialog) self.image_label.setAlignment(Qt.AlignCenter) + self.image_label.setStyleSheet("padding: 10px;") right_layout.addWidget(self.image_label) download_button = QPushButton("Download Theme", dialog) @@ -597,13 +597,14 @@ class PicomcVersionSelector(QWidget): theme = self.find_theme_by_name(theme_name) if theme: self.details_label.setText( - f"Name: {theme['name']}\n" - f"Description: {theme['description']}\n" - f"Author: {theme['author']}\n" - f"License: {theme['license']}\n" - f"Link: {theme['link']}\n" - f"Preview URL: {theme.get('preview', 'N/A')}" + f"Name: {theme['name']}
" + f"Description: {theme['description']}
" + f"Author: {theme['author']}
" + f"License: {theme['license']}
" + f"Link: {theme['link']}
" ) + self.details_label.setTextFormat(Qt.RichText) + self.details_label.setOpenExternalLinks(True) preview = theme.get('preview') if preview: image_data = self.fetch_image(preview)