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
Use window manager to handle window move when dragging from free space
also with QtQuickControls.
Registering QQuickItems is hacky, because there is no Style::polish
for QtQuickControls, so those items are now registered from ::isQtQuickControl.
Differential Revision: https://phabricator.kde.org/D3578
Summary:
Some mono apps (e.g. KeePass) look for a `top_left_arrow` cursor file instead
of the usual `left_ptr` cursor. Breeze doesn't ship such file, which
means that those mono apps have an ugly mouse cursor on Plasma (see
http://i.imgur.com/D4isxCn.png).
This patch just adds a top_left_arrow -> left_ptr symlink (both for Breeze and
Breeze_Snow).
Test Plan:
`ln -s /usr/share/icons/breeze_cursors/cursors/left_ptr ~/.icons/breeze_cursor/cursors/top_left_arrow`
With such symlink, mono apps use the breeze cursor as expected.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3459
Summary:
as the last part of the new design, try to not have arrows
in the scrollbars by default (just change of default,
all the functionality is there)
Test Plan: default is correctly picked up
Reviewers: #plasma, #vdg, hpereiradacosta
Reviewed By: hpereiradacosta
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3378
Summary:
make scrollbars size configurable with an enum, letting 3
allowed values, small, medium, large preferring it over
letting the user fiddle with pixel values
the default now is a tiny scrollbar.
(that can be done instead if needed)
Test Plan:
tried the 3 different values and checked that it updates
on the fly
Reviewers: #plasma, #vdg, hpereiradacosta
Reviewed By: hpereiradacosta
Subscribers: colomar, alex-l, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3210