Updated Payment Page
This commit is contained in:
parent
79af4b3884
commit
8253567a34
1 changed files with 39 additions and 20 deletions
|
@ -5580,12 +5580,27 @@ class DurationSelectionPage(Page):
|
||||||
self.button_reverse.clicked.connect(self.reverse)
|
self.button_reverse.clicked.connect(self.reverse)
|
||||||
|
|
||||||
self.combo_box = QComboBox(self)
|
self.combo_box = QComboBox(self)
|
||||||
self.combo_box.setGeometry(300, 200, 200, 40)
|
self.combo_box.setGeometry(200, 200, 400, 60)
|
||||||
self.combo_box.addItems(["1 month ($1)", "3 months ($3)", "6 months ($5)", "12 months ($10)"])
|
self.combo_box.addItems(["1 month ($1)", "3 months ($3)", "6 months ($5)", "12 months ($10)"])
|
||||||
self.combo_box.setEditable(True)
|
self.combo_box.setEditable(True)
|
||||||
self.combo_box.setMaxVisibleItems(4)
|
self.combo_box.setMaxVisibleItems(4)
|
||||||
self.combo_box.setDuplicatesEnabled(True)
|
self.combo_box.setDuplicatesEnabled(True)
|
||||||
self.combo_box.setPlaceholderText("Select options")
|
self.combo_box.setPlaceholderText("Select options")
|
||||||
|
self.combo_box.setStyleSheet("""
|
||||||
|
QComboBox {
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 10px;
|
||||||
|
border: 2px solid #ccc;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
QComboBox::drop-down {
|
||||||
|
width: 30px;
|
||||||
|
}
|
||||||
|
QComboBox::down-arrow {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
}
|
||||||
|
""")
|
||||||
|
|
||||||
self.next_button = QPushButton("Next", self)
|
self.next_button = QPushButton("Next", self)
|
||||||
self.next_button.setGeometry(350, 300, 100, 40)
|
self.next_button.setGeometry(350, 300, 100, 40)
|
||||||
|
@ -5678,7 +5693,7 @@ class PaymentDetailsPage(Page):
|
||||||
self.button_reverse.clicked.connect(self.reverse)
|
self.button_reverse.clicked.connect(self.reverse)
|
||||||
|
|
||||||
self.qr_code_button = QPushButton(self)
|
self.qr_code_button = QPushButton(self)
|
||||||
self.qr_code_button.setGeometry(490, 375, 50, 50)
|
self.qr_code_button.setGeometry(380, 435, 50, 50)
|
||||||
qr_icon = QIcon(os.path.join(self.btn_path, "qr-code.png"))
|
qr_icon = QIcon(os.path.join(self.btn_path, "qr-code.png"))
|
||||||
self.qr_code_button.setIcon(qr_icon)
|
self.qr_code_button.setIcon(qr_icon)
|
||||||
self.qr_code_button.setIconSize(self.qr_code_button.size())
|
self.qr_code_button.setIconSize(self.qr_code_button.size())
|
||||||
|
@ -5687,22 +5702,27 @@ class PaymentDetailsPage(Page):
|
||||||
self.qr_code_button.setDisabled(True)
|
self.qr_code_button.setDisabled(True)
|
||||||
|
|
||||||
labels_info = [
|
labels_info = [
|
||||||
("Your new billing ID", None, (20, 80), (240, 50)),
|
("Your new billing ID", None, (20, 40), (240, 50)),
|
||||||
("", "cuadro400x50", (20, 130), (400, 50)),
|
("", "cuadro400x50", (20, 90), (400, 50)),
|
||||||
("Duration", None, (20, 195), (150, 50)),
|
("Duration", None, (20, 155), (150, 50)),
|
||||||
("", "cuadro150x50", (200, 195), (150, 50)),
|
("", "cuadro150x50", (200, 155), (150, 50)),
|
||||||
("Pay", None, (20, 260), (120, 50)),
|
("Amount", None, (10, 220), (150, 50)),
|
||||||
("", "cuadro150x50", (200, 260), (150, 50)),
|
("", "cuadro150x50", (200, 220), (150, 50)),
|
||||||
("To address", None, (20, 325), (150, 50)),
|
("Hit this icon to copy paste the address:", None, (15, 305), (500, 30)),
|
||||||
("", "cuadro400x50", (20, 375), (400, 50)),
|
("", "cuadro400x50", (20, 375), (400, 50)),
|
||||||
("", "cuadro400x50", (20, 450), (400, 50))
|
("Hit this icon to Scan the QR code:", None, (15, 450), (360, 30)),
|
||||||
]
|
]
|
||||||
|
|
||||||
for text, image_name, position, size in labels_info:
|
for text, image_name, position, size in labels_info:
|
||||||
label = QLabel(self)
|
label = QLabel(self)
|
||||||
label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
|
||||||
label.setGeometry(position[0], position[1], size[0], size[1])
|
label.setGeometry(position[0], position[1], size[0], size[1])
|
||||||
|
|
||||||
|
if "Hit" in text:
|
||||||
|
label.setStyleSheet("font-size: 17px;")
|
||||||
|
label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft | QtCore.Qt.AlignmentFlag.AlignVCenter)
|
||||||
|
else:
|
||||||
|
label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
||||||
|
|
||||||
if image_name:
|
if image_name:
|
||||||
pixmap = QPixmap(os.path.join(self.btn_path, f"{image_name}.png"))
|
pixmap = QPixmap(os.path.join(self.btn_path, f"{image_name}.png"))
|
||||||
label.setPixmap(pixmap)
|
label.setPixmap(pixmap)
|
||||||
|
@ -5710,12 +5730,13 @@ class PaymentDetailsPage(Page):
|
||||||
else:
|
else:
|
||||||
label.setText(text)
|
label.setText(text)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
line_edit_info = [
|
line_edit_info = [
|
||||||
(20, 130, 400, 50),
|
(20, 90, 400, 50),
|
||||||
(200, 195, 150, 50),
|
(200, 155, 150, 50),
|
||||||
(200, 260, 150, 50),
|
(200, 220, 150, 50),
|
||||||
(20, 375, 400, 50),
|
(20, 375, 400, 50),
|
||||||
(20, 450, 400, 50)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
for x, y, width, height in line_edit_info:
|
for x, y, width, height in line_edit_info:
|
||||||
|
@ -5726,9 +5747,9 @@ class PaymentDetailsPage(Page):
|
||||||
line_edit.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
line_edit.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
||||||
|
|
||||||
copy_button_info = [
|
copy_button_info = [
|
||||||
(430, 130, 0),
|
(430, 90, 0),
|
||||||
(360, 260, 2),
|
(360, 220, 2),
|
||||||
(430, 375, 3)
|
(450, 290, 3),
|
||||||
]
|
]
|
||||||
|
|
||||||
for x, y, field_index in copy_button_info:
|
for x, y, field_index in copy_button_info:
|
||||||
|
@ -5807,8 +5828,6 @@ class PaymentDetailsPage(Page):
|
||||||
|
|
||||||
def invoice_update_text_output(self, text):
|
def invoice_update_text_output(self, text):
|
||||||
self.update_status.update_status(text)
|
self.update_status.update_status(text)
|
||||||
self.text_fields[4].setText(text)
|
|
||||||
self.text_fields[4].setStyleSheet('font-size: 15px;')
|
|
||||||
|
|
||||||
if 'No compatible' in text:
|
if 'No compatible' in text:
|
||||||
for line in self.text_fields:
|
for line in self.text_fields:
|
||||||
|
|
Loading…
Reference in a new issue