feat(UI模块): 添加深色样式

This commit is contained in:
huheng@kylinos.cn 2022-10-11 17:20:36 +08:00
parent 1bb94753e8
commit 7d3b59cd54
4 changed files with 5 additions and 7 deletions

View File

@ -160,7 +160,7 @@ void SearchDeviceWin::setTheme(PublicAttributes::Theme theme)
m_listWidget->setStyleSheet("background: #F6F6F6;");
} break;
case PublicAttributes::Theme::Dark: {
m_listWidget->setStyleSheet("background: #F6F6F6;");
m_listWidget->setStyleSheet("background: #232426;");
} break;
}
}

View File

@ -209,7 +209,7 @@ void UsbConnectWin::setTheme(PublicAttributes::Theme theme)
m_nextImageBtn->setIcon(QIcon(":/connectinterface/nextIcon.png"));
} break;
case PublicAttributes::Theme::Dark: {
m_imageWidget->setStyleSheet("QWidget{background: #F6F6F6;}");
m_imageWidget->setStyleSheet("QWidget{background: #232426;}");
m_backImageBtn->setIcon(QIcon(":/connectinterface/backDarkIcon.png"));
m_nextImageBtn->setIcon(QIcon(":/connectinterface/nextDarkIcon.png"));
} break;

View File

@ -36,13 +36,13 @@ void BackgroundWin::paintEvent(QPaintEvent *event)
if (m_theme == PublicAttributes::Theme::Light) {
mainColor = QColor("#FFFEFD");
} else {
mainColor = QColor("#FFFEFD");
mainColor = QColor("#1D1D1D");
}
} else {
if (m_theme == PublicAttributes::Theme::Light) {
mainColor = QColor("#F6F6F6");
} else {
mainColor = QColor("#F6F6F6");
mainColor = QColor("#232426");
}
}
painter.setBrush(QBrush(mainColor));

View File

@ -85,7 +85,7 @@ ConnectedWin::ConnectedWin(QWidget *parent) : QWidget(parent)
titleWin->setLayout(layout);
m_backgroundWin = new BackgroundWin(this);
m_backgroundWin->setMinimumHeight(HEIGHT);
m_backgroundWin->setMinimumHeight(467);
m_backgroundWin->setBackground(true);
m_layout = new QHBoxLayout;
m_layout->setMargin(0);
@ -95,9 +95,7 @@ ConnectedWin::ConnectedWin(QWidget *parent) : QWidget(parent)
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->setMargin(0);
mainLayout->setSpacing(0);
mainLayout->addSpacing(44);
mainLayout->addWidget(titleWin);
mainLayout->addSpacing(24);
mainLayout->addWidget(m_backgroundWin);
setLayout(mainLayout);
}