Sometimes button labels in a ToolButton without icon and a ToolButton
with icon are not vertically aligned even if all buttons have the same
height. This is caused by double-to-int.
The original top padding `(contentsRect.height() - textSize.height()) / 2`
can be rounded down, and when the padding is rounded down, so
`contentsRect.height() - padding - textSize.height() ≠ padding`.
After this change, textRect is calculated based on the remaining space.
For example, `contentsRect.height() = 32`, and `textSize.height() = 15`,
so the padding is 8. Before this commit, the bottom padding will be
`32 - 8 - 15 = 9 ≠ 8`. After this change, the bottom padding is the
same as the top padding (8), so the visual glitch is fixed.
The cursor build scripts generate pngs that are too small when using Inkscape 0.92 or later due to Inkscape changing its default dpi from 90 to 96. Changed script to use width and height flags as they produce png files with correct dimensions on all Inkscape versions.
BUG: 453365
This reverts commit 3fe906b0bc.
Despite the attempt to hack dynamically swapping metrics
into working by simulating a StyleChanged event, this
doesn't work with many controls and ends up just causing
layout bugs and inconsistencies, and we agreed on
preferring consistent but undynamic vs dynamic and inconsistent.
Since data view headers are not the content the user is trying
to peruse, having them be the same size as an actual cell of data
(or larger) doesn't really make sense.
Instead, they can be made smaller, which gives more room to the
content the user is looking for, and helps make the distinction
between header/data more visible.
- buttons now flatten
- default buttons don't show their blue colour, because, they aren't the
button that'll get triggered on enter if their window isn't active
On touch devices, the default decoration button size is rather hard
to use. We have a thing to detect this however, KWin's Tablet Mode.
Using that, we can change button sizes based on this. Rather than
changing which size to use, change the base unit so we don't mess
around with config values.
Now interactive UI elements get bigger when in Tablet mode, and return
to normal size when out of it. This is automatic, and currently there
is no UI to manually control it.
Sending a stylechanged event makes everything to be reevaluated but
the style instance doesn't get actually reloaded, so this is still
manageable, resource-wise.
CCBUG: 418904
This commit fixes the glitches in titlebar caption when it is updated near
the edge. These glitches were caused by the Titlebar_SideMargin being
multiplied by the incorrect largeSpacing factor when smallSpacing is used
in every other instance.
BUG: 418517
Showing focus/hover/etc. often looks strange/inconsistent without frames
on all sides, so if we're drawing on frames other than all sides, don't
show those states. It's also more consistent with the style we're trying
to emulate, which doesn't show focus/hover on separator lines between
views.
The geometry of the the title bar is not being correctly updated. The bug affects all C++-based window decorations (breeze, oxygen, even lightly) and can be observed when there isn't any title bar buttons to the left of the caption and the caption is changed (e.g. changing directories in dolphin), regardless of the alignment as long as the caption becomes close to the left edge. This makes sure that updateTitlebar sets the title bar's geometry in Decoration coordinates.
BUG: 418517
This fixes the contrast of tabs on dark themes by using
a darkening factor on the Window colour, adjusted for
whether it's light or dark, instead of using the Shadow
colour for both light and dark themes.
BUG: 438627
FIXED-IN: 5.25
Don't blend window background (default white) with selected text color
(also white), as this results in unreadable combinations. Instead, blend
it with the normal color.
BUG: 438964
FIXED-IN: 5.24.2
This prevents situations where menus take up excessive
amounts of the screen's area by overflowing into columns
instead of scrolling. Also matches our QtQuick behaviour.
BUG: 54716
FIXED-IN: 5.25
An idea from Nate.
This commit literally just adds support for https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1304 to Breeze Classic.
This is what it will look like with this commit applied (just not under a different name):

If we're changing the font size when painting we need to change the
fontSize when calculating the contents size too otherwise you end up
with things that don't fit
BUGS: 450333