[Differential] [Request, 4 lines] D4410: Fix header content size when sorting is disabled
Elvis Stansvik
noreply at phabricator.kde.org
Thu Feb 2 17:06:10 UTC 2017
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170202/2a92e824/attachment.html>
More information about the Plasma-devel
mailing list