mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-27 08:52:05 +08:00
UI: PrimeUserWidget cleanup (#28300)
* cleanup * setMargin is obsolete * more
This commit is contained in:
@@ -114,31 +114,30 @@ PairingPopup::PairingPopup(QWidget *parent) : QDialogBase(parent) {
|
||||
}
|
||||
|
||||
|
||||
PrimeUserWidget::PrimeUserWidget(QWidget* parent) : QWidget(parent) {
|
||||
mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setMargin(0);
|
||||
PrimeUserWidget::PrimeUserWidget(QWidget* parent) : QFrame(parent) {
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(0, 0, 0, 0);
|
||||
mainLayout->setSpacing(30);
|
||||
|
||||
// subscribed prime layout
|
||||
QWidget *primeWidget = new QWidget;
|
||||
primeWidget->setObjectName("primeWidget");
|
||||
QVBoxLayout *primeLayout = new QVBoxLayout(primeWidget);
|
||||
primeLayout->setMargin(0);
|
||||
primeWidget->setContentsMargins(60, 50, 60, 50);
|
||||
primeLayout->setContentsMargins(60, 50, 60, 50);
|
||||
|
||||
QLabel* subscribed = new QLabel(tr("✓ SUBSCRIBED"));
|
||||
QLabel *subscribed = new QLabel(tr("✓ SUBSCRIBED"));
|
||||
subscribed->setStyleSheet("font-size: 41px; font-weight: bold; color: #86FF4E;");
|
||||
primeLayout->addWidget(subscribed, 0, Qt::AlignTop);
|
||||
|
||||
primeLayout->addSpacing(60);
|
||||
|
||||
QLabel* commaPrime = new QLabel(tr("comma prime"));
|
||||
QLabel *commaPrime = new QLabel(tr("comma prime"));
|
||||
commaPrime->setStyleSheet("font-size: 75px; font-weight: bold;");
|
||||
primeLayout->addWidget(commaPrime, 0, Qt::AlignTop);
|
||||
|
||||
primeLayout->addSpacing(20);
|
||||
|
||||
QLabel* connectUrl = new QLabel(tr("CONNECT.COMMA.AI"));
|
||||
QLabel *connectUrl = new QLabel(tr("CONNECT.COMMA.AI"));
|
||||
connectUrl->setStyleSheet("font-size: 41px; font-family: Inter SemiBold; color: #A0A0A0;");
|
||||
primeLayout->addWidget(connectUrl, 0, Qt::AlignTop);
|
||||
|
||||
@@ -148,10 +147,9 @@ PrimeUserWidget::PrimeUserWidget(QWidget* parent) : QWidget(parent) {
|
||||
QWidget *pointsWidget = new QWidget;
|
||||
pointsWidget->setObjectName("primeWidget");
|
||||
QVBoxLayout *pointsLayout = new QVBoxLayout(pointsWidget);
|
||||
pointsLayout->setMargin(0);
|
||||
pointsWidget->setContentsMargins(60, 50, 60, 50);
|
||||
pointsLayout->setContentsMargins(60, 50, 60, 50);
|
||||
|
||||
QLabel* commaPoints = new QLabel(tr("COMMA POINTS"));
|
||||
QLabel *commaPoints = new QLabel(tr("COMMA POINTS"));
|
||||
commaPoints->setStyleSheet("font-size: 41px; font-family: Inter SemiBold;");
|
||||
pointsLayout->addWidget(commaPoints, 0, Qt::AlignTop);
|
||||
|
||||
@@ -183,7 +181,7 @@ void PrimeUserWidget::replyFinished(const QString &response) {
|
||||
}
|
||||
|
||||
PrimeAdWidget::PrimeAdWidget(QWidget* parent) : QFrame(parent) {
|
||||
QVBoxLayout* main_layout = new QVBoxLayout(this);
|
||||
QVBoxLayout *main_layout = new QVBoxLayout(this);
|
||||
main_layout->setContentsMargins(80, 90, 80, 60);
|
||||
main_layout->setSpacing(0);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ enum PrimeType {
|
||||
MAGENTA_NEW = 4,
|
||||
};
|
||||
|
||||
|
||||
// pairing QR code
|
||||
class PairingQRWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
@@ -34,6 +35,7 @@ private slots:
|
||||
void refresh();
|
||||
};
|
||||
|
||||
|
||||
// pairing popup widget
|
||||
class PairingPopup : public QDialogBase {
|
||||
Q_OBJECT
|
||||
@@ -42,15 +44,16 @@ public:
|
||||
explicit PairingPopup(QWidget* parent);
|
||||
};
|
||||
|
||||
|
||||
// widget for paired users with prime
|
||||
class PrimeUserWidget : public QWidget {
|
||||
class PrimeUserWidget : public QFrame {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PrimeUserWidget(QWidget* parent = 0);
|
||||
|
||||
private:
|
||||
QVBoxLayout* mainLayout;
|
||||
QLabel* points;
|
||||
QLabel *points;
|
||||
|
||||
private slots:
|
||||
void replyFinished(const QString &response);
|
||||
@@ -64,6 +67,7 @@ public:
|
||||
explicit PrimeAdWidget(QWidget* parent = 0);
|
||||
};
|
||||
|
||||
|
||||
// container widget
|
||||
class SetupWidget : public QFrame {
|
||||
Q_OBJECT
|
||||
|
||||
Reference in New Issue
Block a user