-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui_ModrinthExtractor.py
More file actions
207 lines (179 loc) · 7.7 KB
/
Copy pathui_ModrinthExtractor.py
File metadata and controls
207 lines (179 loc) · 7.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'ModrinthExtractorIwdrYo.ui'
##
## Created by: Qt User Interface Compiler version 6.8.1
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QFrame, QGroupBox, QHBoxLayout,
QLabel, QLineEdit, QPushButton, QSizePolicy,
QVBoxLayout, QWidget)
from choose_extract_folder import ChooseExtractFolder
from drop_area import DropArea
class Ui_ModrinthExtractor(object):
def setupUi(self, ModrinthExtractor):
if not ModrinthExtractor.objectName():
ModrinthExtractor.setObjectName(u"ModrinthExtractor")
ModrinthExtractor.resize(503, 383)
sizePolicy = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(ModrinthExtractor.sizePolicy().hasHeightForWidth())
ModrinthExtractor.setSizePolicy(sizePolicy)
ModrinthExtractor.setAutoFillBackground(False)
ModrinthExtractor.setStyleSheet(u"QWidget {\n"
" background-color: #121212;\n"
" color: #e6e6e6;\n"
" font-size: 13px;\n"
" font-family: Inter, Segoe UI, Arial;\n"
"}")
self.verticalLayoutWidget = QWidget(ModrinthExtractor)
self.verticalLayoutWidget.setObjectName(u"verticalLayoutWidget")
self.verticalLayoutWidget.setGeometry(QRect(0, 0, 503, 384))
self.MainLayout = QVBoxLayout(self.verticalLayoutWidget)
self.MainLayout.setObjectName(u"MainLayout")
self.MainLayout.setContentsMargins(10, 10, 10, 10)
self.DropArea = DropArea(self.verticalLayoutWidget)
self.DropArea.setObjectName(u"DropArea")
self.DropArea.setMinimumSize(QSize(0, 200))
self.DropArea.setStyleSheet(u"QFrame#DropArea {\n"
" background-color: #1a1a1a;\n"
" border: 2px dashed #3a3a3a;\n"
" border-radius: 16px;\n"
"}\n"
"\n"
"QFrame#DropArea:hover {\n"
" border: 2px dashed #00d084;\n"
" background-color: #1f1f1f;\n"
"}")
self.DropArea.setFrameShape(QFrame.Shape.StyledPanel)
self.DropArea.setFrameShadow(QFrame.Shadow.Raised)
self.verticalLayout = QVBoxLayout(self.DropArea)
self.verticalLayout.setObjectName(u"verticalLayout")
self.MainLabel = QLabel(self.DropArea)
self.MainLabel.setObjectName(u"MainLabel")
self.MainLabel.setMaximumSize(QSize(16777215, 50))
self.MainLabel.setLayoutDirection(Qt.LayoutDirection.LeftToRight)
self.MainLabel.setAutoFillBackground(False)
self.MainLabel.setStyleSheet(u"QLabel {\n"
" background-color: #00000000;\n"
" color: #cfcfcf;\n"
"}")
self.MainLabel.setFrameShape(QFrame.Shape.NoFrame)
self.MainLabel.setTextFormat(Qt.TextFormat.MarkdownText)
self.MainLabel.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.verticalLayout.addWidget(self.MainLabel)
self.MainLayout.addWidget(self.DropArea)
self.ModpackInfo = QGroupBox(self.verticalLayoutWidget)
self.ModpackInfo.setObjectName(u"ModpackInfo")
self.ModpackInfo.setStyleSheet(u"QGroupBox#ModpackInfo {\n"
" border: 1px solid #2a2a2a;\n"
" border-radius: 12px;\n"
" margin-top: 10px;\n"
" padding: 10px;\n"
" background-color: #161616;\n"
"}\n"
"\n"
"QGroupBox#ModpackInfo::title {\n"
" color: #00d084;\n"
" subcontrol-origin: margin;\n"
" left: 10px;\n"
" padding: 0 4px;\n"
"}")
self.verticalLayout_2 = QVBoxLayout(self.ModpackInfo)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.Name = QLabel(self.ModpackInfo)
self.Name.setObjectName(u"Name")
self.Name.setStyleSheet(u"QLabel {\n"
" color: #cfcfcf;\n"
" background-color: #161616;\n"
"}\n"
"")
self.verticalLayout_2.addWidget(self.Name)
self.ModpackVersion = QLabel(self.ModpackInfo)
self.ModpackVersion.setObjectName(u"ModpackVersion")
self.ModpackVersion.setStyleSheet(u"QLabel {\n"
" color: #cfcfcf;\n"
" background-color: #161616;\n"
"}")
self.verticalLayout_2.addWidget(self.ModpackVersion)
self.MinecraftVersion = QLabel(self.ModpackInfo)
self.MinecraftVersion.setObjectName(u"MinecraftVersion")
self.MinecraftVersion.setStyleSheet(u"QLabel {\n"
" color: #cfcfcf;\n"
" background-color: #161616;\n"
"}")
self.verticalLayout_2.addWidget(self.MinecraftVersion)
self.MainLayout.addWidget(self.ModpackInfo)
self.ExtractMenu = QHBoxLayout()
self.ExtractMenu.setObjectName(u"ExtractMenu")
self.Path = QLineEdit(self.verticalLayoutWidget)
self.Path.setObjectName(u"Path")
self.Path.setStyleSheet(u"QLineEdit#Path {\n"
" background-color: #1e1e1e;\n"
" border: 1px solid #2f2f2f;\n"
" border-radius: 8px;\n"
" padding: 6px;\n"
" color: #ffffff;\n"
"}\n"
"\n"
"QLineEdit#Path:focus {\n"
" border: 1px solid #00d084;\n"
"}")
self.ExtractMenu.addWidget(self.Path)
self.ChooseExtractFolder = ChooseExtractFolder(self.verticalLayoutWidget)
self.ChooseExtractFolder.setObjectName(u"ChooseExtractFolder")
self.ChooseExtractFolder.setStyleSheet(u"QPushButton#ChooseExtractFolder {\n"
" background-color: #232323;\n"
" border: 1px solid #2f2f2f;\n"
" border-radius: 8px;\n"
" padding: 6px 10px;\n"
" color: #e6e6e6;\n"
"}\n"
"\n"
"QPushButton#ChooseExtractFolder:hover {\n"
" background-color: #2a2a2a;\n"
" border: 1px solid #00d084;\n"
"}")
self.ExtractMenu.addWidget(self.ChooseExtractFolder)
self.ExtractButton = QPushButton(self.verticalLayoutWidget)
self.ExtractButton.setObjectName(u"ExtractButton")
self.ExtractButton.setStyleSheet(u"QPushButton#ExtractButton {\n"
" background-color: #00d084;\n"
" color: #0b0b0b;\n"
" font-weight: bold;\n"
" border-radius: 10px;\n"
" padding: 10px;\n"
"}\n"
"\n"
"QPushButton#ExtractButton:hover {\n"
" background-color: #00b874;\n"
"}\n"
"\n"
"QPushButton#ExtractButton:disabled {\n"
" background-color: #2a2a2a;\n"
" color: #777;\n"
"}")
self.ExtractMenu.addWidget(self.ExtractButton)
self.MainLayout.addLayout(self.ExtractMenu)
self.retranslateUi(ModrinthExtractor)
QMetaObject.connectSlotsByName(ModrinthExtractor)
# setupUi
def retranslateUi(self, ModrinthExtractor):
ModrinthExtractor.setWindowTitle(QCoreApplication.translate("ModrinthExtractor", u"Modrinth Extractor", None))
self.MainLabel.setText(QCoreApplication.translate("ModrinthExtractor", u"# Choose or drop .mrpack file to extract", None))
self.ModpackInfo.setTitle(QCoreApplication.translate("ModrinthExtractor", u"Modpack info", None))
self.Name.setText(QCoreApplication.translate("ModrinthExtractor", u"Name", None))
self.ModpackVersion.setText(QCoreApplication.translate("ModrinthExtractor", u"Modpack version", None))
self.MinecraftVersion.setText(QCoreApplication.translate("ModrinthExtractor", u"Minecraft version", None))
self.ChooseExtractFolder.setText(QCoreApplication.translate("ModrinthExtractor", u"Choose", None))
self.ExtractButton.setText(QCoreApplication.translate("ModrinthExtractor", u"Extract", None))
# retranslateUi