!66 fix(ui): tab样式适配主题

Merge pull request !66 from zy-yuan1/nile0219
This commit is contained in:
赵世旭 2024-03-01 03:30:03 +00:00 committed by Gitee
commit 6955df5e6c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 3 deletions

View File

@ -104,7 +104,6 @@ void SinglePage::initWindowProperties()
{
QPainterPath path;
auto rect = this->rect();
path.addRoundedRect(rect, 12, 12);
path.addRect(rect);
KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); //背景模糊
}
@ -159,7 +158,7 @@ void SinglePage::paintEvent(QPaintEvent *event) {
QPainterPath rectPath;
col.setAlphaF(m_transparency);
rectPath.addRoundedRect(this->rect(),12,12);
rectPath.addRect(this->rect());
painter.setBrush(col);
painter.drawPath(rectPath);

View File

@ -332,7 +332,7 @@ void MainWindow::initUI()
m_centralWidget = new QTabWidget(this);
this->setCentralWidget(m_centralWidget);
m_centralWidget->tabBar()->setFixedWidth(this->width()+1);
m_centralWidget->tabBar()->setProperty("setRadius", 12);
// m_centralWidget->tabBar()->setProperty("setRadius", 12);
// m_centralWidget->tabBar()->setStyleSheet("QTabBar::tab{min-height:40px}");
m_lanWidget = new LanPage(m_centralWidget);
m_wlanWidget = new WlanPage(m_centralWidget);