astan created this revision. astan added a reviewer: Breeze. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY This fixes the same problem as described in https://phabricator.kde.org/D4406 for Breeze. TEST PLAN #include <QApplication> #include <QTreeView> #include <QStandardItemModel> #include <QStandardItem> int main(int argc, char *argv[]) { QApplication app(argc, argv); // Test model QStandardItemModel model(3, 2); model.setHorizontalHeaderLabels({ "Header 1", "Header 2" }); for (int row = 0; row < 3; ++row) { for (int column = 0; column < 2; ++column) { model.setItem(row, column, new QStandardItem("Foo")); } } // View with sorting disabled QTreeView view; view.setWindowTitle("Sorting Disabled"); view.setModel(&model); view.show(); view.resizeColumnToContents(0); // View with sorting enabled QTreeView viewWithSorting; viewWithSorting.setWindowTitle("Sorting Enabled"); viewWithSorting.setModel(&model); viewWithSorting.setSortingEnabled(true); viewWithSorting.show(); viewWithSorting.resizeColumnToContents(0); return app.exec(); } REPOSITORY R113 Oxygen Theme BRANCH fix-unsortable-item-view-header-size REVISION DETAIL https://phabricator.kde.org/D4410 AFFECTED FILES kstyle/oxygenstyle.cpp EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: astan, #breeze Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas