Also add disabled buttons to the PC3 Button test
The minimum size test didn't make any sense. You don't normally set the implicitWidth of a button to Layout.minimumWidth in a Layout.
This fixes the mismatched default sectionDelegate compared to PlasmaComponents.ListItem,
where it was default false and this was default true.
BUG: 425769
Having the macro's definition of the operator| in the namespace of the
flags argument improves/unbreaks things for the argument-dependent
lookup of unqualified function names, e.g. when flags are combined in
calls of other methods, but there is some other operator| defined in the
namespace of the current code.
Given Q_DECLARE_OPERATORS_FOR_FLAGS creates inlined functions, this
should be a source and binary compatible change.
Qt did similar for Qt 5.12 in
https://codereview.qt-project.org/c/qt/qtbase/+/225348
Updated the tests so that you can see if the aspect ratio is correct.
Made an animated transition for when `control.running` is false.
Removed the code that updates the RotationAnimator when control.running changes since it didn't work.
Set padding to 0 (see comment).
BUG: 425504
Rather than duplicating the behaviors in both Button.qml and ToolButton.qml, leading to bugs and inconsistencies, the Button/ToolButton background code is split into separate reusable files. The correct background is used depending on whether or not flat mode is enabled.
BUG: 425174
This fixes installation on Windows.
An alternative solution would have been to dynamically create the symlinks
in the install step, on Linux, and to copy them on Windows.
01:05:07.444 CMake Error at src/desktoptheme/breeze-dark/cmake_install.cmake:43 (file):
01:05:07.444 file INSTALL cannot read symlink
01:05:07.444 "C:/_/acd4f350/plasma-framework-5.71.0/src/desktoptheme/breeze-dark/widgets/plasmoidheading.svgz"
01:05:07.444 to duplicate at
01:05:07.444 "C:/Craft/BC/windows-mingw_64-gcc/build/kde/frameworks/tier3/plasma-framework/image-RelWithDebInfo-5.71.0/Craft/BC/windows-mingw_64-gcc/bin/data/plasma/desktoptheme/breeze-dark/widgets/plasmoidheading.svgz":
01:05:07.444 No such file or directory.
01:05:07.444 Call Stack (most recent call first):
01:05:07.444 src/desktoptheme/cmake_install.cmake:40 (include)
01:05:07.444 src/cmake_install.cmake:41 (include)
01:05:07.444 cmake_install.cmake:109 (include)
The toolbutton-hover margins need to be inconsistent with the hover margins because 3rd party themes expect this inconsistent behavior now.
BUG: #425255
This reverts commit 7062c635a9.
Unfortunately, 3rd party themes were still broken after this commit was made because it didn't fix the real issue.
The real issue is that toolbutton-hover is supposed to have margins, but it didn't have real margins due to a previous patch to `button.svg`.
3rd party themes depend on hover and toolbutton-hover being used in inconsistent ways because of past behavior.
Unfortunately, they have to be inconsistent again
to not break themes.
Previously, it was trying to use the margins of toolbutton-hover for flat buttons, but toolbutton-hover doesn't have real margins (0.001 since 0 isn't valid).
BUG: #425255
Non-flat ToolButtons are supposed to have a shadow, but flat ToolButtons
are not. The ternary providing this was inverted so that the reverse was
true.
QQC2 controls gain activeFocus on press this is a difference to controls 1
which had activeFocusOnPress property that defaulted to false. qqc2-desktop-style
also only sets the focus flag if it was gained via keyboard (kquickstyleitem.cpp:705).
BUG:424446
For the following reasons:
- It can break and look bad on Plasma Mobile which uses the Plasma style
- It makes buttons with icons and short text look visually unbalanced
- QStyle and QML desktop style buttons do not do this so it's a source
of inconsistency
Tests are adjusted to all pass. Stuff looks better to my eye.
Fixes common and frequent crashes introduced by 6c627ea044.
Otherwise the engine will try to delete it. The docs say:
NOTE: A QObject singleton type instance returned from a singleton type provider
is owned by the QML engine unless the object has explicit
QQmlEngine::CppOwnership flag set.
A lambda can only be converted to a function pointer if it does not capture
anything. Just specifying a default capture even if it does not capture anything,
prevents this. In newer Qt this actually ended up calling the std::function
(which is much heavier than function pointers) overload which was introduced
only after Qt 5.12.