Summary:
since from Qt 5.8 QtWayland destroys its surfaces every time
a window gets hidden and recreates them again when is shown
(that's how the protocol is defined) install the shadows
every time the window is shown, using a map to keep track of surfaces, in order to delete them on window hide and avoid leaks
Test Plan: popup menus have correct shadows on wayland now
Reviewers: #plasma, hpereiradacosta
Subscribers: anthonyfieroni, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5910
Summary:
The patch fixes progress bar color which now is always `QPalette::Highlight`. This leads to invisible bar contents for selected view items when we use `QStyleOptionProgressBar` inside item delegates. New version fixes this issue with setting `QPalette::Window` color if current state has `QStyle::State_Selected` flag.
Old version:
{F780631}
{F780630}
New version:
with `QPalette::Window`
{F780638}
with `QPalette::HighlightedText`
{F2673473}
with `QPalette::Window`
{F780637}
with `QPalette::HighlightedText`
{F2673474}
Delegate code should set correct state:
```
void MyDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
// ...
QStyleOptionProgressBar progressBarOption;
progressBarOption.state = option.state;
// ...
}
```
Test Plan: Tested on linux system (Arch x86_64) with Qt 5.7.0
Reviewers: #breeze, hpereiradacosta
Reviewed By: hpereiradacosta
Subscribers: plasma-devel, andreaska
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3697
On a desktop with 1.5 scaling the cursor sizes 24 (factor 1) and 48 (factor 2)
are both not very well suited. Therefore add a 1.5 scaled cursor, since it's a
common scaling factor.
For that I edited the build script and rebuilt everything with it, which also
replaced some unnecessary file duplicates with symlinks.
BUG: 348603
Reviewers: #plasma
Subscribers: plasma-devel, broulik
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4358
This results in the highlight in ComboBox popups being "cut-off" (it renders a white line there) at the bottom.
Differential Revision: https://phabricator.kde.org/D4426
Summary: Instead of always adding space for the sorting indicator in item view headers, only add it if sorting is enabled. Without this fix, operations such as QTreeView::resizeColumnToContents(..) will not result in a snug fit when the header section is wider than all items in the column.
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();
}
```
Notice how before applying this fix, there's space reserved for the sorting indicator even on the QTreeView that has sorting disabled.
Before the fix:
{F2405867}
After the fix:
{F2405871}
Reviewers: #breeze, hpereiradacosta
Reviewed By: hpereiradacosta
Subscribers: hpereiradacosta, cfeck, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4406