| 30 | UserRegisterDialog::~UserRegisterDialog() = default; |
| 31 | |
| 32 | void UserRegisterDialog::CreateLayout() { |
| 33 | setWindowTitle(tcTr("id_register")); |
| 34 | |
| 35 | auto item_width = 320; |
| 36 | auto edit_size = QSize(item_width, 35); |
| 37 | |
| 38 | auto root_layout = new NoMarginHLayout(); |
| 39 | auto content_layout = new NoMarginVLayout(); |
| 40 | root_layout->addStretch(); |
| 41 | root_layout->addLayout(content_layout); |
| 42 | root_layout->addStretch(); |
| 43 | root_layout_->addLayout(root_layout); |
| 44 | |
| 45 | content_layout->addSpacing(25); |
| 46 | |
| 47 | // 1. username |
| 48 | { |
| 49 | auto layout = new NoMarginVLayout(); |
| 50 | auto label = new TcLabel(this); |
| 51 | label->setFixedWidth(item_width); |
| 52 | label->setStyleSheet(R"(color: #333333; font-weight: 700; font-size:13px;)"); |
| 53 | label->SetTextId("id_username"); |
| 54 | label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); |
| 55 | layout->addWidget(label); |
| 56 | layout->addSpacing(10); |
| 57 | |
| 58 | auto edit = new QLineEdit(this); |
| 59 | edt_username_ = edit; |
| 60 | edt_username_->setText(""); |
| 61 | |
| 62 | edit->setFixedSize(edit_size); |
| 63 | layout->addWidget(edit); |
| 64 | layout->addStretch(); |
| 65 | content_layout->addLayout(layout); |
| 66 | } |
| 67 | |
| 68 | content_layout->addSpacing(25); |
| 69 | |
| 70 | // 2. password |
| 71 | { |
| 72 | auto layout = new NoMarginVLayout(); |
| 73 | auto label = new TcLabel(this); |
| 74 | label->setFixedWidth(item_width); |
| 75 | label->setStyleSheet(R"(color: #333333; font-weight: 700; font-size:13px;)"); |
| 76 | label->SetTextId("id_password"); |
| 77 | label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); |
| 78 | layout->addWidget(label); |
| 79 | layout->addSpacing(10); |
| 80 | |
| 81 | auto edit = new TcPasswordInput(this); |
| 82 | password_input_ = edit; |
| 83 | password_input_->SetPassword(""); |
| 84 | |
| 85 | edit->setFixedSize(edit_size); |
| 86 | layout->addWidget(edit); |
| 87 | layout->addStretch(); |
| 88 | content_layout->addLayout(layout); |
| 89 | } |
nothing calls this directly
no test coverage detected