- 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.
We've gotten some feedback that radio buttons look like big creepy eyes
that are staring at you. To reduce that effect, this commit makes the
center dots a bit smaller.
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
This reverts commit 7e678c344b and the followup.
A B
+-----+ +-----+ C
| | |XXXXX| +---+
| XXX | |X X| |XXX|
| XCX | |X C X| |XCX|
| XXX | |X X| |XXX|
| | |XXXXX| +---+
+-----+ +-----+
Initially it was A, the referenced commit changed it to be B instead, which
created a 1px gap between frame and content, and the followup avoids that gap
by adjusting the frame width, resulting in C.
Although it's consistent, it leads to a worse apperance in places where the 1px
margin between frame and rect was expected.
The documentation for 'QPainter::drawRoundedRect' [1]
says:
"A filled rectangle has a size of rect.size(). A stroked
rectangle has a size of rect.size() plus the pen width."
Therefore, the frame rect passed to that method needs to
be adjusted according to the pen width for the case where
the rect is stroked (i.e. an outline exists), and no
adjustement is needed when the rect is not stroked so
that
[size of rect] + [outline width] = [wanted total size]
The default pen size is 1 (which is also the value
of 'PenWidth::Frame' used to calculate the radius for the
outline a few lines further down).
For the case that an outline exists, the adjustment of
the rect already happens in the call to 'Helper::strokedRect',
so there is no need for reducing the rect by one additional
pixel on each side, which resulted in the frame border
unnecessarily not being right at the inner edge of the
rect, but one additional pixel "further inside".
It looks like the additional adjustment was originally added
by commit 3dbcea7e59
("Changed frame width to 2, to cope with focus rect.",
2014-07-30), later adapted by commit
f288c34c3e
("Render 2px focused outline *inside* frames rather than outside",
2014-08-11) and commit 2985b4cb6b
("use one pixel for focus frame instead of 2", 2014-09-22).
While 'Metrics::Frame_FrameWidth' still has the value 2,
it is not used here at all, so the default pen width of 1
applies.
Therefore, drop the extra adjustment in order for the
stroke to be drawn right at the edge of the rect.
[1] https://doc.qt.io/qt-5/qpainter.html#drawRoundedRect
BUG: 428973
Currently the condition in the #if directive evaluates to false (sorry
for breaking it!).
In order to prevent breaking Helper::isX11() in the future, this change
removes the #if directive. It's okay to do so because KWindowSystem
provides a platform-independent API.
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:
Caused icons to be not longer recolored when changing the color scheme until an
application is started again
Test Plan: Change color scheme while having an application open, icons should change color correctly
Reviewers: #breeze, #plasma, ndavis
Reviewed By: #breeze, ndavis
Subscribers: ndavis, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29012
Summary: Caused some icons not be colored correctly
Test Plan: Close KWrite with unsaved changes, all icons should be colored correctly
Reviewers: broulik, ngraham
Reviewed By: broulik, ngraham
Subscribers: ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28830
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 reverts commit c9aa535863.
Also makes the small down arrow pixel perfect. I will make the other arrows pixel perfect in a separate patch.
After D19890 (27bcd1be9c) was reopened, there was some discussion about the reason it was reverted and the problems it introduced. It is possible that an icon could partially cover this arrow, but it seemed uncommon enough that ignoring the problem was deemed acceptable. The type of control that this arrow is used for is also pretty uncommon because it does not feel very good to use with a mouse or touchpad.
Reviewers: #vdg, #breeze, #plasma, hpereiradacosta, ngraham
Reviewed By: #vdg, #breeze, ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26139
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:
Add some const & for things that return const & so there's no need to make a copy
Add a std::move for a thing that we pass by copy and it's just saved in another variable
Reviewers: zzag
Reviewed By: zzag
Subscribers: zzag, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24614
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
Summary:
This fixes the colors of things like context menus and application menus
T11124#193132
Test Plan:
Old:
{F7096221}
New:
{F7248348}
Reviewers: #vdg, #breeze
Subscribers: hpereiradacosta, mglb, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23170
Summary:
Remove unneeded 1 pixel margin around side panels, namely QAbstractScrollArea with property _kde_side_panel_view set to true.
In order to be able to still draw a vertical line on the side of the list, a one pixel margin is kept, on this side only, using SE_FrameContent subelementRect
The viewport background is kept to QPalette::Base, as for regular lists.
The logic in polishScrollArea has been adjusted accordingly
Differential Revision: https://phabricator.kde.org/D22138
This reverts commit 27bcd1be9c.
The change in question has the potential to introduce regressions with
alternative icon themes, and in retrospect is not necessary for the
feature it was created in support of (https://phabricator.kde.org/D19311)
Summary:
Changes the drawing of inline indicators with QToolButtons so that it
is drawn as a small arrow in the lower right corner.
Test Plan: Show QToolButton with Menu and PopupDelay enabled
Reviewers: #vdg, #breeze, ngraham
Reviewed By: #vdg, #breeze, ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19890
Summary: I tested a bit of code with -02 to measure the speed gains of using a std::initializer_list over appending to a temporary and appending to temporary is around 50% slower, so I removed all the code that appened to temporaries for a initializer list in breeze.
Reviewers: #breeze, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, ngraham, zzag, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D13591