UI: PrimeUserWidget cleanup (#28300)

* cleanup

* setMargin is obsolete

* more
old-commit-hash: 13cf695738
beeps
Cameron Clough 2 years ago committed by GitHub
parent c2e86afc8c
commit 7db6687227
  1. 12
      selfdrive/ui/qt/widgets/prime.cc
  2. 8
      selfdrive/ui/qt/widgets/prime.h

@ -114,17 +114,16 @@ 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"));
subscribed->setStyleSheet("font-size: 41px; font-weight: bold; color: #86FF4E;");
@ -148,8 +147,7 @@ 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"));
commaPoints->setStyleSheet("font-size: 41px; font-family: Inter SemiBold;");

@ -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,14 +44,15 @@ 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;
private slots:
@ -64,6 +67,7 @@ public:
explicit PrimeAdWidget(QWidget* parent = 0);
};
// container widget
class SetupWidget : public QFrame {
Q_OBJECT

Loading…
Cancel
Save