https://bugs.kde.org/show_bug.cgi?id=508373

            Bug ID: 508373
           Summary: Visual artifact when using QTabBar in DocumentMode in
                    vertical orientation
    Classification: Plasma
           Product: Breeze
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: QStyle
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

Created attachment 184171
  --> https://bugs.kde.org/attachment.cgi?id=184171&action=edit
Screenshot of the reproducer showing grayish artifacts between unselected tabs

SUMMARY
Hi Breeze-Crew! When using a QTabWidget in vertical orientation and
DocumentMode it is showing grayish areas between unselected tabs which looks
quite ugly (see attached screenshot showing the reproducing code below).
I assume this is a regression as similar code as shown below has been used in
Kdenlive for a long time. No such artifacts artifacts are visible with
documentMode set to false or when not using Breeze but Fusion application
style.

STEPS TO REPRODUCE
```
#include <QApplication>
#include <QTabWidget>
#include <QWidget>
#include <QVBoxLayout>
#include <QLabel>
#include <QStyleFactory>
#include <QIcon>
#include <QStyle>

int main(int argc, char *argv[])
{
    // This code reproduces the bug with QTabWidget when:
    // 1. documentMode is set to true
    // 3. tab position is set to East or West (vertical tabs)
    // 4. using Breeze application style (Does not happen on Fusion)
    // Then, you can see that there are gray rectangular areas shown in betwwen
unselected tabs

    QApplication app(argc, argv);

    app.setStyle(QStyleFactory::create("breeze"));

    QWidget window;
    window.setWindowTitle("QTabWidget Breeze Bug Reproducer");
    window.resize(300, 300);

    QVBoxLayout *mainLayout = new QVBoxLayout(&window);

    // Create QTabWidget with document mode enabled
    QTabWidget *tabWidget = new QTabWidget();
    tabWidget->setDocumentMode(true);
    tabWidget->setTabPosition(QTabWidget::East);

    // Create some content widgets
    QWidget *page1 = new QWidget();
    QWidget *page2 = new QWidget();
    QWidget *page3 = new QWidget();
    QWidget *page4 = new QWidget();

    QVBoxLayout *layout1 = new QVBoxLayout(page1);
    QVBoxLayout *layout2 = new QVBoxLayout(page2);
    QVBoxLayout *layout3 = new QVBoxLayout(page3);
    QVBoxLayout *layout4 = new QVBoxLayout(page4);

    layout1->addWidget(new QLabel("File Info Page"));
    layout2->addWidget(new QLabel("Properties Page"));
    layout3->addWidget(new QLabel("Audio Properties Page"));
    layout4->addWidget(new QLabel("Metadata Page"));

    // Add tabs with icon-only (empty text). This is how its used in Kdenlive
but it also reproduces with additional text.
    tabWidget->addTab(page1, QString());
    tabWidget->addTab(page2, QString());
    tabWidget->addTab(page3, QString());
    tabWidget->addTab(page4, QString());

    // Set icons for the tabs (using system icons). Also reproduces without
icons.
    tabWidget->setTabIcon(0, QIcon::fromTheme("edit-find"));
    tabWidget->setTabIcon(1, QIcon::fromTheme("document-edit"));
    tabWidget->setTabIcon(2, QIcon::fromTheme("audio-volume-high"));
    tabWidget->setTabIcon(3, QIcon::fromTheme("view-grid"));

    mainLayout->addWidget(tabWidget);

    window.show();

    return app.exec();
}
```

Build (you may need to adjust this but it works on my system Arch Linux):
```
g++ -I/usr/include/qt6 -I/usr/include/qt6/QtWidgets -I/usr/include/qt6/QtCore
-I/usr/include/qt6/QtGui  -o qtabwidget_breeze_bug_reproducer
qtabwidget_breeze_bug_reproducer.cpp -lQt6Widgets -lQt6Core -lQt6Gui
```

```
./qtabwidget_breeze_bug_reproducer
```


OBSERVED RESULT
Unselected tabs are partially obstructed by this grayish overlay in between.


EXPECTED RESULT
No gray overlays, unselected tabs should not be obstructed and be clearly
visible like the selected tab.

SOFTWARE/OS VERSIONS
Arch Linux, Breeze 6.4.4, KDE Frameworks 6.17, Qt 6.9.1
But I received confirmation from a Windows user reporting the same visuals.
Also tried earlier library versions used in Kdenlive 24.12 and it's also
showing there so probably not a recent change / regression.

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to