@@ -4397,60 +4397,15 @@ bool Style::drawFrameTabWidgetPrimitive(const QStyleOption *option, QPainter *pa
43974397// ___________________________________________________________________________________
43984398bool Style::drawFrameTabBarBasePrimitive (const QStyleOption *option, QPainter *painter, const QWidget *widget) const
43994399{
4400- // tabbar frame used either for 'separate' tabbar, or in 'document mode'
4401-
4402- // this is the empty part of the tab area
4403-
4404- // cast option and check
4405- const auto tabOption (qstyleoption_cast<const QStyleOptionTabBarBase *>(option));
4406- // get rect, orientation, palette
4407- const auto rect (option->rect );
4408-
4409- if (!tabOption)
4410- return true ;
4411-
4412- // setup painter
4413- painter->setRenderHint (QPainter::Antialiasing, false );
4400+ const auto *tabOption = qstyleoption_cast<const QStyleOptionTabBarBase *>(option);
4401+ if (!tabOption)
4402+ return true ;
44144403
4415- // precaution don't change the alpha channel if the tabbar opacity is at 100
4416- if ((_isDolphin || _isKonsole) && (StyleConfigData::tabBarOpacity () < 100 ) && !_isOpaque) {
44174404 QColor backgroundColor = _helper->transparentBarBgColor (widget->palette ().color (QPalette::Window), painter, widget->rect (), BarType::TabBar);
4418- painter->setBrush (backgroundColor);
4419- painter->fillRect (rect, backgroundColor);
4420- } else {
4421- const auto outline (QColor (0 , 0 , 0 , 1 ));
4422-
4423- painter->setBrush (Qt::NoBrush);
4424- painter->setPen (QPen (outline, 1 ));
4425-
4426- // render
4427- switch (tabOption->shape ) {
4428- case QTabBar::RoundedNorth:
4429- case QTabBar::TriangularNorth:
4430- painter->drawLine (rect.bottomLeft () - QPoint (1 , 0 ), rect.bottomRight () + QPoint (1 , 0 ));
4431- break ;
4432-
4433- case QTabBar::RoundedSouth:
4434- case QTabBar::TriangularSouth:
4435- painter->drawLine (rect.topLeft () - QPoint (1 , 0 ), rect.topRight () + QPoint (1 , 0 ));
4436- break ;
4437-
4438- case QTabBar::RoundedWest:
4439- case QTabBar::TriangularWest:
4440- painter->drawLine (rect.topRight () - QPoint (0 , 1 ), rect.bottomRight () + QPoint (1 , 0 ));
4441- break ;
4442-
4443- case QTabBar::RoundedEast:
4444- case QTabBar::TriangularEast:
4445- painter->drawLine (rect.topLeft () - QPoint (0 , 1 ), rect.bottomLeft () + QPoint (1 , 0 ));
4446- break ;
4405+ painter->fillRect (widget->rect (), backgroundColor);
44474406
4448- default :
4449- break ;
4450- }
4451- }
4452-
4453- return true ;
4407+ const QRect baseRect = option->rect ;
4408+ return true ;
44544409}
44554410
44564411// ___________________________________________________________________________________
@@ -7252,14 +7207,14 @@ bool Style::drawTabBarTabShapeControl(const QStyleOption *option, QPainter *pain
72527207 // opacity only target dolphin and konsole
72537208 // if ((_isDolphin || _isKonsole) && (StyleConfigData::tabBarOpacity() < 100) && (widget->parentWidget()->inherits("DolphinTabWidget") ||
72547209 // widget->parentWidget()->inherits("Konsole::TabbedViewContainer"))) {
7255- if ((_isDolphin || _isKonsole) && (StyleConfigData::tabBarOpacity () < 100 ) && !_isOpaque) {
7256- // override the tab background color if adjustToDarkThemes is false
7257- if (StyleConfigData::adjustToDarkThemes ()) {
7258- backgroundColor = _helper->transparentBarBgColor (backgroundColor, painter, rect, BarType::TabBar);
7259- } else {
7260- backgroundColor = _helper->transparentBarBgColor (_toolsAreaManager->palette ().color (QPalette::Window), painter, rect, BarType::TabBar);
7261- }
7262- }
7210+ // if ((_isDolphin || _isKonsole) && (StyleConfigData::tabBarOpacity() < 100) && !_isOpaque) {
7211+ // // override the tab background color if adjustToDarkThemes is false
7212+ // if (StyleConfigData::adjustToDarkThemes()) {
7213+ // backgroundColor = _helper->transparentBarBgColor(backgroundColor, painter, rect, BarType::TabBar);
7214+ // } else {
7215+ // backgroundColor = _helper->transparentBarBgColor(_toolsAreaManager->palette().color(QPalette::Window), painter, rect, BarType::TabBar);
7216+ // }
7217+ // }
72637218
72647219 // shadow size
72657220 constexpr int shadowSize = 4 ;
0 commit comments