Refactor css file.2

This commit is contained in:
Krad
2022-07-14 14:41:54 +08:00
parent 055cb7c7ae
commit 2eda2717e5
6 changed files with 13 additions and 24 deletions

View File

@@ -21,10 +21,10 @@ AdminSettingForm::AdminSettingForm(QWidget* aParent, Qt::WindowFlags f)
: TabFormWidget(aParent)
{
QHBoxLayout* layout = new QHBoxLayout(ui->contentWidget);
layout->setMargin(0);
layout->setContentsMargins(0, 8, 0, 1);
// layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
ui->contentWidget->setObjectName("settingContentWidget");
QListWidget* widget = new QListWidget(this);
QListWidget* widget = new QListWidget(ui->contentWidget);
widget->setFixedWidth(250);
QStringList menus;
menus << tr("General") << tr("Account") << tr("System") << tr("About");
@@ -35,26 +35,24 @@ AdminSettingForm::AdminSettingForm(QWidget* aParent, Qt::WindowFlags f)
widget->item(i)->setTextAlignment(Qt::AlignCenter);
}
layout->addWidget(widget);
QStackedWidget* stackedWidget = new QStackedWidget(this);
QStackedWidget* stackedWidget = new QStackedWidget(ui->contentWidget);
QWidget* spacerLine = new QWidget(this);
spacerLine->setFixedWidth(2);
spacerLine->setObjectName("verSpaceLine");
spacerLine->setStyleSheet("margin-bottom:8px");
layout->addWidget(spacerLine);
layout->addWidget(stackedWidget);
ui->commandWidget->hide();
GeneralForm* generalForm = new GeneralForm(this);
GeneralForm* generalForm = new GeneralForm(ui->commandWidget);
stackedWidget->addWidget(generalForm);
AccountTableForm* acc = new AccountTableForm(this);
AccountTableForm* acc = new AccountTableForm(ui->commandWidget);
stackedWidget->addWidget(acc);
SystemSettingForm* systemSetting = new SystemSettingForm(this);
SystemSettingForm* systemSetting = new SystemSettingForm(ui->commandWidget);
stackedWidget->addWidget(systemSetting);
AboutWidget* about = new AboutWidget(this);
AboutWidget* about = new AboutWidget(ui->commandWidget);
stackedWidget->addWidget(about);
widget->setCurrentRow(0);