QPainter's auto-scaling is prone to off-by-one rounding errors and draws on
fractional coordinates. With this change, we paint on a 1x DPR QPainter and
scale the shadow offset and strength manually based on DPR.
This resolves an issue with resulting in seams on the right and bottom
edges of a menu due to shadow boundaries being off-by-one.
BUG: 418166
v2: remove unrelated formatting changes
v3:
- move the DPR helper to ShadowHelper
- retrieve the DPR from the widget instead of the global QGuiApplication
- added BUG reference
The previous way it was painted was kind of messy in the sense that
other parts overlapped with the active tab when they shouldn't have or
didn't overlap enough like with the highlight. There were also some
painting artifacts that were just weird and are now gone.
- Use a very slight gradient
- Use blue for pressed state
- Make shadow vertical, not diagonal
- Use gray for checked buttons
Some people thought blue checked buttons were pretty, but some people
thought they demanded too much attention. In order to merge the changes
faster, I switched to using gray for checked buttons.
This reverts commit 2f351fe101.
We hve not yet figured out how to apply this style consistently
and were unable to implement it for controls other than text fields
in Plasma 5.21, so it is better to remove it for now than to have an
inconsistent UI. We will re-evaluate this for Plasma 5.22.
BUG: 430944
BUG: 430943
BUG: 433421
FIXED-IN: 5.21.2
Task related : Figure out a good UI for the "show which settings have been changed" feature https://phabricator.kde.org/T13008
This patch introduces a new property to allow to highlight some widgets when we want to draw user's attention on specific widgets.
Summary:
Our icons can be recolored. However there is a difference between custom colors
on widgets and icons. We will respect the palette but KIconLoader that creates
the icon pixmaps operates on an application wide palette basis. This can create
miscolored icons when a widget has a custom palette. A helper function is
introduced to load the pixmaps that switches the palette of the global
KIconLoader if necessary and resets it appropriately.
Test Plan:
Before:
{F8205856}
After:
{F8205857}
Reviewers: #breeze, ndavis, cblack, hpereiradacosta, mart
Reviewed By: cblack, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28433
Summary:
Every time Breeze needs to check whether given widget has an alpha
channel, it makes a synchronous X call to figure out whether a
compositing window manager is running on a particular screen. This
is inefficient!
Luckily for us, Qt XCB QPA monitors compositing manager selections
and caches the ownership status of each one. That cached ownership
data can be accessed via QX11Info::isCompositingManagerRunning().
Reviewers: #plasma, hpereiradacosta
Reviewed By: hpereiradacosta
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26978
Summary:
Since Qt 4 style plugin had been dropped, we can use QX11Info::connection()
directly.
Reviewers: hpereiradacosta
Reviewed By: hpereiradacosta
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27000
Summary:
KWindowSystem cannot be used in the Qt 4 style plugin. On the other hand,
we need to use KWindowSystem to make QWidget-based internal clients in
KWin cast drop-shadows.
Another problem with the Qt 4 style plugin is that some distributions
have already dropped Qt 4, so one has to build it first in order to
verify that his or her change works with Qt 4.
Given maintenance burden and the fact that Qt 6 is around the corner,
this change drops the Qt 4 style plugin.
Reviewers: #kwin, #plasma, davidedmundson
Reviewed By: #kwin, #plasma, davidedmundson
Subscribers: davidedmundson, mart, plasma-devel
Tags: #plasma
Maniphest Tasks: T12496
Differential Revision: https://phabricator.kde.org/D26476
Summary:
This look makes listviews look way better, not having the selected
items look truncated into nothingness.
Always display "big" handles, due to the numerous complaints of the slim handles not being obvious
Test Plan:
Before:
{F7882628}
After:
{F7882624}
Reviewers: #plasma, #breeze, #vdg, ngraham, hpereiradacosta
Reviewed By: #vdg, ngraham, hpereiradacosta
Subscribers: ndavis, ahiemstra, hpereiradacosta, mthw, plasma-devel
Tags: #plasma
Maniphest Tasks: T9126
Differential Revision: https://phabricator.kde.org/D26655
Summary: This patch reduces the amount of duplicate code and makes every part of the helper functions use the correct frame radius.
Reviewers: #breeze, #plasma, hpereiradacosta, ngraham
Reviewed By: hpereiradacosta
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26225
Summary:
The replaced numbers are directly related to the width of the pen.
This patch likely doesn't replace all of the numbers that could be replaced.
It just replaces the ones I'm currently certain of being related to pen width.
The goal is to make the code show the intent of the designer.
Reviewers: #breeze, #plasma, hpereiradacosta, ngraham
Reviewed By: #breeze, hpereiradacosta, ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26217
Summary:
This patch makes other helper functions reuse more code by calling these shadow rendering functions instead of defining their own shadows.
The shadows are perfectly shaped, tested up to 8x scaling.
Without this patch, the radius of the shadows for checkboxes is slighly too wide and there is a gap between the inside edge of the radio button shadow and the outside edge of the radio button.
Shadow rendering performance has also been improved a bit.
Test Plan:
run `QT_SCALE_FACTOR=8 oxygen-demo5` and examine the shadows. You can try higher scaling levels, but that's overkill.
8x scaling
before: {F7824689, size=full} {F7824691, size=full}
after: {F7824692, size=full} {F7824693, size=full}
Reviewers: #breeze, hpereiradacosta, #plasma
Reviewed By: hpereiradacosta
Subscribers: ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26094
Summary:
Before this patch, the outline of the rubberband selection control was down and to the right half a pixel too far.
This wasn't visible at 1x scaling because of the lack of antialiasing, but resulted in the top/left being too thin and bottom/right being too thick on high DPI displays.
To fix the issue, I enabled antialiasing and moved all sides inwards by half a pixel so that the outline would be pixel perfect.
I also added a function to get a QRectF with the correct size and position for rectangles with pen strokes.
Test Plan:
- Open dolphin and make a selection with the mouse
- Go to a Folder View Plasma widget and make a selection with the mouse
2x scaling
before: {F7818498, size=full}
after: {F7818500, size=full}
3x scaling
before: {F7818484}
after: {F7818483}
Reviewers: #vdg, #breeze, #plasma, hpereiradacosta, broulik
Reviewed By: hpereiradacosta
Subscribers: broulik, plasma-devel
Tags: #plasma, #breeze, #vdg
Differential Revision: https://phabricator.kde.org/D26001
Summary: It bothered me that the groove for dials doesn't match the maximum area that the contents can use.
Test Plan:
Old: {F7366118, size=full}
New: {F7366127, size=full}
Reviewers: #vdg, #breeze, ngraham
Reviewed By: #vdg, #breeze, ngraham
Subscribers: ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24008
Special background for groupboxes, menus, etc is now handled directly in the painting routine rather than adjusting
the palette. This was indeed breaking palette inheritance, and requiring hacks that apparently posed some performance
regressions.
- check documentMode to decide tab background color.
BUG: 356561
BUG: 356343
- Properly round menu item selection for first and last item in menu, to not overlap with menu rounding.
- Added suttle outline around focus rect in menus
old-style light focus (simple line under item text) is still available as a (hidden) option
One must add "MenuItemDrawStrongFocus=false" to breezerc, whereever it is saved.
CCMAIL: jamboarder@gmail.com