diff options
| author | Robert Honz <exislow+github@gmail.com> | 2024-02-03 09:56:02 +0100 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2024-02-03 09:56:02 +0100 |
| commit | c1442c894230b3855fa74b1a915624d0c17cab0f (patch) | |
| tree | 81ff7beb3ccb1b8ea5cf8864cc0ae1052b539e53 | |
| parent | a8a14e71ef5c1df9729af47b8bf2339c5fa167e2 (diff) | |
| download | tidal-dl-ng-c1442c894230b3855fa74b1a915624d0c17cab0f.tar.gz | |
✨ Login URL will get wrapped.
| -rw-r--r-- | tidal_dl_ng/dialog.py | 2 | ||||
| -rw-r--r-- | tidal_dl_ng/ui/dialog_login.py | 22 | ||||
| -rw-r--r-- | tidal_dl_ng/ui/dialog_login.ui | 32 |
3 files changed, 13 insertions, 43 deletions
diff --git a/tidal_dl_ng/dialog.py b/tidal_dl_ng/dialog.py index 788aeba..43d14b1 100644 --- a/tidal_dl_ng/dialog.py +++ b/tidal_dl_ng/dialog.py @@ -37,7 +37,7 @@ class DialogLogin(QDialog): # Run the .setupUi() method to show the GUI self.ui.setupUi(self) # Set data. - self.ui.l_url_login.setText(f'<a href="{url_login}">{url_login}</a>') + self.ui.tb_url_login.setText(f'<a href="{url_login}">{url_login}</a>') self.ui.l_hint.setText(hint) # Show self.return_code = self.exec() diff --git a/tidal_dl_ng/ui/dialog_login.py b/tidal_dl_ng/ui/dialog_login.py index ffb8e76..bbc916f 100644 --- a/tidal_dl_ng/ui/dialog_login.py +++ b/tidal_dl_ng/ui/dialog_login.py @@ -6,9 +6,9 @@ ## WARNING! All changes made in this file will be lost when recompiling UI file! ################################################################################ -from PySide6.QtCore import QCoreApplication, QMetaObject, QRect, QSize, Qt +from PySide6.QtCore import QCoreApplication, QMetaObject, QRect, Qt from PySide6.QtGui import QFont -from PySide6.QtWidgets import QDialogButtonBox, QLabel, QSizePolicy, QTextEdit, QVBoxLayout, QWidget +from PySide6.QtWidgets import QDialogButtonBox, QLabel, QSizePolicy, QTextBrowser, QTextEdit, QVBoxLayout, QWidget class Ui_DialogLogin: @@ -31,7 +31,7 @@ class Ui_DialogLogin: self.bb_dialog.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.Ok) self.verticalLayoutWidget = QWidget(DialogLogin) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") - self.verticalLayoutWidget.setGeometry(QRect(20, 20, 411, 321)) + self.verticalLayoutWidget.setGeometry(QRect(20, 20, 411, 325)) self.lv_main = QVBoxLayout(self.verticalLayoutWidget) self.lv_main.setObjectName("lv_main") self.lv_main.setContentsMargins(0, 0, 0, 0) @@ -57,17 +57,11 @@ class Ui_DialogLogin: self.lv_main.addWidget(self.l_description) - self.l_url_login = QLabel(self.verticalLayoutWidget) - self.l_url_login.setObjectName("l_url_login") - sizePolicy.setHeightForWidth(self.l_url_login.sizePolicy().hasHeightForWidth()) - self.l_url_login.setSizePolicy(sizePolicy) - self.l_url_login.setMinimumSize(QSize(0, 50)) - self.l_url_login.setBaseSize(QSize(0, 0)) - self.l_url_login.setStyleSheet("border: 2px solid red; padding: 6px") - self.l_url_login.setWordWrap(True) - self.l_url_login.setOpenExternalLinks(True) + self.tb_url_login = QTextBrowser(self.verticalLayoutWidget) + self.tb_url_login.setObjectName("tb_url_login") + self.tb_url_login.setOpenExternalLinks(True) - self.lv_main.addWidget(self.l_url_login) + self.lv_main.addWidget(self.tb_url_login) self.te_url_redirect = QTextEdit(self.verticalLayoutWidget) self.te_url_redirect.setObjectName("te_url_redirect") @@ -101,7 +95,7 @@ class Ui_DialogLogin: None, ) ) - self.l_url_login.setText(QCoreApplication.translate("DialogLogin", "PLACEHOLDER URL...", None)) + self.tb_url_login.setPlaceholderText(QCoreApplication.translate("DialogLogin", "Copy this login URL...", None)) self.te_url_redirect.setPlaceholderText( QCoreApplication.translate("DialogLogin", "Copy and paste the redirect URL after login here...", None) ) diff --git a/tidal_dl_ng/ui/dialog_login.ui b/tidal_dl_ng/ui/dialog_login.ui index ae0a25a..c9c9774 100644 --- a/tidal_dl_ng/ui/dialog_login.ui +++ b/tidal_dl_ng/ui/dialog_login.ui @@ -50,7 +50,7 @@ <x>20</x> <y>20</y> <width>411</width> - <height>321</height> + <height>325</height> </rect> </property> <layout class="QVBoxLayout" name="lv_main"> @@ -95,33 +95,9 @@ </widget> </item> <item> - <widget class="QLabel" name="l_url_login"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="baseSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true">border: 2px solid red; padding: 6px</string> - </property> - <property name="text"> - <string>PLACEHOLDER URL...</string> - </property> - <property name="wordWrap"> - <bool>true</bool> + <widget class="QTextBrowser" name="tb_url_login"> + <property name="placeholderText"> + <string>Copy this login URL...</string> </property> <property name="openExternalLinks"> <bool>true</bool> |
